@qawolf/cli 2.6.0 → 2.7.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
@@ -16878,6 +16878,7 @@ var agentReplySchema = object({
16878
16878
 
16879
16879
  // node_modules/@qawolf/api-contracts/dist/v1/agent/wait.js
16880
16880
  var maxAgentWaitSeconds = 45;
16881
+ var maxAgentWaitSecondsWithProgress = 170;
16881
16882
  var agentWakeReasonSchema = _enum(["reply", "status", "timeout"]).describe('Why a held check answered. "reply" means the AI said something new, "status" means the session settled or needs you, "timeout" means the hold ran out with nothing new.');
16882
16883
 
16883
16884
  // node_modules/@qawolf/api-contracts/dist/v1/run/summary.js
@@ -16910,6 +16911,54 @@ var makeRunSummaryFields = (ids) => ({
16910
16911
  }).optional().describe("The run that replaced this one, present only when `status` is `superseded`. A newer deployment to the same branch and environment (and service, when the deployment named one) cancels the older run's unfinished flows and takes over. Deduplication ignores the commit, so the replacement may be testing a later commit than this run did. Only the direct replacement is named; that run can itself be superseded.")
16911
16912
  });
16912
16913
 
16914
+ // node_modules/@qawolf/api-contracts/dist/v1/activity/wait.js
16915
+ var maxActivityWaitItems = 50;
16916
+ var makeActivityWaitContract = (ids) => {
16917
+ const cursors = record(string2().min(1), string2().min(1));
16918
+ const runIds = array(ids.run);
16919
+ const sessionIds = array(ids.chatSession);
16920
+ const input = object({
16921
+ cursors: cursors.optional().describe("Each session's nextCursor from the previous answer, keyed by its session id. A session without one is read from its first reply."),
16922
+ runIds: runIds.max(maxActivityWaitItems).optional().describe(`The runs you are waiting on, including a run still being created. Send at least one session or run, and at most ${maxActivityWaitItems} together.`),
16923
+ sessionIds: sessionIds.max(maxActivityWaitItems).optional().describe("The Tester sessions you are waiting on, as agent.send answered with."),
16924
+ waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this call open, in seconds. Defaults to ${maxAgentWaitSeconds}. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives.`)
16925
+ });
16926
+ const output = object({
16927
+ open: object({ cursors, runIds, sessionIds }).describe("Everything still worth waiting on: each session whose status is not completed, failed, cancelled or not-found, with its new cursor, and each run that has not finished. Send it as the next call's input."),
16928
+ runs: array(object({
16929
+ finished: boolean2().describe("True once the status is passed, failed, canceled, superseded or not-found. A finished run never changes again."),
16930
+ runId: ids.run.describe("The run id you sent."),
16931
+ status: _enum([...publicRunSummaryStatusValues, "not-found"]).describe(`The run's status, as run.get reports it. A run still being created reads "queued". "not-found" means no run has this id: its creation failed, was skipped or never finished, or the run is gone.`),
16932
+ url: string2().optional().describe("Absolute URL of the run page. Absent while the run is still being created, and when it is not found.")
16933
+ })).describe("Every run you sent, in the order you sent them."),
16934
+ sessions: array(object({
16935
+ nextCursor: string2().min(1).describe("Send back under this session's id in cursors to read only what follows."),
16936
+ replies: array(agentReplySchema).describe("What the AI has said since the cursor, oldest first, as agent.get returns it. Empty when it said nothing new."),
16937
+ sessionId: ids.chatSession,
16938
+ status: _enum([...agentSessionStatuses, "not-found"]).describe('Where the work stands, as agent.get reports it. "working" means the AI is still on it. "waiting-for-you" means it asked a question that agent.send must answer. "completed" means it finished, and a new agent.send continues it. "failed" and "cancelled" are settled. "not-found" means the session is gone and will not change.')
16939
+ })).describe("Every session you sent, in the order you sent them."),
16940
+ waitSeconds: number2().int().describe("The hold this call was allowed, in seconds, after clamping."),
16941
+ wokeOn: _enum(["activity", "timeout"]).describe('"activity" means a session replied or changed status, or a run finished, or a session or run was not found; every item with news is in this answer. "timeout" means the hold ran out with nothing new.')
16942
+ });
16943
+ return {
16944
+ annotationJustifications: {
16945
+ destructiveHint: "Does not cancel work, stop runs or edit tests.",
16946
+ openWorldHint: "Reads QA Wolf sessions and runs without posting to external services.",
16947
+ readOnlyHint: "Retrieves session replies and statuses and run statuses without sending work."
16948
+ },
16949
+ annotations: {
16950
+ destructiveHint: false,
16951
+ openWorldHint: false,
16952
+ readOnlyHint: true
16953
+ },
16954
+ description: `Wait on many QA Wolf AI (Tester) sessions and runs in one call. Pass every Tester session and run you are waiting on. The call returns as soon as any session replies or changes status or any run finishes, and reports every item with news. Send back open as the next call's input, and call again as soon as it returns. Pass waitSeconds above ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives.`,
16955
+ input,
16956
+ kind: "read",
16957
+ name: "activity.wait",
16958
+ output
16959
+ };
16960
+ };
16961
+
16913
16962
  // node_modules/@qawolf/api-contracts/dist/v1/deployment/didNotRunReason.js
16914
16963
  var didNotRunReasonSchema = _enum([
16915
16964
  "billing-prevented",
@@ -17297,6 +17346,9 @@ var makeListScreenshotComparisonsContract = (ids) => {
17297
17346
  };
17298
17347
  };
17299
17348
 
17349
+ // node_modules/@qawolf/api-contracts/dist/v1/run/wait.js
17350
+ var runWakeReasonSchema = _enum(["status", "timeout"]).describe(`Why a held check answered. "status" means the run's status differs from the one the check started with, or the run was already terminal; "timeout" means the hold ran out with the status unchanged.`);
17351
+
17300
17352
  // node_modules/@qawolf/api-contracts/dist/v1/runner/actionSequence.js
17301
17353
  var maxActionsPerRequest = 10;
17302
17354
  var screenshotModes = ["none", "final", "each"];
@@ -18079,6 +18131,13 @@ var runSelectionSchema = object({
18079
18131
  error: "A selection's startLine must not be after its endLine.",
18080
18132
  path: ["startLine"]
18081
18133
  });
18134
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatFields.js
18135
+ var triggerScheduleRepeatFields = {
18136
+ 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."),
18137
+ 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."),
18138
+ 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.')
18139
+ };
18140
+
18082
18141
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/configuration.js
18083
18142
  var isTimezone = (value) => {
18084
18143
  try {
@@ -18088,7 +18147,7 @@ var isTimezone = (value) => {
18088
18147
  return false;
18089
18148
  }
18090
18149
  };
18091
- var triggerCadenceSchema = _enum(["hourly", "daily", "weekly"]).describe("How often the schedule fires.");
18150
+ var triggerCadenceSchema = _enum(["hourly", "daily", "weekly", "monthly"]).describe("How often the schedule fires.");
18092
18151
  var triggerDayOfWeekSchema = _enum([
18093
18152
  "monday",
18094
18153
  "tuesday",
@@ -18116,11 +18175,74 @@ var makeTriggerScheduleFields = (ids) => ({
18116
18175
  message: "Expected each day to be named at most once."
18117
18176
  }).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."),
18118
18177
  environmentId: ids.environmentId.describe("The environment the scheduled runs happen in."),
18178
+ ...triggerScheduleRepeatFields,
18119
18179
  minuteOfHour: number2().int().min(0).max(59).optional().describe("Minutes past the hour an hourly schedule fires. Defaults to 0."),
18120
- timeOfDay: string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/).optional().describe('The wall clock time a daily or weekly schedule fires, as "HH:mm". Required when cadence is daily or weekly.'),
18180
+ 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.'),
18121
18181
  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.")
18122
18182
  });
18123
18183
 
18184
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatRules.js
18185
+ var hourlyEveryValues = [1, 2, 3, 4, 6, 8, 12];
18186
+ var maxEvery = {
18187
+ daily: 31,
18188
+ monthly: 12,
18189
+ weekly: 12
18190
+ };
18191
+ var dayOfWeekNames = [
18192
+ "sunday",
18193
+ "monday",
18194
+ "tuesday",
18195
+ "wednesday",
18196
+ "thursday",
18197
+ "friday",
18198
+ "saturday"
18199
+ ];
18200
+ var calendarDayOf = (startDate) => {
18201
+ const date = new Date(`${startDate}T00:00:00Z`);
18202
+ return !Number.isNaN(date.getTime()) && date.toISOString().startsWith(startDate) ? date : undefined;
18203
+ };
18204
+ var everyIssue = (value, every) => {
18205
+ if (value.cadence === "hourly") {
18206
+ return hourlyEveryValues.includes(every) ? undefined : "every must divide a day evenly when cadence is hourly: 1, 2, 3, 4, 6, 8 or 12.";
18207
+ }
18208
+ const max = maxEvery[value.cadence];
18209
+ return every > max ? `every is at most ${max} when cadence is ${value.cadence}.` : undefined;
18210
+ };
18211
+ var startDateIssue = (value, startDate) => {
18212
+ const day = calendarDayOf(startDate);
18213
+ if (day === undefined)
18214
+ return "startDate must be a real calendar date.";
18215
+ if (value.cadence === "weekly" && value.dayOfWeek !== undefined && dayOfWeekNames[day.getUTCDay()] !== value.dayOfWeek)
18216
+ return "startDate must fall on dayOfWeek.";
18217
+ if (value.cadence === "monthly" && value.dayOfMonth !== undefined && day.getUTCDate() !== value.dayOfMonth)
18218
+ return "startDate must fall on dayOfMonth.";
18219
+ return;
18220
+ };
18221
+ var checkScheduleRepeat = (value, ctx) => {
18222
+ const every = value.every ?? 1;
18223
+ const issue = (message, field) => ctx.addIssue({ code: "custom", message, path: [field] });
18224
+ const everyMessage = everyIssue(value, every);
18225
+ if (everyMessage !== undefined)
18226
+ issue(everyMessage, "every");
18227
+ if (value.cadence === "hourly")
18228
+ return;
18229
+ if (every > 1 && value.daysOfWeek !== undefined)
18230
+ issue("daysOfWeek applies only when every is 1.", "daysOfWeek");
18231
+ if (every > 1 && value.startDate === undefined) {
18232
+ issue("startDate is required when every is more than 1.", "startDate");
18233
+ return;
18234
+ }
18235
+ if (value.startDate === undefined)
18236
+ return;
18237
+ if (every === 1) {
18238
+ issue("startDate applies only when every is more than 1.", "startDate");
18239
+ return;
18240
+ }
18241
+ const startDateMessage = startDateIssue(value, value.startDate);
18242
+ if (startDateMessage !== undefined)
18243
+ issue(startDateMessage, "startDate");
18244
+ };
18245
+
18124
18246
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/configurationRules.js
18125
18247
  var checkAction = (action, ctx) => {
18126
18248
  const namesFlows = action.flowIds.length + action.tagNames.length > 0;
@@ -18152,24 +18274,32 @@ var checkAction = (action, ctx) => {
18152
18274
  var requiredScheduleFields = {
18153
18275
  daily: ["timeOfDay", "timezoneId"],
18154
18276
  hourly: ["timezoneId"],
18277
+ monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
18155
18278
  weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
18156
18279
  };
18157
18280
  var optionalScheduleFields = {
18158
- daily: ["daysOfWeek"],
18159
- hourly: ["daysOfWeek", "minuteOfHour"],
18160
- weekly: []
18281
+ daily: ["daysOfWeek", "every", "startDate"],
18282
+ hourly: ["daysOfWeek", "every", "minuteOfHour"],
18283
+ monthly: ["every", "startDate"],
18284
+ weekly: ["every", "startDate"]
18161
18285
  };
18162
18286
  var cadencesUsingField = {
18287
+ dayOfMonth: "a monthly cadence",
18163
18288
  dayOfWeek: "a weekly cadence",
18164
18289
  daysOfWeek: "an hourly or daily cadence",
18290
+ every: "any cadence",
18165
18291
  minuteOfHour: "an hourly cadence",
18166
- timeOfDay: "a daily or weekly cadence",
18167
- timezoneId: "an hourly, daily or weekly cadence"
18292
+ startDate: "a daily, weekly or monthly cadence",
18293
+ timeOfDay: "a daily, weekly or monthly cadence",
18294
+ timezoneId: "an hourly, daily, weekly or monthly cadence"
18168
18295
  };
18169
18296
  var scheduleFields = [
18297
+ "dayOfMonth",
18170
18298
  "dayOfWeek",
18171
18299
  "daysOfWeek",
18300
+ "every",
18172
18301
  "minuteOfHour",
18302
+ "startDate",
18173
18303
  "timeOfDay",
18174
18304
  "timezoneId"
18175
18305
  ];
@@ -18199,6 +18329,7 @@ var checkScheduleFields = (value, ctx) => {
18199
18329
  };
18200
18330
  var checkSchedule = (value, ctx) => {
18201
18331
  checkScheduleFields(value, ctx);
18332
+ checkScheduleRepeat(value, ctx);
18202
18333
  if (value.action.kind === "generativeSuite") {
18203
18334
  ctx.addIssue({
18204
18335
  code: "custom",
@@ -18477,7 +18608,7 @@ var makeAgentGetContract = (ids) => {
18477
18608
  const input = object({
18478
18609
  cursor: string2().min(1).optional().describe("Opaque cursor copied from this same session's previous nextCursor. Omit to read from its first reply."),
18479
18610
  sessionId: ids.chatSession.describe("The id agent.send answered with."),
18480
- waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds. Defaults to ${maxAgentWaitSeconds}, the longest hold, and a larger value clamps to it. Pass 0 to answer at once. Check again as soon as a held check returns.`)
18611
+ waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds. Defaults to ${maxAgentWaitSeconds}. Pass 0 to answer at once. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives. A held check answers the moment a reply or status change arrives. Check again as soon as a held check returns.`)
18481
18612
  });
18482
18613
  const output = resource({
18483
18614
  nextCursor: string2().min(1).describe("Send back as cursor on the next check to read only what follows. Always present, even with no replies. Belongs to this session alone."),
@@ -18500,7 +18631,7 @@ var makeAgentGetContract = (ids) => {
18500
18631
  openWorldHint: false,
18501
18632
  readOnlyHint: true
18502
18633
  },
18503
- description: 'Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Pass waitSeconds 45 so the server holds the check open and answers the moment something happens. Check again as soon as it returns; never sleep between checks or loop without waitSeconds. Pass the nextCursor from one response as the cursor on the next check; it then reads only what is new, and only for the session that minted it. Continue monitoring silently when the status is unchanged and no replies come back; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result.',
18634
+ description: `Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Pass waitSeconds ${maxAgentWaitSeconds} so the server holds the check open and answers the moment a reply or status change arrives. Check again as soon as it returns; never sleep between checks or loop without waitSeconds. Pass the nextCursor from one response as the cursor on the next check; it then reads only what is new, and only for the session that minted it. Continue monitoring silently when the status is unchanged and no replies come back; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result.`,
18504
18635
  input,
18505
18636
  kind: "read",
18506
18637
  name: "agent.get",
@@ -19860,13 +19991,7 @@ var makeUpdateFlowContract = (ids) => {
19860
19991
  };
19861
19992
 
19862
19993
  // node_modules/@qawolf/api-contracts/dist/v1/issue/index.js
19863
- var issuePrioritySchema = _enum([
19864
- "unprioritized",
19865
- "low",
19866
- "medium",
19867
- "high",
19868
- "urgent"
19869
- ]);
19994
+ var issuePrioritySchema = _enum(["unprioritized", "low", "medium", "high", "urgent"]).describe("An open bug report at unprioritized, high or urgent priority blocks its suite and CI gate. Low and medium don't block. Priority never makes a blocker or coverage request block.");
19870
19995
  var issueStatusSchema = _enum([
19871
19996
  "backlog",
19872
19997
  "pending",
@@ -20066,6 +20191,51 @@ var makeGetInvestigationContract = (ids) => {
20066
20191
  };
20067
20192
  };
20068
20193
 
20194
+ // node_modules/@qawolf/api-contracts/dist/v1/investigation/question/answer.js
20195
+ var maxAnswersPerCall = 50;
20196
+ var findingIdSchema = string2().min(1).max(80);
20197
+ var findingIdsOf = ({ answers = {}, replies = {} }) => [
20198
+ ...Object.keys(answers),
20199
+ ...Object.keys(replies)
20200
+ ];
20201
+ var makeAnswerInvestigationQuestionsContract = (ids) => {
20202
+ const input = object({
20203
+ answers: record(findingIdSchema, string2().min(1)).optional().describe("Offered answers, keyed by the question's findingId. Each value is the `value` of one of the question's offered answers, such as maintenance or bug."),
20204
+ replies: record(findingIdSchema, string2().trim().min(1).max(1000)).optional().describe("The person's own words, keyed by the question's findingId, for a question that none of the offered answers fits."),
20205
+ runId: ids.run
20206
+ }).refine((sent) => findingIdsOf(sent).length > 0, {
20207
+ message: "Send at least one answer or reply."
20208
+ }).refine((sent) => findingIdsOf(sent).length <= maxAnswersPerCall, {
20209
+ message: `Send at most ${maxAnswersPerCall} answers and replies in one call.`
20210
+ }).refine((sent) => new Set(findingIdsOf(sent)).size === findingIdsOf(sent).length, { message: "Answer each question once, as an answer or as a reply." });
20211
+ const output = resource({
20212
+ answeredFindingIds: array(string2()).describe("The questions this call answered. The investigation receives the answers and acts on them."),
20213
+ refused: array(object({
20214
+ findingId: string2(),
20215
+ message: string2().describe("Why the answer was not recorded."),
20216
+ reason: string2().describe('Known values: "answer-not-offered", "environment-terminated", "not-asking", "not-found", "response-pending" and "superseded". New values can appear.')
20217
+ })).describe("The answers that were not recorded."),
20218
+ runId: ids.run
20219
+ }, { urlFieldDescription: "The run in the QA Wolf app." });
20220
+ return {
20221
+ annotationJustifications: {
20222
+ destructiveHint: "Records a person's answer that cannot be changed, and the investigation acts on it, for example by filing a bug or publishing a test fix.",
20223
+ openWorldHint: "A bug report the investigation files from an answer can reach the workspace's configured integrations.",
20224
+ readOnlyHint: "Records answers to the questions of a run's investigation."
20225
+ },
20226
+ annotations: {
20227
+ destructiveHint: true,
20228
+ openWorldHint: true,
20229
+ readOnlyHint: false
20230
+ },
20231
+ description: "Answer the questions the QA Wolf AI investigating a failed run is waiting on, as the signed-in person. " + "List the questions with investigation.question.find, and answer only with the person's approval. " + "The first answer to a question wins, and the investigation acts on it. " + "Only a person's own sign-in or user API key can answer; a team or organization key cannot.",
20232
+ input,
20233
+ kind: "write",
20234
+ name: "investigation.question.answer",
20235
+ output
20236
+ };
20237
+ };
20238
+
20069
20239
  // node_modules/@qawolf/api-contracts/dist/v1/investigation/question/find.js
20070
20240
  var makeFindInvestigationQuestionsContract = (ids) => {
20071
20241
  const input = object({
@@ -20083,7 +20253,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
20083
20253
  headline: string2().optional(),
20084
20254
  question: investigationQuestionSchema,
20085
20255
  runId: ids.run,
20086
- sessionId: ids.chatSession.describe("The investigation session. Answer the question by sending the person's answer to it with agent.send."),
20256
+ sessionId: ids.chatSession.describe("The investigation session. Read what it is doing with agent.get."),
20087
20257
  summary: string2().optional()
20088
20258
  }, { urlFieldDescription: "The run in the QA Wolf app." })).describe("Questions that wait for a person's answer, the most recently recorded first. A page can hold fewer than limit questions, or none, while nextCursor is present.")
20089
20259
  });
@@ -20098,7 +20268,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
20098
20268
  openWorldHint: false,
20099
20269
  readOnlyHint: true
20100
20270
  },
20101
- description: "List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. " + "Each question names its run, flows, details and offered answers. " + "To answer one, send the person's answer to its sessionId with agent.send.",
20271
+ description: "List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. " + "Each question names its run, flows, details and offered answers. " + "To answer them, call investigation.question.answer with the run and the person's answers.",
20102
20272
  input,
20103
20273
  kind: "read",
20104
20274
  name: "investigation.question.find",
@@ -20108,6 +20278,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
20108
20278
 
20109
20279
  // node_modules/@qawolf/api-contracts/dist/v1/investigation/question/index.js
20110
20280
  var makeInvestigationQuestionContracts = (ids) => ({
20281
+ answer: makeAnswerInvestigationQuestionsContract(ids),
20111
20282
  find: makeFindInvestigationQuestionsContract(ids)
20112
20283
  });
20113
20284
 
@@ -20173,12 +20344,61 @@ var makeAttachFilesToIssueContract = (ids) => {
20173
20344
  };
20174
20345
  };
20175
20346
 
20347
+ // node_modules/@qawolf/api-contracts/dist/v1/issue/commentResource.js
20348
+ var issueCommentAuthorSchema = discriminatedUnion("type", [
20349
+ object({
20350
+ email: string2(),
20351
+ name: string2().optional().describe("Absent when the person has not set a name."),
20352
+ type: literal("user")
20353
+ }),
20354
+ object({ type: literal("former-user") }),
20355
+ object({ type: literal("team-api-key") }),
20356
+ object({ type: literal("system") })
20357
+ ]).describe("Who wrote the comment: a person, a person whose account was since deleted (`former-user`), an API key of the team or its organization (`team-api-key`), or QA Wolf itself (`system`).");
20358
+ var makeIssueCommentResourceSchema = (ids) => resource({
20359
+ author: issueCommentAuthorSchema,
20360
+ body: string2().describe("The comment in GitHub-flavored Markdown."),
20361
+ commentId: string2().describe("The id of the comment."),
20362
+ createdAt: exports_coerce.date().describe("When the comment was written."),
20363
+ issueId: ids.issue.describe("The issue the comment is on."),
20364
+ viaQaWolfAi: boolean2().describe("Whether the author wrote the comment through QA Wolf AI.")
20365
+ }, { urlFieldDescription: "Absolute URL of the issue page." });
20366
+
20367
+ // node_modules/@qawolf/api-contracts/dist/v1/issue/comment.js
20368
+ var maxCommentLength = 1e4;
20369
+ var makeCommentOnIssueContract = (ids) => {
20370
+ const input = object({
20371
+ body: string2().trim().min(1).max(maxCommentLength).describe("The comment in GitHub-flavored Markdown."),
20372
+ issueId: ids.issue.describe("The bug report, blocker, or coverage request to comment on.")
20373
+ });
20374
+ const output = object({
20375
+ comment: makeIssueCommentResourceSchema(ids)
20376
+ });
20377
+ return {
20378
+ annotationJustifications: {
20379
+ destructiveHint: "Adds a comment without removing or changing anything else on the issue.",
20380
+ openWorldHint: "Today it changes only QA Wolf records. It does not post the comment to a linked tracker or to any other service of the workspace.",
20381
+ readOnlyHint: "Records a comment on the issue."
20382
+ },
20383
+ annotations: {
20384
+ destructiveHint: false,
20385
+ openWorldHint: false,
20386
+ readOnlyHint: false
20387
+ },
20388
+ description: "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.",
20389
+ input,
20390
+ kind: "write",
20391
+ name: "issue.comment",
20392
+ output
20393
+ };
20394
+ };
20395
+
20176
20396
  // node_modules/@qawolf/api-contracts/dist/v1/issue/create.js
20177
20397
  var makeCreateIssueContract = (ids) => {
20178
20398
  const commonFields = {
20179
20399
  description: string2().optional().describe("The issue description in Markdown, which is stored as rich text. Text without Markdown is stored as written, one paragraph per line."),
20180
20400
  name: string2().trim().min(1).max(255),
20181
- priority: issuePrioritySchema.optional().describe('Defaults to "unprioritized" for bug reports and coverage requests.'),
20401
+ priority: issuePrioritySchema.optional().describe(`${issuePrioritySchema.description} Defaults to "unprioritized" for bug reports and coverage requests.`),
20182
20402
  workspaceId: ids.workspace.optional().describe("The workspace to create the issue in. Required when authenticating with an organization or user API key.")
20183
20403
  };
20184
20404
  const input = discriminatedUnion("type", [
@@ -20316,6 +20536,35 @@ var makeListIssueActivityContract = (ids) => {
20316
20536
  };
20317
20537
  };
20318
20538
 
20539
+ // node_modules/@qawolf/api-contracts/dist/v1/issue/listComments.js
20540
+ var makeListIssueCommentsContract = (ids) => {
20541
+ const input = object({
20542
+ issueId: ids.issue.describe("The bug report, blocker, or coverage request whose comments to list."),
20543
+ ...makePaginationInputFields({ defaultLimit: 50, maxLimit: 200 })
20544
+ });
20545
+ const output = object({
20546
+ comments: array(makeIssueCommentResourceSchema(ids)).describe("The issue's comments, oldest first."),
20547
+ nextCursor: nextCursorSchema
20548
+ });
20549
+ return {
20550
+ annotationJustifications: {
20551
+ destructiveHint: "Does not edit the issue or its comments.",
20552
+ openWorldHint: "Reads QA Wolf comments without reading or changing linked trackers.",
20553
+ readOnlyHint: "Lists the comments on one issue."
20554
+ },
20555
+ annotations: {
20556
+ destructiveHint: false,
20557
+ openWorldHint: false,
20558
+ readOnlyHint: true
20559
+ },
20560
+ description: "List the comments on a bug report, blocker (issue type `maintenance`), or coverage request, oldest first, with who wrote each one.",
20561
+ input,
20562
+ kind: "read",
20563
+ name: "issue.listComments",
20564
+ output
20565
+ };
20566
+ };
20567
+
20319
20568
  // node_modules/@qawolf/api-contracts/dist/v1/issue/removeFlows.js
20320
20569
  var makeRemoveFlowsFromIssueContract = (ids) => {
20321
20570
  const input = object({
@@ -20384,11 +20633,13 @@ var makeUpdateIssueContract = (ids) => {
20384
20633
  var makeIssueContracts = (ids) => ({
20385
20634
  addFlows: makeAddFlowsToIssueContract(ids),
20386
20635
  attachFiles: makeAttachFilesToIssueContract(ids),
20636
+ comment: makeCommentOnIssueContract(ids),
20387
20637
  create: makeCreateIssueContract(ids),
20388
20638
  decideSuggestion: makeDecideSuggestionContract(ids),
20389
20639
  find: makeFindIssuesContract(ids),
20390
20640
  get: makeGetIssueContract(ids),
20391
20641
  listActivity: makeListIssueActivityContract(ids),
20642
+ listComments: makeListIssueCommentsContract(ids),
20392
20643
  removeFlows: makeRemoveFlowsFromIssueContract(ids),
20393
20644
  update: makeUpdateIssueContract(ids)
20394
20645
  });
@@ -20542,6 +20793,7 @@ var makeConnectMcpServerContract = (ids) => {
20542
20793
  });
20543
20794
  const output = object({
20544
20795
  authorizationUrl: string2().url().describe("The server's sign-in page. Show it to the user: the connection is ready once they approve access there."),
20796
+ connectionName: string2().describe("The name of the workspace connection the sign-in authorizes. It differs from serverName when the workspace already reaches the server under another name and that connection needs authorizing again."),
20545
20797
  serverName: string2().describe("The catalog name of the server.")
20546
20798
  });
20547
20799
  return {
@@ -20784,7 +21036,8 @@ var makeGetRunContract = (ids) => {
20784
21036
  const flowStatus = _enum(publicRunStatusValues);
20785
21037
  const input = object({
20786
21038
  flowStatuses: array(flowStatus).min(1).optional().describe("Return only the flows whose status is one of these. A suite run can " + "hold hundreds of flows, so start an investigation with failed " + "alone. A flow that passed after a retry reads passed, so add " + "passed when a flaky flow is missing from the answer. Omit to " + "return every flow. The run-level fields are unaffected."),
20787
- runId: ids.run
21039
+ runId: ids.run,
21040
+ waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds, waiting for the run's status to change. Defaults to 0, which answers at once. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives. A held check answers the moment the status changes, and at once when the run is already terminal. A held check also waits while the run is still being created.`)
20788
21041
  });
20789
21042
  const attempts = makeFlowAttemptsSchema(ids);
20790
21043
  const failedFlow = object({
@@ -20808,7 +21061,9 @@ var makeGetRunContract = (ids) => {
20808
21061
  buildVersions: array(runBuildVersionSchema).describe("The apps the run's attempts installed, one per app and platform, with warnings. Empty when no attempt reported an install and the run has no builds."),
20809
21062
  flows,
20810
21063
  runId: ids.run.describe("The run this response describes. Treat it as canonical: it can differ from the id you asked for. A deploy notification returns a run id before the run exists, and if a second notification for the same commit is folded into an earlier run, that id resolves to the earlier run instead."),
20811
- siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one.")
21064
+ siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one."),
21065
+ waitSeconds: number2().int().optional().describe("The hold this check was allowed, in seconds, after clamping. Absent when the check did not wait."),
21066
+ wokeOn: runWakeReasonSchema.optional()
20812
21067
  }, { urlFieldDescription: "Absolute URL of the run page." });
20813
21068
  return {
20814
21069
  annotationJustifications: {
@@ -20821,7 +21076,7 @@ var makeGetRunContract = (ids) => {
20821
21076
  openWorldHint: false,
20822
21077
  readOnlyHint: true
20823
21078
  },
20824
- description: "Get a run's status, per-flow results, links, and how many of its bugs are blocking.",
21079
+ description: `Get a run's status, per-flow results, links, and how many of its bugs are blocking. Call it without waitSeconds for an immediate answer. To wait on a run that is still queued or running, pass waitSeconds up to ${maxAgentWaitSeconds}: the server holds the check open and answers the moment the status changes. A held check also waits while the run is still being created. After a held check returns, call again only while status is queued or running. Stop when status is passed, failed, canceled, or superseded.`,
20825
21080
  input,
20826
21081
  kind: "read",
20827
21082
  name: "run.get",
@@ -21558,6 +21813,9 @@ var makeContractsV1 = (ids) => {
21558
21813
  runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
21559
21814
  };
21560
21815
  return {
21816
+ activity: {
21817
+ wait: makeActivityWaitContract(resolvedIds)
21818
+ },
21561
21819
  agent: {
21562
21820
  get: makeAgentGetContract(resolvedIds),
21563
21821
  send: makeAgentSendContract(resolvedIds)
@@ -24132,7 +24390,7 @@ function startUpdateCheck(deps) {
24132
24390
  // package.json
24133
24391
  var package_default = {
24134
24392
  name: "@qawolf/cli",
24135
- version: "2.6.0",
24393
+ version: "2.7.0",
24136
24394
  description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
24137
24395
  keywords: [
24138
24396
  "automation",
@@ -24204,7 +24462,7 @@ var package_default = {
24204
24462
  "@clack/prompts": "1.5.1",
24205
24463
  "@napi-rs/keyring": "1.3.0",
24206
24464
  "@oxc-node/core": "0.1.0",
24207
- "@qawolf/api-contracts": "0.107.0",
24465
+ "@qawolf/api-contracts": "0.114.0",
24208
24466
  "@qawolf/emails": "1.1.1",
24209
24467
  "@qawolf/flow-targets": "2.0.0",
24210
24468
  "@qawolf/flows": "0.3.0",
@@ -42378,4 +42636,4 @@ createProgram({ signals }).parseAsync().catch(() => {
42378
42636
  process.exitCode = 1;
42379
42637
  }).finally(() => exitWhenIdle(typeof process.exitCode === "number" ? process.exitCode : 0));
42380
42638
 
42381
- //# debugId=5F33B8D66BC6D61964756E2164756E21
42639
+ //# debugId=4123DE9F7A00111E64756E2164756E21
@@ -7110,6 +7110,7 @@ var agentReplySchema = object({
7110
7110
 
7111
7111
  // node_modules/@qawolf/api-contracts/dist/v1/agent/wait.js
7112
7112
  var maxAgentWaitSeconds = 45;
7113
+ var maxAgentWaitSecondsWithProgress = 170;
7113
7114
  var agentWakeReasonSchema = _enum(["reply", "status", "timeout"]).describe('Why a held check answered. "reply" means the AI said something new, "status" means the session settled or needs you, "timeout" means the hold ran out with nothing new.');
7114
7115
 
7115
7116
  // node_modules/@qawolf/api-contracts/dist/v1/run/summary.js
@@ -7142,6 +7143,54 @@ var makeRunSummaryFields = (ids) => ({
7142
7143
  }).optional().describe("The run that replaced this one, present only when `status` is `superseded`. A newer deployment to the same branch and environment (and service, when the deployment named one) cancels the older run's unfinished flows and takes over. Deduplication ignores the commit, so the replacement may be testing a later commit than this run did. Only the direct replacement is named; that run can itself be superseded.")
7143
7144
  });
7144
7145
 
7146
+ // node_modules/@qawolf/api-contracts/dist/v1/activity/wait.js
7147
+ var maxActivityWaitItems = 50;
7148
+ var makeActivityWaitContract = (ids) => {
7149
+ const cursors = record(string2().min(1), string2().min(1));
7150
+ const runIds = array(ids.run);
7151
+ const sessionIds = array(ids.chatSession);
7152
+ const input = object({
7153
+ cursors: cursors.optional().describe("Each session's nextCursor from the previous answer, keyed by its session id. A session without one is read from its first reply."),
7154
+ runIds: runIds.max(maxActivityWaitItems).optional().describe(`The runs you are waiting on, including a run still being created. Send at least one session or run, and at most ${maxActivityWaitItems} together.`),
7155
+ sessionIds: sessionIds.max(maxActivityWaitItems).optional().describe("The Tester sessions you are waiting on, as agent.send answered with."),
7156
+ waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this call open, in seconds. Defaults to ${maxAgentWaitSeconds}. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives.`)
7157
+ });
7158
+ const output = object({
7159
+ open: object({ cursors, runIds, sessionIds }).describe("Everything still worth waiting on: each session whose status is not completed, failed, cancelled or not-found, with its new cursor, and each run that has not finished. Send it as the next call's input."),
7160
+ runs: array(object({
7161
+ finished: boolean2().describe("True once the status is passed, failed, canceled, superseded or not-found. A finished run never changes again."),
7162
+ runId: ids.run.describe("The run id you sent."),
7163
+ status: _enum([...publicRunSummaryStatusValues, "not-found"]).describe(`The run's status, as run.get reports it. A run still being created reads "queued". "not-found" means no run has this id: its creation failed, was skipped or never finished, or the run is gone.`),
7164
+ url: string2().optional().describe("Absolute URL of the run page. Absent while the run is still being created, and when it is not found.")
7165
+ })).describe("Every run you sent, in the order you sent them."),
7166
+ sessions: array(object({
7167
+ nextCursor: string2().min(1).describe("Send back under this session's id in cursors to read only what follows."),
7168
+ replies: array(agentReplySchema).describe("What the AI has said since the cursor, oldest first, as agent.get returns it. Empty when it said nothing new."),
7169
+ sessionId: ids.chatSession,
7170
+ status: _enum([...agentSessionStatuses, "not-found"]).describe('Where the work stands, as agent.get reports it. "working" means the AI is still on it. "waiting-for-you" means it asked a question that agent.send must answer. "completed" means it finished, and a new agent.send continues it. "failed" and "cancelled" are settled. "not-found" means the session is gone and will not change.')
7171
+ })).describe("Every session you sent, in the order you sent them."),
7172
+ waitSeconds: number2().int().describe("The hold this call was allowed, in seconds, after clamping."),
7173
+ wokeOn: _enum(["activity", "timeout"]).describe('"activity" means a session replied or changed status, or a run finished, or a session or run was not found; every item with news is in this answer. "timeout" means the hold ran out with nothing new.')
7174
+ });
7175
+ return {
7176
+ annotationJustifications: {
7177
+ destructiveHint: "Does not cancel work, stop runs or edit tests.",
7178
+ openWorldHint: "Reads QA Wolf sessions and runs without posting to external services.",
7179
+ readOnlyHint: "Retrieves session replies and statuses and run statuses without sending work."
7180
+ },
7181
+ annotations: {
7182
+ destructiveHint: false,
7183
+ openWorldHint: false,
7184
+ readOnlyHint: true
7185
+ },
7186
+ description: `Wait on many QA Wolf AI (Tester) sessions and runs in one call. Pass every Tester session and run you are waiting on. The call returns as soon as any session replies or changes status or any run finishes, and reports every item with news. Send back open as the next call's input, and call again as soon as it returns. Pass waitSeconds above ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives.`,
7187
+ input,
7188
+ kind: "read",
7189
+ name: "activity.wait",
7190
+ output
7191
+ };
7192
+ };
7193
+
7145
7194
  // node_modules/@qawolf/api-contracts/dist/v1/deployment/didNotRunReason.js
7146
7195
  var didNotRunReasonSchema = _enum([
7147
7196
  "billing-prevented",
@@ -7529,6 +7578,9 @@ var makeListScreenshotComparisonsContract = (ids) => {
7529
7578
  };
7530
7579
  };
7531
7580
 
7581
+ // node_modules/@qawolf/api-contracts/dist/v1/run/wait.js
7582
+ var runWakeReasonSchema = _enum(["status", "timeout"]).describe(`Why a held check answered. "status" means the run's status differs from the one the check started with, or the run was already terminal; "timeout" means the hold ran out with the status unchanged.`);
7583
+
7532
7584
  // node_modules/@qawolf/api-contracts/dist/v1/runner/actionSequence.js
7533
7585
  var maxActionsPerRequest = 10;
7534
7586
  var screenshotModes = ["none", "final", "each"];
@@ -8317,6 +8369,13 @@ var runSelectionSchema = object({
8317
8369
  error: "A selection's startLine must not be after its endLine.",
8318
8370
  path: ["startLine"]
8319
8371
  });
8372
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatFields.js
8373
+ var triggerScheduleRepeatFields = {
8374
+ 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."),
8375
+ 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."),
8376
+ 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.')
8377
+ };
8378
+
8320
8379
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/configuration.js
8321
8380
  var isTimezone = (value) => {
8322
8381
  try {
@@ -8326,7 +8385,7 @@ var isTimezone = (value) => {
8326
8385
  return false;
8327
8386
  }
8328
8387
  };
8329
- var triggerCadenceSchema = _enum(["hourly", "daily", "weekly"]).describe("How often the schedule fires.");
8388
+ var triggerCadenceSchema = _enum(["hourly", "daily", "weekly", "monthly"]).describe("How often the schedule fires.");
8330
8389
  var triggerDayOfWeekSchema = _enum([
8331
8390
  "monday",
8332
8391
  "tuesday",
@@ -8354,11 +8413,74 @@ var makeTriggerScheduleFields = (ids) => ({
8354
8413
  message: "Expected each day to be named at most once."
8355
8414
  }).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."),
8356
8415
  environmentId: ids.environmentId.describe("The environment the scheduled runs happen in."),
8416
+ ...triggerScheduleRepeatFields,
8357
8417
  minuteOfHour: number2().int().min(0).max(59).optional().describe("Minutes past the hour an hourly schedule fires. Defaults to 0."),
8358
- timeOfDay: string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/).optional().describe('The wall clock time a daily or weekly schedule fires, as "HH:mm". Required when cadence is daily or weekly.'),
8418
+ 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.'),
8359
8419
  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.")
8360
8420
  });
8361
8421
 
8422
+ // node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatRules.js
8423
+ var hourlyEveryValues = [1, 2, 3, 4, 6, 8, 12];
8424
+ var maxEvery = {
8425
+ daily: 31,
8426
+ monthly: 12,
8427
+ weekly: 12
8428
+ };
8429
+ var dayOfWeekNames = [
8430
+ "sunday",
8431
+ "monday",
8432
+ "tuesday",
8433
+ "wednesday",
8434
+ "thursday",
8435
+ "friday",
8436
+ "saturday"
8437
+ ];
8438
+ var calendarDayOf = (startDate) => {
8439
+ const date = new Date(`${startDate}T00:00:00Z`);
8440
+ return !Number.isNaN(date.getTime()) && date.toISOString().startsWith(startDate) ? date : undefined;
8441
+ };
8442
+ var everyIssue = (value, every) => {
8443
+ if (value.cadence === "hourly") {
8444
+ return hourlyEveryValues.includes(every) ? undefined : "every must divide a day evenly when cadence is hourly: 1, 2, 3, 4, 6, 8 or 12.";
8445
+ }
8446
+ const max = maxEvery[value.cadence];
8447
+ return every > max ? `every is at most ${max} when cadence is ${value.cadence}.` : undefined;
8448
+ };
8449
+ var startDateIssue = (value, startDate) => {
8450
+ const day = calendarDayOf(startDate);
8451
+ if (day === undefined)
8452
+ return "startDate must be a real calendar date.";
8453
+ if (value.cadence === "weekly" && value.dayOfWeek !== undefined && dayOfWeekNames[day.getUTCDay()] !== value.dayOfWeek)
8454
+ return "startDate must fall on dayOfWeek.";
8455
+ if (value.cadence === "monthly" && value.dayOfMonth !== undefined && day.getUTCDate() !== value.dayOfMonth)
8456
+ return "startDate must fall on dayOfMonth.";
8457
+ return;
8458
+ };
8459
+ var checkScheduleRepeat = (value, ctx) => {
8460
+ const every = value.every ?? 1;
8461
+ const issue = (message, field) => ctx.addIssue({ code: "custom", message, path: [field] });
8462
+ const everyMessage = everyIssue(value, every);
8463
+ if (everyMessage !== undefined)
8464
+ issue(everyMessage, "every");
8465
+ if (value.cadence === "hourly")
8466
+ return;
8467
+ if (every > 1 && value.daysOfWeek !== undefined)
8468
+ issue("daysOfWeek applies only when every is 1.", "daysOfWeek");
8469
+ if (every > 1 && value.startDate === undefined) {
8470
+ issue("startDate is required when every is more than 1.", "startDate");
8471
+ return;
8472
+ }
8473
+ if (value.startDate === undefined)
8474
+ return;
8475
+ if (every === 1) {
8476
+ issue("startDate applies only when every is more than 1.", "startDate");
8477
+ return;
8478
+ }
8479
+ const startDateMessage = startDateIssue(value, value.startDate);
8480
+ if (startDateMessage !== undefined)
8481
+ issue(startDateMessage, "startDate");
8482
+ };
8483
+
8362
8484
  // node_modules/@qawolf/api-contracts/dist/v1/trigger/configurationRules.js
8363
8485
  var checkAction = (action, ctx) => {
8364
8486
  const namesFlows = action.flowIds.length + action.tagNames.length > 0;
@@ -8390,24 +8512,32 @@ var checkAction = (action, ctx) => {
8390
8512
  var requiredScheduleFields = {
8391
8513
  daily: ["timeOfDay", "timezoneId"],
8392
8514
  hourly: ["timezoneId"],
8515
+ monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
8393
8516
  weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
8394
8517
  };
8395
8518
  var optionalScheduleFields = {
8396
- daily: ["daysOfWeek"],
8397
- hourly: ["daysOfWeek", "minuteOfHour"],
8398
- weekly: []
8519
+ daily: ["daysOfWeek", "every", "startDate"],
8520
+ hourly: ["daysOfWeek", "every", "minuteOfHour"],
8521
+ monthly: ["every", "startDate"],
8522
+ weekly: ["every", "startDate"]
8399
8523
  };
8400
8524
  var cadencesUsingField = {
8525
+ dayOfMonth: "a monthly cadence",
8401
8526
  dayOfWeek: "a weekly cadence",
8402
8527
  daysOfWeek: "an hourly or daily cadence",
8528
+ every: "any cadence",
8403
8529
  minuteOfHour: "an hourly cadence",
8404
- timeOfDay: "a daily or weekly cadence",
8405
- timezoneId: "an hourly, daily or weekly cadence"
8530
+ startDate: "a daily, weekly or monthly cadence",
8531
+ timeOfDay: "a daily, weekly or monthly cadence",
8532
+ timezoneId: "an hourly, daily, weekly or monthly cadence"
8406
8533
  };
8407
8534
  var scheduleFields = [
8535
+ "dayOfMonth",
8408
8536
  "dayOfWeek",
8409
8537
  "daysOfWeek",
8538
+ "every",
8410
8539
  "minuteOfHour",
8540
+ "startDate",
8411
8541
  "timeOfDay",
8412
8542
  "timezoneId"
8413
8543
  ];
@@ -8437,6 +8567,7 @@ var checkScheduleFields = (value, ctx) => {
8437
8567
  };
8438
8568
  var checkSchedule = (value, ctx) => {
8439
8569
  checkScheduleFields(value, ctx);
8570
+ checkScheduleRepeat(value, ctx);
8440
8571
  if (value.action.kind === "generativeSuite") {
8441
8572
  ctx.addIssue({
8442
8573
  code: "custom",
@@ -8715,7 +8846,7 @@ var makeAgentGetContract = (ids) => {
8715
8846
  const input = object({
8716
8847
  cursor: string2().min(1).optional().describe("Opaque cursor copied from this same session's previous nextCursor. Omit to read from its first reply."),
8717
8848
  sessionId: ids.chatSession.describe("The id agent.send answered with."),
8718
- waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds. Defaults to ${maxAgentWaitSeconds}, the longest hold, and a larger value clamps to it. Pass 0 to answer at once. Check again as soon as a held check returns.`)
8849
+ waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds. Defaults to ${maxAgentWaitSeconds}. Pass 0 to answer at once. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives. A held check answers the moment a reply or status change arrives. Check again as soon as a held check returns.`)
8719
8850
  });
8720
8851
  const output = resource({
8721
8852
  nextCursor: string2().min(1).describe("Send back as cursor on the next check to read only what follows. Always present, even with no replies. Belongs to this session alone."),
@@ -8738,7 +8869,7 @@ var makeAgentGetContract = (ids) => {
8738
8869
  openWorldHint: false,
8739
8870
  readOnlyHint: true
8740
8871
  },
8741
- description: 'Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Pass waitSeconds 45 so the server holds the check open and answers the moment something happens. Check again as soon as it returns; never sleep between checks or loop without waitSeconds. Pass the nextCursor from one response as the cursor on the next check; it then reads only what is new, and only for the session that minted it. Continue monitoring silently when the status is unchanged and no replies come back; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result.',
8872
+ description: `Monitor a QA Wolf AI session by reading its status and replies. After agent.send, share the returned session URL before monitoring. Pass waitSeconds ${maxAgentWaitSeconds} so the server holds the check open and answers the moment a reply or status change arrives. Check again as soon as it returns; never sleep between checks or loop without waitSeconds. Pass the nextCursor from one response as the cursor on the next check; it then reads only what is new, and only for the session that minted it. Continue monitoring silently when the status is unchanged and no replies come back; do not narrate waiting, announce the next check, or ask whether to keep monitoring. Report only substantive new progress, questions, blockers, or the final outcome. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Surface an explicit request for user input even if the status still says "working". Include the session URL when reporting a blocker or final outcome. On "completed", stop status checks and verify the requested result before claiming success. For new flows, validation, publication in the target environment, and readiness are separate checks; a Git push or final reply does not prove the flow is active. If every requested result is verified but status remains "working", report the mismatch and stop monitoring. Stop on "failed" or "cancelled" and report any confirmed partial result.`,
8742
8873
  input,
8743
8874
  kind: "read",
8744
8875
  name: "agent.get",
@@ -10098,13 +10229,7 @@ var makeUpdateFlowContract = (ids) => {
10098
10229
  };
10099
10230
 
10100
10231
  // node_modules/@qawolf/api-contracts/dist/v1/issue/index.js
10101
- var issuePrioritySchema = _enum([
10102
- "unprioritized",
10103
- "low",
10104
- "medium",
10105
- "high",
10106
- "urgent"
10107
- ]);
10232
+ var issuePrioritySchema = _enum(["unprioritized", "low", "medium", "high", "urgent"]).describe("An open bug report at unprioritized, high or urgent priority blocks its suite and CI gate. Low and medium don't block. Priority never makes a blocker or coverage request block.");
10108
10233
  var issueStatusSchema = _enum([
10109
10234
  "backlog",
10110
10235
  "pending",
@@ -10304,6 +10429,51 @@ var makeGetInvestigationContract = (ids) => {
10304
10429
  };
10305
10430
  };
10306
10431
 
10432
+ // node_modules/@qawolf/api-contracts/dist/v1/investigation/question/answer.js
10433
+ var maxAnswersPerCall = 50;
10434
+ var findingIdSchema = string2().min(1).max(80);
10435
+ var findingIdsOf = ({ answers = {}, replies = {} }) => [
10436
+ ...Object.keys(answers),
10437
+ ...Object.keys(replies)
10438
+ ];
10439
+ var makeAnswerInvestigationQuestionsContract = (ids) => {
10440
+ const input = object({
10441
+ answers: record(findingIdSchema, string2().min(1)).optional().describe("Offered answers, keyed by the question's findingId. Each value is the `value` of one of the question's offered answers, such as maintenance or bug."),
10442
+ replies: record(findingIdSchema, string2().trim().min(1).max(1000)).optional().describe("The person's own words, keyed by the question's findingId, for a question that none of the offered answers fits."),
10443
+ runId: ids.run
10444
+ }).refine((sent) => findingIdsOf(sent).length > 0, {
10445
+ message: "Send at least one answer or reply."
10446
+ }).refine((sent) => findingIdsOf(sent).length <= maxAnswersPerCall, {
10447
+ message: `Send at most ${maxAnswersPerCall} answers and replies in one call.`
10448
+ }).refine((sent) => new Set(findingIdsOf(sent)).size === findingIdsOf(sent).length, { message: "Answer each question once, as an answer or as a reply." });
10449
+ const output = resource({
10450
+ answeredFindingIds: array(string2()).describe("The questions this call answered. The investigation receives the answers and acts on them."),
10451
+ refused: array(object({
10452
+ findingId: string2(),
10453
+ message: string2().describe("Why the answer was not recorded."),
10454
+ reason: string2().describe('Known values: "answer-not-offered", "environment-terminated", "not-asking", "not-found", "response-pending" and "superseded". New values can appear.')
10455
+ })).describe("The answers that were not recorded."),
10456
+ runId: ids.run
10457
+ }, { urlFieldDescription: "The run in the QA Wolf app." });
10458
+ return {
10459
+ annotationJustifications: {
10460
+ destructiveHint: "Records a person's answer that cannot be changed, and the investigation acts on it, for example by filing a bug or publishing a test fix.",
10461
+ openWorldHint: "A bug report the investigation files from an answer can reach the workspace's configured integrations.",
10462
+ readOnlyHint: "Records answers to the questions of a run's investigation."
10463
+ },
10464
+ annotations: {
10465
+ destructiveHint: true,
10466
+ openWorldHint: true,
10467
+ readOnlyHint: false
10468
+ },
10469
+ description: "Answer the questions the QA Wolf AI investigating a failed run is waiting on, as the signed-in person. " + "List the questions with investigation.question.find, and answer only with the person's approval. " + "The first answer to a question wins, and the investigation acts on it. " + "Only a person's own sign-in or user API key can answer; a team or organization key cannot.",
10470
+ input,
10471
+ kind: "write",
10472
+ name: "investigation.question.answer",
10473
+ output
10474
+ };
10475
+ };
10476
+
10307
10477
  // node_modules/@qawolf/api-contracts/dist/v1/investigation/question/find.js
10308
10478
  var makeFindInvestigationQuestionsContract = (ids) => {
10309
10479
  const input = object({
@@ -10321,7 +10491,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
10321
10491
  headline: string2().optional(),
10322
10492
  question: investigationQuestionSchema,
10323
10493
  runId: ids.run,
10324
- sessionId: ids.chatSession.describe("The investigation session. Answer the question by sending the person's answer to it with agent.send."),
10494
+ sessionId: ids.chatSession.describe("The investigation session. Read what it is doing with agent.get."),
10325
10495
  summary: string2().optional()
10326
10496
  }, { urlFieldDescription: "The run in the QA Wolf app." })).describe("Questions that wait for a person's answer, the most recently recorded first. A page can hold fewer than limit questions, or none, while nextCursor is present.")
10327
10497
  });
@@ -10336,7 +10506,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
10336
10506
  openWorldHint: false,
10337
10507
  readOnlyHint: true
10338
10508
  },
10339
- description: "List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. " + "Each question names its run, flows, details and offered answers. " + "To answer one, send the person's answer to its sessionId with agent.send.",
10509
+ description: "List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. " + "Each question names its run, flows, details and offered answers. " + "To answer them, call investigation.question.answer with the run and the person's answers.",
10340
10510
  input,
10341
10511
  kind: "read",
10342
10512
  name: "investigation.question.find",
@@ -10346,6 +10516,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
10346
10516
 
10347
10517
  // node_modules/@qawolf/api-contracts/dist/v1/investigation/question/index.js
10348
10518
  var makeInvestigationQuestionContracts = (ids) => ({
10519
+ answer: makeAnswerInvestigationQuestionsContract(ids),
10349
10520
  find: makeFindInvestigationQuestionsContract(ids)
10350
10521
  });
10351
10522
 
@@ -10411,12 +10582,61 @@ var makeAttachFilesToIssueContract = (ids) => {
10411
10582
  };
10412
10583
  };
10413
10584
 
10585
+ // node_modules/@qawolf/api-contracts/dist/v1/issue/commentResource.js
10586
+ var issueCommentAuthorSchema = discriminatedUnion("type", [
10587
+ object({
10588
+ email: string2(),
10589
+ name: string2().optional().describe("Absent when the person has not set a name."),
10590
+ type: literal("user")
10591
+ }),
10592
+ object({ type: literal("former-user") }),
10593
+ object({ type: literal("team-api-key") }),
10594
+ object({ type: literal("system") })
10595
+ ]).describe("Who wrote the comment: a person, a person whose account was since deleted (`former-user`), an API key of the team or its organization (`team-api-key`), or QA Wolf itself (`system`).");
10596
+ var makeIssueCommentResourceSchema = (ids) => resource({
10597
+ author: issueCommentAuthorSchema,
10598
+ body: string2().describe("The comment in GitHub-flavored Markdown."),
10599
+ commentId: string2().describe("The id of the comment."),
10600
+ createdAt: exports_coerce.date().describe("When the comment was written."),
10601
+ issueId: ids.issue.describe("The issue the comment is on."),
10602
+ viaQaWolfAi: boolean2().describe("Whether the author wrote the comment through QA Wolf AI.")
10603
+ }, { urlFieldDescription: "Absolute URL of the issue page." });
10604
+
10605
+ // node_modules/@qawolf/api-contracts/dist/v1/issue/comment.js
10606
+ var maxCommentLength = 1e4;
10607
+ var makeCommentOnIssueContract = (ids) => {
10608
+ const input = object({
10609
+ body: string2().trim().min(1).max(maxCommentLength).describe("The comment in GitHub-flavored Markdown."),
10610
+ issueId: ids.issue.describe("The bug report, blocker, or coverage request to comment on.")
10611
+ });
10612
+ const output = object({
10613
+ comment: makeIssueCommentResourceSchema(ids)
10614
+ });
10615
+ return {
10616
+ annotationJustifications: {
10617
+ destructiveHint: "Adds a comment without removing or changing anything else on the issue.",
10618
+ openWorldHint: "Today it changes only QA Wolf records. It does not post the comment to a linked tracker or to any other service of the workspace.",
10619
+ readOnlyHint: "Records a comment on the issue."
10620
+ },
10621
+ annotations: {
10622
+ destructiveHint: false,
10623
+ openWorldHint: false,
10624
+ readOnlyHint: false
10625
+ },
10626
+ description: "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.",
10627
+ input,
10628
+ kind: "write",
10629
+ name: "issue.comment",
10630
+ output
10631
+ };
10632
+ };
10633
+
10414
10634
  // node_modules/@qawolf/api-contracts/dist/v1/issue/create.js
10415
10635
  var makeCreateIssueContract = (ids) => {
10416
10636
  const commonFields = {
10417
10637
  description: string2().optional().describe("The issue description in Markdown, which is stored as rich text. Text without Markdown is stored as written, one paragraph per line."),
10418
10638
  name: string2().trim().min(1).max(255),
10419
- priority: issuePrioritySchema.optional().describe('Defaults to "unprioritized" for bug reports and coverage requests.'),
10639
+ priority: issuePrioritySchema.optional().describe(`${issuePrioritySchema.description} Defaults to "unprioritized" for bug reports and coverage requests.`),
10420
10640
  workspaceId: ids.workspace.optional().describe("The workspace to create the issue in. Required when authenticating with an organization or user API key.")
10421
10641
  };
10422
10642
  const input = discriminatedUnion("type", [
@@ -10554,6 +10774,35 @@ var makeListIssueActivityContract = (ids) => {
10554
10774
  };
10555
10775
  };
10556
10776
 
10777
+ // node_modules/@qawolf/api-contracts/dist/v1/issue/listComments.js
10778
+ var makeListIssueCommentsContract = (ids) => {
10779
+ const input = object({
10780
+ issueId: ids.issue.describe("The bug report, blocker, or coverage request whose comments to list."),
10781
+ ...makePaginationInputFields({ defaultLimit: 50, maxLimit: 200 })
10782
+ });
10783
+ const output = object({
10784
+ comments: array(makeIssueCommentResourceSchema(ids)).describe("The issue's comments, oldest first."),
10785
+ nextCursor: nextCursorSchema
10786
+ });
10787
+ return {
10788
+ annotationJustifications: {
10789
+ destructiveHint: "Does not edit the issue or its comments.",
10790
+ openWorldHint: "Reads QA Wolf comments without reading or changing linked trackers.",
10791
+ readOnlyHint: "Lists the comments on one issue."
10792
+ },
10793
+ annotations: {
10794
+ destructiveHint: false,
10795
+ openWorldHint: false,
10796
+ readOnlyHint: true
10797
+ },
10798
+ description: "List the comments on a bug report, blocker (issue type `maintenance`), or coverage request, oldest first, with who wrote each one.",
10799
+ input,
10800
+ kind: "read",
10801
+ name: "issue.listComments",
10802
+ output
10803
+ };
10804
+ };
10805
+
10557
10806
  // node_modules/@qawolf/api-contracts/dist/v1/issue/removeFlows.js
10558
10807
  var makeRemoveFlowsFromIssueContract = (ids) => {
10559
10808
  const input = object({
@@ -10622,11 +10871,13 @@ var makeUpdateIssueContract = (ids) => {
10622
10871
  var makeIssueContracts = (ids) => ({
10623
10872
  addFlows: makeAddFlowsToIssueContract(ids),
10624
10873
  attachFiles: makeAttachFilesToIssueContract(ids),
10874
+ comment: makeCommentOnIssueContract(ids),
10625
10875
  create: makeCreateIssueContract(ids),
10626
10876
  decideSuggestion: makeDecideSuggestionContract(ids),
10627
10877
  find: makeFindIssuesContract(ids),
10628
10878
  get: makeGetIssueContract(ids),
10629
10879
  listActivity: makeListIssueActivityContract(ids),
10880
+ listComments: makeListIssueCommentsContract(ids),
10630
10881
  removeFlows: makeRemoveFlowsFromIssueContract(ids),
10631
10882
  update: makeUpdateIssueContract(ids)
10632
10883
  });
@@ -10780,6 +11031,7 @@ var makeConnectMcpServerContract = (ids) => {
10780
11031
  });
10781
11032
  const output = object({
10782
11033
  authorizationUrl: string2().url().describe("The server's sign-in page. Show it to the user: the connection is ready once they approve access there."),
11034
+ connectionName: string2().describe("The name of the workspace connection the sign-in authorizes. It differs from serverName when the workspace already reaches the server under another name and that connection needs authorizing again."),
10783
11035
  serverName: string2().describe("The catalog name of the server.")
10784
11036
  });
10785
11037
  return {
@@ -11022,7 +11274,8 @@ var makeGetRunContract = (ids) => {
11022
11274
  const flowStatus = _enum(publicRunStatusValues);
11023
11275
  const input = object({
11024
11276
  flowStatuses: array(flowStatus).min(1).optional().describe("Return only the flows whose status is one of these. A suite run can " + "hold hundreds of flows, so start an investigation with failed " + "alone. A flow that passed after a retry reads passed, so add " + "passed when a flaky flow is missing from the answer. Omit to " + "return every flow. The run-level fields are unaffected."),
11025
- runId: ids.run
11277
+ runId: ids.run,
11278
+ waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds, waiting for the run's status to change. Defaults to 0, which answers at once. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives. A held check answers the moment the status changes, and at once when the run is already terminal. A held check also waits while the run is still being created.`)
11026
11279
  });
11027
11280
  const attempts = makeFlowAttemptsSchema(ids);
11028
11281
  const failedFlow = object({
@@ -11046,7 +11299,9 @@ var makeGetRunContract = (ids) => {
11046
11299
  buildVersions: array(runBuildVersionSchema).describe("The apps the run's attempts installed, one per app and platform, with warnings. Empty when no attempt reported an install and the run has no builds."),
11047
11300
  flows,
11048
11301
  runId: ids.run.describe("The run this response describes. Treat it as canonical: it can differ from the id you asked for. A deploy notification returns a run id before the run exists, and if a second notification for the same commit is folded into an earlier run, that id resolves to the earlier run instead."),
11049
- siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one.")
11302
+ siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one."),
11303
+ waitSeconds: number2().int().optional().describe("The hold this check was allowed, in seconds, after clamping. Absent when the check did not wait."),
11304
+ wokeOn: runWakeReasonSchema.optional()
11050
11305
  }, { urlFieldDescription: "Absolute URL of the run page." });
11051
11306
  return {
11052
11307
  annotationJustifications: {
@@ -11059,7 +11314,7 @@ var makeGetRunContract = (ids) => {
11059
11314
  openWorldHint: false,
11060
11315
  readOnlyHint: true
11061
11316
  },
11062
- description: "Get a run's status, per-flow results, links, and how many of its bugs are blocking.",
11317
+ description: `Get a run's status, per-flow results, links, and how many of its bugs are blocking. Call it without waitSeconds for an immediate answer. To wait on a run that is still queued or running, pass waitSeconds up to ${maxAgentWaitSeconds}: the server holds the check open and answers the moment the status changes. A held check also waits while the run is still being created. After a held check returns, call again only while status is queued or running. Stop when status is passed, failed, canceled, or superseded.`,
11063
11318
  input,
11064
11319
  kind: "read",
11065
11320
  name: "run.get",
@@ -11796,6 +12051,9 @@ var makeContractsV1 = (ids) => {
11796
12051
  runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
11797
12052
  };
11798
12053
  return {
12054
+ activity: {
12055
+ wait: makeActivityWaitContract(resolvedIds)
12056
+ },
11799
12057
  agent: {
11800
12058
  get: makeAgentGetContract(resolvedIds),
11801
12059
  send: makeAgentSendContract(resolvedIds)
@@ -16615,4 +16873,4 @@ export {
16615
16873
  createRunnerSdk
16616
16874
  };
16617
16875
 
16618
- //# debugId=75C8CC52E0AB71DC64756E2164756E21
16876
+ //# debugId=B5473BEAD8EDFE4164756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/cli",
3
- "version": "2.6.0",
3
+ "version": "2.7.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.107.0",
75
+ "@qawolf/api-contracts": "0.114.0",
76
76
  "@qawolf/emails": "1.1.1",
77
77
  "@qawolf/flow-targets": "2.0.0",
78
78
  "@qawolf/flows": "0.3.0",
@@ -135,6 +135,7 @@ that `url`; never guess a route and never send a repository link in its place.
135
135
  <!-- prettier-ignore -->
136
136
  | Command | Kind | What it does |
137
137
  | --- | --- | --- |
138
+ | `qawolf activity wait` | read | Wait on many QA Wolf AI (Tester) sessions and runs in one call. Pass every Tester session and run you are waiting on. The call returns as soon as any session replies or changes status or any run finishes, and reports every item with news. Send back open as the next call's input, and call again as soon as it returns. Pass waitSeconds above 45 only when your instructions say your client keeps the call open while progress arrives. |
138
139
  | `qawolf agent get` | read | Read what the QA Wolf AI has said and whether it is still working |
139
140
  | `qawolf agent send` | write | Ask the QA Wolf AI to do a piece of work, such as covering a journey or fixing a broken flow |
140
141
  | `qawolf attempt get` | read | Get a finished run attempt: its run and flow status, its place among that flow's attempts in the run, and signed links to its logs, trace, and video when they were captured. |
@@ -187,14 +188,17 @@ that `url`; never guess a route and never send a repository link in its place.
187
188
  | `qawolf install browsers` | local | Install Playwright browsers used by the project's web flows |
188
189
  | `qawolf install clear` | local | Remove the managed runtime cache (all installed runtime versions) |
189
190
  | `qawolf investigation get` | read | Read what the QA Wolf AI investigating a run has concluded: one finding per cause of its failures, with the question waiting for a person and any answer or dispute the investigation hasn't acted on yet. A run that automatic investigation does not cover answers status "not-enabled". |
190
- | `qawolf investigation question find` | read | List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. Each question names its run, flows, details and offered answers. To answer one, send the person's answer to its sessionId with agent.send. |
191
+ | `qawolf investigation question answer` | write | Answer the questions the QA Wolf AI investigating a failed run is waiting on, as the signed-in person. List the questions with investigation.question.find, and answer only with the person's approval. The first answer to a question wins, and the investigation acts on it. Only a person's own sign-in or user API key can answer; a team or organization key cannot. |
192
+ | `qawolf investigation question find` | read | List the questions the QA Wolf AI investigating failed runs is waiting for a person to answer, across a workspace's runs. Each question names its run, flows, details and offered answers. To answer them, call investigation.question.answer with the run and the person's answers. |
191
193
  | `qawolf issue addFlows` | write | Add flows to a coverage request owned by the caller's team. Flows already covered stay covered. Bug reports and blockers link to flows through the runs that reproduce them; use run.diagnose to record one. |
192
194
  | `qawolf issue attachFiles` | write | Attach files from the team's storage to a bug report owned by the caller's team, for example the files a bug was reproduced with. Files already attached stay attached. Upload a file with file.requestUpload first. |
195
+ | `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. |
193
196
  | `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. |
194
197
  | `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. |
195
198
  | `qawolf issue find` | read | List the team's bug reports, blockers, or coverage requests, newest first. |
196
199
  | `qawolf issue get` | read | Get an issue by id. |
197
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. |
201
+ | `qawolf issue listComments` | read | List the comments on a bug report, blocker (issue type `maintenance`), or coverage request, oldest first, with who wrote each one. |
198
202
  | `qawolf issue removeFlows` | write | Remove flows from a coverage request or remove bug report or blocker reproductions in an environment. Unlinked flows are left alone. Reports auto-close when no active reproductions remain and auto-close is enabled. For reports, omit environmentId only when each selected flow is linked in at most one environment. |
199
203
  | `qawolf issue update` | write | Update an issue owned by the caller's team. Omitted fields remain unchanged. |
200
204
  | `qawolf legacyTrigger find` | read | List a workspace's legacy per-environment triggers; trigger.find lists the current ones. For migration only; it goes when legacy triggers go. adaptiveFlowSelection becomes a generativeSuite action, which takes no tags. |
@@ -208,7 +212,7 @@ that `url`; never guess a route and never send a repository link in its place.
208
212
  | `qawolf run create` | write | Create a run for the selected flows and/or tags in an environment. |
209
213
  | `qawolf run diagnose` | write | Link failed flows in a run to an existing bug report or blocker owned by the caller's team, recording them as its reproductions. It does not explain why a run failed; read investigation.get or attempt.get for that. The issue's type selects the diagnosis. Each flow must have failed in the run. A flow that is already diagnosed in the run moves to this issue, and may stay linked to other open reports. The diagnosis appears on the run, and the reproduction appears under the issue's reproductions. Coverage requests cannot be diagnosed; use issue.addFlows to cover flows instead. |
210
214
  | `qawolf run find` | read | List an environment's recent runs, newest first, including failed-attempt discovery metadata. |
211
- | `qawolf run get` | read | Get a run's status, per-flow results, links, and how many of its bugs are blocking. |
215
+ | `qawolf run get` | read | Get a run's status, per-flow results, links, and how many of its bugs are blocking. Call it without waitSeconds for an immediate answer. To wait on a run that is still queued or running, pass waitSeconds up to 45: the server holds the check open and answers the moment the status changes. A held check also waits while the run is still being created. After a held check returns, call again only while status is queued or running. Stop when status is passed, failed, canceled, or superseded. |
212
216
  | `qawolf run listScreenshotComparisons` | read | List the screenshot comparisons that failed a run's flows, with the expected, actual and diff images of each. Only comparisons that caused a failure are listed: a screenshot that differs within tolerance, or that differs on a line that did not fail, is left out. Each comparison tells whether its baseline changed since the run and whether the baseline still passes in other environments. The image URLs expire after a few minutes; fetch the preview URLs to look at the images. The first call for an image makes its missing JPEG preview and keeps it in team storage, so later calls reuse it. |
213
217
  | `qawolf run optOutOfInvestigation` | write | Mark failed flows in a run as "do not investigate" (DNI): the failures need no bug report or blocker. Each flow must have failed in the run and still be under investigation. A flow that already has a diagnosis cannot be opted out. A team or organization key records the opt-out as the workspace's automation user. To link a failure to a report instead, use run.diagnose. |
214
218
  | `qawolf run reattempt` | write | Request new attempts for a run's flows. A flow is eligible once its result is failed or canceled and QA Wolf's automatic retries have finished. A flow that kept failing in later runs is attempted in the latest of them, because that is the run carrying the failure, so read reattemptedInRunIds for where each attempt landed. A fully investigated run no longer accepts reattempts. Attempts run with the flow code the environment has synced when the request arrives: after publishing a fix, pass afterCommit so the request waits for that commit instead of rerunning older code. Poll run.get for results, or pass aiTaskId or chatSessionId to be notified when they settle. |
@@ -245,6 +245,8 @@ Every documented field of the `run.get` response. `[]` marks an array, so
245
245
  - `siteVersions[].observed[].source` — One of header, meta, versionPath, frameworkBuildId, fingerprint; newer servers may add values, so ignore any you don't know. Where the attempt read the version.
246
246
  - `siteVersions[].origin` — The site origin the attempts visited.
247
247
  - `siteVersions[].warnings` — Why the site may not be the version the run should test.
248
+ - `waitSeconds` — The hold this check was allowed, in seconds, after clamping. Absent when the check did not wait.
249
+ - `wokeOn` — One of: status, timeout
248
250
  - `url` — Absolute URL of the run page.
249
251
 
250
252
  <!-- fields:end -->