@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.
@@ -8138,6 +8138,49 @@ 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
+
8174
+ // node_modules/@qawolf/api-contracts/dist/v1/promotion/validationRun.js
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.");
8176
+ var makePromotionValidationRunSchema = (ids) => object({
8177
+ aiTaskId: ids.aiTask.describe("The resolution task that started the run."),
8178
+ runId: ids.run,
8179
+ runMode: resolutionRunModeSchema,
8180
+ sourceCommitHash: string2().describe("The head commit of the conflict the run was started for."),
8181
+ targetCommitHash: string2().describe("The base commit of the conflict the run was started for.")
8182
+ });
8183
+
8141
8184
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/resource.js
8142
8185
  var promotionStatusSchema = _enum([
8143
8186
  "pending",
@@ -8157,11 +8200,14 @@ var makePromotionResourceSchema = (ids) => resource({
8157
8200
  baseEnvironmentId: ids.environment.describe("The environment the flow changes promote into."),
8158
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."),
8159
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."),
8160
8204
  headEnvironmentId: ids.environment.describe("The environment whose flow changes are promoted."),
8161
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."),
8162
8207
  promotedCommitHash: string2().optional().describe("The commit the promotion landed on the base environment's flow code branch. Present when status is promoted."),
8163
8208
  settledAt: exports_iso.datetime().optional().describe("When the promotion reached promoted, no-changes or abandoned. Absent while it is open."),
8164
- status: promotionStatusSchema
8209
+ status: promotionStatusSchema,
8210
+ 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.")
8165
8211
  }, { urlFieldDescription: "Absolute URL of the head environment's page." });
8166
8212
 
8167
8213
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/find.js
@@ -8220,6 +8266,53 @@ var makeGetPromotionContract = (ids) => {
8220
8266
  };
8221
8267
  };
8222
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
+
8223
8316
  // node_modules/@qawolf/api-contracts/dist/v1/promotion/resolve.js
8224
8317
  var maxResolvedFileBytes = 1e6;
8225
8318
  var utf8ByteLength = (content) => new TextEncoder().encode(content).byteLength;
@@ -8262,6 +8355,7 @@ var makeResolvePromotionContract = (ids) => {
8262
8355
  var makePromotionContracts = (ids) => ({
8263
8356
  find: makeFindPromotionsContract(ids),
8264
8357
  get: makeGetPromotionContract(ids),
8358
+ reportDecision: makeReportPromotionDecisionContract(ids),
8265
8359
  resolve: makeResolvePromotionContract(ids)
8266
8360
  });
8267
8361
 
@@ -8583,6 +8677,7 @@ var defaultIdSchemas = {
8583
8677
  promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
8584
8678
  run: string2().min(1).describe("The id of the run."),
8585
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."),
8586
8681
  trigger: string2().min(1).describe("The id of the trigger."),
8587
8682
  workspace: string2().min(1).describe("The id of the workspace.")
8588
8683
  };
@@ -8645,7 +8740,7 @@ var makeFlowSelectionSchema = (ids) => object({
8645
8740
  // node_modules/@qawolf/api-contracts/dist/v1/run/index.js
8646
8741
  var makeCreateRunContract = (ids) => {
8647
8742
  const input = object({
8648
- aiTaskId: ids.aiTask.optional().describe("The AI task whose conversation should receive run status updates."),
8743
+ 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."),
8649
8744
  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."),
8650
8745
  chatSessionId: ids.chatSession.optional().describe("The chat session whose transcript should receive run status updates."),
8651
8746
  environmentId: ids.environmentRef,
@@ -8654,6 +8749,7 @@ var makeCreateRunContract = (ids) => {
8654
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."),
8655
8750
  pullRequestNumber: number2().int().positive().describe("The number of the pull request to associate with the run.").optional(),
8656
8751
  repository: string2().min(1).describe('The owner/name of the repository, e.g. "acme/web".').optional(),
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.'),
8657
8753
  workspaceId: workspaceForEnvironmentRef(ids.workspace)
8658
8754
  }).and(makeFlowSelectionSchema(ids)).refine((value) => !(value.aiTaskId && value.chatSessionId), {
8659
8755
  message: "Provide at most one of aiTaskId and chatSessionId: a task already implies its own chat session.",
@@ -8774,6 +8870,7 @@ var screenPointSchema = strictObject({
8774
8870
  });
8775
8871
  var maxScrollDelta = 5000;
8776
8872
  var scrollDeltaSchema = int().min(-maxScrollDelta).max(maxScrollDelta);
8873
+ var optionalScrollDeltaSchema = scrollDeltaSchema.optional().default(0);
8777
8874
  var maxTypedTextLength = 200;
8778
8875
  var maxKeypressKeys = 10;
8779
8876
  var maxKeyNameLength = 32;
@@ -8794,8 +8891,8 @@ var browserActionSchema = discriminatedUnion("type", [
8794
8891
  y: screenCoordinateSchema
8795
8892
  }),
8796
8893
  strictObject({
8797
- scroll_x: scrollDeltaSchema,
8798
- scroll_y: scrollDeltaSchema,
8894
+ scroll_x: optionalScrollDeltaSchema,
8895
+ scroll_y: optionalScrollDeltaSchema,
8799
8896
  type: literal("scroll"),
8800
8897
  x: screenCoordinateSchema,
8801
8898
  y: screenCoordinateSchema
@@ -9148,6 +9245,7 @@ var journalEntrySchema = object({
9148
9245
  }));
9149
9246
  var knownJournalStreams = [
9150
9247
  "console",
9248
+ "network",
9151
9249
  "recorder",
9152
9250
  "run-events",
9153
9251
  "run-logs",
@@ -9549,10 +9647,16 @@ var runSelectionSchema = object({
9549
9647
  error: "A selection's startLine must not be after its endLine.",
9550
9648
  path: ["startLine"]
9551
9649
  });
9650
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/hourlyWindowField.js
9651
+ var triggerHourlyWindowSchema = object({
9652
+ 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.`),
9653
+ 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.`)
9654
+ }).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.");
9655
+
9552
9656
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatFields.js
9553
9657
  var triggerScheduleRepeatFields = {
9554
9658
  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."),
9555
- 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."),
9659
+ 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."),
9556
9660
  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.')
9557
9661
  };
9558
9662
 
@@ -9594,15 +9698,99 @@ var makeTriggerScheduleFields = (ids) => ({
9594
9698
  }).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."),
9595
9699
  environmentId: ids.environmentId.describe("The environment the scheduled runs happen in."),
9596
9700
  ...triggerScheduleRepeatFields,
9597
- minuteOfHour: number2().int().min(0).max(59).optional().describe("Minutes past the hour an hourly schedule fires. Defaults to 0."),
9701
+ 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."),
9598
9702
  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.'),
9599
- 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.")
9703
+ 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."),
9704
+ window: triggerHourlyWindowSchema
9600
9705
  });
9601
9706
 
9707
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/hourlyWindowRules.js
9708
+ var partsOf = (time) => time.split(":").map(Number);
9709
+ var checkHourlyWindow = (value, ctx) => {
9710
+ if (value.cadence !== "hourly" || value.window === undefined)
9711
+ return;
9712
+ const [startHour, startMinute] = partsOf(value.window.startTime);
9713
+ const [endHour] = value.window.endTime === undefined ? [] : partsOf(value.window.endTime);
9714
+ if (endHour !== undefined && startHour !== undefined && endHour <= startHour) {
9715
+ ctx.addIssue({
9716
+ code: "custom",
9717
+ 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.",
9718
+ path: ["window", "endTime"]
9719
+ });
9720
+ }
9721
+ if (value.minuteOfHour !== undefined && value.minuteOfHour !== startMinute) {
9722
+ ctx.addIssue({
9723
+ code: "custom",
9724
+ message: "minuteOfHour must match the minute of window.startTime, which sets it.",
9725
+ path: ["minuteOfHour"]
9726
+ });
9727
+ }
9728
+ };
9729
+
9730
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleFieldRules.js
9731
+ var requiredScheduleFields = {
9732
+ daily: ["timeOfDay", "timezoneId"],
9733
+ hourly: ["timezoneId"],
9734
+ monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
9735
+ weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
9736
+ };
9737
+ var optionalScheduleFields = {
9738
+ daily: ["daysOfWeek", "every", "startDate"],
9739
+ hourly: ["daysOfWeek", "every", "minuteOfHour", "window"],
9740
+ monthly: ["every", "startDate"],
9741
+ weekly: ["every", "startDate"]
9742
+ };
9743
+ var cadencesUsingField = {
9744
+ dayOfMonth: "a monthly cadence",
9745
+ dayOfWeek: "a weekly cadence",
9746
+ daysOfWeek: "an hourly or daily cadence",
9747
+ every: "any cadence",
9748
+ minuteOfHour: "an hourly cadence",
9749
+ startDate: "a daily, weekly or monthly cadence",
9750
+ timeOfDay: "a daily, weekly or monthly cadence",
9751
+ timezoneId: "an hourly, daily, weekly or monthly cadence",
9752
+ window: "an hourly cadence"
9753
+ };
9754
+ var scheduleFields = [
9755
+ "dayOfMonth",
9756
+ "dayOfWeek",
9757
+ "daysOfWeek",
9758
+ "every",
9759
+ "minuteOfHour",
9760
+ "startDate",
9761
+ "timeOfDay",
9762
+ "timezoneId",
9763
+ "window"
9764
+ ];
9765
+ var checkScheduleFields = (value, ctx) => {
9766
+ const required = requiredScheduleFields[value.cadence];
9767
+ const optional = optionalScheduleFields[value.cadence];
9768
+ for (const field of scheduleFields) {
9769
+ const isSupplied = value[field] !== undefined;
9770
+ if (required.includes(field)) {
9771
+ if (!isSupplied) {
9772
+ ctx.addIssue({
9773
+ code: "custom",
9774
+ message: `${field} is required when cadence is ${value.cadence}.`,
9775
+ path: [field]
9776
+ });
9777
+ }
9778
+ continue;
9779
+ }
9780
+ if (isSupplied && !optional.includes(field)) {
9781
+ ctx.addIssue({
9782
+ code: "custom",
9783
+ message: `${field} applies to ${cadencesUsingField[field]} only.`,
9784
+ path: [field]
9785
+ });
9786
+ }
9787
+ }
9788
+ };
9789
+
9602
9790
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatRules.js
9603
- var hourlyEveryValues = [1, 2, 3, 4, 6, 8, 12];
9604
9791
  var maxEvery = {
9605
9792
  daily: 31,
9793
+ hourly: 12,
9606
9794
  monthly: 12,
9607
9795
  weekly: 12
9608
9796
  };
@@ -9620,9 +9808,6 @@ var calendarDayOf = (startDate) => {
9620
9808
  return !Number.isNaN(date.getTime()) && date.toISOString().startsWith(startDate) ? date : undefined;
9621
9809
  };
9622
9810
  var everyIssue = (value, every) => {
9623
- if (value.cadence === "hourly") {
9624
- return hourlyEveryValues.includes(every) ? undefined : "every must divide a day evenly when cadence is hourly: 1, 2, 3, 4, 6, 8 or 12.";
9625
- }
9626
9811
  const max = maxEvery[value.cadence];
9627
9812
  return every > max ? `every is at most ${max} when cadence is ${value.cadence}.` : undefined;
9628
9813
  };
@@ -9689,65 +9874,10 @@ var checkAction = (action, ctx) => {
9689
9874
  });
9690
9875
  }
9691
9876
  };
9692
- var requiredScheduleFields = {
9693
- daily: ["timeOfDay", "timezoneId"],
9694
- hourly: ["timezoneId"],
9695
- monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
9696
- weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
9697
- };
9698
- var optionalScheduleFields = {
9699
- daily: ["daysOfWeek", "every", "startDate"],
9700
- hourly: ["daysOfWeek", "every", "minuteOfHour"],
9701
- monthly: ["every", "startDate"],
9702
- weekly: ["every", "startDate"]
9703
- };
9704
- var cadencesUsingField = {
9705
- dayOfMonth: "a monthly cadence",
9706
- dayOfWeek: "a weekly cadence",
9707
- daysOfWeek: "an hourly or daily cadence",
9708
- every: "any cadence",
9709
- minuteOfHour: "an hourly cadence",
9710
- startDate: "a daily, weekly or monthly cadence",
9711
- timeOfDay: "a daily, weekly or monthly cadence",
9712
- timezoneId: "an hourly, daily, weekly or monthly cadence"
9713
- };
9714
- var scheduleFields = [
9715
- "dayOfMonth",
9716
- "dayOfWeek",
9717
- "daysOfWeek",
9718
- "every",
9719
- "minuteOfHour",
9720
- "startDate",
9721
- "timeOfDay",
9722
- "timezoneId"
9723
- ];
9724
- var checkScheduleFields = (value, ctx) => {
9725
- const required = requiredScheduleFields[value.cadence];
9726
- const optional = optionalScheduleFields[value.cadence];
9727
- for (const field of scheduleFields) {
9728
- const isSupplied = value[field] !== undefined;
9729
- if (required.includes(field)) {
9730
- if (!isSupplied) {
9731
- ctx.addIssue({
9732
- code: "custom",
9733
- message: `${field} is required when cadence is ${value.cadence}.`,
9734
- path: [field]
9735
- });
9736
- }
9737
- continue;
9738
- }
9739
- if (isSupplied && !optional.includes(field)) {
9740
- ctx.addIssue({
9741
- code: "custom",
9742
- message: `${field} applies to ${cadencesUsingField[field]} only.`,
9743
- path: [field]
9744
- });
9745
- }
9746
- }
9747
- };
9748
9877
  var checkSchedule = (value, ctx) => {
9749
9878
  checkScheduleFields(value, ctx);
9750
9879
  checkScheduleRepeat(value, ctx);
9880
+ checkHourlyWindow(value, ctx);
9751
9881
  if (value.action.kind === "generativeSuite") {
9752
9882
  ctx.addIssue({
9753
9883
  code: "custom",
@@ -10986,7 +11116,10 @@ var makeFindEnvironmentsContract = (ids) => {
10986
11116
  });
10987
11117
  const output = object({
10988
11118
  defaultEnvironmentId: ids.environment.describe("The id of the workspace's default environment."),
10989
- 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."),
10990
11123
  nextCursor: nextCursorSchema
10991
11124
  });
10992
11125
  return {
@@ -11930,35 +12063,6 @@ var makeCreateIssueContract = (ids) => {
11930
12063
  };
11931
12064
  };
11932
12065
 
11933
- // node_modules/@qawolf/api-contracts/dist/v1/issue/decideSuggestion.js
11934
- var makeDecideSuggestionContract = (ids) => {
11935
- const input = object({
11936
- 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."),
11937
- issueId: ids.issue.describe("The coverage request or bug report that QA Wolf opened for a suggestion."),
11938
- skipReason: _enum(["not-worth-testing", "already-covered", "feature-removed"]).optional().describe("Why the suggestion is skipped. Required for skip.")
11939
- }).refine(({ decision, skipReason }) => decision !== "skip" || skipReason !== undefined, { message: "skipReason is required when the decision is skip." });
11940
- const output = object({
11941
- issue: makeIssueResourceSchema(ids)
11942
- });
11943
- return {
11944
- annotationJustifications: {
11945
- destructiveHint: "Every decision can be undone until the flow joins, and nothing is deleted.",
11946
- openWorldHint: "An added suggestion writes its flow to the environment's flow code repository.",
11947
- readOnlyHint: "Records a decision on a suggestion and changes the issue's status."
11948
- },
11949
- annotations: {
11950
- destructiveHint: false,
11951
- openWorldHint: true,
11952
- readOnlyHint: false
11953
- },
11954
- 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.",
11955
- input,
11956
- kind: "write",
11957
- name: "issue.decideSuggestion",
11958
- output
11959
- };
11960
- };
11961
-
11962
12066
  // node_modules/@qawolf/api-contracts/dist/v1/issue/listActivity.js
11963
12067
  var issueActivityTypeSchema = _enum([
11964
12068
  "created",
@@ -12112,7 +12216,6 @@ var makeIssueContracts = (ids) => ({
12112
12216
  attachFiles: makeAttachFilesToIssueContract(ids),
12113
12217
  comment: makeCommentOnIssueContract(ids),
12114
12218
  create: makeCreateIssueContract(ids),
12115
- decideSuggestion: makeDecideSuggestionContract(ids),
12116
12219
  find: makeFindIssuesContract(ids),
12117
12220
  get: makeGetIssueContract(ids),
12118
12221
  listActivity: makeListIssueActivityContract(ids),
@@ -12292,6 +12395,45 @@ var makeConnectMcpServerContract = (ids) => {
12292
12395
  };
12293
12396
  };
12294
12397
 
12398
+ // node_modules/@qawolf/api-contracts/dist/v1/narratedRecording/get.js
12399
+ var makeGetNarratedRecordingContract = (ids) => {
12400
+ const input = object({
12401
+ narratedRecordingId: string2().min(1).describe("The id of the narrated recording: the last segment of its video page URL, .../<workspace>/bug-report-video/<narratedRecordingId>."),
12402
+ 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.")
12403
+ });
12404
+ const output = object({
12405
+ exportFailureMessage: string2().optional().describe("Why the export failed, when it failed and said why."),
12406
+ 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."),
12407
+ narratedRecordingId: string2(),
12408
+ url: url().describe("The QA Wolf video page that plays the narrated recording. Share it with people; it stays stable."),
12409
+ video: object({
12410
+ downloadUrl: url().describe("Signed link that downloads the voiced mp4 instead of playing it."),
12411
+ durationMs: number2().positive(),
12412
+ expiresAt: exports_iso.datetime().describe("When the signed links stop working. Call narratedRecording.get again for fresh ones after it."),
12413
+ posterUrl: url().optional().describe("Signed link to an animated webp preview, when one exists."),
12414
+ subtitlesUrl: url().describe("Signed link to the WebVTT subtitles of the narration."),
12415
+ videoUrl: url().describe("Signed link that plays the voiced mp4 with the narration baked in.")
12416
+ }).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.")
12417
+ });
12418
+ return {
12419
+ annotationJustifications: {
12420
+ destructiveHint: "Does not change, re-export or delete the recording.",
12421
+ openWorldHint: "Reads QA Wolf workspace storage without changing the application under test.",
12422
+ readOnlyHint: "Reads a narrated recording's export status and signed video links."
12423
+ },
12424
+ annotations: {
12425
+ destructiveHint: false,
12426
+ openWorldHint: false,
12427
+ readOnlyHint: true
12428
+ },
12429
+ 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.",
12430
+ input,
12431
+ kind: "read",
12432
+ name: "narratedRecording.get",
12433
+ output
12434
+ };
12435
+ };
12436
+
12295
12437
  // node_modules/@qawolf/api-contracts/dist/v1/run/investigationSessionId.js
12296
12438
  var investigationSessionId = string2().trim().min(1).max(100).optional();
12297
12439
 
@@ -12485,7 +12627,7 @@ var runBuildVersionSchema = object({
12485
12627
  buildId: buildIdSchema,
12486
12628
  version: string2().optional()
12487
12629
  }).optional().describe("The run's build of this app. Absent for an app it got none of."),
12488
- 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."),
12630
+ 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."),
12489
12631
  observed: array(object({
12490
12632
  attempts: attemptCount,
12491
12633
  buildId: buildIdSchema.optional().describe("Absent when the file is not one of the team's builds."),
@@ -12493,7 +12635,7 @@ var runBuildVersionSchema = object({
12493
12635
  })).describe("What attempts installed, one entry per build or version."),
12494
12636
  platform: buildPlatformSchema,
12495
12637
  unreportedAttempts: number2().int().nonnegative().describe("Finished attempts that reported no installed app, such as web attempts or attempts on an older Flows SDK."),
12496
- 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.")
12638
+ 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.")
12497
12639
  });
12498
12640
  var runSiteVersionSchema = object({
12499
12641
  expected: object({
@@ -13251,6 +13393,130 @@ var makeSkillContracts = () => ({
13251
13393
  list: makeListSkillsContract()
13252
13394
  });
13253
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
+
13254
13520
  // node_modules/@qawolf/api-contracts/dist/v1/tag/list.js
13255
13521
  var makeListTagsContract = (ids) => {
13256
13522
  const input = object({
@@ -13289,7 +13555,8 @@ var makeContractsV1 = (ids) => {
13289
13555
  const resolvedIds = {
13290
13556
  ...defaultIdSchemas,
13291
13557
  ...ids,
13292
- runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
13558
+ runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt,
13559
+ suggestion: ids.suggestion ?? defaultIdSchemas.suggestion
13293
13560
  };
13294
13561
  return {
13295
13562
  activity: {
@@ -13342,6 +13609,9 @@ var makeContractsV1 = (ids) => {
13342
13609
  mcpServer: {
13343
13610
  connect: makeConnectMcpServerContract(resolvedIds)
13344
13611
  },
13612
+ narratedRecording: {
13613
+ get: makeGetNarratedRecordingContract(resolvedIds)
13614
+ },
13345
13615
  promotion: makePromotionContracts(resolvedIds),
13346
13616
  run: {
13347
13617
  acceptScreenshotBaseline: makeAcceptScreenshotBaselineContract(resolvedIds),
@@ -13357,6 +13627,7 @@ var makeContractsV1 = (ids) => {
13357
13627
  },
13358
13628
  runner: makeRunnerContracts(resolvedIds),
13359
13629
  skill: makeSkillContracts(),
13630
+ suggestion: makeSuggestionContracts(resolvedIds),
13360
13631
  tag: {
13361
13632
  create: makeCreateTagContract(resolvedIds),
13362
13633
  list: makeListTagsContract(resolvedIds)
@@ -18141,4 +18412,4 @@ export {
18141
18412
  createRunnerSdk
18142
18413
  };
18143
18414
 
18144
- //# debugId=706D757BA902B47B64756E2164756E21
18415
+ //# debugId=BBFB581D3BFFB3C364756E2164756E21