@qawolf/cli 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +37 -11
- package/dist/runner-sdk.js +9 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -342212,6 +342212,7 @@ var identityResponse = exports_external.union([
|
|
|
342212
342212
|
var defaultIdSchemas = {
|
|
342213
342213
|
aiTask: exports_external.string().min(1).describe("The id of the AI task."),
|
|
342214
342214
|
automation: exports_external.string().min(1).describe("The id of the automation."),
|
|
342215
|
+
chatSession: exports_external.string().min(1).describe("The id of the chat session."),
|
|
342215
342216
|
environment: exports_external.string().min(1).describe("The id of the environment."),
|
|
342216
342217
|
environmentRef: exports_external.string().min(1).describe("The id or alias of the environment. Aliases require a team API key."),
|
|
342217
342218
|
flow: exports_external.string().min(1).describe("The id of the flow."),
|
|
@@ -342240,19 +342241,24 @@ var makeFlowSelectionSchema = (ids) => exports_external.object({
|
|
|
342240
342241
|
var makeCreateRunContract = (ids) => {
|
|
342241
342242
|
const input = exports_external.object({
|
|
342242
342243
|
aiTaskId: ids.aiTask.describe("The AI task whose conversation should receive run status updates.").optional(),
|
|
342244
|
+
chatSessionId: ids.chatSession.describe("The chat session whose transcript should receive run status updates.").optional(),
|
|
342243
342245
|
environmentId: ids.environmentRef,
|
|
342244
342246
|
environmentVariables: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
342245
342247
|
ignoreRules: exports_external.boolean().describe("Ignore this team's sequencing rules for this run. By default they are honoured: the flows your selection depends on are added to the run, and flows run in the order the rules require. Set this to run exactly what you selected, in any order.").default(false),
|
|
342246
342248
|
pullRequestNumber: exports_external.number().int().positive().describe("The number of the pull request to associate with the run.").optional(),
|
|
342247
342249
|
repository: exports_external.string().min(1).describe('The owner/name of the repository, e.g. "acme/web".').optional()
|
|
342248
|
-
}).and(makeFlowSelectionSchema(ids))
|
|
342250
|
+
}).and(makeFlowSelectionSchema(ids)).refine((value) => !(value.aiTaskId && value.chatSessionId), {
|
|
342251
|
+
message: "Provide at most one of aiTaskId and chatSessionId: a task already implies its own chat session.",
|
|
342252
|
+
path: ["chatSessionId"]
|
|
342253
|
+
});
|
|
342249
342254
|
const output = resource({
|
|
342250
342255
|
excludedFlows: exports_external.array(exports_external.object({
|
|
342251
342256
|
flowId: ids.flow,
|
|
342252
342257
|
name: exports_external.string().describe("The name of the flow."),
|
|
342253
342258
|
reason: exports_external.enum(["deleted", "not-on-branch"]).describe('Why the flow cannot run: "deleted" means the flow was deleted, "not-on-branch" means the flow has no file at the commit the run was created from.')
|
|
342254
342259
|
})).describe("Explicitly requested flows that were left out of the run, each with the reason. Flows selected through tags are not reported here."),
|
|
342255
|
-
runId: ids.run
|
|
342260
|
+
runId: ids.run,
|
|
342261
|
+
tracking: exports_external.enum(["registered", "failed", "not-requested"]).describe('Whether the conversation named by aiTaskId or chatSessionId will receive run status updates: "registered" when it will, "failed" when the run was created but the registration failed, "not-requested" when neither id was given or the AI task has no conversation to notify.')
|
|
342256
342262
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
342257
342263
|
return {
|
|
342258
342264
|
description: "Create a run for the selected flows and/or tags in an environment.",
|
|
@@ -346164,7 +346170,7 @@ function startUpdateCheck(deps) {
|
|
|
346164
346170
|
// package.json
|
|
346165
346171
|
var package_default = {
|
|
346166
346172
|
name: "@qawolf/cli",
|
|
346167
|
-
version: "1.
|
|
346173
|
+
version: "1.22.0",
|
|
346168
346174
|
description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
|
|
346169
346175
|
keywords: [
|
|
346170
346176
|
"automation",
|
|
@@ -346235,7 +346241,7 @@ var package_default = {
|
|
|
346235
346241
|
"@clack/prompts": "1.5.1",
|
|
346236
346242
|
"@napi-rs/keyring": "1.3.0",
|
|
346237
346243
|
"@oxc-node/core": "0.1.0",
|
|
346238
|
-
"@qawolf/api-contracts": "0.
|
|
346244
|
+
"@qawolf/api-contracts": "0.38.0",
|
|
346239
346245
|
"@qawolf/emails": "1.1.1",
|
|
346240
346246
|
"@qawolf/flow-targets": "1.0.0",
|
|
346241
346247
|
"@qawolf/flows": "0.1.4",
|
|
@@ -357341,18 +357347,38 @@ var skippedContractNames = new Set([
|
|
|
357341
357347
|
"runner.terminate"
|
|
357342
357348
|
]);
|
|
357343
357349
|
|
|
357344
|
-
// src/commands/publicApi/
|
|
357345
|
-
var groupDescriptions = {
|
|
357346
|
-
run: "Trigger and manage QA Wolf runs on the platform"
|
|
357347
|
-
};
|
|
357350
|
+
// src/commands/publicApi/environmentOptions.ts
|
|
357348
357351
|
var optionEnvironmentVariables = new Map([
|
|
357349
357352
|
["environmentId", "QAWOLF_ENVIRONMENT"],
|
|
357350
|
-
["public.run.create.aiTaskId", "QAWOLF_AI_TASK_ID"]
|
|
357353
|
+
["public.run.create.aiTaskId", "QAWOLF_AI_TASK_ID"],
|
|
357354
|
+
["public.run.create.chatSessionId", "QAWOLF_CHAT_SESSION_ID"]
|
|
357351
357355
|
]);
|
|
357352
357356
|
function optionEnvironmentVariable(spec, path9) {
|
|
357353
357357
|
const dotted = path9.join(".");
|
|
357354
357358
|
return optionEnvironmentVariables.get(`${spec.trpcPath}.${dotted}`) ?? optionEnvironmentVariables.get(dotted);
|
|
357355
357359
|
}
|
|
357360
|
+
var exclusiveOptions = new Map([
|
|
357361
|
+
["public.run.create", { keep: "aiTaskId", drop: "chatSessionId" }]
|
|
357362
|
+
]);
|
|
357363
|
+
function withoutExclusiveConflict(spec, command, options) {
|
|
357364
|
+
const pair = exclusiveOptions.get(spec.trpcPath);
|
|
357365
|
+
if (!pair)
|
|
357366
|
+
return options;
|
|
357367
|
+
if (options[pair.keep] === undefined || options[pair.drop] === undefined) {
|
|
357368
|
+
return options;
|
|
357369
|
+
}
|
|
357370
|
+
const fromEnvironment = (key) => command.getOptionValueSource(key) === "env";
|
|
357371
|
+
if (!fromEnvironment(pair.keep) && !fromEnvironment(pair.drop)) {
|
|
357372
|
+
return options;
|
|
357373
|
+
}
|
|
357374
|
+
const dropped = fromEnvironment(pair.drop) ? pair.drop : pair.keep;
|
|
357375
|
+
return Object.fromEntries(Object.entries(options).filter(([key]) => key !== dropped));
|
|
357376
|
+
}
|
|
357377
|
+
|
|
357378
|
+
// src/commands/publicApi/index.ts
|
|
357379
|
+
var groupDescriptions = {
|
|
357380
|
+
run: "Trigger and manage QA Wolf runs on the platform"
|
|
357381
|
+
};
|
|
357356
357382
|
function resolveGroup(parent2, segment) {
|
|
357357
357383
|
const existing = parent2.commands.find((command) => command.name() === segment);
|
|
357358
357384
|
return existing ?? parent2.command(segment).description(groupDescriptions[segment] ?? `QA Wolf public API ${segment} commands`);
|
|
@@ -357381,7 +357407,7 @@ function registerSpec(program2, signals, spec, authDeps) {
|
|
|
357381
357407
|
command.option(flag.flag, flag.description);
|
|
357382
357408
|
}
|
|
357383
357409
|
}
|
|
357384
|
-
command.action((options, leaf) => withAuthContext(signals, (ctx) => handlePublicApiCommand(ctx, spec, options), authDeps ?? {})(options, leaf));
|
|
357410
|
+
command.action((options, leaf) => withAuthContext(signals, (ctx) => handlePublicApiCommand(ctx, spec, withoutExclusiveConflict(spec, leaf, options)), authDeps ?? {})(options, leaf));
|
|
357385
357411
|
}
|
|
357386
357412
|
function registerPublicApiCommands(program2, signals, options = {}) {
|
|
357387
357413
|
const specs = buildCommandSpecs(options.contracts ?? publicContractsV1, {
|
|
@@ -359747,4 +359773,4 @@ createProgram({ signals }).parseAsync().catch(() => {
|
|
|
359747
359773
|
process.exitCode = 1;
|
|
359748
359774
|
}).finally(() => flushAndExit(typeof process.exitCode === "number" ? process.exitCode : 0));
|
|
359749
359775
|
|
|
359750
|
-
//# debugId=
|
|
359776
|
+
//# debugId=B89704129DAB2F9C64756E2164756E21
|
package/dist/runner-sdk.js
CHANGED
|
@@ -185479,6 +185479,7 @@ var identityResponse = exports_external.union([
|
|
|
185479
185479
|
var defaultIdSchemas = {
|
|
185480
185480
|
aiTask: exports_external.string().min(1).describe("The id of the AI task."),
|
|
185481
185481
|
automation: exports_external.string().min(1).describe("The id of the automation."),
|
|
185482
|
+
chatSession: exports_external.string().min(1).describe("The id of the chat session."),
|
|
185482
185483
|
environment: exports_external.string().min(1).describe("The id of the environment."),
|
|
185483
185484
|
environmentRef: exports_external.string().min(1).describe("The id or alias of the environment. Aliases require a team API key."),
|
|
185484
185485
|
flow: exports_external.string().min(1).describe("The id of the flow."),
|
|
@@ -185507,19 +185508,24 @@ var makeFlowSelectionSchema = (ids) => exports_external.object({
|
|
|
185507
185508
|
var makeCreateRunContract = (ids) => {
|
|
185508
185509
|
const input = exports_external.object({
|
|
185509
185510
|
aiTaskId: ids.aiTask.describe("The AI task whose conversation should receive run status updates.").optional(),
|
|
185511
|
+
chatSessionId: ids.chatSession.describe("The chat session whose transcript should receive run status updates.").optional(),
|
|
185510
185512
|
environmentId: ids.environmentRef,
|
|
185511
185513
|
environmentVariables: exports_external.record(exports_external.string(), exports_external.string()).optional(),
|
|
185512
185514
|
ignoreRules: exports_external.boolean().describe("Ignore this team's sequencing rules for this run. By default they are honoured: the flows your selection depends on are added to the run, and flows run in the order the rules require. Set this to run exactly what you selected, in any order.").default(false),
|
|
185513
185515
|
pullRequestNumber: exports_external.number().int().positive().describe("The number of the pull request to associate with the run.").optional(),
|
|
185514
185516
|
repository: exports_external.string().min(1).describe('The owner/name of the repository, e.g. "acme/web".').optional()
|
|
185515
|
-
}).and(makeFlowSelectionSchema(ids))
|
|
185517
|
+
}).and(makeFlowSelectionSchema(ids)).refine((value) => !(value.aiTaskId && value.chatSessionId), {
|
|
185518
|
+
message: "Provide at most one of aiTaskId and chatSessionId: a task already implies its own chat session.",
|
|
185519
|
+
path: ["chatSessionId"]
|
|
185520
|
+
});
|
|
185516
185521
|
const output = resource({
|
|
185517
185522
|
excludedFlows: exports_external.array(exports_external.object({
|
|
185518
185523
|
flowId: ids.flow,
|
|
185519
185524
|
name: exports_external.string().describe("The name of the flow."),
|
|
185520
185525
|
reason: exports_external.enum(["deleted", "not-on-branch"]).describe('Why the flow cannot run: "deleted" means the flow was deleted, "not-on-branch" means the flow has no file at the commit the run was created from.')
|
|
185521
185526
|
})).describe("Explicitly requested flows that were left out of the run, each with the reason. Flows selected through tags are not reported here."),
|
|
185522
|
-
runId: ids.run
|
|
185527
|
+
runId: ids.run,
|
|
185528
|
+
tracking: exports_external.enum(["registered", "failed", "not-requested"]).describe('Whether the conversation named by aiTaskId or chatSessionId will receive run status updates: "registered" when it will, "failed" when the run was created but the registration failed, "not-requested" when neither id was given or the AI task has no conversation to notify.')
|
|
185523
185529
|
}, { urlFieldDescription: "Absolute URL of the run page." });
|
|
185524
185530
|
return {
|
|
185525
185531
|
description: "Create a run for the selected flows and/or tags in an environment.",
|
|
@@ -191010,4 +191016,4 @@ export {
|
|
|
191010
191016
|
createRunnerSdk
|
|
191011
191017
|
};
|
|
191012
191018
|
|
|
191013
|
-
//# debugId=
|
|
191019
|
+
//# debugId=D0CE776D921E47A364756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qawolf/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@clack/prompts": "1.5.1",
|
|
72
72
|
"@napi-rs/keyring": "1.3.0",
|
|
73
73
|
"@oxc-node/core": "0.1.0",
|
|
74
|
-
"@qawolf/api-contracts": "0.
|
|
74
|
+
"@qawolf/api-contracts": "0.38.0",
|
|
75
75
|
"@qawolf/emails": "1.1.1",
|
|
76
76
|
"@qawolf/flow-targets": "1.0.0",
|
|
77
77
|
"@qawolf/flows": "0.1.4",
|