@qawolf/cli 1.40.0 → 1.42.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/README.md +24 -0
- package/dist/cli.js +825 -126
- package/dist/investigation-parser.js +11423 -0
- package/dist/runner-sdk.js +439 -124
- package/package.json +4 -2
- package/skills/qawolf-cli/SKILL.md +12 -3
package/dist/runner-sdk.js
CHANGED
|
@@ -6952,6 +6952,146 @@ function date4(params) {
|
|
|
6952
6952
|
|
|
6953
6953
|
// node_modules/zod/v4/classic/external.js
|
|
6954
6954
|
config(en_default());
|
|
6955
|
+
// node_modules/@qawolf/api-contracts/dist/v1/pagination.js
|
|
6956
|
+
var makePaginationInputFields = (limits) => ({
|
|
6957
|
+
cursor: string2().min(1).optional().describe("Opaque cursor copied from the previous response's nextCursor. Omit to fetch the first page."),
|
|
6958
|
+
limit: number2().int().min(1).max(limits.maxLimit).default(limits.defaultLimit).describe(`Maximum rows per page. Defaults to ${limits.defaultLimit}, capped at ${limits.maxLimit}.`)
|
|
6959
|
+
});
|
|
6960
|
+
var nextCursorSchema = string2().min(1).optional().describe("Repeat the request with this value as cursor to fetch the next page. Absent when there are no further results.");
|
|
6961
|
+
|
|
6962
|
+
// node_modules/@qawolf/api-contracts/dist/v1/resource.js
|
|
6963
|
+
function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
|
|
6964
|
+
return object({
|
|
6965
|
+
...fields,
|
|
6966
|
+
url: url().describe(urlFieldDescription)
|
|
6967
|
+
});
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
// node_modules/@qawolf/api-contracts/dist/v1/promotion/resource.js
|
|
6971
|
+
var promotionStatusSchema = _enum([
|
|
6972
|
+
"pending",
|
|
6973
|
+
"conflicted",
|
|
6974
|
+
"resolving",
|
|
6975
|
+
"promoted",
|
|
6976
|
+
"no-changes",
|
|
6977
|
+
"abandoned"
|
|
6978
|
+
]).describe("pending (requested, the merge has not run yet), conflicted (the head's flow changes clash with the base and await a resolution), resolving (a submitted resolution is being applied), promoted (merged into the base and the head environment terminated), no-changes (the head had nothing to promote and was terminated), abandoned (the head environment was terminated before the promotion settled).");
|
|
6979
|
+
var conflictSchema = object({
|
|
6980
|
+
paths: array(string2()).describe("Every path that conflicts between the head and the base. A resolution must cover exactly these paths."),
|
|
6981
|
+
sourceCommitHash: string2().describe("The head environment's flow code commit the conflict was computed against."),
|
|
6982
|
+
targetCommitHash: string2().describe("The base environment's flow code commit the conflict was computed against.")
|
|
6983
|
+
});
|
|
6984
|
+
var makePromotionResourceSchema = (ids) => resource({
|
|
6985
|
+
aiTaskId: ids.aiTask.optional().describe("The AI task dispatched to resolve this promotion's conflicts. Absent until the agent is dispatched. A promotion that stays conflicted after this is set means the agent could not resolve it."),
|
|
6986
|
+
baseEnvironmentId: ids.environment.describe("The environment the flow changes promote into."),
|
|
6987
|
+
conflict: conflictSchema.optional().describe("The conflict awaiting resolution. Present while status is conflicted or resolving. A resolution must name both commit hashes and cover exactly these paths; if either branch moves, the conflict is recomputed and this changes."),
|
|
6988
|
+
createdAt: exports_iso.datetime().describe("When the promotion was requested."),
|
|
6989
|
+
headEnvironmentId: ids.environment.describe("The environment whose flow changes are promoted."),
|
|
6990
|
+
id: ids.promotion,
|
|
6991
|
+
promotedCommitHash: string2().optional().describe("The commit the promotion landed on the base environment's flow code branch. Present when status is promoted."),
|
|
6992
|
+
settledAt: exports_iso.datetime().optional().describe("When the promotion reached promoted, no-changes or abandoned. Absent while it is open."),
|
|
6993
|
+
status: promotionStatusSchema
|
|
6994
|
+
}, { urlFieldDescription: "Absolute URL of the head environment's page." });
|
|
6995
|
+
|
|
6996
|
+
// node_modules/@qawolf/api-contracts/dist/v1/promotion/find.js
|
|
6997
|
+
var makeFindPromotionsContract = (ids) => {
|
|
6998
|
+
const input = object({
|
|
6999
|
+
environmentId: ids.environmentRef.optional().describe("Only list promotions out of this head environment, by id or alias. Omit to list the whole workspace's promotions."),
|
|
7000
|
+
status: promotionStatusSchema.optional().describe("Only list promotions in this status. Use conflicted to see the promotions that need attention."),
|
|
7001
|
+
workspaceId: ids.workspace.optional().describe("The workspace to list promotions from, which an environment alias resolves in. Required when authenticating with an organization or user API key."),
|
|
7002
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 })
|
|
7003
|
+
});
|
|
7004
|
+
const output = object({
|
|
7005
|
+
nextCursor: nextCursorSchema,
|
|
7006
|
+
promotions: array(makePromotionResourceSchema(ids)).describe("The workspace's promotions, newest first.")
|
|
7007
|
+
});
|
|
7008
|
+
return {
|
|
7009
|
+
annotationJustifications: {
|
|
7010
|
+
destructiveHint: "Does not change promotions, environments or flow code branches.",
|
|
7011
|
+
openWorldHint: "Reads private QA Wolf promotion records without changing external systems.",
|
|
7012
|
+
readOnlyHint: "Lists promotions in the authorized workspace without changing them."
|
|
7013
|
+
},
|
|
7014
|
+
annotations: {
|
|
7015
|
+
destructiveHint: false,
|
|
7016
|
+
openWorldHint: false,
|
|
7017
|
+
readOnlyHint: true
|
|
7018
|
+
},
|
|
7019
|
+
description: "List environment promotions, newest first. A promotion moves the flow changes made in a head environment into its base environment. Filter by status conflicted to find the promotions whose conflicts still need a resolution.",
|
|
7020
|
+
input,
|
|
7021
|
+
kind: "read",
|
|
7022
|
+
name: "promotion.find",
|
|
7023
|
+
output
|
|
7024
|
+
};
|
|
7025
|
+
};
|
|
7026
|
+
|
|
7027
|
+
// node_modules/@qawolf/api-contracts/dist/v1/promotion/get.js
|
|
7028
|
+
var makeGetPromotionContract = (ids) => {
|
|
7029
|
+
const input = object({ promotionId: ids.promotion });
|
|
7030
|
+
const output = makePromotionResourceSchema(ids);
|
|
7031
|
+
return {
|
|
7032
|
+
annotationJustifications: {
|
|
7033
|
+
destructiveHint: "Does not change the promotion, its environments or flow code branches.",
|
|
7034
|
+
openWorldHint: "Reads a private QA Wolf promotion record without changing external systems.",
|
|
7035
|
+
readOnlyHint: "Retrieves one authorized promotion's status and conflict without changing it."
|
|
7036
|
+
},
|
|
7037
|
+
annotations: {
|
|
7038
|
+
destructiveHint: false,
|
|
7039
|
+
openWorldHint: false,
|
|
7040
|
+
readOnlyHint: true
|
|
7041
|
+
},
|
|
7042
|
+
description: "Read one environment promotion: its status, the conflicting paths and commit hashes while it is conflicted or resolving, the commit it landed when promoted, and the AI task resolving it. Poll it after environment.promote to learn how the promotion settled. It does not serve file contents; a resolver reads both branches from the flow code repository.",
|
|
7043
|
+
input,
|
|
7044
|
+
kind: "read",
|
|
7045
|
+
name: "promotion.get",
|
|
7046
|
+
output
|
|
7047
|
+
};
|
|
7048
|
+
};
|
|
7049
|
+
|
|
7050
|
+
// node_modules/@qawolf/api-contracts/dist/v1/promotion/resolve.js
|
|
7051
|
+
var maxResolvedFileBytes = 1e6;
|
|
7052
|
+
var utf8ByteLength = (content) => new TextEncoder().encode(content).byteLength;
|
|
7053
|
+
var keptFileSizeIssues = (writes) => Object.entries(writes).map(([path, content]) => ({ bytes: utf8ByteLength(content), path })).filter(({ bytes }) => bytes >= maxResolvedFileBytes).map(({ bytes, path }) => ({
|
|
7054
|
+
code: "custom",
|
|
7055
|
+
message: `Each kept file must be under ${maxResolvedFileBytes} bytes of UTF-8; ${path} is ${bytes} bytes.`,
|
|
7056
|
+
path: [path]
|
|
7057
|
+
}));
|
|
7058
|
+
var makeResolvePromotionContract = (ids) => {
|
|
7059
|
+
const input = object({
|
|
7060
|
+
deletes: array(string2().min(1)).optional().describe("Conflicting paths to remove from the base environment. Repeat the flag once per path."),
|
|
7061
|
+
expectedSourceCommitHash: string2().min(1).describe("The head environment's commit the conflict was computed against: conflict.sourceCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
|
|
7062
|
+
expectedTargetCommitHash: string2().min(1).describe("The base environment's commit the conflict was computed against: conflict.targetCommitHash from promotion.get. A different current commit means the branch moved and the call is refused."),
|
|
7063
|
+
promotionId: ids.promotion,
|
|
7064
|
+
writes: record(string2().min(1), string2()).superRefine((writes, refinement) => {
|
|
7065
|
+
keptFileSizeIssues(writes).forEach((issue) => refinement.addIssue(issue));
|
|
7066
|
+
}).optional().describe("The resolved full contents of each conflicting path to keep, keyed by path. Repeat the flag once per path as PATH=CONTENT. Each file must be under 1 MB of UTF-8.")
|
|
7067
|
+
});
|
|
7068
|
+
const output = makePromotionResourceSchema(ids);
|
|
7069
|
+
return {
|
|
7070
|
+
annotationJustifications: {
|
|
7071
|
+
destructiveHint: "Lands the resolved files on the base environment's flow code branch and terminates the head environment once they land.",
|
|
7072
|
+
openWorldHint: "Changes QA Wolf flow code branches only, not the customer's own repository or deployments.",
|
|
7073
|
+
readOnlyHint: "Records a resolution that a background executor applies to the base branch."
|
|
7074
|
+
},
|
|
7075
|
+
annotations: {
|
|
7076
|
+
destructiveHint: true,
|
|
7077
|
+
openWorldHint: false,
|
|
7078
|
+
readOnlyHint: false
|
|
7079
|
+
},
|
|
7080
|
+
description: "Submit the resolution of a conflicted promotion: the full resolved contents of every conflicting path to keep, and every conflicting path to delete. Together they must cover exactly the paths in the promotion's conflict, and both commit hashes must match the conflict's; if a branch moved since, the call is refused as stale-conflict and promotion.get has the current conflict. Returns the promotion in resolving; poll promotion.get until it is promoted, or conflicted again if the branches moved while it applied.",
|
|
7081
|
+
input,
|
|
7082
|
+
kind: "write",
|
|
7083
|
+
name: "promotion.resolve",
|
|
7084
|
+
output
|
|
7085
|
+
};
|
|
7086
|
+
};
|
|
7087
|
+
|
|
7088
|
+
// node_modules/@qawolf/api-contracts/dist/v1/promotion/index.js
|
|
7089
|
+
var makePromotionContracts = (ids) => ({
|
|
7090
|
+
find: makeFindPromotionsContract(ids),
|
|
7091
|
+
get: makeGetPromotionContract(ids),
|
|
7092
|
+
resolve: makeResolvePromotionContract(ids)
|
|
7093
|
+
});
|
|
7094
|
+
|
|
6955
7095
|
// node_modules/@qawolf/api-contracts/dist/v1/agent/status.js
|
|
6956
7096
|
var agentSessionStatuses = [
|
|
6957
7097
|
"working",
|
|
@@ -7048,14 +7188,6 @@ var didNotRunReasonSchema = _enum([
|
|
|
7048
7188
|
].join(`
|
|
7049
7189
|
`));
|
|
7050
7190
|
|
|
7051
|
-
// node_modules/@qawolf/api-contracts/dist/v1/resource.js
|
|
7052
|
-
function resource(fields, { urlFieldDescription = "Absolute URL." } = {}) {
|
|
7053
|
-
return object({
|
|
7054
|
-
...fields,
|
|
7055
|
-
url: url().describe(urlFieldDescription)
|
|
7056
|
-
});
|
|
7057
|
-
}
|
|
7058
|
-
|
|
7059
7191
|
// node_modules/@qawolf/api-contracts/dist/v1/email/resource.js
|
|
7060
7192
|
var emailDirectionSchema = _enum(["inbound", "outbound"]);
|
|
7061
7193
|
var namedAddressSchema = object({
|
|
@@ -7222,6 +7354,7 @@ var defaultIdSchemas = {
|
|
|
7222
7354
|
flow: string2().min(1).describe("The id of the flow."),
|
|
7223
7355
|
issue: string2().min(1).describe("The id of the issue."),
|
|
7224
7356
|
legacyTrigger: string2().min(1).describe("The id of the legacy trigger, from legacyTrigger.find."),
|
|
7357
|
+
promotion: string2().min(1).describe("The id of the promotion, from promotion.find or environment.promote."),
|
|
7225
7358
|
run: string2().min(1).describe("The id of the run."),
|
|
7226
7359
|
runAttempt: string2().min(1).describe("The id of the run attempt."),
|
|
7227
7360
|
trigger: string2().min(1).describe("The id of the trigger."),
|
|
@@ -7544,7 +7677,7 @@ var makeInspectOnRunnerContract = (ids) => {
|
|
|
7544
7677
|
openWorldHint: false,
|
|
7545
7678
|
readOnlyHint: false
|
|
7546
7679
|
},
|
|
7547
|
-
description: "Inspect one thing on an interactive runner: an element's HTML, the page's HTML simplified for a model, or a top-level variable's value as JSON. This refreshes the inactivity timer and can extend the runner's billed lifetime. `nothing-to-inspect` means the runner had nothing to answer with: no live page, no element matching the selector, or no variable under that name. A runner cannot tell those apart, so it reports the one reason and puts whatever it did say in `errorMessage`. `runner-is-not-a-browser`
|
|
7680
|
+
description: "Inspect one thing on an interactive runner: an element's HTML, the page's HTML simplified for a model, or a top-level variable's value as JSON. This refreshes the inactivity timer and can extend the runner's billed lifetime. `nothing-to-inspect` means the runner had nothing to answer with: no live page, no element matching the selector, or no variable under that name. A runner cannot tell those apart, so it reports the one reason and puts whatever it did say in `errorMessage`. A mobile or Windows runner answers `variable`; for `element-html` or `page-html` it answers `runner-is-not-a-browser` — call `runner.inspectMobile` for its equivalent surface instead. " + retryableRunnerUnreachableDescription,
|
|
7548
7681
|
input,
|
|
7549
7682
|
kind: "read",
|
|
7550
7683
|
name: "runner.inspect",
|
|
@@ -7615,8 +7748,8 @@ var elementsRequestSchema = discriminatedUnion("by", [
|
|
|
7615
7748
|
by: literal("point"),
|
|
7616
7749
|
context: string2().min(1).optional(),
|
|
7617
7750
|
what: literal("elements"),
|
|
7618
|
-
x: int().min(0).describe("Whole pixels
|
|
7619
|
-
y: int().min(0).describe("Whole pixels
|
|
7751
|
+
x: int().min(0).describe("Whole pixels in the same space as `runner.takeScreenshot`."),
|
|
7752
|
+
y: int().min(0).describe("Whole pixels in the same space as `runner.takeScreenshot`.")
|
|
7620
7753
|
}),
|
|
7621
7754
|
object({
|
|
7622
7755
|
by: literal("text"),
|
|
@@ -7678,7 +7811,7 @@ var inspectMobileAnswerSchema = discriminatedUnion("what", [
|
|
|
7678
7811
|
context: string2(),
|
|
7679
7812
|
orientation: orientationSchema,
|
|
7680
7813
|
outcome: literal("success"),
|
|
7681
|
-
pageSource: pageSourceNodeSchema,
|
|
7814
|
+
pageSource: pageSourceNodeSchema.describe("The element tree. Its bounds are in the device's own pixels, not the screenshot's; to find a point to act on, ask for `elements`, whose bounds and centers are in screenshot pixels."),
|
|
7682
7815
|
what: literal("page")
|
|
7683
7816
|
}),
|
|
7684
7817
|
object({
|
|
@@ -7714,7 +7847,7 @@ var makeInspectMobileOnRunnerContract = (ids) => {
|
|
|
7714
7847
|
openWorldHint: false,
|
|
7715
7848
|
readOnlyHint: true
|
|
7716
7849
|
},
|
|
7717
|
-
description: `Inspect one thing on a mobile interactive runner: the Appium session's status, the
|
|
7850
|
+
description: `Inspect one thing on a mobile or Windows interactive runner: the Appium session's status, the contexts available (WebViews on mobile, top-level windows on Windows), the current context's page source, or the elements at a point, carrying some text, or matching a selector. This does not refresh the runner's inactivity timer. Mobile and Windows only — a browser runner answers \`runner-is-not-mobile\`; call \`runner.inspect\` for a browser's equivalent surface instead. \`what: "session"\` always answers with the session's own status rather than \`screen-needs-a-run\`, since that is the question it exists to answer; the other three request kinds need a live session first and answer the same \`screen-needs-a-run\` or \`screen-not-ready\` outcomes \`runner.performAction\` and \`runner.takeScreenshot\` use, instead of reading anything when there is none. \`screen-needs-a-run\` means no Appium session has started on this runner yet — call \`runner.runFlow\` with a flow that opens one, then inspect again. \`screen-not-ready\` means the runner's Appium session exists but did not answer this instant, or more than one is somehow live — retry once; if it persists, relaunch the runner. \`runner-is-not-mobile\` means there is nothing here to inspect, and retrying will never help — launch an \`android\`, \`ios\` or \`windows\` runner instead. \`invalid-selector\` (elements by selector only) means the selector itself could not be parsed under the given \`strategy\` — distinct from a selector that parsed fine but matched nothing, which answers \`matches: []\` instead. ${retryableRunnerUnreachableDescription}`,
|
|
7718
7851
|
input,
|
|
7719
7852
|
kind: "read",
|
|
7720
7853
|
name: "runner.inspectMobile",
|
|
@@ -7761,9 +7894,9 @@ var readJournalResponseSchema = object({
|
|
|
7761
7894
|
var maxRunFilesByteLength = 30 * 1024 * 1024;
|
|
7762
7895
|
var maxRunnerRequestEncodedByteLength = 30 * 1024 * 1024;
|
|
7763
7896
|
function runFilesByteLength(files) {
|
|
7764
|
-
return Object.entries(files).reduce((total, [path, content]) => total +
|
|
7897
|
+
return Object.entries(files).reduce((total, [path, content]) => total + utf8ByteLength2(content) + utf8ByteLength2(path), 0);
|
|
7765
7898
|
}
|
|
7766
|
-
function
|
|
7899
|
+
function utf8ByteLength2(text) {
|
|
7767
7900
|
return Buffer.byteLength(text, "utf8");
|
|
7768
7901
|
}
|
|
7769
7902
|
var runFilesSchema = record(string2(), string2()).superRefine((files, refinementContext) => {
|
|
@@ -7845,19 +7978,20 @@ var screenFailureReasons = [
|
|
|
7845
7978
|
"screen-not-ready"
|
|
7846
7979
|
];
|
|
7847
7980
|
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.";
|
|
7848
|
-
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.";
|
|
7849
|
-
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
|
|
7981
|
+
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 Windows runner any flow run claims the VM and brings up its screen. 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.";
|
|
7982
|
+
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.";
|
|
7850
7983
|
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.");
|
|
7851
7984
|
|
|
7852
7985
|
// node_modules/@qawolf/api-contracts/dist/v1/runner/performAction.js
|
|
7853
7986
|
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.";
|
|
7854
|
-
var notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this action
|
|
7855
|
-
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`.";
|
|
7856
|
-
var
|
|
7987
|
+
var notSupportedOnMobileDescription = "`action-not-supported-on-mobile` if the runner is a mobile device and this is a browser action other than `type`: `click`, `double_click`, `drag`, `scroll`, `move`, `keypress` and `navigate` describe a mouse and keyboard, so send `tap` and `swipe` instead. `type` types into whatever the last tap focused.";
|
|
7988
|
+
var mobileActionsDescription = "Only a mobile or Windows 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`.";
|
|
7989
|
+
var windowsActionsDescription = "On a Windows runner, `click`, `double_click`, `move`, `scroll`, `drag`, `keypress` and `type` act on the whole desktop with a mouse and keyboard, at screenshot coordinates; a `drag` takes only its start and end point, and `swipe` is a drag. `tap` and `fill` also accept a UI Automation XPath `selector` (as in `runner.inspectMobile`) in place of a point. `navigate` is refused with `action-failed` because it needs a browser: open the page from a flow instead. Take points to act on from `runner.inspectMobile` `elements` (their `center`), not from page-source bounds, which are in the desktop's own pixels.";
|
|
7990
|
+
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 or Windows runner the screenshot is the device's own screen (on Windows, the whole desktop), taken right after a performed action.";
|
|
7857
7991
|
var maxActionErrorMessageLength = 1000;
|
|
7858
7992
|
var makePerformActionOnRunnerContract = (ids) => {
|
|
7859
7993
|
const input = object({
|
|
7860
|
-
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}`),
|
|
7994
|
+
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} ${windowsActionsDescription}`),
|
|
7861
7995
|
id: runnerIdSchema.describe("Id of the runner to act on."),
|
|
7862
7996
|
withScreenshot: boolean2().optional().describe(withScreenshotDescription),
|
|
7863
7997
|
workspaceId: ids.workspace.optional().describe(runnerWorkspaceIdDescription)
|
|
@@ -7895,7 +8029,7 @@ var makePerformActionOnRunnerContract = (ids) => {
|
|
|
7895
8029
|
openWorldHint: true,
|
|
7896
8030
|
readOnlyHint: false
|
|
7897
8031
|
},
|
|
7898
|
-
description: `Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile, tap, swipe,
|
|
8032
|
+
description: `Perform one raw action on an interactive runner: click, double_click, move, drag, scroll, keypress, type, or navigate; on mobile or Windows, also tap, swipe, or fill. 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 or Windows 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}`,
|
|
7899
8033
|
input,
|
|
7900
8034
|
kind: "write",
|
|
7901
8035
|
name: "runner.performAction",
|
|
@@ -8004,7 +8138,7 @@ var makePerformActionsOnRunnerContract = (ids) => {
|
|
|
8004
8138
|
openWorldHint: true,
|
|
8005
8139
|
readOnlyHint: false
|
|
8006
8140
|
},
|
|
8007
|
-
description: "Perform a sequence of raw actions on an interactive runner in one request, one after another, and answer with what happened to each. A `success` means every action took effect. A `failure` names the first action that did not (`failedIndex`, `failureReason`), the last one that did (`lastCompletedIndex`), and whether actions were left unperformed (`stoppedEarly`); `results` has one entry per action reached, in order. Read `effect` on an entry before sending its action again: `performed` means the runner did it; `not-performed` means the runner answered that it did not take effect, though a `navigate` that timed out may still be loading; `unknown` means the runner stopped answering with the action in flight (`runner-unreachable`), or its screen went quiet mid-action (`action-unconfirmed`), and it may have taken effect — a click that submitted a form, say — so take a screenshot instead of repeating it. A sequence gets about a minute to start its actions; an action it did not reach in time is `out-of-time`, nothing after it was attempted, and the rest can go in a new request. Everything `runner.performAction` says about a runner that has never run anything, a mobile runner, and the `screen-needs-a-run`, `screen-not-ready`, `runner-has-no-screen`, `action-not-supported-on-mobile` and `action-not-supported-on-browser` reasons holds for each action here.",
|
|
8141
|
+
description: "Perform a sequence of raw actions on an interactive runner in one request, one after another, and answer with what happened to each. A `success` means every action took effect. A `failure` names the first action that did not (`failedIndex`, `failureReason`), the last one that did (`lastCompletedIndex`), and whether actions were left unperformed (`stoppedEarly`); `results` has one entry per action reached, in order. Read `effect` on an entry before sending its action again: `performed` means the runner did it; `not-performed` means the runner answered that it did not take effect, though a `navigate` that timed out may still be loading; `unknown` means the runner stopped answering with the action in flight (`runner-unreachable`), or its screen went quiet mid-action (`action-unconfirmed`), and it may have taken effect — a click that submitted a form, say — so take a screenshot instead of repeating it. A sequence gets about a minute to start its actions; an action it did not reach in time is `out-of-time`, nothing after it was attempted, and the rest can go in a new request. Everything `runner.performAction` says about a runner that has never run anything, a mobile or Windows runner, and the `screen-needs-a-run`, `screen-not-ready`, `runner-has-no-screen`, `action-not-supported-on-mobile` and `action-not-supported-on-browser` reasons holds for each action here.",
|
|
8008
8142
|
input,
|
|
8009
8143
|
kind: "write",
|
|
8010
8144
|
name: "runner.performActions",
|
|
@@ -8180,7 +8314,7 @@ var makeTriggerScheduleFields = (ids) => ({
|
|
|
8180
8314
|
var makeTriggerDeploymentFields = (ids) => ({
|
|
8181
8315
|
action: makeTriggerActionSchema(ids),
|
|
8182
8316
|
branchPattern: string2().min(1).optional().describe("Only fire for deployments of a branch matching this pattern."),
|
|
8183
|
-
deployTargetPattern: string2().min(1).optional().describe("Only fire for deployments whose deploy target matches this pattern. A deploy target is the URL
|
|
8317
|
+
deployTargetPattern: string2().min(1).optional().describe("Only fire for deployments whose deploy target matches this pattern. A deploy target is the URL the deploy reported, which many deployments do not carry."),
|
|
8184
8318
|
environmentIds: array(ids.environment).default([]).describe("Only fire for deployments to these environments. Mutually exclusive with environmentPattern."),
|
|
8185
8319
|
environmentPattern: string2().min(1).optional().describe("Only fire for deployments to environments matching this pattern. Mutually exclusive with environmentIds."),
|
|
8186
8320
|
servicePattern: string2().min(1).optional().describe("Only fire for deployments whose service matches this pattern. A deployment that names no service never matches it.")
|
|
@@ -8531,7 +8665,7 @@ var makeAgentGetContract = (ids) => {
|
|
|
8531
8665
|
const input = object({
|
|
8532
8666
|
cursor: string2().min(1).optional().describe("Opaque cursor copied from this same session's previous nextCursor. Omit to read from its first reply."),
|
|
8533
8667
|
sessionId: ids.chatSession.describe("The id agent.send answered with."),
|
|
8534
|
-
waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds.
|
|
8668
|
+
waitSeconds: number2().int().min(0).optional().describe(`How long the server may hold this check open, in seconds. Defaults to ${maxAgentWaitSeconds}, the longest hold, and a larger value clamps to it. Pass 0 to answer at once. Check again as soon as a held check returns.`)
|
|
8535
8669
|
});
|
|
8536
8670
|
const output = resource({
|
|
8537
8671
|
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."),
|
|
@@ -8598,6 +8732,88 @@ var makeAgentSendContract = (ids) => {
|
|
|
8598
8732
|
};
|
|
8599
8733
|
};
|
|
8600
8734
|
|
|
8735
|
+
// node_modules/@qawolf/api-contracts/dist/v1/attempt/get.js
|
|
8736
|
+
var makeGetAttemptContract = (ids) => {
|
|
8737
|
+
const input = object({ attemptId: ids.runAttempt });
|
|
8738
|
+
const attemptStatus = _enum([
|
|
8739
|
+
"passed",
|
|
8740
|
+
"failed",
|
|
8741
|
+
"canceled",
|
|
8742
|
+
"aborted",
|
|
8743
|
+
"skipped"
|
|
8744
|
+
]);
|
|
8745
|
+
const attemptNeighbor = object({
|
|
8746
|
+
attemptId: ids.runAttempt,
|
|
8747
|
+
status: attemptStatus
|
|
8748
|
+
});
|
|
8749
|
+
const response = object({
|
|
8750
|
+
flowId: ids.flow,
|
|
8751
|
+
flowStatus: _enum(publicRunStatusValues),
|
|
8752
|
+
retryContext: object({
|
|
8753
|
+
currentOrdinal: number2().int().min(1),
|
|
8754
|
+
next: attemptNeighbor.optional(),
|
|
8755
|
+
previous: attemptNeighbor.optional(),
|
|
8756
|
+
total: number2().int().min(1)
|
|
8757
|
+
}),
|
|
8758
|
+
runId: ids.run,
|
|
8759
|
+
runStatus: _enum(publicRunSummaryStatusValues)
|
|
8760
|
+
});
|
|
8761
|
+
const attempt = object({
|
|
8762
|
+
attemptId: ids.runAttempt,
|
|
8763
|
+
completedAt: exports_iso.datetime().optional(),
|
|
8764
|
+
createdAt: exports_iso.datetime(),
|
|
8765
|
+
error: string2().optional(),
|
|
8766
|
+
startedAt: exports_iso.datetime().optional()
|
|
8767
|
+
});
|
|
8768
|
+
const output = discriminatedUnion("artifactStatus", [
|
|
8769
|
+
response.extend({
|
|
8770
|
+
artifacts: object({
|
|
8771
|
+
logsUrl: url().optional(),
|
|
8772
|
+
traceUrl: url().optional(),
|
|
8773
|
+
videoUrl: url().optional()
|
|
8774
|
+
}),
|
|
8775
|
+
artifactStatus: literal("signed"),
|
|
8776
|
+
attempt: attempt.extend({
|
|
8777
|
+
kind: literal("automated"),
|
|
8778
|
+
status: attemptStatus
|
|
8779
|
+
})
|
|
8780
|
+
}),
|
|
8781
|
+
response.extend({
|
|
8782
|
+
artifacts: object({}).strict(),
|
|
8783
|
+
artifactStatus: literal("signing-failed"),
|
|
8784
|
+
attempt: attempt.extend({
|
|
8785
|
+
kind: literal("automated"),
|
|
8786
|
+
status: attemptStatus
|
|
8787
|
+
})
|
|
8788
|
+
}),
|
|
8789
|
+
response.extend({
|
|
8790
|
+
artifacts: object({}).strict(),
|
|
8791
|
+
artifactStatus: literal("not-captured"),
|
|
8792
|
+
attempt: attempt.extend({
|
|
8793
|
+
kind: literal("manual"),
|
|
8794
|
+
status: literal("passed")
|
|
8795
|
+
})
|
|
8796
|
+
})
|
|
8797
|
+
]);
|
|
8798
|
+
return {
|
|
8799
|
+
annotationJustifications: {
|
|
8800
|
+
destructiveHint: "Does not retry, cancel or alter the run attempt.",
|
|
8801
|
+
openWorldHint: "Reads recorded QA Wolf artifacts without changing the application under test.",
|
|
8802
|
+
readOnlyHint: "Retrieves a finished attempt's metadata and signed artifact URLs."
|
|
8803
|
+
},
|
|
8804
|
+
annotations: {
|
|
8805
|
+
destructiveHint: false,
|
|
8806
|
+
openWorldHint: false,
|
|
8807
|
+
readOnlyHint: true
|
|
8808
|
+
},
|
|
8809
|
+
description: "Get a finished run attempt: its run and flow status, its place among that flow's attempts in the run, and signed links to its logs, trace, and video when they were captured.",
|
|
8810
|
+
input,
|
|
8811
|
+
kind: "read",
|
|
8812
|
+
name: "attempt.get",
|
|
8813
|
+
output
|
|
8814
|
+
};
|
|
8815
|
+
};
|
|
8816
|
+
|
|
8601
8817
|
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/resource.js
|
|
8602
8818
|
var makeCodeHostIntegrationResourceSchema = () => resource({
|
|
8603
8819
|
connectedAt: exports_iso.datetime().describe("When the code host was connected to the workspace."),
|
|
@@ -8641,13 +8857,6 @@ var makeFindCodeHostIntegrationsContract = (ids) => {
|
|
|
8641
8857
|
};
|
|
8642
8858
|
};
|
|
8643
8859
|
|
|
8644
|
-
// node_modules/@qawolf/api-contracts/dist/v1/pagination.js
|
|
8645
|
-
var makePaginationInputFields = (limits) => ({
|
|
8646
|
-
cursor: string2().min(1).optional().describe("Opaque cursor copied from the previous response's nextCursor. Omit to fetch the first page."),
|
|
8647
|
-
limit: number2().int().min(1).max(limits.maxLimit).default(limits.defaultLimit).describe(`Maximum rows per page. Defaults to ${limits.defaultLimit}, capped at ${limits.maxLimit}.`)
|
|
8648
|
-
});
|
|
8649
|
-
var nextCursorSchema = string2().min(1).optional().describe("Repeat the request with this value as cursor to fetch the next page. Absent when there are no further results.");
|
|
8650
|
-
|
|
8651
8860
|
// node_modules/@qawolf/api-contracts/dist/v1/codeHostIntegration/listRepositories.js
|
|
8652
8861
|
var makeListCodeHostRepositoriesContract = (ids) => {
|
|
8653
8862
|
const input = object({
|
|
@@ -8686,11 +8895,12 @@ var makeDeploymentResourceSchema = (ids) => resource({
|
|
|
8686
8895
|
commitSha: string2().optional().describe("The sha of the deployed commit."),
|
|
8687
8896
|
commitUrl: string2().optional().describe("A link to the deployed commit, as declared by the deployment report."),
|
|
8688
8897
|
deployedAt: exports_iso.datetime().describe("When QA Wolf first received the deployment."),
|
|
8689
|
-
deployTarget: string2().optional().describe("
|
|
8898
|
+
deployTarget: string2().optional().describe("The URL the deployment serves. A trigger's deployTargetPattern matches against it."),
|
|
8690
8899
|
environmentId: ids.environment.describe("The QA Wolf environment the deployment reported into."),
|
|
8691
8900
|
environmentName: string2().optional().describe("The environment's name. Absent when the environment has since been deleted."),
|
|
8692
8901
|
id: ids.deployment,
|
|
8693
8902
|
provider: _enum(["github", "gitlab", "api"]).optional().describe("How QA Wolf received the deployment: a GitHub webhook, a GitLab webhook, or the deployment.reportStatus API."),
|
|
8903
|
+
repository: string2().optional().describe('The repository the deployment came from, as "owner/name". Absent when neither the code host nor the deployment report named one.'),
|
|
8694
8904
|
service: string2().optional().describe("Which application was deployed, as the deployer named it. Absent when the deployer named none."),
|
|
8695
8905
|
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.")
|
|
8696
8906
|
}, {
|
|
@@ -8840,7 +9050,7 @@ var makeReportDeploymentStatusContract = (ids) => {
|
|
|
8840
9050
|
error: "Send environment as either { id } or { name }, with optional ephemeral and baseEphemeralEnvironment."
|
|
8841
9051
|
});
|
|
8842
9052
|
const input = strictObject({
|
|
8843
|
-
deployTarget: httpUrl().max(2048).describe("The URL the deployment serves, e.g. a preview URL.").optional(),
|
|
9053
|
+
deployTarget: httpUrl().max(2048).describe("The URL the deployment serves, e.g. a preview URL. A mobile pipeline leaves it unset and reports a service instead.").optional(),
|
|
8844
9054
|
environment: environment.describe("Selects the environment the deployment reports into.").optional(),
|
|
8845
9055
|
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(),
|
|
8846
9056
|
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(),
|
|
@@ -9088,6 +9298,7 @@ var makeSendEmailContract = (ids) => {
|
|
|
9088
9298
|
// node_modules/@qawolf/api-contracts/dist/v1/environment/resource.js
|
|
9089
9299
|
var makeEnvironmentResourceSchema = (ids) => resource({
|
|
9090
9300
|
alias: string2().optional().describe("The environment's alias: a team-unique slug that team API keys can use in place of the id. Terminated environments have none."),
|
|
9301
|
+
baseEnvironmentId: ids.environment.optional().describe("The environment this one promotes its flow changes into, if it has a base."),
|
|
9091
9302
|
flowCodeBranch: discriminatedUnion("syncStatus", [
|
|
9092
9303
|
object({
|
|
9093
9304
|
lastSyncedCommitHash: string2().describe("Hash of the latest reconciled commit."),
|
|
@@ -9101,6 +9312,7 @@ var makeEnvironmentResourceSchema = (ids) => resource({
|
|
|
9101
9312
|
]).optional().describe("The environment's flow code branch and its git reconciliation state, if it has one."),
|
|
9102
9313
|
id: ids.environment,
|
|
9103
9314
|
isDefault: boolean2().describe("Whether this is the workspace's default environment."),
|
|
9315
|
+
isDefaultBase: boolean2().describe("Whether this is the workspace's default base environment."),
|
|
9104
9316
|
kind: _enum(["static", "preview"]).describe("Whether the environment is static or a preview."),
|
|
9105
9317
|
name: string2(),
|
|
9106
9318
|
runConcurrencyLimit: string2().describe('Maximum number of concurrent runs: a whole number, "unlimited", or a concurrency expression.'),
|
|
@@ -9309,6 +9521,58 @@ var makeSetEnvironmentVariableContract = (ids) => {
|
|
|
9309
9521
|
};
|
|
9310
9522
|
};
|
|
9311
9523
|
|
|
9524
|
+
// node_modules/@qawolf/api-contracts/dist/v1/environment/promote.js
|
|
9525
|
+
var makePromoteEnvironmentContract = (ids) => {
|
|
9526
|
+
const input = object({
|
|
9527
|
+
environmentId: ids.environmentRef,
|
|
9528
|
+
workspaceId: workspaceForEnvironmentRef(ids.workspace)
|
|
9529
|
+
});
|
|
9530
|
+
const output = makePromotionResourceSchema(ids);
|
|
9531
|
+
return {
|
|
9532
|
+
annotationJustifications: {
|
|
9533
|
+
destructiveHint: "Merges the environment's flow changes into its base and terminates the environment once they land.",
|
|
9534
|
+
openWorldHint: "Changes QA Wolf flow code branches only, not the customer's own repository or deployments.",
|
|
9535
|
+
readOnlyHint: "Records a promotion request that a background executor carries out."
|
|
9536
|
+
},
|
|
9537
|
+
annotations: {
|
|
9538
|
+
destructiveHint: true,
|
|
9539
|
+
openWorldHint: false,
|
|
9540
|
+
readOnlyHint: false
|
|
9541
|
+
},
|
|
9542
|
+
description: "Declare a preview environment's work accepted, typically when its pull request merges: its flow changes are promoted into its base environment and the environment is terminated once they land. Returns the promotion in pending; poll promotion.get to learn how it settled. Calling again while a promotion is open returns that promotion. A conflict settles the promotion conflicted and cancels the environment's in-progress runs; promotion.get names the conflicting paths. Use environment.terminate instead when the work is abandoned.",
|
|
9543
|
+
input,
|
|
9544
|
+
kind: "write",
|
|
9545
|
+
name: "environment.promote",
|
|
9546
|
+
output
|
|
9547
|
+
};
|
|
9548
|
+
};
|
|
9549
|
+
|
|
9550
|
+
// node_modules/@qawolf/api-contracts/dist/v1/environment/terminate.js
|
|
9551
|
+
var makeTerminateEnvironmentContract = (ids) => {
|
|
9552
|
+
const input = object({
|
|
9553
|
+
environmentId: ids.environmentRef,
|
|
9554
|
+
workspaceId: workspaceForEnvironmentRef(ids.workspace)
|
|
9555
|
+
});
|
|
9556
|
+
const output = makeEnvironmentResourceSchema(ids);
|
|
9557
|
+
return {
|
|
9558
|
+
annotationJustifications: {
|
|
9559
|
+
destructiveHint: "Terminates the environment for good: its runs are canceled and its flow changes are never promoted.",
|
|
9560
|
+
openWorldHint: "Changes QA Wolf environments only, not the customer's own repository or deployments.",
|
|
9561
|
+
readOnlyHint: "Terminates an environment and returns it terminated."
|
|
9562
|
+
},
|
|
9563
|
+
annotations: {
|
|
9564
|
+
destructiveHint: true,
|
|
9565
|
+
openWorldHint: false,
|
|
9566
|
+
readOnlyHint: false
|
|
9567
|
+
},
|
|
9568
|
+
description: "Terminate a preview environment, typically when its pull request closes without merging: its flow changes are not promoted into its base. Returns the environment, now terminated. A terminated environment cannot be terminated again. Use environment.promote instead when the work is accepted.",
|
|
9569
|
+
input,
|
|
9570
|
+
kind: "write",
|
|
9571
|
+
name: "environment.terminate",
|
|
9572
|
+
output
|
|
9573
|
+
};
|
|
9574
|
+
};
|
|
9575
|
+
|
|
9312
9576
|
// node_modules/@qawolf/api-contracts/dist/v1/environment/update.js
|
|
9313
9577
|
var makeUpdateEnvironmentContract = (ids) => {
|
|
9314
9578
|
const nameSchema = string2().trim().min(1).max(255).describe("New display name. Must be unique within the team.");
|
|
@@ -9411,6 +9675,52 @@ var makeAddTagToFlowsContract = (ids) => {
|
|
|
9411
9675
|
};
|
|
9412
9676
|
};
|
|
9413
9677
|
|
|
9678
|
+
// node_modules/@qawolf/api-contracts/dist/v1/flow/getHistory.js
|
|
9679
|
+
var makeGetFlowHistoryContract = (ids) => {
|
|
9680
|
+
const input = object({
|
|
9681
|
+
createdAfter: exports_iso.datetime({ offset: true }).optional().describe("Only include results of runs created strictly after this instant."),
|
|
9682
|
+
createdBefore: exports_iso.datetime({ offset: true }).optional().describe("Only include results of runs created strictly before this instant."),
|
|
9683
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 }),
|
|
9684
|
+
environmentId: ids.environmentRef,
|
|
9685
|
+
flowId: ids.flow.describe("The flow whose results to list. It must belong to the environment's workspace."),
|
|
9686
|
+
workspaceId: workspaceForEnvironmentRef(ids.workspace)
|
|
9687
|
+
});
|
|
9688
|
+
const result = resource({
|
|
9689
|
+
attemptCount: number2().int().nonnegative().describe("How many automated attempts the flow made in this run."),
|
|
9690
|
+
completedAt: exports_iso.datetime().optional().describe("When the flow finished. Absent until it does."),
|
|
9691
|
+
createdAt: exports_iso.datetime(),
|
|
9692
|
+
diagnosis: object({
|
|
9693
|
+
issueId: ids.issue,
|
|
9694
|
+
type: _enum(["bug", "maintenance"])
|
|
9695
|
+
}).optional().describe("QA Wolf's investigation verdict for a failed result: `bug` means the application is broken, `maintenance` means the test needed an update. Absent until the investigation reaches a verdict, and for results that did not fail."),
|
|
9696
|
+
durationMs: number2().int().nonnegative().optional().describe("Milliseconds from the flow's start to its completion. Absent when either is unknown."),
|
|
9697
|
+
passedAfterRetry: boolean2().describe("The flow passed, but only after at least one earlier attempt in the same run. A signal of flakiness."),
|
|
9698
|
+
runId: ids.run.describe("The run this result belongs to."),
|
|
9699
|
+
status: _enum(publicRunStatusValues)
|
|
9700
|
+
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
9701
|
+
const output = object({
|
|
9702
|
+
nextCursor: nextCursorSchema,
|
|
9703
|
+
results: array(result).describe("The flow's results in the environment, newest first.")
|
|
9704
|
+
});
|
|
9705
|
+
return {
|
|
9706
|
+
annotationJustifications: {
|
|
9707
|
+
destructiveHint: "Does not rerun, edit or remove the flow or its runs.",
|
|
9708
|
+
openWorldHint: "Reads recorded QA Wolf results without changing the application under test.",
|
|
9709
|
+
readOnlyHint: "Lists one flow's past results across runs."
|
|
9710
|
+
},
|
|
9711
|
+
annotations: {
|
|
9712
|
+
destructiveHint: false,
|
|
9713
|
+
openWorldHint: false,
|
|
9714
|
+
readOnlyHint: true
|
|
9715
|
+
},
|
|
9716
|
+
description: "List one flow's results across runs in an environment, newest first, with status, attempts, duration, and diagnosis. Use it to spot flakiness, failure streaks, and duration trends.",
|
|
9717
|
+
input,
|
|
9718
|
+
kind: "read",
|
|
9719
|
+
name: "flow.getHistory",
|
|
9720
|
+
output
|
|
9721
|
+
};
|
|
9722
|
+
};
|
|
9723
|
+
|
|
9414
9724
|
// node_modules/@qawolf/api-contracts/dist/v1/flow/readiness.js
|
|
9415
9725
|
var flowReadinessSchema = _enum(["draft", "active"]);
|
|
9416
9726
|
|
|
@@ -9647,6 +9957,7 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
9647
9957
|
type: literal("commit")
|
|
9648
9958
|
}),
|
|
9649
9959
|
object({
|
|
9960
|
+
applyOn: string2().optional().describe(`When the new baseline applies. Known values: "now" (once a person applies the proposal) and "merge" (when the run's pull request merges, because every environment of the workspace shares baselines). Absent means "now". New values can appear.`),
|
|
9650
9961
|
baselineChangeId: string2().optional().describe('The baseline change that made the new screenshot the baseline, on a "fixed" finding. `run restoreScreenshotBaseline` undoes it.'),
|
|
9651
9962
|
comparisonId: string2().describe("The failed screenshot comparison whose new screenshot becomes the baseline, as `run listScreenshotComparisons` names it."),
|
|
9652
9963
|
type: literal("baseline")
|
|
@@ -9658,6 +9969,12 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
9658
9969
|
kind: string2().describe('What the failure is. Known values: "maintenance", "bug", "flake" and "unknown". New values can appear.'),
|
|
9659
9970
|
matchReason: string2().optional(),
|
|
9660
9971
|
priority: issuePrioritySchema.optional(),
|
|
9972
|
+
pullRequest: object({
|
|
9973
|
+
file: string2().optional().describe("The changed file that explains the verdict."),
|
|
9974
|
+
line: number2().int().optional().describe("The line in `file` that explains the verdict."),
|
|
9975
|
+
reason: string2().describe("Why the investigation reached the verdict."),
|
|
9976
|
+
verdict: string2().describe('Whether the pull request caused the failure. Known values: "caused", "not-caused" and "unclear". New values can appear.')
|
|
9977
|
+
}).optional().describe("Whether the pull request the run tested caused this finding. Absent on a run that didn't test a pull request, and when the investigation didn't say."),
|
|
9661
9978
|
question: object({
|
|
9662
9979
|
answers: array(object({
|
|
9663
9980
|
description: string2().optional(),
|
|
@@ -9671,7 +9988,8 @@ var makeInvestigationFindingSchema = (ids) => object({
|
|
|
9671
9988
|
answer: string2().optional(),
|
|
9672
9989
|
at: exports_iso.datetime(),
|
|
9673
9990
|
reason: string2().optional(),
|
|
9674
|
-
|
|
9991
|
+
text: string2().optional().describe("A person's answer in their own words, when they typed one."),
|
|
9992
|
+
type: string2().describe('Known values: "answer", "dispute" and "reply". New values can appear.')
|
|
9675
9993
|
}).optional().describe("A person's answer or dispute that the investigation hasn't acted on yet."),
|
|
9676
9994
|
state: string2().describe(investigationFindingStateDescription),
|
|
9677
9995
|
steps: array(string2()).optional(),
|
|
@@ -9688,7 +10006,7 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
9688
10006
|
findings: array(makeInvestigationFindingSchema(ids)),
|
|
9689
10007
|
runId: ids.run,
|
|
9690
10008
|
sessionId: ids.chatSession.optional().describe("The investigation session. Absent when the run has none."),
|
|
9691
|
-
status: _enum(["investigating", "finished", "not-investigated"]).describe('Whether the lead or any child investigator is still working. "not-investigated" when the run has no investigation.'),
|
|
10009
|
+
status: _enum(["investigating", "finished", "not-investigated", "not-enabled"]).describe('Whether the lead or any child investigator is still working. "not-investigated" when the run has no investigation. ' + '"not-enabled" when automatic investigation does not cover this run, because its workspace has it off or investigates only pull request runs: read its failures with run.get and attempt.get instead.'),
|
|
9692
10010
|
subSessions: array(object({
|
|
9693
10011
|
sessionId: ids.chatSession,
|
|
9694
10012
|
status: agentSessionStatusSchema
|
|
@@ -9705,7 +10023,7 @@ var makeGetInvestigationContract = (ids) => {
|
|
|
9705
10023
|
openWorldHint: false,
|
|
9706
10024
|
readOnlyHint: true
|
|
9707
10025
|
},
|
|
9708
|
-
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.",
|
|
10026
|
+
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. " + 'A run that automatic investigation does not cover answers status "not-enabled".',
|
|
9709
10027
|
input,
|
|
9710
10028
|
kind: "read",
|
|
9711
10029
|
name: "investigation.get",
|
|
@@ -9794,6 +10112,60 @@ var makeCreateIssueContract = (ids) => {
|
|
|
9794
10112
|
};
|
|
9795
10113
|
};
|
|
9796
10114
|
|
|
10115
|
+
// node_modules/@qawolf/api-contracts/dist/v1/issue/listActivity.js
|
|
10116
|
+
var issueActivityTypeSchema = _enum([
|
|
10117
|
+
"created",
|
|
10118
|
+
"status-changed",
|
|
10119
|
+
"priority-changed",
|
|
10120
|
+
"resolved",
|
|
10121
|
+
"auto-resolved",
|
|
10122
|
+
"reopened",
|
|
10123
|
+
"flow-started-reproducing",
|
|
10124
|
+
"flow-stopped-reproducing",
|
|
10125
|
+
"flow-removed",
|
|
10126
|
+
"maintenance-reason-changed",
|
|
10127
|
+
"due-date-changed",
|
|
10128
|
+
"other"
|
|
10129
|
+
]).describe("What happened. resolved is a person resolving the issue, auto-resolved is QA Wolf resolving it once no flow reproduces it. flow-stopped-reproducing means a run of the flow passed. flow-removed means the flow was detached from the issue, deleted, or its environment ended. other covers edits such as the name or description.");
|
|
10130
|
+
var issueActivityActorKindSchema = _enum(["qa-wolf", "user", "api-key"]).optional().describe("Who caused the event: QA Wolf automation, a person, or an API key. Absent on older events.");
|
|
10131
|
+
var makeListIssueActivityContract = (ids) => {
|
|
10132
|
+
const input = object({
|
|
10133
|
+
issueId: ids.issue,
|
|
10134
|
+
...makePaginationInputFields({ defaultLimit: 50, maxLimit: 200 })
|
|
10135
|
+
});
|
|
10136
|
+
const output = object({
|
|
10137
|
+
events: array(object({
|
|
10138
|
+
actorKind: issueActivityActorKindSchema,
|
|
10139
|
+
environmentId: ids.environment.optional(),
|
|
10140
|
+
flowId: ids.flow.optional(),
|
|
10141
|
+
fromPriority: issuePrioritySchema.optional(),
|
|
10142
|
+
occurredAt: exports_iso.datetime(),
|
|
10143
|
+
runId: ids.run.optional().describe("The run whose result caused the event."),
|
|
10144
|
+
toPriority: issuePrioritySchema.optional(),
|
|
10145
|
+
toStatus: issueStatusSchema.optional().describe("The issue status after the event."),
|
|
10146
|
+
type: issueActivityTypeSchema
|
|
10147
|
+
})).describe("The issue's activity, oldest first."),
|
|
10148
|
+
nextCursor: nextCursorSchema
|
|
10149
|
+
});
|
|
10150
|
+
return {
|
|
10151
|
+
annotationJustifications: {
|
|
10152
|
+
destructiveHint: "Does not edit the issue or its activity.",
|
|
10153
|
+
openWorldHint: "Reads QA Wolf issue history without publishing updates to linked trackers.",
|
|
10154
|
+
readOnlyHint: "Lists the recorded activity of one issue."
|
|
10155
|
+
},
|
|
10156
|
+
annotations: {
|
|
10157
|
+
destructiveHint: false,
|
|
10158
|
+
openWorldHint: false,
|
|
10159
|
+
readOnlyHint: true
|
|
10160
|
+
},
|
|
10161
|
+
description: "List an issue's activity, oldest first: creation, status and priority changes, and the flows that started or stopped reproducing it. Use it to measure time to fix or to find issues that came back.",
|
|
10162
|
+
input,
|
|
10163
|
+
kind: "read",
|
|
10164
|
+
name: "issue.listActivity",
|
|
10165
|
+
output
|
|
10166
|
+
};
|
|
10167
|
+
};
|
|
10168
|
+
|
|
9797
10169
|
// node_modules/@qawolf/api-contracts/dist/v1/issue/removeFlows.js
|
|
9798
10170
|
var makeRemoveFlowsFromIssueContract = (ids) => {
|
|
9799
10171
|
const input = object({
|
|
@@ -10020,6 +10392,9 @@ var makeAcceptScreenshotBaselineContract = (ids) => {
|
|
|
10020
10392
|
object({
|
|
10021
10393
|
outcome: literal("not-investigation-session").describe("An API key that is not a person's can change a baseline only as the investigation of the run, and chatSessionId is missing or is not the session that investigates the run. Nothing changed.")
|
|
10022
10394
|
}),
|
|
10395
|
+
object({
|
|
10396
|
+
outcome: literal("waits-for-merge").describe("The investigation proposed this baseline to apply when the run's pull request merges, and it hasn't merged. Nothing changed. QA Wolf applies the approved baseline on merge.")
|
|
10397
|
+
}),
|
|
10023
10398
|
object({
|
|
10024
10399
|
outcome: literal("nothing-to-accept").describe("The comparison did not fail, or has no new screenshot to accept. Nothing changed.")
|
|
10025
10400
|
})
|
|
@@ -10210,88 +10585,6 @@ var makeGetRunContract = (ids) => {
|
|
|
10210
10585
|
};
|
|
10211
10586
|
};
|
|
10212
10587
|
|
|
10213
|
-
// node_modules/@qawolf/api-contracts/dist/v1/run/getAttemptArtifacts.js
|
|
10214
|
-
var makeGetRunAttemptArtifactsContract = (ids) => {
|
|
10215
|
-
const input = object({ attemptId: ids.runAttempt });
|
|
10216
|
-
const attemptStatus = _enum([
|
|
10217
|
-
"passed",
|
|
10218
|
-
"failed",
|
|
10219
|
-
"canceled",
|
|
10220
|
-
"aborted",
|
|
10221
|
-
"skipped"
|
|
10222
|
-
]);
|
|
10223
|
-
const attemptNeighbor = object({
|
|
10224
|
-
attemptId: ids.runAttempt,
|
|
10225
|
-
status: attemptStatus
|
|
10226
|
-
});
|
|
10227
|
-
const response = object({
|
|
10228
|
-
flowId: ids.flow,
|
|
10229
|
-
flowStatus: _enum(publicRunStatusValues),
|
|
10230
|
-
retryContext: object({
|
|
10231
|
-
currentOrdinal: number2().int().min(1),
|
|
10232
|
-
next: attemptNeighbor.optional(),
|
|
10233
|
-
previous: attemptNeighbor.optional(),
|
|
10234
|
-
total: number2().int().min(1)
|
|
10235
|
-
}),
|
|
10236
|
-
runId: ids.run,
|
|
10237
|
-
runStatus: _enum(publicRunSummaryStatusValues)
|
|
10238
|
-
});
|
|
10239
|
-
const attempt = object({
|
|
10240
|
-
attemptId: ids.runAttempt,
|
|
10241
|
-
completedAt: exports_iso.datetime().optional(),
|
|
10242
|
-
createdAt: exports_iso.datetime(),
|
|
10243
|
-
error: string2().optional(),
|
|
10244
|
-
startedAt: exports_iso.datetime().optional()
|
|
10245
|
-
});
|
|
10246
|
-
const output = discriminatedUnion("artifactStatus", [
|
|
10247
|
-
response.extend({
|
|
10248
|
-
artifacts: object({
|
|
10249
|
-
logsUrl: url().optional(),
|
|
10250
|
-
traceUrl: url().optional(),
|
|
10251
|
-
videoUrl: url().optional()
|
|
10252
|
-
}),
|
|
10253
|
-
artifactStatus: literal("signed"),
|
|
10254
|
-
attempt: attempt.extend({
|
|
10255
|
-
kind: literal("automated"),
|
|
10256
|
-
status: attemptStatus
|
|
10257
|
-
})
|
|
10258
|
-
}),
|
|
10259
|
-
response.extend({
|
|
10260
|
-
artifacts: object({}).strict(),
|
|
10261
|
-
artifactStatus: literal("signing-failed"),
|
|
10262
|
-
attempt: attempt.extend({
|
|
10263
|
-
kind: literal("automated"),
|
|
10264
|
-
status: attemptStatus
|
|
10265
|
-
})
|
|
10266
|
-
}),
|
|
10267
|
-
response.extend({
|
|
10268
|
-
artifacts: object({}).strict(),
|
|
10269
|
-
artifactStatus: literal("not-captured"),
|
|
10270
|
-
attempt: attempt.extend({
|
|
10271
|
-
kind: literal("manual"),
|
|
10272
|
-
status: literal("passed")
|
|
10273
|
-
})
|
|
10274
|
-
})
|
|
10275
|
-
]);
|
|
10276
|
-
return {
|
|
10277
|
-
annotationJustifications: {
|
|
10278
|
-
destructiveHint: "Does not retry, cancel or alter the run attempt.",
|
|
10279
|
-
openWorldHint: "Reads recorded QA Wolf artifacts without changing the application under test.",
|
|
10280
|
-
readOnlyHint: "Retrieves a finished attempt's metadata and signed artifact URLs."
|
|
10281
|
-
},
|
|
10282
|
-
annotations: {
|
|
10283
|
-
destructiveHint: false,
|
|
10284
|
-
openWorldHint: false,
|
|
10285
|
-
readOnlyHint: true
|
|
10286
|
-
},
|
|
10287
|
-
description: "Get metadata and signed artifact URLs for one finished run attempt.",
|
|
10288
|
-
input,
|
|
10289
|
-
kind: "read",
|
|
10290
|
-
name: "run.getAttemptArtifacts",
|
|
10291
|
-
output
|
|
10292
|
-
};
|
|
10293
|
-
};
|
|
10294
|
-
|
|
10295
10588
|
// node_modules/@qawolf/api-contracts/dist/v1/run/optOutOfInvestigation.js
|
|
10296
10589
|
var makeOptOutOfInvestigationRunContract = (ids) => {
|
|
10297
10590
|
const input = object({
|
|
@@ -10329,6 +10622,7 @@ var makeReattemptRunContract = (ids) => {
|
|
|
10329
10622
|
});
|
|
10330
10623
|
const output = resource({
|
|
10331
10624
|
reattemptedFlowIds: array(ids.flow).describe("The flows a new attempt was requested for."),
|
|
10625
|
+
reattemptedInRunIds: array(ids.run).describe("The runs the new attempts were added to, which is where to poll " + "for their results. It is this run alone unless a flow had kept " + "failing in later runs, because the attempt then goes to the " + "latest of them."),
|
|
10332
10626
|
runId: ids.run
|
|
10333
10627
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
10334
10628
|
return {
|
|
@@ -10342,7 +10636,7 @@ var makeReattemptRunContract = (ids) => {
|
|
|
10342
10636
|
openWorldHint: true,
|
|
10343
10637
|
readOnlyHint: false
|
|
10344
10638
|
},
|
|
10345
|
-
description: "Request new attempts for a run's flows
|
|
10639
|
+
description: "Request new attempts for a run's flows. " + "A flow is eligible once its result is failed or canceled and QA Wolf's " + "automatic retries have finished. " + "A flow that kept failing in later runs is attempted in the latest of " + "them, because that is the run carrying the failure, so read " + "reattemptedInRunIds for where each attempt landed. " + "A fully investigated run no longer accepts reattempts. " + "Attempts run with the latest flow code. Poll run.get for results.",
|
|
10346
10640
|
input,
|
|
10347
10641
|
kind: "write",
|
|
10348
10642
|
name: "run.reattempt",
|
|
@@ -10762,7 +11056,7 @@ var makeRunFlowOnRunnerContract = (ids) => {
|
|
|
10762
11056
|
const input = object({
|
|
10763
11057
|
entryPointPath: runFilePathSchema.describe("Path of the flow file to run, as it appears in `files`."),
|
|
10764
11058
|
env: runEnvironmentSchema.optional().describe("Environment variables to make available to the run."),
|
|
10765
|
-
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."),
|
|
11059
|
+
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`. Send this or `env`, not both."),
|
|
10766
11060
|
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."),
|
|
10767
11061
|
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. Omitted, the flow whose file is at `entryPointPath` on the named environment's flow-code branch stands in; a file not in QA Wolf yet, or a run given no environment, leaves the run with no `QAWOLF_WORKFLOW_ID`."),
|
|
10768
11062
|
id: runnerIdSchema.describe("Id of the runner to run the flow on."),
|
|
@@ -10888,7 +11182,7 @@ var makeTakeScreenshotOnRunnerContract = (ids) => {
|
|
|
10888
11182
|
openWorldHint: false,
|
|
10889
11183
|
readOnlyHint: false
|
|
10890
11184
|
},
|
|
10891
|
-
description: `Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all; this refreshes the inactivity timer and can extend the runner's billed lifetime. On a mobile runner it is the device's own screen, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. ${screenNeedsARunDescription} ${screenNotReadyDescription} ${runnerHasNoScreenDescription} ${retryableRunnerUnreachableDescription}`,
|
|
11185
|
+
description: `Take one screenshot of an interactive runner's screen. On a runner with a browser the image is the whole virtual desktop, browser window and all; this refreshes the inactivity timer and can extend the runner's billed lifetime. On a mobile runner it is the device's own screen, and on Windows the VM's whole desktop, re-encoded to JPEG on the pod so this contract reads one image format regardless of runner family. ${screenNeedsARunDescription} ${screenNotReadyDescription} ${runnerHasNoScreenDescription} ${retryableRunnerUnreachableDescription}`,
|
|
10892
11186
|
input,
|
|
10893
11187
|
kind: "read",
|
|
10894
11188
|
name: "runner.takeScreenshot",
|
|
@@ -11020,6 +11314,9 @@ var makeContractsV1 = (ids) => {
|
|
|
11020
11314
|
get: makeAgentGetContract(resolvedIds),
|
|
11021
11315
|
send: makeAgentSendContract(resolvedIds)
|
|
11022
11316
|
},
|
|
11317
|
+
attempt: {
|
|
11318
|
+
get: makeGetAttemptContract(resolvedIds)
|
|
11319
|
+
},
|
|
11023
11320
|
codeHostIntegration: {
|
|
11024
11321
|
find: makeFindCodeHostIntegrationsContract(resolvedIds),
|
|
11025
11322
|
listRepositories: makeListCodeHostRepositoriesContract(resolvedIds)
|
|
@@ -11040,12 +11337,15 @@ var makeContractsV1 = (ids) => {
|
|
|
11040
11337
|
get: makeGetEnvironmentContract(resolvedIds),
|
|
11041
11338
|
getVariable: makeGetEnvironmentVariableContract(resolvedIds),
|
|
11042
11339
|
listVariableNames: makeListEnvironmentVariableNamesContract(resolvedIds),
|
|
11340
|
+
promote: makePromoteEnvironmentContract(resolvedIds),
|
|
11043
11341
|
setVariable: makeSetEnvironmentVariableContract(resolvedIds),
|
|
11342
|
+
terminate: makeTerminateEnvironmentContract(resolvedIds),
|
|
11044
11343
|
update: makeUpdateEnvironmentContract(resolvedIds)
|
|
11045
11344
|
},
|
|
11046
11345
|
file: makeFileContracts(resolvedIds),
|
|
11047
11346
|
flow: {
|
|
11048
11347
|
addTag: makeAddTagToFlowsContract(resolvedIds),
|
|
11348
|
+
getHistory: makeGetFlowHistoryContract(resolvedIds),
|
|
11049
11349
|
list: makeListFlowsContract(resolvedIds),
|
|
11050
11350
|
removeTag: makeRemoveTagFromFlowsContract(resolvedIds),
|
|
11051
11351
|
update: makeUpdateFlowContract(resolvedIds)
|
|
@@ -11056,17 +11356,18 @@ var makeContractsV1 = (ids) => {
|
|
|
11056
11356
|
create: makeCreateIssueContract(resolvedIds),
|
|
11057
11357
|
find: makeFindIssuesContract(resolvedIds),
|
|
11058
11358
|
get: makeGetIssueContract(resolvedIds),
|
|
11359
|
+
listActivity: makeListIssueActivityContract(resolvedIds),
|
|
11059
11360
|
removeFlows: makeRemoveFlowsFromIssueContract(resolvedIds),
|
|
11060
11361
|
update: makeUpdateIssueContract(resolvedIds)
|
|
11061
11362
|
},
|
|
11062
11363
|
legacyTrigger: makeLegacyTriggerContracts(resolvedIds),
|
|
11364
|
+
promotion: makePromotionContracts(resolvedIds),
|
|
11063
11365
|
run: {
|
|
11064
11366
|
acceptScreenshotBaseline: makeAcceptScreenshotBaselineContract(resolvedIds),
|
|
11065
11367
|
create: makeCreateRunContract(resolvedIds),
|
|
11066
11368
|
diagnose: makeDiagnoseRunContract(resolvedIds),
|
|
11067
11369
|
find: makeFindRunsContract(resolvedIds),
|
|
11068
11370
|
get: makeGetRunContract(resolvedIds),
|
|
11069
|
-
getAttemptArtifacts: makeGetRunAttemptArtifactsContract(resolvedIds),
|
|
11070
11371
|
listScreenshotComparisons: makeListScreenshotComparisonsContract(resolvedIds),
|
|
11071
11372
|
optOutOfInvestigation: makeOptOutOfInvestigationRunContract(resolvedIds),
|
|
11072
11373
|
reattempt: makeReattemptRunContract(resolvedIds),
|
|
@@ -13030,6 +13331,20 @@ function makeDefaultFs() {
|
|
|
13030
13331
|
await fs2.promises.writeFile(path, data, options ?? undefined);
|
|
13031
13332
|
}
|
|
13032
13333
|
},
|
|
13334
|
+
async writeFileExclusive(path, data, options) {
|
|
13335
|
+
try {
|
|
13336
|
+
await fs2.promises.writeFile(path, data, {
|
|
13337
|
+
encoding: typeof data === "string" ? "utf8" : undefined,
|
|
13338
|
+
flag: "wx",
|
|
13339
|
+
mode: options?.mode
|
|
13340
|
+
});
|
|
13341
|
+
return true;
|
|
13342
|
+
} catch (error) {
|
|
13343
|
+
if (errorCode(error) === "EEXIST")
|
|
13344
|
+
return false;
|
|
13345
|
+
throw error;
|
|
13346
|
+
}
|
|
13347
|
+
},
|
|
13033
13348
|
openWriteHandle: openFsWriteHandle,
|
|
13034
13349
|
readdir(path) {
|
|
13035
13350
|
return fs2.promises.readdir(path);
|
|
@@ -15705,4 +16020,4 @@ export {
|
|
|
15705
16020
|
createRunnerSdk
|
|
15706
16021
|
};
|
|
15707
16022
|
|
|
15708
|
-
//# debugId=
|
|
16023
|
+
//# debugId=A94DB3C7942B00FA64756E2164756E21
|