@qawolf/cli 2.10.0 → 2.11.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
@@ -17953,8 +17953,41 @@ function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
17953
17953
  });
17954
17954
  }
17955
17955
 
17956
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/decision.js
17957
+ var promotionDecisionTypeSchema = _enum(["picked-by-run", "combined", "kept-more-checks", "needs-person"]).describe("picked-by-run (exactly one version passed, so it was kept), combined (every version passed and they check different things, so they were merged), kept-more-checks (every version passed and one checks more, so it was kept), needs-person (every version failed or the runs could not tell them apart, so a person decides).");
17958
+ var promotionCandidateSchema = _enum(["head", "base", "combined"]).describe("head (the head environment's version), base (the base environment's version), combined (the resolver's combination of the two).");
17959
+ var promotionCandidateOutcomeSchema = _enum(["passed", "failed", "inconclusive"]).describe("How the version did in its run. inconclusive: it passed in some attempts and failed in others, or the run did not finish.");
17960
+ var makePromotionDecisionSchema = (ids) => object({
17961
+ candidateRuns: array(object({
17962
+ candidate: promotionCandidateSchema,
17963
+ outcome: promotionCandidateOutcomeSchema,
17964
+ runId: ids.run
17965
+ })).describe("The run of each version the decision relied on."),
17966
+ kept: promotionCandidateSchema.optional().describe("The version kept. Present for picked-by-run and kept-more-checks."),
17967
+ path: string2().describe("The conflicting path this decision is about."),
17968
+ reason: string2().describe("Why, in a sentence or two a person can read."),
17969
+ sourceCommitHash: string2().describe("The head commit of the conflict this decision was made for."),
17970
+ targetCommitHash: string2().describe("The base commit of the conflict this decision was made for."),
17971
+ type: promotionDecisionTypeSchema
17972
+ });
17973
+
17974
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/needsPerson.js
17975
+ var promotionNeedsPersonReasonSchema = _enum([
17976
+ "undecided-paths",
17977
+ "run-limit-reached",
17978
+ "flows-undetermined",
17979
+ "agent-stopped",
17980
+ "agent-failed",
17981
+ "agent-not-started",
17982
+ "agent-resolution-off"
17983
+ ]).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
+ var promotionNeedsPersonSchema = object({
17985
+ paths: array(object({ path: string2() })).optional().describe("The paths left undecided. Present for undecided-paths."),
17986
+ reason: promotionNeedsPersonReasonSchema
17987
+ });
17988
+
17956
17989
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/validationRun.js
17957
- var resolutionRunModeSchema = _enum(["confirm-after"]).describe("Why a promotion conflict resolution task runs flows. confirm-after confirms a finished resolution before it is submitted.");
17990
+ var resolutionRunModeSchema = _enum(["confirm-after", "choose-version"]).describe("Why a promotion conflict resolution task runs flows. confirm-after confirms a finished resolution before it is submitted; choose-version runs one version of an undecided path to choose between them.");
17958
17991
  var makePromotionValidationRunSchema = (ids) => object({
17959
17992
  aiTaskId: ids.aiTask.describe("The resolution task that started the run."),
17960
17993
  runId: ids.run,
@@ -17982,8 +18015,10 @@ var makePromotionResourceSchema = (ids) => resource({
17982
18015
  baseEnvironmentId: ids.environment.describe("The environment the flow changes promote into."),
17983
18016
  conflict: conflictSchema.optional().describe("The conflict awaiting resolution. Present while status is conflicted or resolving. A resolution must name both commit hashes and cover exactly these paths; if either branch moves, the conflict is recomputed and this changes."),
17984
18017
  createdAt: exports_iso.datetime().describe("When the promotion was requested."),
18018
+ decisions: array(makePromotionDecisionSchema(ids)).optional().describe("How the resolution agent settled each conflicting path it decided by running the versions, or why it left one for a person. Absent when it reported none."),
17985
18019
  headEnvironmentId: ids.environment.describe("The environment whose flow changes are promoted."),
17986
18020
  id: ids.promotion,
18021
+ needsPerson: promotionNeedsPersonSchema.optional().describe("Present while the current conflict waits on a person, with why. Absent once a resolution is submitted, the conflict is recomputed, or the promotion settles."),
17987
18022
  promotedCommitHash: string2().optional().describe("The commit the promotion landed on the base environment's flow code branch. Present when status is promoted."),
17988
18023
  settledAt: exports_iso.datetime().optional().describe("When the promotion reached promoted, no-changes or abandoned. Absent while it is open."),
17989
18024
  status: promotionStatusSchema,
@@ -18046,6 +18081,53 @@ var makeGetPromotionContract = (ids) => {
18046
18081
  };
18047
18082
  };
18048
18083
 
18084
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/reportDecision.js
18085
+ var keptIsRequiredFor = new Set(["kept-more-checks", "picked-by-run"]);
18086
+ var makeReportPromotionDecisionContract = (ids) => {
18087
+ const candidateRun = (version) => object({
18088
+ outcome: promotionCandidateOutcomeSchema,
18089
+ runId: ids.run.describe(`The run of ${version}, started for this promotion's resolution.`)
18090
+ }).optional().describe(`How ${version} did when it ran. Omit when it did not run.`);
18091
+ const input = object({
18092
+ base: candidateRun("the base environment's version"),
18093
+ combined: candidateRun("the resolver's combination of both versions"),
18094
+ decision: promotionDecisionTypeSchema,
18095
+ expectedSourceCommitHash: string2().min(1).describe("conflict.sourceCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
18096
+ expectedTargetCommitHash: string2().min(1).describe("conflict.targetCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
18097
+ head: candidateRun("the head environment's version"),
18098
+ kept: promotionCandidateSchema.optional().describe("The version kept: required for picked-by-run and kept-more-checks (head or base), omitted otherwise."),
18099
+ path: string2().min(1).max(1024).describe("One of the promotion's conflicting paths."),
18100
+ promotionId: ids.promotion,
18101
+ reason: string2().min(1).max(1000).describe("Why, in a sentence or two a person can read: what was kept and what the runs showed, or what is undecided.")
18102
+ }).superRefine(({ decision, kept }, refinement) => {
18103
+ if (keptIsRequiredFor.has(decision) === (kept !== undefined))
18104
+ return;
18105
+ refinement.addIssue({
18106
+ code: "custom",
18107
+ message: keptIsRequiredFor.has(decision) ? `${decision} needs the version it kept.` : `${decision} keeps no single version; omit kept.`,
18108
+ path: ["kept"]
18109
+ });
18110
+ });
18111
+ const output = makePromotionResourceSchema(ids);
18112
+ return {
18113
+ annotationJustifications: {
18114
+ destructiveHint: "Records a decision on the promotion and changes no flow code.",
18115
+ openWorldHint: "Changes a private QA Wolf promotion record without touching external systems.",
18116
+ readOnlyHint: "Records how a conflicting path was settled."
18117
+ },
18118
+ annotations: {
18119
+ destructiveHint: false,
18120
+ openWorldHint: false,
18121
+ readOnlyHint: false
18122
+ },
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.",
18124
+ input,
18125
+ kind: "write",
18126
+ name: "promotion.reportDecision",
18127
+ output
18128
+ };
18129
+ };
18130
+
18049
18131
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/resolve.js
18050
18132
  var maxResolvedFileBytes = 1e6;
18051
18133
  var utf8ByteLength = (content) => new TextEncoder().encode(content).byteLength;
@@ -18088,6 +18170,7 @@ var makeResolvePromotionContract = (ids) => {
18088
18170
  var makePromotionContracts = (ids) => ({
18089
18171
  find: makeFindPromotionsContract(ids),
18090
18172
  get: makeGetPromotionContract(ids),
18173
+ reportDecision: makeReportPromotionDecisionContract(ids),
18091
18174
  resolve: makeResolvePromotionContract(ids)
18092
18175
  });
18093
18176
 
@@ -18408,6 +18491,7 @@ var defaultIdSchemas = {
18408
18491
  promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
18409
18492
  run: string2().min(1).describe("The id of the run."),
18410
18493
  runAttempt: string2().min(1).describe("The id of the run attempt."),
18494
+ suggestion: string2().min(1).describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification."),
18411
18495
  trigger: string2().min(1).describe("The id of the trigger."),
18412
18496
  workspace: string2().min(1).describe("The id of the workspace.")
18413
18497
  };
@@ -18479,7 +18563,7 @@ var makeCreateRunContract = (ids) => {
18479
18563
  investigateFailures: boolean2().optional().describe("Whether QA Wolf investigates failures in this run. False disables automatic AI Investigation for this run, including PR-testing runs. Omission or true follows the existing policy and never forces investigation. Uninvestigated failures fail associated commit checks."),
18480
18564
  pullRequestNumber: number2().int().positive().describe("The number of the pull request to associate with the run.").optional(),
18481
18565
  repository: string2().min(1).describe('The owner/name of the repository, e.g. "acme/web".').optional(),
18482
- resolutionRunMode: resolutionRunModeSchema.optional().describe('Required when aiTaskId names a promotion conflict resolution task: why it runs flows. "confirm-after" confirms a finished resolution before it is submitted.'),
18566
+ resolutionRunMode: resolutionRunModeSchema.optional().describe('Required when aiTaskId names a promotion conflict resolution task: why it runs flows. "confirm-after" confirms a finished resolution before it is submitted; "choose-version" runs one version of an undecided path to choose between them.'),
18483
18567
  workspaceId: workspaceForEnvironmentRef(ids.workspace)
18484
18568
  }).and(makeFlowSelectionSchema(ids)).refine((value) => !(value.aiTaskId && value.chatSessionId), {
18485
18569
  message: "Provide at most one of aiTaskId and chatSessionId: a task already implies its own chat session.",
@@ -18971,6 +19055,7 @@ var journalEntrySchema = object({
18971
19055
  }));
18972
19056
  var knownJournalStreams = [
18973
19057
  "console",
19058
+ "network",
18974
19059
  "recorder",
18975
19060
  "run-events",
18976
19061
  "run-logs",
@@ -20839,7 +20924,10 @@ var makeFindEnvironmentsContract = (ids) => {
20839
20924
  });
20840
20925
  const output = object({
20841
20926
  defaultEnvironmentId: ids.environment.describe("The id of the workspace's default environment."),
20842
- environments: array(makeEnvironmentResourceSchema(ids)).describe("The team's environments, newest first."),
20927
+ environments: array(makeEnvironmentResourceSchema(ids).extend({
20928
+ flowCount: number2().int().nonnegative().optional().describe("The number of active and draft flows at the latest reconciled commit, when available."),
20929
+ testCount: number2().int().nonnegative().optional().describe("The number of tests in those flows, when available. One flow can contain several tests.")
20930
+ })).describe("The team's environments, newest first."),
20843
20931
  nextCursor: nextCursorSchema
20844
20932
  });
20845
20933
  return {
@@ -21783,35 +21871,6 @@ var makeCreateIssueContract = (ids) => {
21783
21871
  };
21784
21872
  };
21785
21873
 
21786
- // node_modules/@qawolf/api-contracts/dist/v1/issue/decideSuggestion.js
21787
- var makeDecideSuggestionContract = (ids) => {
21788
- const input = object({
21789
- decision: _enum(["add", "report", "skip", "undo", "activate"]).describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip before the flow joins. activate: retry a suggestion that QA Wolf held."),
21790
- issueId: ids.issue.describe("The coverage request or bug report that QA Wolf opened for a suggestion."),
21791
- skipReason: _enum(["not-worth-testing", "already-covered", "feature-removed"]).optional().describe("Why the suggestion is skipped. Required for skip.")
21792
- }).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
21793
- const output = object({
21794
- issue: makeIssueResourceSchema(ids)
21795
- });
21796
- return {
21797
- annotationJustifications: {
21798
- destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
21799
- openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
21800
- readOnlyHint: "Records a decision on a suggestion and changes the issue's status."
21801
- },
21802
- annotations: {
21803
- destructiveHint: false,
21804
- openWorldHint: true,
21805
- readOnlyHint: false
21806
- },
21807
- description: "Decide a coverage request or bug report that QA Wolf suggested after exploring an environment. " + "Add turns on the suggested flow in the environment. Report files a potential bug. " + "Skip declines the suggestion. Undo takes back a decision before the flow joins. " + "The issue's status follows the decision, so change the status only through this tool while the suggestion is undecided.",
21808
- input,
21809
- kind: "write",
21810
- name: "issue.decideSuggestion",
21811
- output
21812
- };
21813
- };
21814
-
21815
21874
  // node_modules/@qawolf/api-contracts/dist/v1/issue/listActivity.js
21816
21875
  var issueActivityTypeSchema = _enum([
21817
21876
  "created",
@@ -21965,7 +22024,6 @@ var makeIssueContracts = (ids) => ({
21965
22024
  attachFiles: makeAttachFilesToIssueContract(ids),
21966
22025
  comment: makeCommentOnIssueContract(ids),
21967
22026
  create: makeCreateIssueContract(ids),
21968
- decideSuggestion: makeDecideSuggestionContract(ids),
21969
22027
  find: makeFindIssuesContract(ids),
21970
22028
  get: makeGetIssueContract(ids),
21971
22029
  listActivity: makeListIssueActivityContract(ids),
@@ -23143,6 +23201,130 @@ var makeSkillContracts = () => ({
23143
23201
  list: makeListSkillsContract()
23144
23202
  });
23145
23203
 
23204
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/resource.js
23205
+ var suggestionStateSchema = _enum(["waiting", "accepted", "skipped", "expired"]).describe("waiting (QA Wolf proposed it and nobody has decided yet), accepted (someone added the flow or reported the bug; it stays accepted while the flow joins, is held, or is being undone), skipped (someone declined it), expired (nobody decided it in time).");
23206
+ var suggestionDecisionSchema = _enum(["add", "report", "skip", "undo", "activate"]).describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip. activate: retry a held suggestion.");
23207
+ var suggestionSkipReasonSchema = _enum(["not-worth-testing", "already-covered", "feature-removed"]).describe("Why the suggestion was skipped.");
23208
+ var makeSuggestionResourceSchema = (ids) => resource({
23209
+ decidedAt: exports_iso.datetime().optional().describe("When someone last decided the suggestion. Absent while it is waiting."),
23210
+ decisions: array(suggestionDecisionSchema).describe("The decisions suggestion.decide takes for this suggestion now. Empty when it takes none."),
23211
+ environmentId: ids.environment.describe("The environment QA Wolf explored when it made the suggestion."),
23212
+ environmentName: string2(),
23213
+ flow: object({
23214
+ flowId: ids.flow.optional().describe("The flow, once it joined the environment."),
23215
+ path: string2().describe("Where the proposed flow lives in the environment's flow code.")
23216
+ }).describe("The flow QA Wolf proposes. For a potential bug, the flow that stopped at the bug."),
23217
+ holdReason: _enum([
23218
+ "path-taken",
23219
+ "not-proven-on-merged-commit",
23220
+ "merge-conflicted",
23221
+ "undo-cleanup-failed"
23222
+ ]).optional().describe("Why QA Wolf held an accepted suggestion. activate retries it once the cause is gone."),
23223
+ issue: object({
23224
+ issueId: ids.issue,
23225
+ type: _enum(["bug", "coverageRequest"])
23226
+ }).optional().describe("The bug report or coverage request behind the suggestion, which the issue tools read. Absent when there is none."),
23227
+ kind: _enum(["new-flow", "potential-bug"]).describe("new-flow: QA Wolf wrote a flow for coverage that is missing. potential-bug: the flow it wrote stopped at what looks like a bug."),
23228
+ location: string2().describe("Where in the app the suggestion applies."),
23229
+ reason: string2().describe("Why QA Wolf suggests it."),
23230
+ skipReason: suggestionSkipReasonSchema.optional().describe("Why the suggestion was skipped. Present when skipped."),
23231
+ state: suggestionStateSchema,
23232
+ suggestedAt: exports_iso.datetime().describe("When QA Wolf suggested it."),
23233
+ suggestionId: ids.suggestion.describe("The suggestion's id, which suggestion.get and suggestion.decide take."),
23234
+ title: string2()
23235
+ }, {
23236
+ urlFieldDescription: "Absolute URL of the suggestion on the workspace's Suggested page."
23237
+ });
23238
+
23239
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/decide.js
23240
+ var makeDecideSuggestionContract = (ids) => {
23241
+ const input = object({
23242
+ decision: suggestionDecisionSchema,
23243
+ skipReason: suggestionSkipReasonSchema.optional().describe("Why the suggestion is skipped. Required for skip."),
23244
+ suggestionId: ids.suggestion.describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification.")
23245
+ }).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
23246
+ const output = object({ suggestion: makeSuggestionResourceSchema(ids) });
23247
+ return {
23248
+ annotationJustifications: {
23249
+ destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
23250
+ openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
23251
+ readOnlyHint: "Records a decision on a suggestion and changes its linked issue's status."
23252
+ },
23253
+ annotations: {
23254
+ destructiveHint: false,
23255
+ openWorldHint: true,
23256
+ readOnlyHint: false
23257
+ },
23258
+ description: "Decide a coverage suggestion QA Wolf made while exploring an environment, as the signed-in person. " + "Add turns on the suggested flow in the environment. Report files the potential bug. Skip declines the suggestion and needs a skipReason. " + "Undo takes back a decision. Activate retries a held suggestion. Only the decisions suggestion.get lists take effect. " + "Use this, not issue.update, to accept or skip a suggestion.",
23259
+ input,
23260
+ kind: "write",
23261
+ name: "suggestion.decide",
23262
+ output
23263
+ };
23264
+ };
23265
+
23266
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/find.js
23267
+ var makeFindSuggestionsContract = (ids) => {
23268
+ const input = object({
23269
+ state: _enum(["waiting", "accepted", "skipped"]).optional().describe("Only list suggestions in this state. Use waiting to find the ones that need a decision. Omit to list all three."),
23270
+ workspaceId: ids.workspace.optional().describe("The workspace whose suggestions to list. Required when authenticating with an organization or user API key."),
23271
+ ...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
23272
+ });
23273
+ const output = object({
23274
+ nextCursor: nextCursorSchema,
23275
+ suggestions: array(makeSuggestionResourceSchema(ids)).describe("The workspace's coverage suggestions, newest first.")
23276
+ });
23277
+ return {
23278
+ annotationJustifications: {
23279
+ destructiveHint: "Does not decide or change any suggestion.",
23280
+ openWorldHint: "Reads QA Wolf suggestion records without changing external systems.",
23281
+ readOnlyHint: "Lists the workspace's coverage suggestions."
23282
+ },
23283
+ annotations: {
23284
+ destructiveHint: false,
23285
+ openWorldHint: false,
23286
+ readOnlyHint: true
23287
+ },
23288
+ description: "List the coverage QA Wolf suggested for a workspace, newest first: flows it wrote for missing coverage and potential bugs it found while exploring an environment. " + "Use this, not issue.find, for QA Wolf's suggestions, such as the ones a new suggestions notification points to. Filter by state waiting to find the ones that need a decision.",
23289
+ input,
23290
+ kind: "read",
23291
+ name: "suggestion.find",
23292
+ output
23293
+ };
23294
+ };
23295
+
23296
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/get.js
23297
+ var makeGetSuggestionContract = (ids) => {
23298
+ const input = object({
23299
+ suggestionId: ids.suggestion.describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification.")
23300
+ });
23301
+ const output = object({ suggestion: makeSuggestionResourceSchema(ids) });
23302
+ return {
23303
+ annotationJustifications: {
23304
+ destructiveHint: "Does not decide or change the suggestion.",
23305
+ openWorldHint: "Reads a QA Wolf suggestion record without changing external systems.",
23306
+ readOnlyHint: "Retrieves one coverage suggestion."
23307
+ },
23308
+ annotations: {
23309
+ destructiveHint: false,
23310
+ openWorldHint: false,
23311
+ readOnlyHint: true
23312
+ },
23313
+ description: "Read one coverage suggestion QA Wolf made while exploring an environment: its state, the flow it proposes, the bug report or coverage request behind it, and the decisions it takes now. " + "Use this, not issue.get, for a suggestion id. A suggestion QA Wolf withdrew reads as not found.",
23314
+ input,
23315
+ kind: "read",
23316
+ name: "suggestion.get",
23317
+ output
23318
+ };
23319
+ };
23320
+
23321
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/index.js
23322
+ var makeSuggestionContracts = (ids) => ({
23323
+ decide: makeDecideSuggestionContract(ids),
23324
+ find: makeFindSuggestionsContract(ids),
23325
+ get: makeGetSuggestionContract(ids)
23326
+ });
23327
+
23146
23328
  // node_modules/@qawolf/api-contracts/dist/v1/tag/list.js
23147
23329
  var makeListTagsContract = (ids) => {
23148
23330
  const input = object({
@@ -23181,7 +23363,8 @@ var makeContractsV1 = (ids) => {
23181
23363
  const resolvedIds = {
23182
23364
  ...defaultIdSchemas,
23183
23365
  ...ids,
23184
- runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
23366
+ runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt,
23367
+ suggestion: ids.suggestion ?? defaultIdSchemas.suggestion
23185
23368
  };
23186
23369
  return {
23187
23370
  activity: {
@@ -23252,6 +23435,7 @@ var makeContractsV1 = (ids) => {
23252
23435
  },
23253
23436
  runner: makeRunnerContracts(resolvedIds),
23254
23437
  skill: makeSkillContracts(),
23438
+ suggestion: makeSuggestionContracts(resolvedIds),
23255
23439
  tag: {
23256
23440
  create: makeCreateTagContract(resolvedIds),
23257
23441
  list: makeListTagsContract(resolvedIds)
@@ -25764,7 +25948,7 @@ function startUpdateCheck(deps) {
25764
25948
  // package.json
25765
25949
  var package_default = {
25766
25950
  name: "@qawolf/cli",
25767
- version: "2.10.0",
25951
+ version: "2.11.0",
25768
25952
  description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
25769
25953
  keywords: [
25770
25954
  "automation",
@@ -25836,7 +26020,7 @@ var package_default = {
25836
26020
  "@clack/prompts": "1.5.1",
25837
26021
  "@napi-rs/keyring": "1.3.0",
25838
26022
  "@oxc-node/core": "0.1.0",
25839
- "@qawolf/api-contracts": "0.130.0",
26023
+ "@qawolf/api-contracts": "0.132.0",
25840
26024
  "@qawolf/emails": "1.1.1",
25841
26025
  "@qawolf/flow-targets": "2.0.0",
25842
26026
  commander: "14.0.3",
@@ -41971,7 +42155,7 @@ A sequence exits by the worst thing that happened to any one of its actions: an
41971
42155
  // src/commands/runner/guides/events.txt
41972
42156
  var events_default = `# Streams
41973
42157
 
41974
- Everything observable is an append-only stream on the pod, read by cursor or tail rather than subscribed to, so attaching late still gets you the history that is still there. QA Wolf writes recorder, console, run-events, run-logs and run-status; a stream nobody has written reads as empty rather than as an error, and a stream this CLI version does not know about is still readable by name. One payload per line, so shell tools compose:
42158
+ Everything observable is an append-only stream on the pod, read by cursor or tail rather than subscribed to, so attaching late still gets you the history that is still there. QA Wolf writes recorder, console, network, run-events, run-logs and run-status; a stream nobody has written reads as empty rather than as an error, and a stream this CLI version does not know about is still readable by name. One payload per line, so shell tools compose:
41975
42159
 
41976
42160
  $ qawolf runner events console --tail 20 | jq -r '.message'
41977
42161
  $ qawolf runner events run-logs --run <runId> --follow > run.log
@@ -44450,4 +44634,4 @@ createProgram({ signals }).parseAsync().catch(() => {
44450
44634
  process.exitCode = 1;
44451
44635
  }).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
44452
44636
 
44453
- //# debugId=607AD2DAA196641B64756E2164756E21
44637
+ //# debugId=114AC29954890FBA64756E2164756E21
@@ -8138,8 +8138,41 @@ function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
8138
8138
  });
8139
8139
  }
8140
8140
 
8141
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/decision.js
8142
+ var promotionDecisionTypeSchema = _enum(["picked-by-run", "combined", "kept-more-checks", "needs-person"]).describe("picked-by-run (exactly one version passed, so it was kept), combined (every version passed and they check different things, so they were merged), kept-more-checks (every version passed and one checks more, so it was kept), needs-person (every version failed or the runs could not tell them apart, so a person decides).");
8143
+ var promotionCandidateSchema = _enum(["head", "base", "combined"]).describe("head (the head environment's version), base (the base environment's version), combined (the resolver's combination of the two).");
8144
+ var promotionCandidateOutcomeSchema = _enum(["passed", "failed", "inconclusive"]).describe("How the version did in its run. inconclusive: it passed in some attempts and failed in others, or the run did not finish.");
8145
+ var makePromotionDecisionSchema = (ids) => object({
8146
+ candidateRuns: array(object({
8147
+ candidate: promotionCandidateSchema,
8148
+ outcome: promotionCandidateOutcomeSchema,
8149
+ runId: ids.run
8150
+ })).describe("The run of each version the decision relied on."),
8151
+ kept: promotionCandidateSchema.optional().describe("The version kept. Present for picked-by-run and kept-more-checks."),
8152
+ path: string2().describe("The conflicting path this decision is about."),
8153
+ reason: string2().describe("Why, in a sentence or two a person can read."),
8154
+ sourceCommitHash: string2().describe("The head commit of the conflict this decision was made for."),
8155
+ targetCommitHash: string2().describe("The base commit of the conflict this decision was made for."),
8156
+ type: promotionDecisionTypeSchema
8157
+ });
8158
+
8159
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/needsPerson.js
8160
+ var promotionNeedsPersonReasonSchema = _enum([
8161
+ "undecided-paths",
8162
+ "run-limit-reached",
8163
+ "flows-undetermined",
8164
+ "agent-stopped",
8165
+ "agent-failed",
8166
+ "agent-not-started",
8167
+ "agent-resolution-off"
8168
+ ]).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
+ var promotionNeedsPersonSchema = object({
8170
+ paths: array(object({ path: string2() })).optional().describe("The paths left undecided. Present for undecided-paths."),
8171
+ reason: promotionNeedsPersonReasonSchema
8172
+ });
8173
+
8141
8174
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/validationRun.js
8142
- var resolutionRunModeSchema = _enum(["confirm-after"]).describe("Why a promotion conflict resolution task runs flows. confirm-after confirms a finished resolution before it is submitted.");
8175
+ var resolutionRunModeSchema = _enum(["confirm-after", "choose-version"]).describe("Why a promotion conflict resolution task runs flows. confirm-after confirms a finished resolution before it is submitted; choose-version runs one version of an undecided path to choose between them.");
8143
8176
  var makePromotionValidationRunSchema = (ids) => object({
8144
8177
  aiTaskId: ids.aiTask.describe("The resolution task that started the run."),
8145
8178
  runId: ids.run,
@@ -8167,8 +8200,10 @@ var makePromotionResourceSchema = (ids) => resource({
8167
8200
  baseEnvironmentId: ids.environment.describe("The environment the flow changes promote into."),
8168
8201
  conflict: conflictSchema.optional().describe("The conflict awaiting resolution. Present while status is conflicted or resolving. A resolution must name both commit hashes and cover exactly these paths; if either branch moves, the conflict is recomputed and this changes."),
8169
8202
  createdAt: exports_iso.datetime().describe("When the promotion was requested."),
8203
+ decisions: array(makePromotionDecisionSchema(ids)).optional().describe("How the resolution agent settled each conflicting path it decided by running the versions, or why it left one for a person. Absent when it reported none."),
8170
8204
  headEnvironmentId: ids.environment.describe("The environment whose flow changes are promoted."),
8171
8205
  id: ids.promotion,
8206
+ needsPerson: promotionNeedsPersonSchema.optional().describe("Present while the current conflict waits on a person, with why. Absent once a resolution is submitted, the conflict is recomputed, or the promotion settles."),
8172
8207
  promotedCommitHash: string2().optional().describe("The commit the promotion landed on the base environment's flow code branch. Present when status is promoted."),
8173
8208
  settledAt: exports_iso.datetime().optional().describe("When the promotion reached promoted, no-changes or abandoned. Absent while it is open."),
8174
8209
  status: promotionStatusSchema,
@@ -8231,6 +8266,53 @@ var makeGetPromotionContract = (ids) => {
8231
8266
  };
8232
8267
  };
8233
8268
 
8269
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/reportDecision.js
8270
+ var keptIsRequiredFor = new Set(["kept-more-checks", "picked-by-run"]);
8271
+ var makeReportPromotionDecisionContract = (ids) => {
8272
+ const candidateRun = (version) => object({
8273
+ outcome: promotionCandidateOutcomeSchema,
8274
+ runId: ids.run.describe(`The run of ${version}, started for this promotion's resolution.`)
8275
+ }).optional().describe(`How ${version} did when it ran. Omit when it did not run.`);
8276
+ const input = object({
8277
+ base: candidateRun("the base environment's version"),
8278
+ combined: candidateRun("the resolver's combination of both versions"),
8279
+ decision: promotionDecisionTypeSchema,
8280
+ expectedSourceCommitHash: string2().min(1).describe("conflict.sourceCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
8281
+ expectedTargetCommitHash: string2().min(1).describe("conflict.targetCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
8282
+ head: candidateRun("the head environment's version"),
8283
+ kept: promotionCandidateSchema.optional().describe("The version kept: required for picked-by-run and kept-more-checks (head or base), omitted otherwise."),
8284
+ path: string2().min(1).max(1024).describe("One of the promotion's conflicting paths."),
8285
+ promotionId: ids.promotion,
8286
+ reason: string2().min(1).max(1000).describe("Why, in a sentence or two a person can read: what was kept and what the runs showed, or what is undecided.")
8287
+ }).superRefine(({ decision, kept }, refinement) => {
8288
+ if (keptIsRequiredFor.has(decision) === (kept !== undefined))
8289
+ return;
8290
+ refinement.addIssue({
8291
+ code: "custom",
8292
+ message: keptIsRequiredFor.has(decision) ? `${decision} needs the version it kept.` : `${decision} keeps no single version; omit kept.`,
8293
+ path: ["kept"]
8294
+ });
8295
+ });
8296
+ const output = makePromotionResourceSchema(ids);
8297
+ return {
8298
+ annotationJustifications: {
8299
+ destructiveHint: "Records a decision on the promotion and changes no flow code.",
8300
+ openWorldHint: "Changes a private QA Wolf promotion record without touching external systems.",
8301
+ readOnlyHint: "Records how a conflicting path was settled."
8302
+ },
8303
+ annotations: {
8304
+ destructiveHint: false,
8305
+ openWorldHint: false,
8306
+ readOnlyHint: false
8307
+ },
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.",
8309
+ input,
8310
+ kind: "write",
8311
+ name: "promotion.reportDecision",
8312
+ output
8313
+ };
8314
+ };
8315
+
8234
8316
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/resolve.js
8235
8317
  var maxResolvedFileBytes = 1e6;
8236
8318
  var utf8ByteLength = (content) => new TextEncoder().encode(content).byteLength;
@@ -8273,6 +8355,7 @@ var makeResolvePromotionContract = (ids) => {
8273
8355
  var makePromotionContracts = (ids) => ({
8274
8356
  find: makeFindPromotionsContract(ids),
8275
8357
  get: makeGetPromotionContract(ids),
8358
+ reportDecision: makeReportPromotionDecisionContract(ids),
8276
8359
  resolve: makeResolvePromotionContract(ids)
8277
8360
  });
8278
8361
 
@@ -8594,6 +8677,7 @@ var defaultIdSchemas = {
8594
8677
  promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
8595
8678
  run: string2().min(1).describe("The id of the run."),
8596
8679
  runAttempt: string2().min(1).describe("The id of the run attempt."),
8680
+ suggestion: string2().min(1).describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification."),
8597
8681
  trigger: string2().min(1).describe("The id of the trigger."),
8598
8682
  workspace: string2().min(1).describe("The id of the workspace.")
8599
8683
  };
@@ -8665,7 +8749,7 @@ var makeCreateRunContract = (ids) => {
8665
8749
  investigateFailures: boolean2().optional().describe("Whether QA Wolf investigates failures in this run. False disables automatic AI Investigation for this run, including PR-testing runs. Omission or true follows the existing policy and never forces investigation. Uninvestigated failures fail associated commit checks."),
8666
8750
  pullRequestNumber: number2().int().positive().describe("The number of the pull request to associate with the run.").optional(),
8667
8751
  repository: string2().min(1).describe('The owner/name of the repository, e.g. "acme/web".').optional(),
8668
- resolutionRunMode: resolutionRunModeSchema.optional().describe('Required when aiTaskId names a promotion conflict resolution task: why it runs flows. "confirm-after" confirms a finished resolution before it is submitted.'),
8752
+ resolutionRunMode: resolutionRunModeSchema.optional().describe('Required when aiTaskId names a promotion conflict resolution task: why it runs flows. "confirm-after" confirms a finished resolution before it is submitted; "choose-version" runs one version of an undecided path to choose between them.'),
8669
8753
  workspaceId: workspaceForEnvironmentRef(ids.workspace)
8670
8754
  }).and(makeFlowSelectionSchema(ids)).refine((value) => !(value.aiTaskId && value.chatSessionId), {
8671
8755
  message: "Provide at most one of aiTaskId and chatSessionId: a task already implies its own chat session.",
@@ -9161,6 +9245,7 @@ var journalEntrySchema = object({
9161
9245
  }));
9162
9246
  var knownJournalStreams = [
9163
9247
  "console",
9248
+ "network",
9164
9249
  "recorder",
9165
9250
  "run-events",
9166
9251
  "run-logs",
@@ -11031,7 +11116,10 @@ var makeFindEnvironmentsContract = (ids) => {
11031
11116
  });
11032
11117
  const output = object({
11033
11118
  defaultEnvironmentId: ids.environment.describe("The id of the workspace's default environment."),
11034
- environments: array(makeEnvironmentResourceSchema(ids)).describe("The team's environments, newest first."),
11119
+ environments: array(makeEnvironmentResourceSchema(ids).extend({
11120
+ flowCount: number2().int().nonnegative().optional().describe("The number of active and draft flows at the latest reconciled commit, when available."),
11121
+ testCount: number2().int().nonnegative().optional().describe("The number of tests in those flows, when available. One flow can contain several tests.")
11122
+ })).describe("The team's environments, newest first."),
11035
11123
  nextCursor: nextCursorSchema
11036
11124
  });
11037
11125
  return {
@@ -11975,35 +12063,6 @@ var makeCreateIssueContract = (ids) => {
11975
12063
  };
11976
12064
  };
11977
12065
 
11978
- // node_modules/@qawolf/api-contracts/dist/v1/issue/decideSuggestion.js
11979
- var makeDecideSuggestionContract = (ids) => {
11980
- const input = object({
11981
- decision: _enum(["add", "report", "skip", "undo", "activate"]).describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip before the flow joins. activate: retry a suggestion that QA Wolf held."),
11982
- issueId: ids.issue.describe("The coverage request or bug report that QA Wolf opened for a suggestion."),
11983
- skipReason: _enum(["not-worth-testing", "already-covered", "feature-removed"]).optional().describe("Why the suggestion is skipped. Required for skip.")
11984
- }).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
11985
- const output = object({
11986
- issue: makeIssueResourceSchema(ids)
11987
- });
11988
- return {
11989
- annotationJustifications: {
11990
- destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
11991
- openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
11992
- readOnlyHint: "Records a decision on a suggestion and changes the issue's status."
11993
- },
11994
- annotations: {
11995
- destructiveHint: false,
11996
- openWorldHint: true,
11997
- readOnlyHint: false
11998
- },
11999
- description: "Decide a coverage request or bug report that QA Wolf suggested after exploring an environment. " + "Add turns on the suggested flow in the environment. Report files a potential bug. " + "Skip declines the suggestion. Undo takes back a decision before the flow joins. " + "The issue's status follows the decision, so change the status only through this tool while the suggestion is undecided.",
12000
- input,
12001
- kind: "write",
12002
- name: "issue.decideSuggestion",
12003
- output
12004
- };
12005
- };
12006
-
12007
12066
  // node_modules/@qawolf/api-contracts/dist/v1/issue/listActivity.js
12008
12067
  var issueActivityTypeSchema = _enum([
12009
12068
  "created",
@@ -12157,7 +12216,6 @@ var makeIssueContracts = (ids) => ({
12157
12216
  attachFiles: makeAttachFilesToIssueContract(ids),
12158
12217
  comment: makeCommentOnIssueContract(ids),
12159
12218
  create: makeCreateIssueContract(ids),
12160
- decideSuggestion: makeDecideSuggestionContract(ids),
12161
12219
  find: makeFindIssuesContract(ids),
12162
12220
  get: makeGetIssueContract(ids),
12163
12221
  listActivity: makeListIssueActivityContract(ids),
@@ -13335,6 +13393,130 @@ var makeSkillContracts = () => ({
13335
13393
  list: makeListSkillsContract()
13336
13394
  });
13337
13395
 
13396
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/resource.js
13397
+ var suggestionStateSchema = _enum(["waiting", "accepted", "skipped", "expired"]).describe("waiting (QA Wolf proposed it and nobody has decided yet), accepted (someone added the flow or reported the bug; it stays accepted while the flow joins, is held, or is being undone), skipped (someone declined it), expired (nobody decided it in time).");
13398
+ var suggestionDecisionSchema = _enum(["add", "report", "skip", "undo", "activate"]).describe("add: turn on the suggested flow. report: file the potential bug. skip: decline the suggestion. undo: take back an add, report or skip. activate: retry a held suggestion.");
13399
+ var suggestionSkipReasonSchema = _enum(["not-worth-testing", "already-covered", "feature-removed"]).describe("Why the suggestion was skipped.");
13400
+ var makeSuggestionResourceSchema = (ids) => resource({
13401
+ decidedAt: exports_iso.datetime().optional().describe("When someone last decided the suggestion. Absent while it is waiting."),
13402
+ decisions: array(suggestionDecisionSchema).describe("The decisions suggestion.decide takes for this suggestion now. Empty when it takes none."),
13403
+ environmentId: ids.environment.describe("The environment QA Wolf explored when it made the suggestion."),
13404
+ environmentName: string2(),
13405
+ flow: object({
13406
+ flowId: ids.flow.optional().describe("The flow, once it joined the environment."),
13407
+ path: string2().describe("Where the proposed flow lives in the environment's flow code.")
13408
+ }).describe("The flow QA Wolf proposes. For a potential bug, the flow that stopped at the bug."),
13409
+ holdReason: _enum([
13410
+ "path-taken",
13411
+ "not-proven-on-merged-commit",
13412
+ "merge-conflicted",
13413
+ "undo-cleanup-failed"
13414
+ ]).optional().describe("Why QA Wolf held an accepted suggestion. activate retries it once the cause is gone."),
13415
+ issue: object({
13416
+ issueId: ids.issue,
13417
+ type: _enum(["bug", "coverageRequest"])
13418
+ }).optional().describe("The bug report or coverage request behind the suggestion, which the issue tools read. Absent when there is none."),
13419
+ kind: _enum(["new-flow", "potential-bug"]).describe("new-flow: QA Wolf wrote a flow for coverage that is missing. potential-bug: the flow it wrote stopped at what looks like a bug."),
13420
+ location: string2().describe("Where in the app the suggestion applies."),
13421
+ reason: string2().describe("Why QA Wolf suggests it."),
13422
+ skipReason: suggestionSkipReasonSchema.optional().describe("Why the suggestion was skipped. Present when skipped."),
13423
+ state: suggestionStateSchema,
13424
+ suggestedAt: exports_iso.datetime().describe("When QA Wolf suggested it."),
13425
+ suggestionId: ids.suggestion.describe("The suggestion's id, which suggestion.get and suggestion.decide take."),
13426
+ title: string2()
13427
+ }, {
13428
+ urlFieldDescription: "Absolute URL of the suggestion on the workspace's Suggested page."
13429
+ });
13430
+
13431
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/decide.js
13432
+ var makeDecideSuggestionContract = (ids) => {
13433
+ const input = object({
13434
+ decision: suggestionDecisionSchema,
13435
+ skipReason: suggestionSkipReasonSchema.optional().describe("Why the suggestion is skipped. Required for skip."),
13436
+ suggestionId: ids.suggestion.describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification.")
13437
+ }).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
13438
+ const output = object({ suggestion: makeSuggestionResourceSchema(ids) });
13439
+ return {
13440
+ annotationJustifications: {
13441
+ destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
13442
+ openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
13443
+ readOnlyHint: "Records a decision on a suggestion and changes its linked issue's status."
13444
+ },
13445
+ annotations: {
13446
+ destructiveHint: false,
13447
+ openWorldHint: true,
13448
+ readOnlyHint: false
13449
+ },
13450
+ description: "Decide a coverage suggestion QA Wolf made while exploring an environment, as the signed-in person. " + "Add turns on the suggested flow in the environment. Report files the potential bug. Skip declines the suggestion and needs a skipReason. " + "Undo takes back a decision. Activate retries a held suggestion. Only the decisions suggestion.get lists take effect. " + "Use this, not issue.update, to accept or skip a suggestion.",
13451
+ input,
13452
+ kind: "write",
13453
+ name: "suggestion.decide",
13454
+ output
13455
+ };
13456
+ };
13457
+
13458
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/find.js
13459
+ var makeFindSuggestionsContract = (ids) => {
13460
+ const input = object({
13461
+ state: _enum(["waiting", "accepted", "skipped"]).optional().describe("Only list suggestions in this state. Use waiting to find the ones that need a decision. Omit to list all three."),
13462
+ workspaceId: ids.workspace.optional().describe("The workspace whose suggestions to list. Required when authenticating with an organization or user API key."),
13463
+ ...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
13464
+ });
13465
+ const output = object({
13466
+ nextCursor: nextCursorSchema,
13467
+ suggestions: array(makeSuggestionResourceSchema(ids)).describe("The workspace's coverage suggestions, newest first.")
13468
+ });
13469
+ return {
13470
+ annotationJustifications: {
13471
+ destructiveHint: "Does not decide or change any suggestion.",
13472
+ openWorldHint: "Reads QA Wolf suggestion records without changing external systems.",
13473
+ readOnlyHint: "Lists the workspace's coverage suggestions."
13474
+ },
13475
+ annotations: {
13476
+ destructiveHint: false,
13477
+ openWorldHint: false,
13478
+ readOnlyHint: true
13479
+ },
13480
+ description: "List the coverage QA Wolf suggested for a workspace, newest first: flows it wrote for missing coverage and potential bugs it found while exploring an environment. " + "Use this, not issue.find, for QA Wolf's suggestions, such as the ones a new suggestions notification points to. Filter by state waiting to find the ones that need a decision.",
13481
+ input,
13482
+ kind: "read",
13483
+ name: "suggestion.find",
13484
+ output
13485
+ };
13486
+ };
13487
+
13488
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/get.js
13489
+ var makeGetSuggestionContract = (ids) => {
13490
+ const input = object({
13491
+ suggestionId: ids.suggestion.describe("The id of the coverage suggestion, from suggestion.find or a new suggestions notification.")
13492
+ });
13493
+ const output = object({ suggestion: makeSuggestionResourceSchema(ids) });
13494
+ return {
13495
+ annotationJustifications: {
13496
+ destructiveHint: "Does not decide or change the suggestion.",
13497
+ openWorldHint: "Reads a QA Wolf suggestion record without changing external systems.",
13498
+ readOnlyHint: "Retrieves one coverage suggestion."
13499
+ },
13500
+ annotations: {
13501
+ destructiveHint: false,
13502
+ openWorldHint: false,
13503
+ readOnlyHint: true
13504
+ },
13505
+ description: "Read one coverage suggestion QA Wolf made while exploring an environment: its state, the flow it proposes, the bug report or coverage request behind it, and the decisions it takes now. " + "Use this, not issue.get, for a suggestion id. A suggestion QA Wolf withdrew reads as not found.",
13506
+ input,
13507
+ kind: "read",
13508
+ name: "suggestion.get",
13509
+ output
13510
+ };
13511
+ };
13512
+
13513
+ // node_modules/@qawolf/api-contracts/dist/v1/suggestion/index.js
13514
+ var makeSuggestionContracts = (ids) => ({
13515
+ decide: makeDecideSuggestionContract(ids),
13516
+ find: makeFindSuggestionsContract(ids),
13517
+ get: makeGetSuggestionContract(ids)
13518
+ });
13519
+
13338
13520
  // node_modules/@qawolf/api-contracts/dist/v1/tag/list.js
13339
13521
  var makeListTagsContract = (ids) => {
13340
13522
  const input = object({
@@ -13373,7 +13555,8 @@ var makeContractsV1 = (ids) => {
13373
13555
  const resolvedIds = {
13374
13556
  ...defaultIdSchemas,
13375
13557
  ...ids,
13376
- runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
13558
+ runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt,
13559
+ suggestion: ids.suggestion ?? defaultIdSchemas.suggestion
13377
13560
  };
13378
13561
  return {
13379
13562
  activity: {
@@ -13444,6 +13627,7 @@ var makeContractsV1 = (ids) => {
13444
13627
  },
13445
13628
  runner: makeRunnerContracts(resolvedIds),
13446
13629
  skill: makeSkillContracts(),
13630
+ suggestion: makeSuggestionContracts(resolvedIds),
13447
13631
  tag: {
13448
13632
  create: makeCreateTagContract(resolvedIds),
13449
13633
  list: makeListTagsContract(resolvedIds)
@@ -18228,4 +18412,4 @@ export {
18228
18412
  createRunnerSdk
18229
18413
  };
18230
18414
 
18231
- //# debugId=1A80CC3801EFA71A64756E2164756E21
18415
+ //# debugId=BBFB581D3BFFB3C364756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/cli",
3
- "version": "2.10.0",
3
+ "version": "2.11.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.130.0",
75
+ "@qawolf/api-contracts": "0.132.0",
76
76
  "@qawolf/emails": "1.1.1",
77
77
  "@qawolf/flow-targets": "2.0.0",
78
78
  "commander": "14.0.3",
@@ -195,7 +195,6 @@ that `url`; never guess a route and never send a repository link in its place.
195
195
  | `qawolf issue attachFiles` | write | Attach files from the team's storage to a bug report or coverage request owned by the caller's team, for example the files a bug was reproduced with or the test data a flow should use. Files already attached stay attached. Upload a file with file.requestUpload first. |
196
196
  | `qawolf issue comment` | write | Comment on a bug report, blocker (issue type `maintenance`), or coverage request owned by the caller's team. The comment changes nothing else on the issue, such as its status or priority. |
197
197
  | `qawolf issue create` | write | Create a bug report, blocker (issue type `maintenance`), or coverage request issue for the caller's team. A user can create a blocker only when they can see the workspace's blockers; a team or organization API key credits it to the workspace's automation user. Link its failed flows afterwards with run.diagnose. |
198
- | `qawolf issue decideSuggestion` | write | Decide a coverage request or bug report that QA Wolf suggested after exploring an environment. Add turns on the suggested flow in the environment. Report files a potential bug. Skip declines the suggestion. Undo takes back a decision before the flow joins. The issue's status follows the decision, so change the status only through this tool while the suggestion is undecided. |
199
198
  | `qawolf issue find` | read | List the team's bug reports, blockers, or coverage requests, newest first. |
200
199
  | `qawolf issue get` | read | Get an issue by id. |
201
200
  | `qawolf issue listActivity` | read | List an issue's activity, oldest first: creation, status and priority changes, and the flows that started or stopped reproducing it. Use it to measure time to fix or to find issues that came back. |
@@ -209,6 +208,7 @@ that `url`; never guess a route and never send a repository link in its place.
209
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. |
210
209
  | `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. |
211
210
  | `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
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
213
  | `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
214
  | `qawolf run create` | write | Create a run for the selected flows and/or tags in an environment. |
@@ -222,7 +222,7 @@ that `url`; never guess a route and never send a repository link in its place.
222
222
  | `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
223
  | `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 |
224
224
  | `qawolf runner actions` | write | Perform a sequence of up to ten raw actions on a runner's screen in one request, as a JSON array of the same actions `runner act` takes. Use - to read the array from stdin. Actions run back to back, so batch only steps whose targets are on the screen you last saw, and end the sequence at the step that changes the page. Each result carries an effect: performed, not-performed, or unknown when the runner stopped answering and the action may have landed |
225
- | `qawolf runner events` | read | Print a runner's journal, one entry per line. QA Wolf writes console, recorder, run-events, run-logs, run-status |
225
+ | `qawolf runner events` | read | Print a runner's journal, one entry per line. QA Wolf writes console, network, recorder, run-events, run-logs, run-status |
226
226
  | `qawolf runner exec` | write | Evaluate a snippet against a runner's live page. Use - to read the snippet from stdin |
227
227
  | `qawolf runner highlight-selector` | write | Highlight what a selector matches on a runner's live page, so the next screenshot shows it. Omit the selector to clear the highlight |
228
228
  | `qawolf runner import-package` | write | Install a package into a runner's live run, so a snippet or a selection can import it |
@@ -248,6 +248,9 @@ that `url`; never guess a route and never send a repository link in its place.
248
248
  | `qawolf runner terminate` | write | End an interactive runner, and the pod it runs on with it |
249
249
  | `qawolf skill get` | read | Read a QA Wolf skill: the instructions a coding agent follows for one kind of QA Wolf work. The reply carries the skill's SKILL.md and every file under its references directory, so nothing else has to be fetched for it. Read the skill before starting the work it covers and follow it. A link in the reply of the form ../<skill>/SKILL.md names another skill, which this call reads by that name. |
250
250
  | `qawolf skill list` | read | List the QA Wolf skills, each with its name and the description that says when to use it. A skill is the instructions a coding agent follows for one kind of QA Wolf work, such as onboarding an application, creating a flow, repairing a failing flow, or setting up triggers. Call this before any QA Wolf work, pick the skill whose description matches the request, and read it with skill.get. |
251
+ | `qawolf suggestion decide` | write | Decide a coverage suggestion QA Wolf made while exploring an environment, as the signed-in person. Add turns on the suggested flow in the environment. Report files the potential bug. Skip declines the suggestion and needs a skipReason. Undo takes back a decision. Activate retries a held suggestion. Only the decisions suggestion.get lists take effect. Use this, not issue.update, to accept or skip a suggestion. |
252
+ | `qawolf suggestion find` | read | List the coverage QA Wolf suggested for a workspace, newest first: flows it wrote for missing coverage and potential bugs it found while exploring an environment. Use this, not issue.find, for QA Wolf's suggestions, such as the ones a new suggestions notification points to. Filter by state waiting to find the ones that need a decision. |
253
+ | `qawolf suggestion get` | read | Read one coverage suggestion QA Wolf made while exploring an environment: its state, the flow it proposes, the bug report or coverage request behind it, and the decisions it takes now. Use this, not issue.get, for a suggestion id. A suggestion QA Wolf withdrew reads as not found. |
251
254
  | `qawolf tag create` | write | Create a tag on the caller's team. Tags select flows in run.create. |
252
255
  | `qawolf tag list` | read | List the team's tags, alphabetical by name. Tag names select flows in run.create. |
253
256
  | `qawolf trigger create` | write | Create a trigger. A schedule trigger runs a named set of flows on a cadence; a deployment trigger runs when a matching deployment is reported. |
@@ -89,7 +89,7 @@ Commands:
89
89
  run [options] <flowFile> Run a flow on an interactive runner, shipping the flow
90
90
  and what it imports
91
91
  events [options] <stream> Print a runner's journal, one entry per line. QA Wolf
92
- writes console, recorder, run-events, run-logs,
92
+ writes console, network, recorder, run-events, run-logs,
93
93
  run-status
94
94
  screenshot [options] Save a JPEG of an interactive runner's screen to a file,
95
95
  or write it to stdout with --out -
@@ -536,7 +536,7 @@ Environment variables:
536
536
  ```text
537
537
  Usage: qawolf runner events [options] <stream>
538
538
 
539
- Print a runner's journal, one entry per line. QA Wolf writes console, recorder, run-events,
539
+ Print a runner's journal, one entry per line. QA Wolf writes console, network, recorder, run-events,
540
540
  run-logs, run-status
541
541
 
542
542
  Options:
@@ -568,10 +568,10 @@ Examples:
568
568
  Streams:
569
569
  Everything observable is an append-only stream on the pod, read by cursor or
570
570
  tail rather than subscribed to, so attaching late still gets you the history
571
- that is still there. QA Wolf writes recorder, console, run-events, run-logs
572
- and run-status; a stream nobody has written reads as empty rather than as an
573
- error, and a stream this CLI version does not know about is still readable by
574
- name. One payload per line, so shell tools compose:
571
+ that is still there. QA Wolf writes recorder, console, network, run-events,
572
+ run-logs and run-status; a stream nobody has written reads as empty rather
573
+ than as an error, and a stream this CLI version does not know about is still
574
+ readable by name. One payload per line, so shell tools compose:
575
575
 
576
576
  $ qawolf runner events console --tail 20 | jq -r '.message'
577
577
  $ qawolf runner events run-logs --run <runId> --follow > run.log