@qawolf/cli 1.34.0 → 1.36.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
|
@@ -2462,7 +2462,6 @@ var bigint = /^-?\d+n?$/;
|
|
|
2462
2462
|
var integer = /^-?\d+$/;
|
|
2463
2463
|
var number = /^-?\d+(?:\.\d+)?$/;
|
|
2464
2464
|
var boolean = /^(?:true|false)$/i;
|
|
2465
|
-
var _null = /^null$/i;
|
|
2466
2465
|
var lowercase = /^[^A-Z]*$/;
|
|
2467
2466
|
var uppercase = /^[^a-z]*$/;
|
|
2468
2467
|
|
|
@@ -3383,23 +3382,6 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
|
|
|
3383
3382
|
return payload;
|
|
3384
3383
|
};
|
|
3385
3384
|
});
|
|
3386
|
-
var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
|
|
3387
|
-
$ZodType.init(inst, def);
|
|
3388
|
-
inst._zod.pattern = _null;
|
|
3389
|
-
inst._zod.values = new Set([null]);
|
|
3390
|
-
inst._zod.parse = (payload, _ctx) => {
|
|
3391
|
-
const input = payload.value;
|
|
3392
|
-
if (input === null)
|
|
3393
|
-
return payload;
|
|
3394
|
-
payload.issues.push({
|
|
3395
|
-
expected: "null",
|
|
3396
|
-
code: "invalid_type",
|
|
3397
|
-
input,
|
|
3398
|
-
inst
|
|
3399
|
-
});
|
|
3400
|
-
return payload;
|
|
3401
|
-
};
|
|
3402
|
-
});
|
|
3403
3385
|
var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
|
|
3404
3386
|
$ZodType.init(inst, def);
|
|
3405
3387
|
inst._zod.parse = (payload) => payload;
|
|
@@ -4884,12 +4866,6 @@ function _coercedBigint(Class, params) {
|
|
|
4884
4866
|
...normalizeParams(params)
|
|
4885
4867
|
});
|
|
4886
4868
|
}
|
|
4887
|
-
function _null2(Class, params) {
|
|
4888
|
-
return new Class({
|
|
4889
|
-
type: "null",
|
|
4890
|
-
...normalizeParams(params)
|
|
4891
|
-
});
|
|
4892
|
-
}
|
|
4893
4869
|
function _unknown(Class) {
|
|
4894
4870
|
return new Class({
|
|
4895
4871
|
type: "unknown"
|
|
@@ -6519,14 +6495,6 @@ var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
|
6519
6495
|
inst.maxValue = bag.maximum ?? null;
|
|
6520
6496
|
inst.format = bag.format ?? null;
|
|
6521
6497
|
});
|
|
6522
|
-
var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
6523
|
-
$ZodNull.init(inst, def);
|
|
6524
|
-
ZodType.init(inst, def);
|
|
6525
|
-
inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
|
|
6526
|
-
});
|
|
6527
|
-
function _null3(params) {
|
|
6528
|
-
return _null2(ZodNull, params);
|
|
6529
|
-
}
|
|
6530
6498
|
var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
6531
6499
|
$ZodUnknown.init(inst, def);
|
|
6532
6500
|
ZodType.init(inst, def);
|
|
@@ -6957,12 +6925,6 @@ function refine(fn, _params = {}) {
|
|
|
6957
6925
|
function superRefine(fn, params) {
|
|
6958
6926
|
return _superRefine(fn, params);
|
|
6959
6927
|
}
|
|
6960
|
-
function json(params) {
|
|
6961
|
-
const jsonSchema = lazy(() => {
|
|
6962
|
-
return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]);
|
|
6963
|
-
});
|
|
6964
|
-
return jsonSchema;
|
|
6965
|
-
}
|
|
6966
6928
|
// node_modules/zod/v4/classic/coerce.js
|
|
6967
6929
|
var exports_coerce = {};
|
|
6968
6930
|
__export(exports_coerce, {
|
|
@@ -6998,7 +6960,7 @@ var agentSessionStatuses = [
|
|
|
6998
6960
|
"failed",
|
|
6999
6961
|
"cancelled"
|
|
7000
6962
|
];
|
|
7001
|
-
var agentSessionStatusSchema = _enum(agentSessionStatuses).describe('Where the work stands. "working" means the AI is still on it. "waiting-for-you" means it asked a question and cannot continue until agent.send answers it. "completed", "failed" and "cancelled" are settled and will not change.');
|
|
6963
|
+
var agentSessionStatusSchema = _enum(agentSessionStatuses).describe('Where the work stands. "working" means the AI is still on it. "waiting-for-you" means it asked a question and cannot continue until agent.send answers it. "completed" means it finished what it was asked, and a new agent.send continues it. "failed" and "cancelled" are settled and will not change.');
|
|
7002
6964
|
var agentReplySchema = object({
|
|
7003
6965
|
askedAt: exports_iso.datetime().describe("When the AI wrote this, as an ISO 8601 timestamp."),
|
|
7004
6966
|
choices: array(string2()).optional().describe("The answers the AI offered, when the reply is a question with a fixed set of them. Answer by sending one of these back through agent.send."),
|
|
@@ -7009,6 +6971,75 @@ var agentReplySchema = object({
|
|
|
7009
6971
|
var maxAgentWaitSeconds = 45;
|
|
7010
6972
|
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.');
|
|
7011
6973
|
|
|
6974
|
+
// node_modules/@qawolf/api-contracts/dist/v1/run/summary.js
|
|
6975
|
+
var publicRunStatusValues = [
|
|
6976
|
+
"queued",
|
|
6977
|
+
"running",
|
|
6978
|
+
"passed",
|
|
6979
|
+
"failed",
|
|
6980
|
+
"canceled"
|
|
6981
|
+
];
|
|
6982
|
+
var makeRunSummaryFields = (ids) => ({
|
|
6983
|
+
completedAt: exports_iso.datetime().optional().describe("When the run finished executing. Absent while queued or running, and also absent for a terminal run that never completed execution (e.g. every flow was canceled or skipped)."),
|
|
6984
|
+
createdAt: exports_iso.datetime(),
|
|
6985
|
+
git: object({
|
|
6986
|
+
branch: string2().optional(),
|
|
6987
|
+
commitMessage: string2().optional(),
|
|
6988
|
+
commitSha: string2().optional(),
|
|
6989
|
+
commitUrl: string2().optional().describe("Link to the commit on the code host.")
|
|
6990
|
+
}).describe("The branch and commit under test. The fields are present when a deploy notification started the run, and absent for runs started another way, for example manually or with run.create."),
|
|
6991
|
+
needsReview: boolean2().optional().describe("True once every flow has finished its attempts and at least one failed flow still has no diagnosis, including one whose investigation carried over to a later run. `status` stays `running` until that failure is diagnosed, so a caller that is not waiting for a diagnosis can stop polling here and read the run's failed flows."),
|
|
6992
|
+
runId: ids.run,
|
|
6993
|
+
status: _enum(publicRunStatusValues).describe("Whole-run status, and the value to gate a pipeline on. Terminal statuses are passed, failed, and canceled; poll until one is reached. `failed` means the run found a bug that is still open and serious enough to block — a lower-priority bug, or one since resolved, reads `passed`, and the per-flow diagnoses are still in `flows`. The run stays `running` while any investigation is unresolved, including one that carried over to a later run, so a terminal status always means a settled answer. `needsReview` tells such a run apart from one that is still executing.")
|
|
6994
|
+
});
|
|
6995
|
+
|
|
6996
|
+
// node_modules/@qawolf/api-contracts/dist/v1/deployment/didNotRunReason.js
|
|
6997
|
+
var didNotRunReasonSchema = _enum([
|
|
6998
|
+
"billing-prevented",
|
|
6999
|
+
"branch-still-syncing",
|
|
7000
|
+
"deployment-no-longer-live",
|
|
7001
|
+
"duplicate-run",
|
|
7002
|
+
"environment-not-linked-to-branch",
|
|
7003
|
+
"environment-not-ready",
|
|
7004
|
+
"environment-terminated",
|
|
7005
|
+
"internal-error",
|
|
7006
|
+
"low-risk-change",
|
|
7007
|
+
"no-flows-to-run",
|
|
7008
|
+
"no-matching-trigger",
|
|
7009
|
+
"no-pull-request",
|
|
7010
|
+
"no-relevant-flows",
|
|
7011
|
+
"rate-limited",
|
|
7012
|
+
"run-not-created",
|
|
7013
|
+
"skipped",
|
|
7014
|
+
"test-configuration-error",
|
|
7015
|
+
"trigger-not-found",
|
|
7016
|
+
"workspace-inactive",
|
|
7017
|
+
"workspace-not-ready"
|
|
7018
|
+
]).describe([
|
|
7019
|
+
"Why the matched trigger created no run, as a stable value safe to branch on in a CI pipeline. The accompanying `message` is the wording for a person to read and may be reworded at any time; this value will not be.",
|
|
7020
|
+
"billing-prevented: a billing restriction on the workspace stopped the run.",
|
|
7021
|
+
"branch-still-syncing: the environment was still syncing its flows.",
|
|
7022
|
+
"deployment-no-longer-live: the deployment was torn down or replaced by a newer one before the run started.",
|
|
7023
|
+
"duplicate-run: another run already covered this same deployment.",
|
|
7024
|
+
"environment-not-linked-to-branch: the environment has no branch to take flows from yet.",
|
|
7025
|
+
"environment-not-ready: the environment was still being prepared; retrying later can succeed.",
|
|
7026
|
+
"environment-terminated: the environment for the run is terminated.",
|
|
7027
|
+
"internal-error: QA Wolf could not start the run and the cause is on our side.",
|
|
7028
|
+
"low-risk-change: adaptive flow selection assessed the change as low risk, so nothing needed to run.",
|
|
7029
|
+
"no-flows-to-run: no flow was eligible, because the trigger's flows are in maintenance, still drafts, or missing on this branch.",
|
|
7030
|
+
"no-matching-trigger: no deployment trigger matched.",
|
|
7031
|
+
"no-pull-request: the trigger uses adaptive flow selection, which needs an open pull request, and this deployment had none.",
|
|
7032
|
+
"no-relevant-flows: adaptive flow selection found no existing flow covering this change.",
|
|
7033
|
+
"rate-limited: too many runs were requested at once; retrying later can succeed.",
|
|
7034
|
+
"run-not-created: the run never reached a decision.",
|
|
7035
|
+
"skipped: the run was skipped for a reason with no more specific value.",
|
|
7036
|
+
"test-configuration-error: the workspace's flows or dependency rules need fixing before this can run.",
|
|
7037
|
+
"trigger-not-found: the trigger no longer exists.",
|
|
7038
|
+
"workspace-inactive: the workspace is not active.",
|
|
7039
|
+
"workspace-not-ready: the workspace has not finished setting up."
|
|
7040
|
+
].join(`
|
|
7041
|
+
`));
|
|
7042
|
+
|
|
7012
7043
|
// node_modules/@qawolf/api-contracts/dist/v1/resource.js
|
|
7013
7044
|
function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
|
|
7014
7045
|
return object({
|
|
@@ -7177,7 +7208,7 @@ var defaultIdSchemas = {
|
|
|
7177
7208
|
trigger: string2().min(1).describe("The id of the trigger."),
|
|
7178
7209
|
workspace: string2().min(1).describe("The id of the workspace.")
|
|
7179
7210
|
};
|
|
7180
|
-
var workspaceForEnvironmentRef = (workspace) => workspace.optional().describe("The workspace the environment belongs to
|
|
7211
|
+
var workspaceForEnvironmentRef = (workspace) => workspace.optional().describe("The workspace the environment belongs to, which an alias resolves in. Read it from whoami.");
|
|
7181
7212
|
|
|
7182
7213
|
// node_modules/@qawolf/api-contracts/dist/v1/run/flowSelection.js
|
|
7183
7214
|
var makeFlowSelectionSchema = (ids) => object({
|
|
@@ -7351,9 +7382,10 @@ var runnerNameSchema = _enum([
|
|
|
7351
7382
|
"basic",
|
|
7352
7383
|
"playwright",
|
|
7353
7384
|
"android",
|
|
7354
|
-
"ios"
|
|
7385
|
+
"ios",
|
|
7386
|
+
"windows"
|
|
7355
7387
|
]);
|
|
7356
|
-
var runnerWorkspaceRequirement = "
|
|
7388
|
+
var runnerWorkspaceRequirement = "Read it from whoami.";
|
|
7357
7389
|
var runnerWorkspaceIdDescription = `The workspace the runner belongs to. ${runnerWorkspaceRequirement}`;
|
|
7358
7390
|
var runnerIdSchema = string2().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/, "A runner id may contain only lowercase letters, digits and dashes, and must start and end with a letter or digit.");
|
|
7359
7391
|
var runnerWatchUrlSchema = url().describe("A QA Wolf page showing what the runner is doing right now, where the person who launched it can watch and take over with their own mouse and keyboard. Opening it requires being signed in to QA Wolf. This link belongs to the user: put it in a normal message as soon as the runner is launched, so they can follow along while the browser is being driven. It is theirs to open, never a page for the caller to fetch or navigate to. The page ends when the runner is terminated, so share it while the runner is alive and report what you found at the end instead of repeating a dead link.");
|
|
@@ -7473,7 +7505,11 @@ function makeRunnerFailureSchema(reasons) {
|
|
|
7473
7505
|
|
|
7474
7506
|
// node_modules/@qawolf/api-contracts/dist/v1/runner/inspectMobile.js
|
|
7475
7507
|
var maxElementTextLength = 500;
|
|
7476
|
-
var selectorStrategySchema = _enum([
|
|
7508
|
+
var selectorStrategySchema = _enum([
|
|
7509
|
+
"ios-predicate",
|
|
7510
|
+
"shadow",
|
|
7511
|
+
"xpath"
|
|
7512
|
+
]);
|
|
7477
7513
|
var elementsRequestSchema = discriminatedUnion("by", [
|
|
7478
7514
|
object({
|
|
7479
7515
|
by: literal("point"),
|
|
@@ -7638,6 +7674,65 @@ var runFilesSchema = record(string2(), string2()).superRefine((files, refinement
|
|
|
7638
7674
|
}).refine((files) => runFilesByteLength(files) <= maxRunFilesByteLength, {
|
|
7639
7675
|
error: `The files in one request may carry at most ${maxRunFilesByteLength} bytes in total.`
|
|
7640
7676
|
});
|
|
7677
|
+
// node_modules/@qawolf/api-contracts/dist/v1/runner/runnerAction.js
|
|
7678
|
+
var maxSwipeDurationMs = 1e4;
|
|
7679
|
+
var selectorSchema2 = string2().min(1).max(maxSelectorLength).describe("The element to act on, resolved the way a screen object's own selector is.");
|
|
7680
|
+
var strategySchema = selectorStrategySchema.optional().describe("How `selector` is resolved. Defaults to `xpath`.");
|
|
7681
|
+
function refuseStrategyWithoutSelector(action, context) {
|
|
7682
|
+
if (action.strategy !== undefined && action.selector === undefined) {
|
|
7683
|
+
context.addIssue({
|
|
7684
|
+
code: "custom",
|
|
7685
|
+
message: "`strategy` says how to resolve a `selector`, so it needs one.",
|
|
7686
|
+
path: ["strategy"]
|
|
7687
|
+
});
|
|
7688
|
+
}
|
|
7689
|
+
}
|
|
7690
|
+
var tapActionSchema = strictObject({
|
|
7691
|
+
selector: selectorSchema2.optional(),
|
|
7692
|
+
strategy: strategySchema,
|
|
7693
|
+
type: literal("tap"),
|
|
7694
|
+
x: screenCoordinateSchema.optional(),
|
|
7695
|
+
y: screenCoordinateSchema.optional()
|
|
7696
|
+
}).superRefine((tap, context) => {
|
|
7697
|
+
refuseStrategyWithoutSelector(tap, context);
|
|
7698
|
+
const hasPoint = tap.x !== undefined || tap.y !== undefined;
|
|
7699
|
+
if (tap.selector !== undefined && hasPoint) {
|
|
7700
|
+
context.addIssue({
|
|
7701
|
+
code: "custom",
|
|
7702
|
+
message: "A tap aims at `x` and `y` or at a `selector`, not both.",
|
|
7703
|
+
path: ["selector"]
|
|
7704
|
+
});
|
|
7705
|
+
}
|
|
7706
|
+
if (tap.selector === undefined && (tap.x === undefined || tap.y === undefined)) {
|
|
7707
|
+
context.addIssue({
|
|
7708
|
+
code: "custom",
|
|
7709
|
+
message: "A tap needs both `x` and `y`, or a `selector`.",
|
|
7710
|
+
path: [tap.x === undefined ? "x" : "y"]
|
|
7711
|
+
});
|
|
7712
|
+
}
|
|
7713
|
+
});
|
|
7714
|
+
var swipeActionSchema = strictObject({
|
|
7715
|
+
duration_ms: int().positive().max(maxSwipeDurationMs).optional().describe("How long the swipe takes, in milliseconds. A slow one scrolls, a fast one flings. The device's default is 300."),
|
|
7716
|
+
from: screenPointSchema,
|
|
7717
|
+
to: screenPointSchema,
|
|
7718
|
+
type: literal("swipe")
|
|
7719
|
+
}).refine(({ from, to }) => from.x !== to.x || from.y !== to.y, {
|
|
7720
|
+
message: "A swipe whose `from` and `to` are the same travels nowhere.",
|
|
7721
|
+
path: ["to"]
|
|
7722
|
+
});
|
|
7723
|
+
var fillActionSchema = strictObject({
|
|
7724
|
+
selector: selectorSchema2,
|
|
7725
|
+
strategy: strategySchema,
|
|
7726
|
+
text: string2().max(maxTypedTextLength).describe("What the field holds afterwards, in place of its old value. Empty clears it."),
|
|
7727
|
+
type: literal("fill")
|
|
7728
|
+
});
|
|
7729
|
+
var runnerActionSchema = discriminatedUnion("type", [
|
|
7730
|
+
...browserActionSchema.options,
|
|
7731
|
+
tapActionSchema,
|
|
7732
|
+
swipeActionSchema,
|
|
7733
|
+
fillActionSchema
|
|
7734
|
+
]);
|
|
7735
|
+
|
|
7641
7736
|
// node_modules/@qawolf/api-contracts/dist/v1/runner/screen.js
|
|
7642
7737
|
var screenFailureReasons = [
|
|
7643
7738
|
"runner-has-no-screen",
|
|
@@ -7646,17 +7741,18 @@ var screenFailureReasons = [
|
|
|
7646
7741
|
];
|
|
7647
7742
|
var screenNotReadyDescription = "`screen-not-ready` if the runner has a screen that cannot serve this instant. Retry in a second or two: the desktop restarts when a run changes the display size, and it serves one see-or-act request at a time, so a screenshot or action already in flight is the usual reason. Do not submit a run to clear this — a run may restart the display and discard what is on it.";
|
|
7648
7743
|
var screenNeedsARunDescription = "`screen-needs-a-run` if the runner's virtual desktop has never started. Waiting will not change this and retrying is pointless — call `runner.runFlow` with a flow that opens a browser, then ask for the screen again. On a runner image with a browser that has never run anything, any `runner.performAction` also starts the browser itself. Evaluating a snippet does not start the desktop.";
|
|
7649
|
-
var runnerHasNoScreenDescription = "`runner-has-no-screen` if this runner
|
|
7744
|
+
var runnerHasNoScreenDescription = "`runner-has-no-screen` if this runner has no browser desktop to see or drive, and retrying will never help. Launch a `playwright` runner, or on `windows` use `runner.runFlow`.";
|
|
7650
7745
|
var screenshotImageSchema = string2().min(1).describe("The screenshot, as a base64-encoded JPEG. Decode it and write the bytes to a `.jpg` file — writing this string to the file leaves you with base64 text rather than an image.");
|
|
7651
7746
|
|
|
7652
7747
|
// node_modules/@qawolf/api-contracts/dist/v1/runner/performAction.js
|
|
7653
7748
|
var unreachableDescription = "`runner-unreachable` if the runner could not be reached: it may still be starting, it may have terminated after inactivity, or it may have stopped answering mid-action. This does not mean the action was not performed — take a screenshot before repeating it.";
|
|
7654
|
-
var notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `click` taps
|
|
7749
|
+
var notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this action has no touchscreen equivalent: `double_click`, `scroll`, `move`, `keypress` and `navigate`, and a `click` whose `button` is not `left`, are all pointer-device concepts a touchscreen has nothing to offer for. `type` types into whatever the last tap focused. Deprecated on mobile and to be removed: `click` taps and `drag` swipes between its path's first and last point; send `tap` and `swipe` instead.";
|
|
7750
|
+
var mobileActionsDescription = "Only a mobile runner performs `tap`, `swipe` and `fill`: `tap` touches a point or the element a `selector` names, `swipe` moves from one point to another over `duration_ms`, and `fill` replaces the value of the field a `selector` names. A browser runner answers them with `action-not-supported-on-browser`.";
|
|
7655
7751
|
var withScreenshotDescription = "With `withScreenshot: true`, the answer also carries `imageJpegBase64`: a screenshot taken after the action. One call instead of `runner.performAction` followed by `runner.takeScreenshot`. The action itself is performed exactly as without the option; if the screen could serve no frame after it — a display restart, or a `navigate` on a desktop that is still starting — the action's result comes back without `imageJpegBase64`, so take a screenshot separately rather than repeating the action. On a mobile runner the screenshot is the device's own, taken right after a performed action.";
|
|
7656
7752
|
var maxActionErrorMessageLength = 1000;
|
|
7657
7753
|
var makePerformActionOnRunnerContract = (ids) => {
|
|
7658
7754
|
const input = object({
|
|
7659
|
-
action:
|
|
7755
|
+
action: runnerActionSchema.describe(`The action to perform. Coordinates are whole pixels on the runner's virtual desktop, in the same space as \`runner.takeScreenshot\`. The browser action shapes follow the computer-use vocabulary, minus \`screenshot\` (use \`runner.takeScreenshot\`) and \`wait\` (delay on the caller's side). A \`navigate\` does not go through the screen, so a screen that is not ready does not stop it. ${notSupportedOnMobileDescription} ${mobileActionsDescription}`),
|
|
7660
7756
|
id: runnerIdSchema.describe("Id of the runner to act on."),
|
|
7661
7757
|
withScreenshot: boolean2().optional().describe(withScreenshotDescription),
|
|
7662
7758
|
workspaceId: ids.workspace.optional().describe(runnerWorkspaceIdDescription)
|
|
@@ -7672,6 +7768,7 @@ var makePerformActionOnRunnerContract = (ids) => {
|
|
|
7672
7768
|
makeRunnerFailureSchema([
|
|
7673
7769
|
...screenFailureReasons,
|
|
7674
7770
|
"action-not-supported-on-mobile",
|
|
7771
|
+
"action-not-supported-on-browser",
|
|
7675
7772
|
runnerUnreachableFailureReason
|
|
7676
7773
|
])
|
|
7677
7774
|
]);
|
|
@@ -7688,7 +7785,7 @@ var makePerformActionOnRunnerContract = (ids) => {
|
|
|
7688
7785
|
openWorldHint: true,
|
|
7689
7786
|
readOnlyHint: false
|
|
7690
7787
|
},
|
|
7691
|
-
description: `Perform one raw
|
|
7788
|
+
description: `Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile, tap, swipe, fill, or type. One action per request, and the runner serves one at a time. A success means the action took effect. \`action-failed\`, with a reason, if it reached the runner and did not take effect. On a runner image with a browser, the first action on a runner that has never run anything starts its browser and waits for it, so it can take up to a minute to answer — no \`runner.runFlow\` is needed before acting; if the browser is still starting when the wait runs out, the answer is \`screen-not-ready\` and retrying converges. On a mobile runner, the same \`screen-needs-a-run\` and \`screen-not-ready\` outcomes mean no Appium session has started yet, or it did not answer this instant; \`runner.runFlow\` is what starts one, same as a browser. \`screen-needs-a-run\` if the browser could not be started that way — usually a runner whose runs all finished without starting its desktop; call \`runner.runFlow\` with a flow that opens a browser. ${screenNotReadyDescription} ${runnerHasNoScreenDescription} ${unreachableDescription}`,
|
|
7692
7789
|
input,
|
|
7693
7790
|
kind: "write",
|
|
7694
7791
|
name: "runner.performAction",
|
|
@@ -7938,23 +8035,28 @@ var makeTriggerActionSchema = (ids) => object({
|
|
|
7938
8035
|
instructions: string2().min(1).optional().describe("Guidance for QA Wolf. Applies to generativeSuite only."),
|
|
7939
8036
|
investigateFailures: boolean2().optional().describe("Whether QA Wolf investigates failures in the resulting runs. Defaults to true."),
|
|
7940
8037
|
kind: triggerActionKindSchema.default("createSuite"),
|
|
8038
|
+
runConcurrencyLimit: string2().trim().min(1).max(255).optional().describe(`How many runs of the resulting suite may execute at once: a whole number from 1 to 1000, "unlimited", or a concurrency expression, which the server validates. It replaces the environment's limit rather than capping below it. Omit it to leave the environment's limit in charge.`),
|
|
7941
8039
|
tagNames: array(string2().min(1)).default([]).describe("Tags naming the flows to run. Combined with flowIds.")
|
|
7942
8040
|
}).describe("What the trigger runs when it fires.");
|
|
7943
8041
|
var makeTriggerScheduleFields = (ids) => ({
|
|
7944
8042
|
action: makeTriggerActionSchema(ids),
|
|
7945
8043
|
cadence: triggerCadenceSchema,
|
|
7946
8044
|
dayOfWeek: triggerDayOfWeekSchema.optional().describe("The day a weekly schedule fires on, read in timezoneId. Required when cadence is weekly."),
|
|
8045
|
+
daysOfWeek: array(triggerDayOfWeekSchema).min(1).refine((daysOfWeek) => new Set(daysOfWeek).size === daysOfWeek.length, {
|
|
8046
|
+
message: "Expected each day to be named at most once."
|
|
8047
|
+
}).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."),
|
|
7947
8048
|
environmentId: ids.environmentId.describe("The environment the scheduled runs happen in."),
|
|
7948
8049
|
minuteOfHour: number2().int().min(0).max(59).optional().describe("Minutes past the hour an hourly schedule fires. Defaults to 0."),
|
|
7949
8050
|
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.'),
|
|
7950
|
-
timezoneId: string2().min(1).refine(isTimezone, "Expected an IANA timezone, such as America/New_York.").optional().describe("The IANA timezone
|
|
8051
|
+
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.")
|
|
7951
8052
|
});
|
|
7952
8053
|
var makeTriggerDeploymentFields = (ids) => ({
|
|
7953
8054
|
action: makeTriggerActionSchema(ids),
|
|
7954
8055
|
branchPattern: string2().min(1).optional().describe("Only fire for deployments of a branch matching this pattern."),
|
|
7955
|
-
deployTargetPattern: string2().min(1).optional().describe("Only fire for deployments
|
|
8056
|
+
deployTargetPattern: string2().min(1).optional().describe("Only fire for deployments whose deploy target matches this pattern. A deploy target is the URL or label the deploy reported, which many deployments do not carry."),
|
|
7956
8057
|
environmentIds: array(ids.environment).default([]).describe("Only fire for deployments to these environments. Mutually exclusive with environmentPattern."),
|
|
7957
|
-
environmentPattern: string2().min(1).optional().describe("Only fire for deployments to environments matching this pattern. Mutually exclusive with environmentIds.")
|
|
8058
|
+
environmentPattern: string2().min(1).optional().describe("Only fire for deployments to environments matching this pattern. Mutually exclusive with environmentIds."),
|
|
8059
|
+
servicePattern: string2().min(1).optional().describe("Only fire for deployments whose service matches this pattern. A deployment that names no service never matches it.")
|
|
7958
8060
|
});
|
|
7959
8061
|
|
|
7960
8062
|
// node_modules/@qawolf/api-contracts/dist/v1/trigger/configurationRules.js
|
|
@@ -7987,23 +8089,31 @@ var checkAction = (action, ctx) => {
|
|
|
7987
8089
|
};
|
|
7988
8090
|
var requiredScheduleFields = {
|
|
7989
8091
|
daily: ["timeOfDay", "timezoneId"],
|
|
7990
|
-
hourly: [],
|
|
8092
|
+
hourly: ["timezoneId"],
|
|
7991
8093
|
weekly: ["dayOfWeek", "timeOfDay", "timezoneId"]
|
|
7992
8094
|
};
|
|
8095
|
+
var optionalScheduleFields = {
|
|
8096
|
+
daily: ["daysOfWeek"],
|
|
8097
|
+
hourly: ["daysOfWeek", "minuteOfHour"],
|
|
8098
|
+
weekly: []
|
|
8099
|
+
};
|
|
7993
8100
|
var cadencesUsingField = {
|
|
7994
8101
|
dayOfWeek: "a weekly cadence",
|
|
8102
|
+
daysOfWeek: "an hourly or daily cadence",
|
|
7995
8103
|
minuteOfHour: "an hourly cadence",
|
|
7996
8104
|
timeOfDay: "a daily or weekly cadence",
|
|
7997
|
-
timezoneId: "
|
|
8105
|
+
timezoneId: "an hourly, daily or weekly cadence"
|
|
7998
8106
|
};
|
|
7999
8107
|
var scheduleFields = [
|
|
8000
8108
|
"dayOfWeek",
|
|
8109
|
+
"daysOfWeek",
|
|
8001
8110
|
"minuteOfHour",
|
|
8002
8111
|
"timeOfDay",
|
|
8003
8112
|
"timezoneId"
|
|
8004
8113
|
];
|
|
8005
8114
|
var checkScheduleFields = (value, ctx) => {
|
|
8006
8115
|
const required = requiredScheduleFields[value.cadence];
|
|
8116
|
+
const optional = optionalScheduleFields[value.cadence];
|
|
8007
8117
|
for (const field of scheduleFields) {
|
|
8008
8118
|
const isSupplied = value[field] !== undefined;
|
|
8009
8119
|
if (required.includes(field)) {
|
|
@@ -8016,7 +8126,7 @@ var checkScheduleFields = (value, ctx) => {
|
|
|
8016
8126
|
}
|
|
8017
8127
|
continue;
|
|
8018
8128
|
}
|
|
8019
|
-
if (isSupplied && !(
|
|
8129
|
+
if (isSupplied && !optional.includes(field)) {
|
|
8020
8130
|
ctx.addIssue({
|
|
8021
8131
|
code: "custom",
|
|
8022
8132
|
message: `${field} applies to ${cadencesUsingField[field]} only.`,
|
|
@@ -8392,12 +8502,14 @@ var makeDeploymentResourceSchema = (ids) => resource({
|
|
|
8392
8502
|
commitAuthorName: string2().optional().describe("The author of the deployed commit."),
|
|
8393
8503
|
commitMessage: string2().optional().describe("The message of the deployed commit."),
|
|
8394
8504
|
commitSha: string2().optional().describe("The sha of the deployed commit."),
|
|
8505
|
+
commitUrl: string2().optional().describe("A link to the deployed commit, as declared by the deployment report."),
|
|
8395
8506
|
deployedAt: exports_iso.datetime().describe("When QA Wolf first received the deployment."),
|
|
8396
8507
|
deployTarget: string2().optional().describe("Identifies the deployed app within the environment: the URL it serves, or the build path of a mobile build. A trigger's deployTargetPattern matches against it."),
|
|
8397
8508
|
environmentId: ids.environment.describe("The QA Wolf environment the deployment reported into."),
|
|
8398
8509
|
environmentName: string2().optional().describe("The environment's name. Absent when the environment has since been deleted."),
|
|
8399
8510
|
id: ids.deployment,
|
|
8400
8511
|
provider: _enum(["github", "gitlab", "api"]).optional().describe("How QA Wolf received the deployment: a GitHub webhook, a GitLab webhook, or the deployment.reportStatus API."),
|
|
8512
|
+
service: string2().optional().describe("Which application was deployed, as the deployer named it. Absent when the deployer named none."),
|
|
8401
8513
|
status: _enum(["pending", "success", "failure", "inactive"]).optional().describe("The deployment's lifecycle status, in the vocabulary deployment.reportStatus accepts. Absent when no status was ever reported.")
|
|
8402
8514
|
}, {
|
|
8403
8515
|
urlFieldDescription: "Absolute URL of the workspace's deployments page."
|
|
@@ -8428,7 +8540,7 @@ var makeFindDeploymentsContract = (ids) => {
|
|
|
8428
8540
|
};
|
|
8429
8541
|
|
|
8430
8542
|
// node_modules/@qawolf/api-contracts/dist/v1/deployment/listTriggerEvaluations.js
|
|
8431
|
-
var conditionKindSchema = _enum(["environment", "deployTarget", "branch"]).describe("What the condition checks on the deployment: the environment it reported into, the deploy target
|
|
8543
|
+
var conditionKindSchema = _enum(["environment", "deployTarget", "branch", "service"]).describe("What the condition checks on the deployment: the environment it reported into, the deploy target it serves, the git branch of the deployed commit, or the service it deployed.");
|
|
8432
8544
|
var conditionVerdictSchema = discriminatedUnion("outcome", [
|
|
8433
8545
|
object({
|
|
8434
8546
|
kind: conditionKindSchema,
|
|
@@ -8451,12 +8563,13 @@ var makeRunOutcomeSchema = (ids) => discriminatedUnion("status", [
|
|
|
8451
8563
|
}),
|
|
8452
8564
|
object({ status: literal("starting") }),
|
|
8453
8565
|
object({
|
|
8454
|
-
|
|
8566
|
+
message: string2().describe("Why the matched trigger created no run, in plain language."),
|
|
8567
|
+
reason: didNotRunReasonSchema,
|
|
8455
8568
|
status: literal("did-not-run"),
|
|
8456
8569
|
supersededByRunId: ids.run.optional().describe("The run that covered this deployment instead, when an earlier delivery of the same deployment had already created one.")
|
|
8457
8570
|
}),
|
|
8458
8571
|
object({ status: literal("unknown") })
|
|
8459
|
-
]).describe("What became of the match. Matching is not running: a matched trigger can still be stopped from creating a run, and did-not-run carries the reason. starting means run creation is still in progress; unknown means QA Wolf has no record of what followed the match.");
|
|
8572
|
+
]).describe("What became of the match. Matching is not running: a matched trigger can still be stopped from creating a run, and did-not-run carries the reason. starting means run creation is still in progress; unknown means QA Wolf has no record of what followed the match. did-not-run also carries a stable reason to branch on, beside the message for a person to read.");
|
|
8460
8573
|
var makeVerdictSchema = (ids) => discriminatedUnion("outcome", [
|
|
8461
8574
|
object({
|
|
8462
8575
|
conditionSets: conditionSetsField,
|
|
@@ -8505,6 +8618,7 @@ var deploymentReportMetadata = strictObject({
|
|
|
8505
8618
|
commitAuthorName: string2().trim().min(1).max(255).describe("The display name of the person who authored the deployed commit.").optional(),
|
|
8506
8619
|
commitMessage: string2().trim().min(1).max(2048).describe("The message of the deployed commit. The deployments list shows its first line.").optional(),
|
|
8507
8620
|
commitSha: string2().trim().min(1).max(255).describe("The commit sha of the deployed application revision.").optional(),
|
|
8621
|
+
commitUrl: httpUrl().max(2048).describe("A link to the deployed commit in your code host. Send this when QA Wolf cannot resolve the commit itself, for example when the QA Wolf GitHub App is not installed.").optional(),
|
|
8508
8622
|
pullRequestNumber: number2().int().positive().describe("The number of the pull request the deployment belongs to. Requires repository.").optional(),
|
|
8509
8623
|
ref: string2().trim().min(1).max(255).describe("The branch or ref that was deployed.").optional(),
|
|
8510
8624
|
repository: string2().trim().min(1).max(255).describe('The owner/name of the repository, e.g. "acme/web".').optional()
|
|
@@ -8539,6 +8653,7 @@ var makeReportDeploymentStatusContract = (ids) => {
|
|
|
8539
8653
|
environmentVariables: record(string2(), string2()).describe("Environment variable overrides for the runs this deployment requests. A report that omits this field keeps the stored values. A report that sends it replaces them.").optional(),
|
|
8540
8654
|
metadata: deploymentReportMetadata.describe("Details the deployer declares about the deployed revision; a code host integration's own record of the same commit is shown in preference to the message and author declared here.").optional(),
|
|
8541
8655
|
providerDeploymentId: string2().trim().min(1).max(255).describe('Your identifier for the deployment, e.g. "vercel_dpl_123". Reports with the same providerDeploymentId update one deployment within this workspace.'),
|
|
8656
|
+
service: string2().trim().min(1).max(255).describe('Which application was deployed, e.g. "checkout-api", when several services deploy into one environment. A report that omits it keeps the stored value.').optional(),
|
|
8542
8657
|
status: deploymentStatusSchema.describe("The deployment lifecycle status. A deployment's first success report evaluates global triggers asynchronously, and it is the only report that does. The response does not include the resulting runs."),
|
|
8543
8658
|
workspaceId: ids.workspace.describe("The workspace to report the deployment status into. A team API key must name its own workspace.")
|
|
8544
8659
|
}).superRefine((value, context) => {
|
|
@@ -9209,6 +9324,70 @@ var makeGetIssueContract = (ids) => {
|
|
|
9209
9324
|
};
|
|
9210
9325
|
};
|
|
9211
9326
|
|
|
9327
|
+
// node_modules/@qawolf/api-contracts/dist/v1/investigation/finding.js
|
|
9328
|
+
var investigationFindingStateDescription = 'What the investigation concluded about the cause. Known values: "investigating", "fixed", "fix-proposed", "reported", "report-proposed", "flake", "question" and "dismissed". New values can appear.';
|
|
9329
|
+
var makeInvestigationFindingSchema = (ids) => object({
|
|
9330
|
+
actual: string2().optional(),
|
|
9331
|
+
commitHash: string2().optional(),
|
|
9332
|
+
decidedBy: _enum(["agent", "user"]).optional().describe("Who decided: the AI on its own, or a person who approved or dismissed it. Absent until someone decides."),
|
|
9333
|
+
disputeReason: string2().optional().describe("Why a person disputed what the AI did. Present on a proposal the AI made again after that dispute."),
|
|
9334
|
+
expected: string2().optional(),
|
|
9335
|
+
findingId: string2(),
|
|
9336
|
+
flowIds: array(ids.flow),
|
|
9337
|
+
headline: string2().optional(),
|
|
9338
|
+
issueId: ids.issue.optional(),
|
|
9339
|
+
kind: string2().describe('What the failure is. Known values: "maintenance", "bug", "flake" and "unknown". New values can appear.'),
|
|
9340
|
+
matchReason: string2().optional(),
|
|
9341
|
+
priority: issuePrioritySchema.optional(),
|
|
9342
|
+
question: object({
|
|
9343
|
+
answers: array(object({
|
|
9344
|
+
description: string2().optional(),
|
|
9345
|
+
title: string2(),
|
|
9346
|
+
value: string2().describe('What choosing this answer means. Known values: "apply", "dismiss", "report", "maintenance" and "bug". New values can appear.')
|
|
9347
|
+
})),
|
|
9348
|
+
text: string2()
|
|
9349
|
+
}).optional().describe("The question waiting for a person, with the answers offered."),
|
|
9350
|
+
response: object({
|
|
9351
|
+
answer: string2().optional(),
|
|
9352
|
+
at: exports_iso.datetime(),
|
|
9353
|
+
reason: string2().optional(),
|
|
9354
|
+
type: string2().describe('Known values: "answer" and "dispute". New values can appear.')
|
|
9355
|
+
}).optional().describe("A person's answer or dispute that the investigation hasn't acted on yet."),
|
|
9356
|
+
state: string2().describe(investigationFindingStateDescription),
|
|
9357
|
+
steps: array(string2()).optional(),
|
|
9358
|
+
subSessionIds: array(ids.chatSession),
|
|
9359
|
+
summary: string2().optional(),
|
|
9360
|
+
updatedAt: exports_iso.datetime()
|
|
9361
|
+
});
|
|
9362
|
+
|
|
9363
|
+
// node_modules/@qawolf/api-contracts/dist/v1/investigation/get.js
|
|
9364
|
+
var makeGetInvestigationContract = (ids) => {
|
|
9365
|
+
const input = object({ runId: ids.run });
|
|
9366
|
+
const output = resource({
|
|
9367
|
+
findings: array(makeInvestigationFindingSchema(ids)),
|
|
9368
|
+
runId: ids.run,
|
|
9369
|
+
sessionId: ids.chatSession.optional().describe("The investigation session. Absent when the run has none."),
|
|
9370
|
+
status: _enum(["investigating", "finished", "not-investigated"]).describe('Whether the investigation session is still working. "not-investigated" when the run has no investigation.')
|
|
9371
|
+
}, { urlFieldDescription: "The run in the QA Wolf app." });
|
|
9372
|
+
return {
|
|
9373
|
+
annotations: {
|
|
9374
|
+
destructiveHint: false,
|
|
9375
|
+
openWorldHint: false,
|
|
9376
|
+
readOnlyHint: true
|
|
9377
|
+
},
|
|
9378
|
+
description: "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.",
|
|
9379
|
+
input,
|
|
9380
|
+
kind: "read",
|
|
9381
|
+
name: "investigation.get",
|
|
9382
|
+
output
|
|
9383
|
+
};
|
|
9384
|
+
};
|
|
9385
|
+
|
|
9386
|
+
// node_modules/@qawolf/api-contracts/dist/v1/investigation/index.js
|
|
9387
|
+
var makeInvestigationContracts = (ids) => ({
|
|
9388
|
+
get: makeGetInvestigationContract(ids)
|
|
9389
|
+
});
|
|
9390
|
+
|
|
9212
9391
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/addFlows.js
|
|
9213
9392
|
var makeAddFlowsToIssueContract = (ids) => {
|
|
9214
9393
|
const input = object({
|
|
@@ -9237,7 +9416,7 @@ var makeCreateIssueContract = (ids) => {
|
|
|
9237
9416
|
const commonFields = {
|
|
9238
9417
|
description: string2().optional().describe("The issue description as plain text; each line becomes a paragraph. Markdown is not parsed."),
|
|
9239
9418
|
name: string2().trim().min(1).max(255),
|
|
9240
|
-
priority: issuePrioritySchema.optional().describe('Defaults to "unprioritized".'),
|
|
9419
|
+
priority: issuePrioritySchema.optional().describe('Defaults to "unprioritized" for bug reports and coverage requests.'),
|
|
9241
9420
|
workspaceId: ids.workspace.optional().describe("The workspace to create the issue in. Required when authenticating with an organization or user API key.")
|
|
9242
9421
|
};
|
|
9243
9422
|
const input = discriminatedUnion("type", [
|
|
@@ -9249,6 +9428,13 @@ var makeCreateIssueContract = (ids) => {
|
|
|
9249
9428
|
...commonFields,
|
|
9250
9429
|
estimatedDueDate: exports_iso.date().optional().describe("The calendar date the coverage is estimated to be complete, as YYYY-MM-DD."),
|
|
9251
9430
|
type: literal("coverageRequest")
|
|
9431
|
+
}),
|
|
9432
|
+
object({
|
|
9433
|
+
...commonFields,
|
|
9434
|
+
effort: _enum(["extraSmall", "small", "medium", "large", "extraLarge"]).describe("The effort to repair the flows."),
|
|
9435
|
+
priority: _enum(["low", "medium", "high", "urgent"]),
|
|
9436
|
+
reason: _enum(["dataChanged", "flowNeedsWork", "other", "uiChanged"]).describe("Why the flows need maintenance."),
|
|
9437
|
+
type: literal("maintenance")
|
|
9252
9438
|
})
|
|
9253
9439
|
]);
|
|
9254
9440
|
const output = object({
|
|
@@ -9260,7 +9446,7 @@ var makeCreateIssueContract = (ids) => {
|
|
|
9260
9446
|
openWorldHint: true,
|
|
9261
9447
|
readOnlyHint: false
|
|
9262
9448
|
},
|
|
9263
|
-
description: "Create a bug or coverage request issue for the caller's team. " + "
|
|
9449
|
+
description: "Create a bug report, maintenance report, or coverage request issue for the caller's team. " + "A user can create a maintenance report only when they can see the workspace's maintenance reports; " + "a team or organization API key credits it to the workspace's automation user. " + "Link its failed flows afterwards with run.diagnose.",
|
|
9264
9450
|
input,
|
|
9265
9451
|
kind: "write",
|
|
9266
9452
|
name: "issue.create",
|
|
@@ -9349,6 +9535,8 @@ var makeLegacyTriggerSchema = (ids) => {
|
|
|
9349
9535
|
isPaused: boolean2(),
|
|
9350
9536
|
name: string2(),
|
|
9351
9537
|
pausedAt: exports_iso.datetime().optional(),
|
|
9538
|
+
runConcurrencyLimit: string2().describe(`How many of the trigger's runs may execute at once: a whole number, "unlimited", or a concurrency expression. A trigger that stores no limit reads as "unlimited", which leaves the environment's limit in charge. Copy a number or an expression onto the current trigger action's runConcurrencyLimit, and omit that field when this reads "unlimited".`),
|
|
9539
|
+
shouldTriage: boolean2().describe("Whether QA Wolf investigates the failures of the runs this trigger creates. It becomes the current trigger action's investigateFailures, which is on unless the trigger says otherwise."),
|
|
9352
9540
|
tags: array(namedIdentity)
|
|
9353
9541
|
};
|
|
9354
9542
|
return union([
|
|
@@ -9465,20 +9653,6 @@ var makeDiagnoseRunContract = (ids) => {
|
|
|
9465
9653
|
};
|
|
9466
9654
|
};
|
|
9467
9655
|
|
|
9468
|
-
// node_modules/@qawolf/api-contracts/dist/v1/run/summary.js
|
|
9469
|
-
var makeRunSummaryFields = (ids) => ({
|
|
9470
|
-
completedAt: exports_iso.datetime().optional().describe("When the run finished executing. Absent while queued or running, and also absent for a terminal run that never completed execution (e.g. every flow was canceled or skipped)."),
|
|
9471
|
-
createdAt: exports_iso.datetime(),
|
|
9472
|
-
git: object({
|
|
9473
|
-
branch: string2().optional(),
|
|
9474
|
-
commitMessage: string2().optional(),
|
|
9475
|
-
commitSha: string2().optional(),
|
|
9476
|
-
commitUrl: string2().optional().describe("Link to the commit on the code host.")
|
|
9477
|
-
}).describe("The branch and commit under test. The fields are present when a deploy notification started the run, and absent for runs started another way, for example manually or with run.create."),
|
|
9478
|
-
runId: ids.run,
|
|
9479
|
-
status: _enum(["queued", "running", "passed", "failed", "canceled"]).describe("Whole-run status. Terminal statuses are passed, failed, and canceled; poll until one is reached.")
|
|
9480
|
-
});
|
|
9481
|
-
|
|
9482
9656
|
// node_modules/@qawolf/api-contracts/dist/v1/run/find.js
|
|
9483
9657
|
var makeFindRunsContract = (ids) => {
|
|
9484
9658
|
const input = object({
|
|
@@ -9509,7 +9683,9 @@ var makeFindRunsContract = (ids) => {
|
|
|
9509
9683
|
|
|
9510
9684
|
// node_modules/@qawolf/api-contracts/dist/v1/run/get.js
|
|
9511
9685
|
var makeGetRunContract = (ids) => {
|
|
9686
|
+
const flowStatus = _enum(publicRunStatusValues);
|
|
9512
9687
|
const input = object({
|
|
9688
|
+
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."),
|
|
9513
9689
|
runId: ids.run
|
|
9514
9690
|
});
|
|
9515
9691
|
const artifactUrls = {
|
|
@@ -9566,11 +9742,12 @@ var makeGetRunContract = (ids) => {
|
|
|
9566
9742
|
attempts,
|
|
9567
9743
|
flowId: ids.flow,
|
|
9568
9744
|
name: string2(),
|
|
9569
|
-
status:
|
|
9745
|
+
status: flowStatus.exclude(["failed"])
|
|
9570
9746
|
});
|
|
9571
|
-
const flows = array(discriminatedUnion("status", [failedFlow, nonFailedFlow])).describe("The run's flows, ordered alphabetically by name.");
|
|
9747
|
+
const flows = array(discriminatedUnion("status", [failedFlow, nonFailedFlow])).describe("The run's flows, ordered alphabetically by name. Only the flows " + "matching flowStatuses when the request set it.");
|
|
9572
9748
|
const output = resource({
|
|
9573
9749
|
...makeRunSummaryFields(ids),
|
|
9750
|
+
blockingBugCount: number2().int().nonnegative().describe("How many bugs this run found are blocking: still open, and priority urgent, high, or unprioritized — unprioritized counts because nobody has ruled it out yet. This is what `failed` is derived from, so it explains a failure rather than adding a second verdict: gate on `status`, then read this to say how many bugs are holding the build. It counts a bug filed against a later run by an investigation that carried over from this one, and it drops a bug once that bug is resolved."),
|
|
9574
9751
|
flows,
|
|
9575
9752
|
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.")
|
|
9576
9753
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
@@ -9580,7 +9757,7 @@ var makeGetRunContract = (ids) => {
|
|
|
9580
9757
|
openWorldHint: false,
|
|
9581
9758
|
readOnlyHint: true
|
|
9582
9759
|
},
|
|
9583
|
-
description: "Get a run's status, per-flow results, and
|
|
9760
|
+
description: "Get a run's status, per-flow results, links, and how many of its bugs are blocking.",
|
|
9584
9761
|
input,
|
|
9585
9762
|
kind: "read",
|
|
9586
9763
|
name: "run.get",
|
|
@@ -9633,54 +9810,6 @@ var makeStopRunContract = (ids) => {
|
|
|
9633
9810
|
};
|
|
9634
9811
|
};
|
|
9635
9812
|
|
|
9636
|
-
// node_modules/@qawolf/api-contracts/dist/v1/run/triage.js
|
|
9637
|
-
var probability = number2().min(0).max(1);
|
|
9638
|
-
var verdictAnswer = object({
|
|
9639
|
-
choice: _enum(["bug", "maintenance"]),
|
|
9640
|
-
confidence: probability,
|
|
9641
|
-
probabilities: record(string2(), probability),
|
|
9642
|
-
type: literal("choice")
|
|
9643
|
-
});
|
|
9644
|
-
var makeTriageRunContract = (ids) => {
|
|
9645
|
-
const input = object({
|
|
9646
|
-
flowId: ids.flow.describe("The flow that failed in the run."),
|
|
9647
|
-
runId: ids.run
|
|
9648
|
-
});
|
|
9649
|
-
const decision = discriminatedUnion("type", [
|
|
9650
|
-
object({
|
|
9651
|
-
diagnosis: _enum(["bug", "maintenance"]),
|
|
9652
|
-
type: literal("diagnose")
|
|
9653
|
-
}),
|
|
9654
|
-
object({
|
|
9655
|
-
diagnosis: _enum(["bug", "maintenance"]),
|
|
9656
|
-
type: literal("suggest")
|
|
9657
|
-
}),
|
|
9658
|
-
object({
|
|
9659
|
-
type: literal("needsHuman")
|
|
9660
|
-
})
|
|
9661
|
-
]);
|
|
9662
|
-
const output = object({
|
|
9663
|
-
answers: object({
|
|
9664
|
-
verdict: verdictAnswer
|
|
9665
|
-
}),
|
|
9666
|
-
decision: decision.describe("What the triage would do with the verdict. The prototype records nothing; it only reports."),
|
|
9667
|
-
model: string2(),
|
|
9668
|
-
state: json().describe("The context that was sent to the model, for inspection.")
|
|
9669
|
-
});
|
|
9670
|
-
return {
|
|
9671
|
-
annotations: {
|
|
9672
|
-
destructiveHint: false,
|
|
9673
|
-
openWorldHint: false,
|
|
9674
|
-
readOnlyHint: true
|
|
9675
|
-
},
|
|
9676
|
-
description: "Prototype. Ask Jev, a TypeSafe System One model, whether a flow failure in a run is a bug in the product " + "or a test that needs maintenance. Compares the failing attempt with the flow's last passing run in the " + "same environment. Records nothing.",
|
|
9677
|
-
input,
|
|
9678
|
-
kind: "read",
|
|
9679
|
-
name: "run.triage",
|
|
9680
|
-
output
|
|
9681
|
-
};
|
|
9682
|
-
};
|
|
9683
|
-
|
|
9684
9813
|
// node_modules/@qawolf/api-contracts/dist/v1/runner/evaluateSnippet.js
|
|
9685
9814
|
var maxSnippetCodeLength = 64 * 1024;
|
|
9686
9815
|
var makeEvaluateSnippetOnRunnerContract = (ids) => {
|
|
@@ -9832,8 +9961,12 @@ var makeImportPackageOnRunnerContract = (ids) => {
|
|
|
9832
9961
|
var makeLaunchRunnerContract = (ids) => {
|
|
9833
9962
|
const input = object({
|
|
9834
9963
|
id: runnerIdSchema.describe("Id to launch the runner under, chosen by the caller. Launching the same id again returns the runner already running under it."),
|
|
9964
|
+
initialUrl: navigableUrlSchema.optional().describe("The page to open as the browser starts, so the first screenshot already shows the application rather than a blank page."),
|
|
9835
9965
|
runnerName: runnerNameSchema.optional().describe("The runner family to launch. Defaults to the standard web family, playwright."),
|
|
9836
9966
|
workspaceId: ids.workspace.optional().describe(`The workspace to launch the runner in. ${runnerWorkspaceRequirement}`)
|
|
9967
|
+
}).refine((request) => request.initialUrl === undefined || (request.runnerName ?? "playwright") === "playwright", {
|
|
9968
|
+
message: "initialUrl opens a page in the runner's browser, so only the playwright runner takes it.",
|
|
9969
|
+
path: ["initialUrl"]
|
|
9837
9970
|
});
|
|
9838
9971
|
const output = makeRunnerSchema().extend({
|
|
9839
9972
|
alreadyRunning: boolean2().describe("True when a runner was already running under this id and was returned unchanged, so no second runner was started and nothing new is billed. Not an error either way."),
|
|
@@ -9845,7 +9978,7 @@ var makeLaunchRunnerContract = (ids) => {
|
|
|
9845
9978
|
openWorldHint: false,
|
|
9846
9979
|
readOnlyHint: false
|
|
9847
9980
|
},
|
|
9848
|
-
description: "Launch an interactive runner on the caller's team under an id the caller chooses. Launching the same id again returns the runner already running rather than starting a second one, and the same id with a different runnerName is refused. A runner is not permanent: it terminates on its own after a period of inactivity, and launching the same id after that starts and bills a new runner
|
|
9981
|
+
description: "Launch an interactive runner on the caller's team under an id the caller chooses. Send `initialUrl` so its browser comes up on the page the work starts from, which saves a separate navigation and the browser's cold start. Launching the same id again returns the runner already running rather than starting a second one, and the same id with a different runnerName is refused. A runner is not permanent: it terminates on its own after a period of inactivity, and launching the same id after that starts and bills a new runner, so read `alreadyRunning` to tell which happened. A success means the runner is answering: the call waits for the pod it started to come up, so the very next call to the runner reaches it. If the pod does not come up in time the call fails instead, leaving the runner running, and launching the same id again attaches to it.",
|
|
9849
9982
|
input,
|
|
9850
9983
|
kind: "write",
|
|
9851
9984
|
name: "runner.launch",
|
|
@@ -9891,7 +10024,7 @@ var makeListRunnersContract = (ids) => {
|
|
|
9891
10024
|
openWorldHint: false,
|
|
9892
10025
|
readOnlyHint: true
|
|
9893
10026
|
},
|
|
9894
|
-
description: "List the runners running on the caller's team right now. A
|
|
10027
|
+
description: "List the runners running on the caller's team right now. A listed runner may be driven by another machine or session, so sending it work can collide with theirs. A runner that was terminated, or that terminated on its own after inactivity, is not listed, because the run system keeps no record of a runner once it is gone. This is a lookup: it never starts a runner, and it does not reset a runner's inactivity clock the way reading its journal does. It is how to find a runner launched from another machine or in an earlier session, when the id it was launched under is no longer at hand.",
|
|
9895
10028
|
input,
|
|
9896
10029
|
kind: "read",
|
|
9897
10030
|
name: "runner.list",
|
|
@@ -9976,6 +10109,7 @@ var makeRunFlowOnRunnerContract = (ids) => {
|
|
|
9976
10109
|
env: runEnvironmentSchema.optional().describe("Environment variables to make available to the run."),
|
|
9977
10110
|
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. Send this or `env`, not both."),
|
|
9978
10111
|
files: runFilesSchema.describe("Every file the run needs keyed by its path — the flow file, everything it imports, package.json and tsconfig.json. A runner holds no copy of your project, so what runs is exactly what is sent here."),
|
|
10112
|
+
flowId: ids.flow.optional().describe("The QA Wolf flow this run is for. The run then sees it as `QAWOLF_WORKFLOW_ID`, the same value a platform run of that flow sees, so fixtures named and cleaned up by it match across both. Omit it when the flow is not in QA Wolf yet, and the run has no `QAWOLF_WORKFLOW_ID`."),
|
|
9979
10113
|
id: runnerIdSchema.describe("Id of the runner to run the flow on."),
|
|
9980
10114
|
selection: runSelectionSchema.optional().describe("Run only these lines, inside the page the runner is already on, instead of running the whole flow from a fresh browser. Omit to run the whole entry point."),
|
|
9981
10115
|
unchangedFiles: unchangedFilesSchema.optional().describe("Files this runner already holds from an earlier run, keyed by path with a hex SHA-256 of the content it should hold. Send this to make `files` only what changed. The runner refuses with `needs-full-sync` if it holds none of a referenced path, so it never runs something other than what was asked for. Omit it to send every file."),
|
|
@@ -10227,6 +10361,7 @@ var makeContractsV1 = (ids) => {
|
|
|
10227
10361
|
removeTag: makeRemoveTagFromFlowsContract(resolvedIds),
|
|
10228
10362
|
update: makeUpdateFlowContract(resolvedIds)
|
|
10229
10363
|
},
|
|
10364
|
+
investigation: makeInvestigationContracts(resolvedIds),
|
|
10230
10365
|
issue: {
|
|
10231
10366
|
addFlows: makeAddFlowsToIssueContract(resolvedIds),
|
|
10232
10367
|
create: makeCreateIssueContract(resolvedIds),
|
|
@@ -10242,8 +10377,7 @@ var makeContractsV1 = (ids) => {
|
|
|
10242
10377
|
find: makeFindRunsContract(resolvedIds),
|
|
10243
10378
|
get: makeGetRunContract(resolvedIds),
|
|
10244
10379
|
reattempt: makeReattemptRunContract(resolvedIds),
|
|
10245
|
-
stop: makeStopRunContract(resolvedIds)
|
|
10246
|
-
triage: makeTriageRunContract(resolvedIds)
|
|
10380
|
+
stop: makeStopRunContract(resolvedIds)
|
|
10247
10381
|
},
|
|
10248
10382
|
runner: makeRunnerContracts(resolvedIds),
|
|
10249
10383
|
skill: makeSkillContracts(),
|
|
@@ -10556,7 +10690,8 @@ var interactMessages = {
|
|
|
10556
10690
|
actionFlagsWithStdin: '"-" reads the whole action from stdin, so an action flag passed alongside it would be ignored. Pipe the action in on its own, or name the action type and use flags.',
|
|
10557
10691
|
actionMayHaveHappened: "The runner could not be reached, which does not mean the action was not performed: it may have stopped answering mid-action. Take a screenshot before repeating it.",
|
|
10558
10692
|
actionNotJson: `Stdin did not hold a JSON action. Pipe one object, for example '{"type":"click","button":"left","x":480,"y":260}'.`,
|
|
10559
|
-
|
|
10693
|
+
actionNotSupportedOnBrowser: (type) => `Only a mobile runner performs ${type}. On a browser runner, click at --x and --y, drag along a --path, and type into whatever has focus.`,
|
|
10694
|
+
actionNotSupportedOnMobile: (type) => `A mobile runner has a touchscreen, so it cannot perform ${type} as asked. Use tap, swipe, fill, or type into whatever the last tap focused.`,
|
|
10560
10695
|
actionFailedScreenshotToStdout: "Its screen was written to stdout as a JPEG, so look at that rather than sending the action again.",
|
|
10561
10696
|
actionFailedScreenshotUnwritten: (detail) => `Its screen could not be written, because ${detail}, so take one with qawolf runner screenshot rather than sending the action again.`,
|
|
10562
10697
|
actionFailedScreenshotWritten: (path) => `Its screen was written to ${path}, so look at that rather than sending the action again.`,
|
|
@@ -14876,4 +15011,4 @@ export {
|
|
|
14876
15011
|
createRunnerSdk
|
|
14877
15012
|
};
|
|
14878
15013
|
|
|
14879
|
-
//# debugId=
|
|
15014
|
+
//# debugId=CBFC365D381BD6E864756E2164756E21
|