@qawolf/cli 2.6.0 → 2.8.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/runner-sdk.js
CHANGED
|
@@ -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",
|
|
@@ -7272,7 +7321,7 @@ var makeRequestFileUploadContract = (ids) => {
|
|
|
7272
7321
|
const output = object({
|
|
7273
7322
|
contentType: string2().describe("Send this as the PUT's `Content-Type` header, exactly. The URL is signed for it and refuses any other value."),
|
|
7274
7323
|
expiresAt: exports_iso.datetime().describe("When uploadUrl stops working. Request another one after it."),
|
|
7275
|
-
filePath: string2().describe("Where the file lives in team storage. Send it as filePath to file.requestDownload,
|
|
7324
|
+
filePath: string2().describe("Where the file lives in team storage. Send it as filePath to file.requestDownload, in agent.send's filePaths so the AI fetches it from there, or as an image's source in an issue description."),
|
|
7276
7325
|
path: string2().describe("Deprecated: the same value as filePath. Read filePath instead."),
|
|
7277
7326
|
uploadUrl: string2().describe(`Send the file's bytes here with a single HTTP PUT carrying the returned contentType, for example \`curl -H 'Content-Type: application/octet-stream' --upload-file "journeys.csv" "<uploadUrl>"\`. Upload the bytes from the shell rather than through this API, so a large file never has to be written out as text.`)
|
|
7278
7327
|
});
|
|
@@ -7365,6 +7414,11 @@ var defaultIdSchemas = {
|
|
|
7365
7414
|
};
|
|
7366
7415
|
var workspaceForEnvironmentRef = (workspace) => workspace.optional().describe("The workspace the environment belongs to, which an alias resolves in. Read it from whoami.");
|
|
7367
7416
|
|
|
7417
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/description.js
|
|
7418
|
+
var maxInlineImageSizeBytes = 2000000;
|
|
7419
|
+
var maxInlineImagesPerDescription = 10;
|
|
7420
|
+
var issueDescriptionDescription = "The issue description in Markdown, which is stored as rich text. Text without Markdown is stored as written, one paragraph per line. " + "To show an image in the description, upload it with file.requestUpload, PUT its bytes with curl, then write `` where the image belongs, with the returned filePath between the angle brackets. " + `The image is stored in the description itself: a GIF, JPEG, PNG or WebP of at most ${maxInlineImageSizeBytes / 1e6} MB. ` + `A description shows at most ${maxInlineImagesPerDescription} such images, each outside any link. ` + "An image at an http(s) URL is stored as a link instead. " + "If an image's path has no file, is not one of those images, is too large or is inside a link, or there are too many images, nothing is written and the error says why.";
|
|
7421
|
+
|
|
7368
7422
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/files.js
|
|
7369
7423
|
var maxAttachedFilesPerRequest = 10;
|
|
7370
7424
|
var attachedFilePathsSchema = array(teamStoragePathSchema).min(1).max(maxAttachedFilesPerRequest).refine((filePaths) => new Set(filePaths).size === filePaths.length, "filePaths must be unique");
|
|
@@ -7529,6 +7583,9 @@ var makeListScreenshotComparisonsContract = (ids) => {
|
|
|
7529
7583
|
};
|
|
7530
7584
|
};
|
|
7531
7585
|
|
|
7586
|
+
// node_modules/@qawolf/api-contracts/dist/v1/run/wait.js
|
|
7587
|
+
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.`);
|
|
7588
|
+
|
|
7532
7589
|
// node_modules/@qawolf/api-contracts/dist/v1/runner/actionSequence.js
|
|
7533
7590
|
var maxActionsPerRequest = 10;
|
|
7534
7591
|
var screenshotModes = ["none", "final", "each"];
|
|
@@ -8317,6 +8374,13 @@ var runSelectionSchema = object({
|
|
|
8317
8374
|
error: "A selection's startLine must not be after its endLine.",
|
|
8318
8375
|
path: ["startLine"]
|
|
8319
8376
|
});
|
|
8377
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatFields.js
|
|
8378
|
+
var triggerScheduleRepeatFields = {
|
|
8379
|
+
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."),
|
|
8380
|
+
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."),
|
|
8381
|
+
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.')
|
|
8382
|
+
};
|
|
8383
|
+
|
|
8320
8384
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/configuration.js
|
|
8321
8385
|
var isTimezone = (value) => {
|
|
8322
8386
|
try {
|
|
@@ -8326,7 +8390,7 @@ var isTimezone = (value) => {
|
|
|
8326
8390
|
return false;
|
|
8327
8391
|
}
|
|
8328
8392
|
};
|
|
8329
|
-
var triggerCadenceSchema = _enum(["hourly", "daily", "weekly"]).describe("How often the schedule fires.");
|
|
8393
|
+
var triggerCadenceSchema = _enum(["hourly", "daily", "weekly", "monthly"]).describe("How often the schedule fires.");
|
|
8330
8394
|
var triggerDayOfWeekSchema = _enum([
|
|
8331
8395
|
"monday",
|
|
8332
8396
|
"tuesday",
|
|
@@ -8354,11 +8418,74 @@ var makeTriggerScheduleFields = (ids) => ({
|
|
|
8354
8418
|
message: "Expected each day to be named at most once."
|
|
8355
8419
|
}).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
8420
|
environmentId: ids.environmentId.describe("The environment the scheduled runs happen in."),
|
|
8421
|
+
...triggerScheduleRepeatFields,
|
|
8357
8422
|
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
|
|
8423
|
+
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
8424
|
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
8425
|
});
|
|
8361
8426
|
|
|
8427
|
+
// node_modules/@qawolf/api-contracts/dist/v1/trigger/scheduleRepeatRules.js
|
|
8428
|
+
var hourlyEveryValues = [1, 2, 3, 4, 6, 8, 12];
|
|
8429
|
+
var maxEvery = {
|
|
8430
|
+
daily: 31,
|
|
8431
|
+
monthly: 12,
|
|
8432
|
+
weekly: 12
|
|
8433
|
+
};
|
|
8434
|
+
var dayOfWeekNames = [
|
|
8435
|
+
"sunday",
|
|
8436
|
+
"monday",
|
|
8437
|
+
"tuesday",
|
|
8438
|
+
"wednesday",
|
|
8439
|
+
"thursday",
|
|
8440
|
+
"friday",
|
|
8441
|
+
"saturday"
|
|
8442
|
+
];
|
|
8443
|
+
var calendarDayOf = (startDate) => {
|
|
8444
|
+
const date = new Date(`${startDate}T00:00:00Z`);
|
|
8445
|
+
return !Number.isNaN(date.getTime()) && date.toISOString().startsWith(startDate) ? date : undefined;
|
|
8446
|
+
};
|
|
8447
|
+
var everyIssue = (value, every) => {
|
|
8448
|
+
if (value.cadence === "hourly") {
|
|
8449
|
+
return hourlyEveryValues.includes(every) ? undefined : "every must divide a day evenly when cadence is hourly: 1, 2, 3, 4, 6, 8 or 12.";
|
|
8450
|
+
}
|
|
8451
|
+
const max = maxEvery[value.cadence];
|
|
8452
|
+
return every > max ? `every is at most ${max} when cadence is ${value.cadence}.` : undefined;
|
|
8453
|
+
};
|
|
8454
|
+
var startDateIssue = (value, startDate) => {
|
|
8455
|
+
const day = calendarDayOf(startDate);
|
|
8456
|
+
if (day === undefined)
|
|
8457
|
+
return "startDate must be a real calendar date.";
|
|
8458
|
+
if (value.cadence === "weekly" && value.dayOfWeek !== undefined && dayOfWeekNames[day.getUTCDay()] !== value.dayOfWeek)
|
|
8459
|
+
return "startDate must fall on dayOfWeek.";
|
|
8460
|
+
if (value.cadence === "monthly" && value.dayOfMonth !== undefined && day.getUTCDate() !== value.dayOfMonth)
|
|
8461
|
+
return "startDate must fall on dayOfMonth.";
|
|
8462
|
+
return;
|
|
8463
|
+
};
|
|
8464
|
+
var checkScheduleRepeat = (value, ctx) => {
|
|
8465
|
+
const every = value.every ?? 1;
|
|
8466
|
+
const issue = (message, field) => ctx.addIssue({ code: "custom", message, path: [field] });
|
|
8467
|
+
const everyMessage = everyIssue(value, every);
|
|
8468
|
+
if (everyMessage !== undefined)
|
|
8469
|
+
issue(everyMessage, "every");
|
|
8470
|
+
if (value.cadence === "hourly")
|
|
8471
|
+
return;
|
|
8472
|
+
if (every > 1 && value.daysOfWeek !== undefined)
|
|
8473
|
+
issue("daysOfWeek applies only when every is 1.", "daysOfWeek");
|
|
8474
|
+
if (every > 1 && value.startDate === undefined) {
|
|
8475
|
+
issue("startDate is required when every is more than 1.", "startDate");
|
|
8476
|
+
return;
|
|
8477
|
+
}
|
|
8478
|
+
if (value.startDate === undefined)
|
|
8479
|
+
return;
|
|
8480
|
+
if (every === 1) {
|
|
8481
|
+
issue("startDate applies only when every is more than 1.", "startDate");
|
|
8482
|
+
return;
|
|
8483
|
+
}
|
|
8484
|
+
const startDateMessage = startDateIssue(value, value.startDate);
|
|
8485
|
+
if (startDateMessage !== undefined)
|
|
8486
|
+
issue(startDateMessage, "startDate");
|
|
8487
|
+
};
|
|
8488
|
+
|
|
8362
8489
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/configurationRules.js
|
|
8363
8490
|
var checkAction = (action, ctx) => {
|
|
8364
8491
|
const namesFlows = action.flowIds.length + action.tagNames.length > 0;
|
|
@@ -8390,24 +8517,32 @@ var checkAction = (action, ctx) => {
|
|
|
8390
8517
|
var requiredScheduleFields = {
|
|
8391
8518
|
daily: ["timeOfDay", "timezoneId"],
|
|
8392
8519
|
hourly: ["timezoneId"],
|
|
8520
|
+
monthly: ["dayOfMonth", "timeOfDay", "timezoneId"],
|
|
8393
8521
|
weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
|
|
8394
8522
|
};
|
|
8395
8523
|
var optionalScheduleFields = {
|
|
8396
|
-
daily: ["daysOfWeek"],
|
|
8397
|
-
hourly: ["daysOfWeek", "minuteOfHour"],
|
|
8398
|
-
|
|
8524
|
+
daily: ["daysOfWeek", "every", "startDate"],
|
|
8525
|
+
hourly: ["daysOfWeek", "every", "minuteOfHour"],
|
|
8526
|
+
monthly: ["every", "startDate"],
|
|
8527
|
+
weekly: ["every", "startDate"]
|
|
8399
8528
|
};
|
|
8400
8529
|
var cadencesUsingField = {
|
|
8530
|
+
dayOfMonth: "a monthly cadence",
|
|
8401
8531
|
dayOfWeek: "a weekly cadence",
|
|
8402
8532
|
daysOfWeek: "an hourly or daily cadence",
|
|
8533
|
+
every: "any cadence",
|
|
8403
8534
|
minuteOfHour: "an hourly cadence",
|
|
8404
|
-
|
|
8405
|
-
|
|
8535
|
+
startDate: "a daily, weekly or monthly cadence",
|
|
8536
|
+
timeOfDay: "a daily, weekly or monthly cadence",
|
|
8537
|
+
timezoneId: "an hourly, daily, weekly or monthly cadence"
|
|
8406
8538
|
};
|
|
8407
8539
|
var scheduleFields = [
|
|
8540
|
+
"dayOfMonth",
|
|
8408
8541
|
"dayOfWeek",
|
|
8409
8542
|
"daysOfWeek",
|
|
8543
|
+
"every",
|
|
8410
8544
|
"minuteOfHour",
|
|
8545
|
+
"startDate",
|
|
8411
8546
|
"timeOfDay",
|
|
8412
8547
|
"timezoneId"
|
|
8413
8548
|
];
|
|
@@ -8437,6 +8572,7 @@ var checkScheduleFields = (value, ctx) => {
|
|
|
8437
8572
|
};
|
|
8438
8573
|
var checkSchedule = (value, ctx) => {
|
|
8439
8574
|
checkScheduleFields(value, ctx);
|
|
8575
|
+
checkScheduleRepeat(value, ctx);
|
|
8440
8576
|
if (value.action.kind === "generativeSuite") {
|
|
8441
8577
|
ctx.addIssue({
|
|
8442
8578
|
code: "custom",
|
|
@@ -8715,7 +8851,7 @@ var makeAgentGetContract = (ids) => {
|
|
|
8715
8851
|
const input = object({
|
|
8716
8852
|
cursor: string2().min(1).optional().describe("Opaque cursor copied from this same session's previous nextCursor. Omit to read from its first reply."),
|
|
8717
8853
|
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}
|
|
8854
|
+
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
8855
|
});
|
|
8720
8856
|
const output = resource({
|
|
8721
8857
|
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 +8874,7 @@ var makeAgentGetContract = (ids) => {
|
|
|
8738
8874
|
openWorldHint: false,
|
|
8739
8875
|
readOnlyHint: true
|
|
8740
8876
|
},
|
|
8741
|
-
description:
|
|
8877
|
+
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
8878
|
input,
|
|
8743
8879
|
kind: "read",
|
|
8744
8880
|
name: "agent.get",
|
|
@@ -8749,6 +8885,7 @@ var makeAgentGetContract = (ids) => {
|
|
|
8749
8885
|
// node_modules/@qawolf/api-contracts/dist/v1/agent/send.js
|
|
8750
8886
|
var makeAgentSendContract = (ids) => {
|
|
8751
8887
|
const input = object({
|
|
8888
|
+
builds: array(buildIdSchema).min(1).max(20).optional().describe("Builds this request is about, from build.create, at most one per app and platform. The runs of the session install them over the environment's builds of the same app and platform, and record them. Create them without an environment, so the environment's own runs keep their builds."),
|
|
8752
8889
|
environmentId: ids.environmentRef.optional().describe("The environment to work in. Omit to use the team's default environment. Ignored when sessionId is given, because a session keeps the environment it opened in."),
|
|
8753
8890
|
filePaths: array(teamStoragePathSchema).max(20).optional().describe("Paths of files this request is about, from file.requestUpload. The AI reads them from storage rather than the message, so a plan of hundreds of journeys costs nothing to send."),
|
|
8754
8891
|
message: string2().trim().min(1).max(1e4).describe("What you want QA Wolf to do, in plain language. Name the journey, the part of the app it covers, and anything the AI cannot discover for itself, such as a test account, a feature flag, or how to reach a staging environment. When answering a question from agent.get, send the answer here."),
|
|
@@ -10098,13 +10235,7 @@ var makeUpdateFlowContract = (ids) => {
|
|
|
10098
10235
|
};
|
|
10099
10236
|
|
|
10100
10237
|
// 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
|
-
]);
|
|
10238
|
+
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
10239
|
var issueStatusSchema = _enum([
|
|
10109
10240
|
"backlog",
|
|
10110
10241
|
"pending",
|
|
@@ -10304,6 +10435,51 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
10304
10435
|
};
|
|
10305
10436
|
};
|
|
10306
10437
|
|
|
10438
|
+
// node_modules/@qawolf/api-contracts/dist/v1/investigation/question/answer.js
|
|
10439
|
+
var maxAnswersPerCall = 50;
|
|
10440
|
+
var findingIdSchema = string2().min(1).max(80);
|
|
10441
|
+
var findingIdsOf = ({ answers = {}, replies = {} }) => [
|
|
10442
|
+
...Object.keys(answers),
|
|
10443
|
+
...Object.keys(replies)
|
|
10444
|
+
];
|
|
10445
|
+
var makeAnswerInvestigationQuestionsContract = (ids) => {
|
|
10446
|
+
const input = object({
|
|
10447
|
+
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."),
|
|
10448
|
+
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."),
|
|
10449
|
+
runId: ids.run
|
|
10450
|
+
}).refine((sent) => findingIdsOf(sent).length > 0, {
|
|
10451
|
+
message: "Send at least one answer or reply."
|
|
10452
|
+
}).refine((sent) => findingIdsOf(sent).length <= maxAnswersPerCall, {
|
|
10453
|
+
message: `Send at most ${maxAnswersPerCall} answers and replies in one call.`
|
|
10454
|
+
}).refine((sent) => new Set(findingIdsOf(sent)).size === findingIdsOf(sent).length, { message: "Answer each question once, as an answer or as a reply." });
|
|
10455
|
+
const output = resource({
|
|
10456
|
+
answeredFindingIds: array(string2()).describe("The questions this call answered. The investigation receives the answers and acts on them."),
|
|
10457
|
+
refused: array(object({
|
|
10458
|
+
findingId: string2(),
|
|
10459
|
+
message: string2().describe("Why the answer was not recorded."),
|
|
10460
|
+
reason: string2().describe('Known values: "answer-not-offered", "environment-terminated", "not-asking", "not-found", "response-pending" and "superseded". New values can appear.')
|
|
10461
|
+
})).describe("The answers that were not recorded."),
|
|
10462
|
+
runId: ids.run
|
|
10463
|
+
}, { urlFieldDescription: "The run in the QA Wolf app." });
|
|
10464
|
+
return {
|
|
10465
|
+
annotationJustifications: {
|
|
10466
|
+
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.",
|
|
10467
|
+
openWorldHint: "A bug report the investigation files from an answer can reach the workspace's configured integrations.",
|
|
10468
|
+
readOnlyHint: "Records answers to the questions of a run's investigation."
|
|
10469
|
+
},
|
|
10470
|
+
annotations: {
|
|
10471
|
+
destructiveHint: true,
|
|
10472
|
+
openWorldHint: true,
|
|
10473
|
+
readOnlyHint: false
|
|
10474
|
+
},
|
|
10475
|
+
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.",
|
|
10476
|
+
input,
|
|
10477
|
+
kind: "write",
|
|
10478
|
+
name: "investigation.question.answer",
|
|
10479
|
+
output
|
|
10480
|
+
};
|
|
10481
|
+
};
|
|
10482
|
+
|
|
10307
10483
|
// node_modules/@qawolf/api-contracts/dist/v1/investigation/question/find.js
|
|
10308
10484
|
var makeFindInvestigationQuestionsContract = (ids) => {
|
|
10309
10485
|
const input = object({
|
|
@@ -10321,7 +10497,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
|
|
|
10321
10497
|
headline: string2().optional(),
|
|
10322
10498
|
question: investigationQuestionSchema,
|
|
10323
10499
|
runId: ids.run,
|
|
10324
|
-
sessionId: ids.chatSession.describe("The investigation session.
|
|
10500
|
+
sessionId: ids.chatSession.describe("The investigation session. Read what it is doing with agent.get."),
|
|
10325
10501
|
summary: string2().optional()
|
|
10326
10502
|
}, { 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
10503
|
});
|
|
@@ -10336,7 +10512,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
|
|
|
10336
10512
|
openWorldHint: false,
|
|
10337
10513
|
readOnlyHint: true
|
|
10338
10514
|
},
|
|
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
|
|
10515
|
+
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
10516
|
input,
|
|
10341
10517
|
kind: "read",
|
|
10342
10518
|
name: "investigation.question.find",
|
|
@@ -10346,6 +10522,7 @@ var makeFindInvestigationQuestionsContract = (ids) => {
|
|
|
10346
10522
|
|
|
10347
10523
|
// node_modules/@qawolf/api-contracts/dist/v1/investigation/question/index.js
|
|
10348
10524
|
var makeInvestigationQuestionContracts = (ids) => ({
|
|
10525
|
+
answer: makeAnswerInvestigationQuestionsContract(ids),
|
|
10349
10526
|
find: makeFindInvestigationQuestionsContract(ids)
|
|
10350
10527
|
});
|
|
10351
10528
|
|
|
@@ -10411,12 +10588,61 @@ var makeAttachFilesToIssueContract = (ids) => {
|
|
|
10411
10588
|
};
|
|
10412
10589
|
};
|
|
10413
10590
|
|
|
10591
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/commentResource.js
|
|
10592
|
+
var issueCommentAuthorSchema = discriminatedUnion("type", [
|
|
10593
|
+
object({
|
|
10594
|
+
email: string2(),
|
|
10595
|
+
name: string2().optional().describe("Absent when the person has not set a name."),
|
|
10596
|
+
type: literal("user")
|
|
10597
|
+
}),
|
|
10598
|
+
object({ type: literal("former-user") }),
|
|
10599
|
+
object({ type: literal("team-api-key") }),
|
|
10600
|
+
object({ type: literal("system") })
|
|
10601
|
+
]).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`).");
|
|
10602
|
+
var makeIssueCommentResourceSchema = (ids) => resource({
|
|
10603
|
+
author: issueCommentAuthorSchema,
|
|
10604
|
+
body: string2().describe("The comment in GitHub-flavored Markdown."),
|
|
10605
|
+
commentId: string2().describe("The id of the comment."),
|
|
10606
|
+
createdAt: exports_coerce.date().describe("When the comment was written."),
|
|
10607
|
+
issueId: ids.issue.describe("The issue the comment is on."),
|
|
10608
|
+
viaQaWolfAi: boolean2().describe("Whether the author wrote the comment through QA Wolf AI.")
|
|
10609
|
+
}, { urlFieldDescription: "Absolute URL of the issue page." });
|
|
10610
|
+
|
|
10611
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/comment.js
|
|
10612
|
+
var maxCommentLength = 1e4;
|
|
10613
|
+
var makeCommentOnIssueContract = (ids) => {
|
|
10614
|
+
const input = object({
|
|
10615
|
+
body: string2().trim().min(1).max(maxCommentLength).describe("The comment in GitHub-flavored Markdown."),
|
|
10616
|
+
issueId: ids.issue.describe("The bug report, blocker, or coverage request to comment on.")
|
|
10617
|
+
});
|
|
10618
|
+
const output = object({
|
|
10619
|
+
comment: makeIssueCommentResourceSchema(ids)
|
|
10620
|
+
});
|
|
10621
|
+
return {
|
|
10622
|
+
annotationJustifications: {
|
|
10623
|
+
destructiveHint: "Adds a comment without removing or changing anything else on the issue.",
|
|
10624
|
+
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.",
|
|
10625
|
+
readOnlyHint: "Records a comment on the issue."
|
|
10626
|
+
},
|
|
10627
|
+
annotations: {
|
|
10628
|
+
destructiveHint: false,
|
|
10629
|
+
openWorldHint: false,
|
|
10630
|
+
readOnlyHint: false
|
|
10631
|
+
},
|
|
10632
|
+
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.",
|
|
10633
|
+
input,
|
|
10634
|
+
kind: "write",
|
|
10635
|
+
name: "issue.comment",
|
|
10636
|
+
output
|
|
10637
|
+
};
|
|
10638
|
+
};
|
|
10639
|
+
|
|
10414
10640
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/create.js
|
|
10415
10641
|
var makeCreateIssueContract = (ids) => {
|
|
10416
10642
|
const commonFields = {
|
|
10417
|
-
description: string2().optional().describe(
|
|
10643
|
+
description: string2().optional().describe(issueDescriptionDescription),
|
|
10418
10644
|
name: string2().trim().min(1).max(255),
|
|
10419
|
-
priority: issuePrioritySchema.optional().describe(
|
|
10645
|
+
priority: issuePrioritySchema.optional().describe(`${issuePrioritySchema.description} Defaults to "unprioritized" for bug reports and coverage requests.`),
|
|
10420
10646
|
workspaceId: ids.workspace.optional().describe("The workspace to create the issue in. Required when authenticating with an organization or user API key.")
|
|
10421
10647
|
};
|
|
10422
10648
|
const input = discriminatedUnion("type", [
|
|
@@ -10554,6 +10780,35 @@ var makeListIssueActivityContract = (ids) => {
|
|
|
10554
10780
|
};
|
|
10555
10781
|
};
|
|
10556
10782
|
|
|
10783
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/listComments.js
|
|
10784
|
+
var makeListIssueCommentsContract = (ids) => {
|
|
10785
|
+
const input = object({
|
|
10786
|
+
issueId: ids.issue.describe("The bug report, blocker, or coverage request whose comments to list."),
|
|
10787
|
+
...makePaginationInputFields({ defaultLimit: 50, maxLimit: 200 })
|
|
10788
|
+
});
|
|
10789
|
+
const output = object({
|
|
10790
|
+
comments: array(makeIssueCommentResourceSchema(ids)).describe("The issue's comments, oldest first."),
|
|
10791
|
+
nextCursor: nextCursorSchema
|
|
10792
|
+
});
|
|
10793
|
+
return {
|
|
10794
|
+
annotationJustifications: {
|
|
10795
|
+
destructiveHint: "Does not edit the issue or its comments.",
|
|
10796
|
+
openWorldHint: "Reads QA Wolf comments without reading or changing linked trackers.",
|
|
10797
|
+
readOnlyHint: "Lists the comments on one issue."
|
|
10798
|
+
},
|
|
10799
|
+
annotations: {
|
|
10800
|
+
destructiveHint: false,
|
|
10801
|
+
openWorldHint: false,
|
|
10802
|
+
readOnlyHint: true
|
|
10803
|
+
},
|
|
10804
|
+
description: "List the comments on a bug report, blocker (issue type `maintenance`), or coverage request, oldest first, with who wrote each one.",
|
|
10805
|
+
input,
|
|
10806
|
+
kind: "read",
|
|
10807
|
+
name: "issue.listComments",
|
|
10808
|
+
output
|
|
10809
|
+
};
|
|
10810
|
+
};
|
|
10811
|
+
|
|
10557
10812
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/removeFlows.js
|
|
10558
10813
|
var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
10559
10814
|
const input = object({
|
|
@@ -10585,7 +10840,7 @@ var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
|
10585
10840
|
|
|
10586
10841
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/update.js
|
|
10587
10842
|
var makeUpdateIssueContract = (ids) => {
|
|
10588
|
-
const descriptionSchema = string2().describe(
|
|
10843
|
+
const descriptionSchema = string2().describe(issueDescriptionDescription);
|
|
10589
10844
|
const nameSchema = string2().trim().min(1).max(255);
|
|
10590
10845
|
const input = object({
|
|
10591
10846
|
description: descriptionSchema.optional(),
|
|
@@ -10622,11 +10877,13 @@ var makeUpdateIssueContract = (ids) => {
|
|
|
10622
10877
|
var makeIssueContracts = (ids) => ({
|
|
10623
10878
|
addFlows: makeAddFlowsToIssueContract(ids),
|
|
10624
10879
|
attachFiles: makeAttachFilesToIssueContract(ids),
|
|
10880
|
+
comment: makeCommentOnIssueContract(ids),
|
|
10625
10881
|
create: makeCreateIssueContract(ids),
|
|
10626
10882
|
decideSuggestion: makeDecideSuggestionContract(ids),
|
|
10627
10883
|
find: makeFindIssuesContract(ids),
|
|
10628
10884
|
get: makeGetIssueContract(ids),
|
|
10629
10885
|
listActivity: makeListIssueActivityContract(ids),
|
|
10886
|
+
listComments: makeListIssueCommentsContract(ids),
|
|
10630
10887
|
removeFlows: makeRemoveFlowsFromIssueContract(ids),
|
|
10631
10888
|
update: makeUpdateIssueContract(ids)
|
|
10632
10889
|
});
|
|
@@ -10780,6 +11037,7 @@ var makeConnectMcpServerContract = (ids) => {
|
|
|
10780
11037
|
});
|
|
10781
11038
|
const output = object({
|
|
10782
11039
|
authorizationUrl: string2().url().describe("The server's sign-in page. Show it to the user: the connection is ready once they approve access there."),
|
|
11040
|
+
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
11041
|
serverName: string2().describe("The catalog name of the server.")
|
|
10784
11042
|
});
|
|
10785
11043
|
return {
|
|
@@ -11022,7 +11280,8 @@ var makeGetRunContract = (ids) => {
|
|
|
11022
11280
|
const flowStatus = _enum(publicRunStatusValues);
|
|
11023
11281
|
const input = object({
|
|
11024
11282
|
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
|
|
11283
|
+
runId: ids.run,
|
|
11284
|
+
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
11285
|
});
|
|
11027
11286
|
const attempts = makeFlowAttemptsSchema(ids);
|
|
11028
11287
|
const failedFlow = object({
|
|
@@ -11046,7 +11305,9 @@ var makeGetRunContract = (ids) => {
|
|
|
11046
11305
|
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
11306
|
flows,
|
|
11048
11307
|
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.")
|
|
11308
|
+
siteVersions: array(runSiteVersionSchema).describe("The versions the run's attempts saw on each site origin, with warnings. Empty when no attempt reported one."),
|
|
11309
|
+
waitSeconds: number2().int().optional().describe("The hold this check was allowed, in seconds, after clamping. Absent when the check did not wait."),
|
|
11310
|
+
wokeOn: runWakeReasonSchema.optional()
|
|
11050
11311
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
11051
11312
|
return {
|
|
11052
11313
|
annotationJustifications: {
|
|
@@ -11059,7 +11320,7 @@ var makeGetRunContract = (ids) => {
|
|
|
11059
11320
|
openWorldHint: false,
|
|
11060
11321
|
readOnlyHint: true
|
|
11061
11322
|
},
|
|
11062
|
-
description:
|
|
11323
|
+
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
11324
|
input,
|
|
11064
11325
|
kind: "read",
|
|
11065
11326
|
name: "run.get",
|
|
@@ -11543,6 +11804,7 @@ var unchangedFilesSchema = record(string2(), string2().min(1)).superRefine((hash
|
|
|
11543
11804
|
});
|
|
11544
11805
|
var makeRunFlowOnRunnerContract = (ids) => {
|
|
11545
11806
|
const input = object({
|
|
11807
|
+
builds: array(buildIdSchema).min(1).max(20).optional().describe("Builds to install in this run, at most one per app and platform. Each replaces the named environment's latest build of its app and platform. The run sees them in `QAWOLF_BUILDS`, which `launch({ app: { id } })` reads."),
|
|
11546
11808
|
entryPointPath: runFilePathSchema.describe("Path of the flow file to run, as it appears in `files`."),
|
|
11547
11809
|
env: runEnvironmentSchema.optional().describe("Environment variables to make available to the run. With `environmentId`, they are added on top of that environment's variables for this run only, replacing any of the same name; the environment itself is not changed."),
|
|
11548
11810
|
environmentId: ids.environmentRef.optional().describe("A QA Wolf environment whose variables the run is given, by id or alias. QA Wolf reads and decrypts them itself, so they never travel in the request and the count and length limits on `env` do not apply to them. The run also gets `QAWOLF_ENVIRONMENT_ID`, `QAWOLF_ENVIRONMENT_NAME` and `QAWOLF_TEAM_API_KEY`, as a cloud run on that environment does, so a flow can save environment variables with `@qawolf/testkit`; `env` cannot replace these three."),
|
|
@@ -11796,6 +12058,9 @@ var makeContractsV1 = (ids) => {
|
|
|
11796
12058
|
runAttempt: ids.runAttempt ?? defaultIdSchemas.runAttempt
|
|
11797
12059
|
};
|
|
11798
12060
|
return {
|
|
12061
|
+
activity: {
|
|
12062
|
+
wait: makeActivityWaitContract(resolvedIds)
|
|
12063
|
+
},
|
|
11799
12064
|
agent: {
|
|
11800
12065
|
get: makeAgentGetContract(resolvedIds),
|
|
11801
12066
|
send: makeAgentSendContract(resolvedIds)
|
|
@@ -16149,6 +16414,17 @@ function buildRunSelection(options) {
|
|
|
16149
16414
|
return { ok: true, selection: parsed.data };
|
|
16150
16415
|
}
|
|
16151
16416
|
|
|
16417
|
+
// src/core/interactiveRunner/runBuilds.ts
|
|
16418
|
+
function parseRunBuilds(values) {
|
|
16419
|
+
if (values.length === 0)
|
|
16420
|
+
return { builds: undefined, ok: true };
|
|
16421
|
+
const checked = publicContractsV1.runner.runFlow.input.shape.builds.safeParse(values);
|
|
16422
|
+
if (!checked.success) {
|
|
16423
|
+
return { error: prettifyError(checked.error), ok: false };
|
|
16424
|
+
}
|
|
16425
|
+
return { builds: checked.data, ok: true };
|
|
16426
|
+
}
|
|
16427
|
+
|
|
16152
16428
|
// src/core/dotenv.ts
|
|
16153
16429
|
var lineRe = /^(?:([A-Za-z_][A-Za-z0-9_]*)|"((?:[^"\\]|\\.)*)")="((?:[^"\\]|\\.)*)"$/;
|
|
16154
16430
|
function parseDotenv(content) {
|
|
@@ -16269,6 +16545,9 @@ async function prepareRun(options, deps) {
|
|
|
16269
16545
|
const fromVars = parseRunVariables(options.vars);
|
|
16270
16546
|
if (!fromVars.ok)
|
|
16271
16547
|
return refused(fromVars.error, exitCodes.invalidArgs);
|
|
16548
|
+
const builds = parseRunBuilds(options.builds);
|
|
16549
|
+
if (!builds.ok)
|
|
16550
|
+
return refused(builds.error, exitCodes.invalidArgs);
|
|
16272
16551
|
const fromEnvVar = deps.env["QAWOLF_ENVIRONMENT"]?.trim();
|
|
16273
16552
|
const environmentId = explicitEnvId ?? (options.envFile === undefined && fromEnvVar ? fromEnvVar : undefined);
|
|
16274
16553
|
const linesFilePath = options.linesFile === undefined ? undefined : toCollectedPath(deps.cwd, options.linesFile);
|
|
@@ -16292,28 +16571,22 @@ async function prepareRun(options, deps) {
|
|
|
16292
16571
|
if (combined !== undefined && !combined.ok) {
|
|
16293
16572
|
return refused(combined.error, exitCodes.invalidArgs);
|
|
16294
16573
|
}
|
|
16295
|
-
const
|
|
16574
|
+
const ready = {
|
|
16575
|
+
builds: builds.builds,
|
|
16576
|
+
environment: combined?.environment,
|
|
16577
|
+
environmentId,
|
|
16578
|
+
files,
|
|
16579
|
+
ok: true
|
|
16580
|
+
};
|
|
16296
16581
|
if (options.lines === undefined) {
|
|
16297
|
-
return options.linesFile === undefined ? {
|
|
16298
|
-
environment: given,
|
|
16299
|
-
environmentId,
|
|
16300
|
-
files,
|
|
16301
|
-
ok: true,
|
|
16302
|
-
selection: undefined
|
|
16303
|
-
} : refused(interactiveRunnerMessages.linesFileWithoutLines, exitCodes.invalidArgs);
|
|
16582
|
+
return options.linesFile === undefined ? { ...ready, selection: undefined } : refused(interactiveRunnerMessages.linesFileWithoutLines, exitCodes.invalidArgs);
|
|
16304
16583
|
}
|
|
16305
16584
|
const path = linesFilePath ?? options.entryPointPath;
|
|
16306
16585
|
if (!Object.hasOwn(files, path)) {
|
|
16307
16586
|
return refused(interactiveRunnerMessages.fileNotCollected(path), exitCodes.invalidArgs);
|
|
16308
16587
|
}
|
|
16309
16588
|
const built = buildRunSelection({ lines: options.lines, path });
|
|
16310
|
-
return built.ok ? {
|
|
16311
|
-
environment: given,
|
|
16312
|
-
environmentId,
|
|
16313
|
-
files,
|
|
16314
|
-
ok: true,
|
|
16315
|
-
selection: built.selection
|
|
16316
|
-
} : refused(built.error, exitCodes.invalidArgs);
|
|
16589
|
+
return built.ok ? { ...ready, selection: built.selection } : refused(built.error, exitCodes.invalidArgs);
|
|
16317
16590
|
}
|
|
16318
16591
|
async function readEnvironment(envFile, deps) {
|
|
16319
16592
|
if (envFile === undefined)
|
|
@@ -16396,6 +16669,7 @@ function describeRunSubmitFailure(failure) {
|
|
|
16396
16669
|
// src/domains/interactiveRunner/sendRunFlowRequest.ts
|
|
16397
16670
|
async function sendRunFlowRequest(ctx, options, delta) {
|
|
16398
16671
|
const result = await ctx.platformClient.callPublicApi(publicContractsV1.runner.runFlow, {
|
|
16672
|
+
...options.builds === undefined ? {} : { builds: options.builds },
|
|
16399
16673
|
entryPointPath: options.entryPointPath,
|
|
16400
16674
|
files: delta.files,
|
|
16401
16675
|
id: options.resolved.runnerId,
|
|
@@ -16515,6 +16789,7 @@ function createRunVerbs({ deps, platformClient }) {
|
|
|
16515
16789
|
selection
|
|
16516
16790
|
}) {
|
|
16517
16791
|
const prepared = await prepareRun({
|
|
16792
|
+
builds: [],
|
|
16518
16793
|
entryPointPath,
|
|
16519
16794
|
envFile: undefined,
|
|
16520
16795
|
envId: environment === "ambient" ? undefined : environment.id,
|
|
@@ -16525,6 +16800,7 @@ function createRunVerbs({ deps, platformClient }) {
|
|
|
16525
16800
|
if (!prepared.ok)
|
|
16526
16801
|
return { error: prepared.error, ok: false };
|
|
16527
16802
|
const submitted = await submitRun(ctx, {
|
|
16803
|
+
builds: prepared.builds,
|
|
16528
16804
|
entryPointPath,
|
|
16529
16805
|
environment: prepared.environment,
|
|
16530
16806
|
environmentId: prepared.environmentId,
|
|
@@ -16615,4 +16891,4 @@ export {
|
|
|
16615
16891
|
createRunnerSdk
|
|
16616
16892
|
};
|
|
16617
16893
|
|
|
16618
|
-
//# debugId=
|
|
16894
|
+
//# debugId=4A6642BCD70C79AB64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qawolf/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.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.
|
|
75
|
+
"@qawolf/api-contracts": "0.116.0",
|
|
76
76
|
"@qawolf/emails": "1.1.1",
|
|
77
77
|
"@qawolf/flow-targets": "2.0.0",
|
|
78
78
|
"@qawolf/flows": "0.3.0",
|