@qawolf/cli 2.9.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,6 +17953,49 @@ 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
+
17989
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/validationRun.js
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.");
17991
+ var makePromotionValidationRunSchema = (ids) => object({
17992
+ aiTaskId: ids.aiTask.describe("The resolution task that started the run."),
17993
+ runId: ids.run,
17994
+ runMode: resolutionRunModeSchema,
17995
+ sourceCommitHash: string2().describe("The head commit of the conflict the run was started for."),
17996
+ targetCommitHash: string2().describe("The base commit of the conflict the run was started for.")
17997
+ });
17998
+
17956
17999
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/resource.js
17957
18000
  var promotionStatusSchema = _enum([
17958
18001
  "pending",
@@ -17972,11 +18015,14 @@ var makePromotionResourceSchema = (ids) => resource({
17972
18015
  baseEnvironmentId: ids.environment.describe("The environment the flow changes promote into."),
17973
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."),
17974
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."),
17975
18019
  headEnvironmentId: ids.environment.describe("The environment whose flow changes are promoted."),
17976
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."),
17977
18022
  promotedCommitHash: string2().optional().describe("The commit the promotion landed on the base environment's flow code branch. Present when status is promoted."),
17978
18023
  settledAt: exports_iso.datetime().optional().describe("When the promotion reached promoted, no-changes or abandoned. Absent while it is open."),
17979
- status: promotionStatusSchema
18024
+ status: promotionStatusSchema,
18025
+ 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.")
17980
18026
  }, { urlFieldDescription: "Absolute URL of the head environment's page." });
17981
18027
 
17982
18028
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/find.js
@@ -18035,6 +18081,53 @@ var makeGetPromotionContract = (ids) => {
18035
18081
  };
18036
18082
  };
18037
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
+
18038
18131
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/resolve.js
18039
18132
  var maxResolvedFileBytes = 1e6;
18040
18133
  var utf8ByteLength = (content) => new TextEncoder().encode(content).byteLength;
@@ -18077,6 +18170,7 @@ var makeResolvePromotionContract = (ids) => {
18077
18170
  var makePromotionContracts = (ids) => ({
18078
18171
  find: makeFindPromotionsContract(ids),
18079
18172
  get: makeGetPromotionContract(ids),
18173
+ reportDecision: makeReportPromotionDecisionContract(ids),
18080
18174
  resolve: makeResolvePromotionContract(ids)
18081
18175
  });
18082
18176
 
@@ -18397,6 +18491,7 @@ var defaultIdSchemas = {
18397
18491
  promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
18398
18492
  run: string2().min(1).describe("The id of the run."),
18399
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."),
18400
18495
  trigger: string2().min(1).describe("The id of the trigger."),
18401
18496
  workspace: string2().min(1).describe("The id of the workspace.")
18402
18497
  };
@@ -18459,7 +18554,7 @@ var makeFlowSelectionSchema = (ids) => object({
18459
18554
  // node_modules/@qawolf/api-contracts/dist/v1/run/index.js
18460
18555
  var makeCreateRunContract = (ids) => {
18461
18556
  const input = object({
18462
- aiTaskId: ids.aiTask.optional().describe("The AI task whose conversation should receive run status updates."),
18557
+ aiTaskId: ids.aiTask.optional().describe("The AI task the run is for. Its conversation receives run status updates, or, for a promotion conflict resolution task, the promotion links the run."),
18463
18558
  builds: array(buildIdSchema).min(1).max(20).optional().describe("Builds to install in this run only. Each replaces the environment's latest build of its app and platform."),
18464
18559
  chatSessionId: ids.chatSession.optional().describe("The chat session whose transcript should receive run status updates."),
18465
18560
  environmentId: ids.environmentRef,
@@ -18468,6 +18563,7 @@ var makeCreateRunContract = (ids) => {
18468
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."),
18469
18564
  pullRequestNumber: number2().int().positive().describe("The number of the pull request to associate with the run.").optional(),
18470
18565
  repository: string2().min(1).describe('The owner/name of the repository, e.g. "acme/web".').optional(),
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.'),
18471
18567
  workspaceId: workspaceForEnvironmentRef(ids.workspace)
18472
18568
  }).and(makeFlowSelectionSchema(ids)).refine((value) => !(value.aiTaskId && value.chatSessionId), {
18473
18569
  message: "Provide at most one of aiTaskId and chatSessionId: a task already implies its own chat session.",
@@ -18587,6 +18683,7 @@ var screenPointSchema = strictObject({
18587
18683
  });
18588
18684
  var maxScrollDelta = 5000;
18589
18685
  var scrollDeltaSchema = int().min(-maxScrollDelta).max(maxScrollDelta);
18686
+ var optionalScrollDeltaSchema = scrollDeltaSchema.optional().default(0);
18590
18687
  var maxTypedTextLength = 200;
18591
18688
  var maxKeypressKeys = 10;
18592
18689
  var maxKeyNameLength = 32;
@@ -18607,8 +18704,8 @@ var browserActionSchema = discriminatedUnion("type", [
18607
18704
  y: screenCoordinateSchema
18608
18705
  }),
18609
18706
  strictObject({
18610
- scroll_x: scrollDeltaSchema,
18611
- scroll_y: scrollDeltaSchema,
18707
+ scroll_x: optionalScrollDeltaSchema,
18708
+ scroll_y: optionalScrollDeltaSchema,
18612
18709
  type: literal("scroll"),
18613
18710
  x: screenCoordinateSchema,
18614
18711
  y: screenCoordinateSchema
@@ -18958,6 +19055,7 @@ var journalEntrySchema = object({
18958
19055
  }));
18959
19056
  var knownJournalStreams = [
18960
19057
  "console",
19058
+ "network",
18961
19059
  "recorder",
18962
19060
  "run-events",
18963
19061
  "run-logs",
@@ -19357,10 +19455,16 @@ var runSelectionSchema = object({
19357
19455
  error: "A selection's startLine must not be after its endLine.",
19358
19456
  path: ["startLine"]
19359
19457
  });
19458
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/hourlyWindowField.js
19459
+ var triggerHourlyWindowSchema = object({
19460
+ endTime: string2().regex(/^([01]\d|2[0-3]):00$/, 'Expected a whole hour, "HH:00".').optional().describe(`The latest hour a run can land in, as "HH:00", later than startTime's hour. Runs keep startTime's minute, so the last run is the last step of every from startTime whose hour is at or before this one, and it can come after endTime: 01:30 to 22:00 last runs at 22:30, while every 4 hours from 06:00 to 16:00 last runs at 14:00. Omitting it runs until the end of the day.`),
19461
+ startTime: string2({ error: "window.startTime is required when a window is set." }).regex(/^([01]\d|2[0-3]):[0-5][05]$/, 'Expected "HH:mm" on a 5-minute step.').describe(`The first run of each day, as "HH:mm" on a 5-minute step. Its minute is every run's minute, and every counts from it.`)
19462
+ }).optional().describe("Runs an hourly schedule only in these hours of the day, read as wall clock times in timezoneId: from startTime up to the endTime hour. A window cannot go past midnight. Omitting it runs all day, counted from midnight.");
19463
+
19360
19464
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatFields.js
19361
19465
  var triggerScheduleRepeatFields = {
19362
19466
  dayOfMonth: number2().int().min(1).max(28).optional().describe("The day of the month a monthly schedule fires on, from 1 to 28 so it exists in every month. Required when cadence is monthly."),
19363
- every: number2().int().min(1).optional().describe("How many hours, days, weeks or months sit between fires. Defaults to 1. Hourly takes 1, 2, 3, 4, 6, 8 or 12, counted from midnight in timezoneId; daily takes up to 31, and weekly and monthly up to 12."),
19467
+ every: number2().int().min(1).optional().describe("How many hours, days, weeks or months sit between fires. Defaults to 1. Hourly takes up to 12, counted from window.startTime, or from midnight in timezoneId without a window, and starts over each day; daily takes up to 31, and weekly and monthly up to 12."),
19364
19468
  startDate: string2().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('The date of the first fire, as "YYYY-MM-DD" in timezoneId, for a daily, weekly or monthly schedule whose every is more than 1. Later fires repeat every N units from it. A weekly start date falls on dayOfWeek and a monthly one on dayOfMonth. Required when every is more than 1.')
19365
19469
  };
19366
19470
 
@@ -19402,15 +19506,99 @@ var makeTriggerScheduleFields = (ids) => ({
19402
19506
  }).optional().describe("The only days an hourly or daily schedule fires on, read in timezoneId. Name each day at most once. Omitting it fires on every day."),
19403
19507
  environmentId: ids.environmentId.describe("The environment the scheduled runs happen in."),
19404
19508
  ...triggerScheduleRepeatFields,
19405
- minuteOfHour: number2().int().min(0).max(59).optional().describe("Minutes past the hour an hourly schedule fires. Defaults to 0."),
19509
+ minuteOfHour: number2().int().min(0).max(59).optional().describe("Minutes past the hour an hourly schedule fires. Defaults to 0, or to the minute of window.startTime."),
19406
19510
  timeOfDay: string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/).optional().describe('The wall clock time a daily, weekly or monthly schedule fires, as "HH:mm". Required when cadence is daily, weekly or monthly.'),
19407
- timezoneId: string2().min(1).refine(isTimezone, "Expected an IANA timezone, such as America/New_York.").optional().describe("The IANA timezone the schedule is read in, such as America/New_York. Required for every cadence: it sets the day boundaries daysOfWeek is read against, and the wall clock timeOfDay is read against.")
19511
+ timezoneId: string2().min(1).refine(isTimezone, "Expected an IANA timezone, such as America/New_York.").optional().describe("The IANA timezone the schedule is read in, such as America/New_York. Required for every cadence: it sets the day boundaries daysOfWeek is read against, and the wall clock timeOfDay is read against."),
19512
+ window: triggerHourlyWindowSchema
19408
19513
  });
19409
19514
 
19515
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/hourlyWindowRules.js
19516
+ var partsOf = (time) => time.split(":").map(Number);
19517
+ var checkHourlyWindow = (value, ctx) => {
19518
+ if (value.cadence !== "hourly" || value.window === undefined)
19519
+ return;
19520
+ const [startHour, startMinute] = partsOf(value.window.startTime);
19521
+ const [endHour] = value.window.endTime === undefined ? [] : partsOf(value.window.endTime);
19522
+ if (endHour !== undefined && startHour !== undefined && endHour <= startHour) {
19523
+ ctx.addIssue({
19524
+ code: "custom",
19525
+ message: "window.endTime must be a later hour than window.startTime. A window cannot go past midnight, so leave endTime out to run until the end of the day.",
19526
+ path: ["window", "endTime"]
19527
+ });
19528
+ }
19529
+ if (value.minuteOfHour !== undefined && value.minuteOfHour !== startMinute) {
19530
+ ctx.addIssue({
19531
+ code: "custom",
19532
+ message: "minuteOfHour must match the minute of window.startTime, which sets it.",
19533
+ path: ["minuteOfHour"]
19534
+ });
19535
+ }
19536
+ };
19537
+
19538
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleFieldRules.js
19539
+ var requiredScheduleFields = {
19540
+ daily: ["timeOfDay", "timezoneId"],
19541
+ hourly: ["timezoneId"],
19542
+ monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
19543
+ weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
19544
+ };
19545
+ var optionalScheduleFields = {
19546
+ daily: ["daysOfWeek", "every", "startDate"],
19547
+ hourly: ["daysOfWeek", "every", "minuteOfHour", "window"],
19548
+ monthly: ["every", "startDate"],
19549
+ weekly: ["every", "startDate"]
19550
+ };
19551
+ var cadencesUsingField = {
19552
+ dayOfMonth: "a monthly cadence",
19553
+ dayOfWeek: "a weekly cadence",
19554
+ daysOfWeek: "an hourly or daily cadence",
19555
+ every: "any cadence",
19556
+ minuteOfHour: "an hourly cadence",
19557
+ startDate: "a daily, weekly or monthly cadence",
19558
+ timeOfDay: "a daily, weekly or monthly cadence",
19559
+ timezoneId: "an hourly, daily, weekly or monthly cadence",
19560
+ window: "an hourly cadence"
19561
+ };
19562
+ var scheduleFields = [
19563
+ "dayOfMonth",
19564
+ "dayOfWeek",
19565
+ "daysOfWeek",
19566
+ "every",
19567
+ "minuteOfHour",
19568
+ "startDate",
19569
+ "timeOfDay",
19570
+ "timezoneId",
19571
+ "window"
19572
+ ];
19573
+ var checkScheduleFields = (value, ctx) => {
19574
+ const required = requiredScheduleFields[value.cadence];
19575
+ const optional = optionalScheduleFields[value.cadence];
19576
+ for (const field of scheduleFields) {
19577
+ const isSupplied = value[field] !== undefined;
19578
+ if (required.includes(field)) {
19579
+ if (!isSupplied) {
19580
+ ctx.addIssue({
19581
+ code: "custom",
19582
+ message: `${field} is required when cadence is ${value.cadence}.`,
19583
+ path: [field]
19584
+ });
19585
+ }
19586
+ continue;
19587
+ }
19588
+ if (isSupplied && !optional.includes(field)) {
19589
+ ctx.addIssue({
19590
+ code: "custom",
19591
+ message: `${field} applies to ${cadencesUsingField[field]} only.`,
19592
+ path: [field]
19593
+ });
19594
+ }
19595
+ }
19596
+ };
19597
+
19410
19598
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatRules.js
19411
- var hourlyEveryValues = [1, 2, 3, 4, 6, 8, 12];
19412
19599
  var maxEvery = {
19413
19600
  daily: 31,
19601
+ hourly: 12,
19414
19602
  monthly: 12,
19415
19603
  weekly: 12
19416
19604
  };
@@ -19428,9 +19616,6 @@ var calendarDayOf = (startDate) => {
19428
19616
  return !Number.isNaN(date.getTime()) && date.toISOString().startsWith(startDate) ? date : undefined;
19429
19617
  };
19430
19618
  var everyIssue = (value, every) => {
19431
- if (value.cadence === "hourly") {
19432
- return hourlyEveryValues.includes(every) ? undefined : "every must divide a day evenly when cadence is hourly: 1, 2, 3, 4, 6, 8 or 12.";
19433
- }
19434
19619
  const max = maxEvery[value.cadence];
19435
19620
  return every > max ? `every is at most ${max} when cadence is ${value.cadence}.` : undefined;
19436
19621
  };
@@ -19497,65 +19682,10 @@ var checkAction = (action, ctx) => {
19497
19682
  });
19498
19683
  }
19499
19684
  };
19500
- var requiredScheduleFields = {
19501
- daily: ["timeOfDay", "timezoneId"],
19502
- hourly: ["timezoneId"],
19503
- monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
19504
- weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
19505
- };
19506
- var optionalScheduleFields = {
19507
- daily: ["daysOfWeek", "every", "startDate"],
19508
- hourly: ["daysOfWeek", "every", "minuteOfHour"],
19509
- monthly: ["every", "startDate"],
19510
- weekly: ["every", "startDate"]
19511
- };
19512
- var cadencesUsingField = {
19513
- dayOfMonth: "a monthly cadence",
19514
- dayOfWeek: "a weekly cadence",
19515
- daysOfWeek: "an hourly or daily cadence",
19516
- every: "any cadence",
19517
- minuteOfHour: "an hourly cadence",
19518
- startDate: "a daily, weekly or monthly cadence",
19519
- timeOfDay: "a daily, weekly or monthly cadence",
19520
- timezoneId: "an hourly, daily, weekly or monthly cadence"
19521
- };
19522
- var scheduleFields = [
19523
- "dayOfMonth",
19524
- "dayOfWeek",
19525
- "daysOfWeek",
19526
- "every",
19527
- "minuteOfHour",
19528
- "startDate",
19529
- "timeOfDay",
19530
- "timezoneId"
19531
- ];
19532
- var checkScheduleFields = (value, ctx) => {
19533
- const required = requiredScheduleFields[value.cadence];
19534
- const optional = optionalScheduleFields[value.cadence];
19535
- for (const field of scheduleFields) {
19536
- const isSupplied = value[field] !== undefined;
19537
- if (required.includes(field)) {
19538
- if (!isSupplied) {
19539
- ctx.addIssue({
19540
- code: "custom",
19541
- message: `${field} is required when cadence is ${value.cadence}.`,
19542
- path: [field]
19543
- });
19544
- }
19545
- continue;
19546
- }
19547
- if (isSupplied && !optional.includes(field)) {
19548
- ctx.addIssue({
19549
- code: "custom",
19550
- message: `${field} applies to ${cadencesUsingField[field]} only.`,
19551
- path: [field]
19552
- });
19553
- }
19554
- }
19555
- };
19556
19685
  var checkSchedule = (value, ctx) => {
19557
19686
  checkScheduleFields(value, ctx);
19558
19687
  checkScheduleRepeat(value, ctx);
19688
+ checkHourlyWindow(value, ctx);
19559
19689
  if (value.action.kind === "generativeSuite") {
19560
19690
  ctx.addIssue({
19561
19691
  code: "custom",
@@ -20794,7 +20924,10 @@ var makeFindEnvironmentsContract = (ids) => {
20794
20924
  });
20795
20925
  const output = object({
20796
20926
  defaultEnvironmentId: ids.environment.describe("The id of the workspace's default environment."),
20797
- 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."),
20798
20931
  nextCursor: nextCursorSchema
20799
20932
  });
20800
20933
  return {
@@ -21738,35 +21871,6 @@ var makeCreateIssueContract = (ids) => {
21738
21871
  };
21739
21872
  };
21740
21873
 
21741
- // node_modules/@qawolf/api-contracts/dist/v1/issue/decideSuggestion.js
21742
- var makeDecideSuggestionContract = (ids) => {
21743
- const input = object({
21744
- 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."),
21745
- issueId: ids.issue.describe("The coverage request or bug report that QA Wolf opened for a suggestion."),
21746
- skipReason: _enum(["not-worth-testing", "already-covered", "feature-removed"]).optional().describe("Why the suggestion is skipped. Required for skip.")
21747
- }).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
21748
- const output = object({
21749
- issue: makeIssueResourceSchema(ids)
21750
- });
21751
- return {
21752
- annotationJustifications: {
21753
- destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
21754
- openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
21755
- readOnlyHint: "Records a decision on a suggestion and changes the issue's status."
21756
- },
21757
- annotations: {
21758
- destructiveHint: false,
21759
- openWorldHint: true,
21760
- readOnlyHint: false
21761
- },
21762
- 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.",
21763
- input,
21764
- kind: "write",
21765
- name: "issue.decideSuggestion",
21766
- output
21767
- };
21768
- };
21769
-
21770
21874
  // node_modules/@qawolf/api-contracts/dist/v1/issue/listActivity.js
21771
21875
  var issueActivityTypeSchema = _enum([
21772
21876
  "created",
@@ -21920,7 +22024,6 @@ var makeIssueContracts = (ids) => ({
21920
22024
  attachFiles: makeAttachFilesToIssueContract(ids),
21921
22025
  comment: makeCommentOnIssueContract(ids),
21922
22026
  create: makeCreateIssueContract(ids),
21923
- decideSuggestion: makeDecideSuggestionContract(ids),
21924
22027
  find: makeFindIssuesContract(ids),
21925
22028
  get: makeGetIssueContract(ids),
21926
22029
  listActivity: makeListIssueActivityContract(ids),
@@ -22100,6 +22203,45 @@ var makeConnectMcpServerContract = (ids) => {
22100
22203
  };
22101
22204
  };
22102
22205
 
22206
+ // node_modules/@qawolf/api-contracts/dist/v1/narratedRecording/get.js
22207
+ var makeGetNarratedRecordingContract = (ids) => {
22208
+ const input = object({
22209
+ narratedRecordingId: string2().min(1).describe("The id of the narrated recording: the last segment of its video page URL, .../<workspace>/bug-report-video/<narratedRecordingId>."),
22210
+ workspaceId: ids.workspace.optional().describe("The workspace the narrated recording belongs to. Required when authenticating with an organization or user API key. Read it from whoami.")
22211
+ });
22212
+ const output = object({
22213
+ exportFailureMessage: string2().optional().describe("Why the export failed, when it failed and said why."),
22214
+ exportStatus: _enum(["not-requested", "pending", "ready", "failed"]).describe("Where the voiced video export is. pending: it is rendering, so check again in a minute. ready: video holds its links. failed: the export stopped; exportFailureMessage may say why. not-requested: no export was asked for yet."),
22215
+ narratedRecordingId: string2(),
22216
+ url: url().describe("The QA Wolf video page that plays the narrated recording. Share it with people; it stays stable."),
22217
+ video: object({
22218
+ downloadUrl: url().describe("Signed link that downloads the voiced mp4 instead of playing it."),
22219
+ durationMs: number2().positive(),
22220
+ expiresAt: exports_iso.datetime().describe("When the signed links stop working. Call narratedRecording.get again for fresh ones after it."),
22221
+ posterUrl: url().optional().describe("Signed link to an animated webp preview, when one exists."),
22222
+ subtitlesUrl: url().describe("Signed link to the WebVTT subtitles of the narration."),
22223
+ videoUrl: url().describe("Signed link that plays the voiced mp4 with the narration baked in.")
22224
+ }).optional().describe("The exported voiced video. Present only when exportStatus is ready. Its signed links stop working at expiresAt, so read this again for fresh links instead of storing them.")
22225
+ });
22226
+ return {
22227
+ annotationJustifications: {
22228
+ destructiveHint: "Does not change, re-export or delete the recording.",
22229
+ openWorldHint: "Reads QA Wolf workspace storage without changing the application under test.",
22230
+ readOnlyHint: "Reads a narrated recording's export status and signed video links."
22231
+ },
22232
+ annotations: {
22233
+ destructiveHint: false,
22234
+ openWorldHint: false,
22235
+ readOnlyHint: true
22236
+ },
22237
+ description: "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.",
22238
+ input,
22239
+ kind: "read",
22240
+ name: "narratedRecording.get",
22241
+ output
22242
+ };
22243
+ };
22244
+
22103
22245
  // node_modules/@qawolf/api-contracts/dist/v1/run/investigationSessionId.js
22104
22246
  var investigationSessionId = string2().trim().min(1).max(100).optional();
22105
22247
 
@@ -22293,7 +22435,7 @@ var runBuildVersionSchema = object({
22293
22435
  buildId: buildIdSchema,
22294
22436
  version: string2().optional()
22295
22437
  }).optional().describe("The run's build of this app. Absent for an app it got none of."),
22296
- kind: extensibleValue(["build", "info"], "build: the run got a build of this app. info: any other app an attempt installed, such as a companion app. It has no warnings."),
22438
+ kind: extensibleValue(["build", "info"], "build: the run got a build of this app. info: any other app an attempt installed, such as a companion app. Its only warning is changedDuringRun."),
22297
22439
  observed: array(object({
22298
22440
  attempts: attemptCount,
22299
22441
  buildId: buildIdSchema.optional().describe("Absent when the file is not one of the team's builds."),
@@ -22301,7 +22443,7 @@ var runBuildVersionSchema = object({
22301
22443
  })).describe("What attempts installed, one entry per build or version."),
22302
22444
  platform: buildPlatformSchema,
22303
22445
  unreportedAttempts: number2().int().nonnegative().describe("Finished attempts that reported no installed app, such as web attempts or attempts on an older Flows SDK."),
22304
- warnings: array(extensibleValue(["changedDuringRun", "notTested", "unknownApp"], "changedDuringRun: attempts installed different builds of the run's app. notTested: attempts installed files on this platform that could be this app, but none installed the run's build. An install of another app never counts. unknownApp: an attempt installed a file of this app that is not the run's build.")).describe("Why the installed apps may not be what the run should test.")
22446
+ warnings: array(extensibleValue(["changedDuringRun", "notTested", "unknownApp"], "changedDuringRun: attempts installed different builds of the run's app, or different versions of an info app. notTested: attempts installed files on this platform that could be this app, but none installed the run's build. An install of another app never counts. unknownApp: an attempt installed a file of this app that is not the run's build.")).describe("Why the installed apps may not be what the run should test.")
22305
22447
  });
22306
22448
  var runSiteVersionSchema = object({
22307
22449
  expected: object({
@@ -23059,6 +23201,130 @@ var makeSkillContracts = () => ({
23059
23201
  list: makeListSkillsContract()
23060
23202
  });
23061
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
+
23062
23328
  // node_modules/@qawolf/api-contracts/dist/v1/tag/list.js
23063
23329
  var makeListTagsContract = (ids) => {
23064
23330
  const input = object({
@@ -23097,7 +23363,8 @@ var makeContractsV1 = (ids) => {
23097
23363
  const resolvedIds = {
23098
23364
  ...defaultIdSchemas,
23099
23365
  ...ids,
23100
- runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
23366
+ runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt,
23367
+ suggestion: ids.suggestion ?? defaultIdSchemas.suggestion
23101
23368
  };
23102
23369
  return {
23103
23370
  activity: {
@@ -23150,6 +23417,9 @@ var makeContractsV1 = (ids) => {
23150
23417
  mcpServer: {
23151
23418
  connect: makeConnectMcpServerContract(resolvedIds)
23152
23419
  },
23420
+ narratedRecording: {
23421
+ get: makeGetNarratedRecordingContract(resolvedIds)
23422
+ },
23153
23423
  promotion: makePromotionContracts(resolvedIds),
23154
23424
  run: {
23155
23425
  acceptScreenshotBaseline: makeAcceptScreenshotBaselineContract(resolvedIds),
@@ -23165,6 +23435,7 @@ var makeContractsV1 = (ids) => {
23165
23435
  },
23166
23436
  runner: makeRunnerContracts(resolvedIds),
23167
23437
  skill: makeSkillContracts(),
23438
+ suggestion: makeSuggestionContracts(resolvedIds),
23168
23439
  tag: {
23169
23440
  create: makeCreateTagContract(resolvedIds),
23170
23441
  list: makeListTagsContract(resolvedIds)
@@ -25677,7 +25948,7 @@ function startUpdateCheck(deps) {
25677
25948
  // package.json
25678
25949
  var package_default = {
25679
25950
  name: "@qawolf/cli",
25680
- version: "2.9.0",
25951
+ version: "2.11.0",
25681
25952
  description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
25682
25953
  keywords: [
25683
25954
  "automation",
@@ -25749,7 +26020,7 @@ var package_default = {
25749
26020
  "@clack/prompts": "1.5.1",
25750
26021
  "@napi-rs/keyring": "1.3.0",
25751
26022
  "@oxc-node/core": "0.1.0",
25752
- "@qawolf/api-contracts": "0.129.0",
26023
+ "@qawolf/api-contracts": "0.132.0",
25753
26024
  "@qawolf/emails": "1.1.1",
25754
26025
  "@qawolf/flow-targets": "2.0.0",
25755
26026
  commander: "14.0.3",
@@ -41884,7 +42155,7 @@ A sequence exits by the worst thing that happened to any one of its actions: an
41884
42155
  // src/commands/runner/guides/events.txt
41885
42156
  var events_default = `# Streams
41886
42157
 
41887
- 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:
41888
42159
 
41889
42160
  $ qawolf runner events console --tail 20 | jq -r '.message'
41890
42161
  $ qawolf runner events run-logs --run <runId> --follow > run.log
@@ -44363,4 +44634,4 @@ createProgram({ signals }).parseAsync().catch(() => {
44363
44634
  process.exitCode = 1;
44364
44635
  }).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
44365
44636
 
44366
- //# debugId=9DA6FB8390FD6B4C64756E2164756E21
44637
+ //# debugId=114AC29954890FBA64756E2164756E21