@qawolf/api-contracts 0.39.0 → 0.40.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.
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeAgentGetContract: <ChatSessionId extends PublicIdSchema, WorkspaceId extends PublicIdSchema>(ids: {
4
+ chatSession: ChatSessionId;
5
+ workspace: WorkspaceId;
6
+ }) => {
7
+ readonly description: "Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.";
8
+ readonly input: z.ZodObject<{
9
+ sessionId: ChatSessionId;
10
+ }, z.core.$strip>;
11
+ readonly kind: "read";
12
+ readonly name: "agent.get";
13
+ readonly output: z.ZodObject<{
14
+ replies: z.ZodArray<z.ZodObject<{
15
+ askedAt: z.ZodISODateTime;
16
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
17
+ text: z.ZodString;
18
+ }, z.core.$strip>>;
19
+ sessionId: ChatSessionId;
20
+ status: z.ZodEnum<{
21
+ working: "working";
22
+ "waiting-for-you": "waiting-for-you";
23
+ completed: "completed";
24
+ failed: "failed";
25
+ cancelled: "cancelled";
26
+ }>;
27
+ url: z.ZodURL;
28
+ }, z.core.$strip>;
29
+ };
30
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,oBAAoB,GAC/B,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;CA8BA,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ import { resource } from "../resource.js";
3
+ import { agentReplySchema, agentSessionStatusSchema } from "./status.js";
4
+ export const makeAgentGetContract = (ids) => {
5
+ const input = z.object({
6
+ sessionId: ids.chatSession.describe("The id agent.send answered with."),
7
+ });
8
+ const output = resource({
9
+ replies: z
10
+ .array(agentReplySchema)
11
+ .describe("Everything the AI has said so far, oldest first. A reply carrying choices is a question the work is blocked on."),
12
+ sessionId: ids.chatSession,
13
+ status: agentSessionStatusSchema,
14
+ }, { urlFieldDescription: "Absolute URL of the session in the QA Wolf app." });
15
+ return {
16
+ description: 'Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of "waiting-for-you" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.',
17
+ input,
18
+ kind: "read",
19
+ name: "agent.get",
20
+ output,
21
+ };
22
+ };
23
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/v1/agent/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAGlC,GAGD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KACxE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,gBAAgB,CAAC;aACvB,QAAQ,CACP,iHAAiH,CAClH;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;QAC1B,MAAM,EAAE,wBAAwB;KACjC,EACD,EAAE,mBAAmB,EAAE,iDAAiD,EAAE,CAC3E,CAAC;IAEF,OAAO;QACL,WAAW,EACT,2VAA2V;QAC7V,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeAgentSendContract: <ChatSessionId extends PublicIdSchema, WorkspaceId extends PublicIdSchema>(ids: {
4
+ chatSession: ChatSessionId;
5
+ environmentRef: PublicIdSchema;
6
+ workspace: WorkspaceId;
7
+ }) => {
8
+ readonly description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.";
9
+ readonly input: z.ZodObject<{
10
+ environmentId: z.ZodOptional<PublicIdSchema>;
11
+ message: z.ZodString;
12
+ sessionId: z.ZodOptional<ChatSessionId>;
13
+ workspaceId: z.ZodOptional<WorkspaceId>;
14
+ }, z.core.$strip>;
15
+ readonly kind: "write";
16
+ readonly name: "agent.send";
17
+ readonly output: z.ZodObject<{
18
+ sessionId: ChatSessionId;
19
+ status: z.ZodEnum<{
20
+ working: "working";
21
+ "waiting-for-you": "waiting-for-you";
22
+ completed: "completed";
23
+ failed: "failed";
24
+ cancelled: "cancelled";
25
+ }>;
26
+ url: z.ZodURL;
27
+ }, z.core.$strip>;
28
+ };
29
+ //# sourceMappingURL=send.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,qBAAqB,GAChC,aAAa,SAAS,cAAc,EACpC,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;CAiDA,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { z } from "zod";
2
+ import { resource } from "../resource.js";
3
+ import { agentSessionStatusSchema } from "./status.js";
4
+ export const makeAgentSendContract = (ids) => {
5
+ const input = z.object({
6
+ environmentId: ids.environmentRef
7
+ .optional()
8
+ .describe("The environment to work in. Omit to use the team's default environment. Ignored when sessionId is given, because a session keeps the environment it opened in."),
9
+ message: z
10
+ .string()
11
+ .trim()
12
+ .min(1)
13
+ .max(10_000)
14
+ .describe("What you want QA Wolf to do, in plain language. Name the journey, the part of the app it covers, and anything the AI cannot discover for itself, such as a test account, a feature flag, or how to reach a staging environment. When answering a question from agent.get, send the answer here."),
15
+ sessionId: ids.chatSession
16
+ .optional()
17
+ .describe("Continue the session with this id instead of opening a new one. Omit to start fresh. Send this to answer a question or to add context to work already running."),
18
+ workspaceId: ids.workspace
19
+ .optional()
20
+ .describe("The workspace to work in. Required when authenticating with an organization or user API key."),
21
+ });
22
+ const output = resource({
23
+ sessionId: ids.chatSession.describe("Follow the work by passing this to agent.get."),
24
+ status: agentSessionStatusSchema,
25
+ }, { urlFieldDescription: "Absolute URL of the session in the QA Wolf app." });
26
+ return {
27
+ description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.",
28
+ input,
29
+ kind: "write",
30
+ name: "agent.send",
31
+ output,
32
+ };
33
+ };
34
+ //# sourceMappingURL=send.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/v1/agent/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAGnC,GAID,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,aAAa,EAAE,GAAG,CAAC,cAAc;aAC9B,QAAQ,EAAE;aACV,QAAQ,CACP,gKAAgK,CACjK;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,MAAM,CAAC;aACX,QAAQ,CACP,iSAAiS,CAClS;QACH,SAAS,EAAE,GAAG,CAAC,WAAW;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,gKAAgK,CACjK;QACH,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,8FAA8F,CAC/F;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,QAAQ,CACrB;QACE,SAAS,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CACjC,+CAA+C,CAChD;QACD,MAAM,EAAE,wBAAwB;KACjC,EACD,EAAE,mBAAmB,EAAE,iDAAiD,EAAE,CAC3E,CAAC;IAEF,OAAO;QACL,WAAW,EACT,yfAAyf;QAC3f,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,YAAY;QAClB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ export declare const agentSessionStatuses: readonly ["working", "waiting-for-you", "completed", "failed", "cancelled"];
3
+ export declare const agentSessionStatusSchema: z.ZodEnum<{
4
+ working: "working";
5
+ "waiting-for-you": "waiting-for-you";
6
+ completed: "completed";
7
+ failed: "failed";
8
+ cancelled: "cancelled";
9
+ }>;
10
+ export declare const agentReplySchema: z.ZodObject<{
11
+ askedAt: z.ZodISODateTime;
12
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ text: z.ZodString;
14
+ }, z.core.$strip>;
15
+ export type AgentSessionStatus = z.infer<typeof agentSessionStatusSchema>;
16
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/v1/agent/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,6EAMvB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;;;EAIlC,CAAC;AAEJ,eAAO,MAAM,gBAAgB;;;;iBAW3B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ export const agentSessionStatuses = [
3
+ "working",
4
+ "waiting-for-you",
5
+ "completed",
6
+ "failed",
7
+ "cancelled",
8
+ ];
9
+ export const agentSessionStatusSchema = z
10
+ .enum(agentSessionStatuses)
11
+ .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.');
12
+ export const agentReplySchema = z.object({
13
+ askedAt: z.iso
14
+ .datetime()
15
+ .describe("When the AI wrote this, as an ISO 8601 timestamp."),
16
+ choices: z
17
+ .array(z.string())
18
+ .optional()
19
+ .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."),
20
+ text: z.string().describe("What the AI said."),
21
+ });
22
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/v1/agent/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,iBAAiB;IACjB,WAAW;IACX,QAAQ;IACR,WAAW;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,IAAI,CAAC,oBAAoB,CAAC;KAC1B,QAAQ,CACP,mOAAmO,CACpO,CAAC;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,GAAG;SACX,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;IAChE,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CACP,4IAA4I,CAC7I;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CAC/C,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { z } from "zod";
2
+ export { type AgentSessionStatus, agentSessionStatusSchema, } from "./agent/status.js";
2
3
  export { type AuthConfigResponse, authConfigResponse } from "./auth/config.js";
3
4
  export type { AnyPublicApiContract, PublicApiContract, PublicApiContractKind, } from "./definition.js";
4
5
  export { type IdentityResponse, identityResponse } from "./identity/index.js";
@@ -18,6 +19,54 @@ export type PublicApiOutput<Api extends AnyPublicApiContract> = z.infer<Api["out
18
19
  * never drift between the two while validation strictness stays server-owned.
19
20
  */
20
21
  export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, AutomationId extends PublicIdSchema = PublicIdSchema, IssueId extends PublicIdSchema = PublicIdSchema, WorkspaceId extends PublicIdSchema = PublicIdSchema, AiTaskId extends PublicIdSchema = PublicIdSchema, ChatSessionId extends PublicIdSchema = PublicIdSchema>(ids: PublicIdSchemasOf<EnvironmentId, FlowId, RunId, AutomationId, IssueId, WorkspaceId, AiTaskId, ChatSessionId>) => {
22
+ agent: {
23
+ get: {
24
+ readonly description: "Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.";
25
+ readonly input: z.ZodObject<{
26
+ sessionId: ChatSessionId;
27
+ }, z.core.$strip>;
28
+ readonly kind: "read";
29
+ readonly name: "agent.get";
30
+ readonly output: z.ZodObject<{
31
+ replies: z.ZodArray<z.ZodObject<{
32
+ askedAt: z.ZodISODateTime;
33
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ text: z.ZodString;
35
+ }, z.core.$strip>>;
36
+ sessionId: ChatSessionId;
37
+ status: z.ZodEnum<{
38
+ working: "working";
39
+ "waiting-for-you": "waiting-for-you";
40
+ completed: "completed";
41
+ failed: "failed";
42
+ cancelled: "cancelled";
43
+ }>;
44
+ url: z.ZodURL;
45
+ }, z.core.$strip>;
46
+ };
47
+ send: {
48
+ readonly description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.";
49
+ readonly input: z.ZodObject<{
50
+ environmentId: z.ZodOptional<PublicIdSchema>;
51
+ message: z.ZodString;
52
+ sessionId: z.ZodOptional<ChatSessionId>;
53
+ workspaceId: z.ZodOptional<WorkspaceId>;
54
+ }, z.core.$strip>;
55
+ readonly kind: "write";
56
+ readonly name: "agent.send";
57
+ readonly output: z.ZodObject<{
58
+ sessionId: ChatSessionId;
59
+ status: z.ZodEnum<{
60
+ working: "working";
61
+ "waiting-for-you": "waiting-for-you";
62
+ completed: "completed";
63
+ failed: "failed";
64
+ cancelled: "cancelled";
65
+ }>;
66
+ url: z.ZodURL;
67
+ }, z.core.$strip>;
68
+ };
69
+ };
21
70
  automate: {
22
71
  readonly description: "Request automation for draft flows. First create a named local .flow.ts draft for every requested journey that does not already have a matching draft; never reuse a generic starter or placeholder. Each new draft must start with a JSDoc Goal: description, import flow from @qawolf/flows/web, and use export default flow(...); a comment-only file or direct test(...) call is not a valid draft. Commit and push all changes with Git to publish them, then list remote drafts to resolve every selected ID. Do not use patch to create or rename a selected flow. Finally make one automation request containing all requested flow IDs.";
23
72
  readonly input: z.ZodObject<{
@@ -621,13 +670,61 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
621
670
  }, z.core.$strip>>;
622
671
  runId: RunId;
623
672
  tracking: z.ZodEnum<{
624
- registered: "registered";
625
673
  failed: "failed";
674
+ registered: "registered";
626
675
  "not-requested": "not-requested";
627
676
  }>;
628
677
  url: z.ZodURL;
629
678
  }, z.core.$strip>;
630
679
  };
680
+ diagnose: {
681
+ readonly description: string;
682
+ readonly input: z.ZodObject<{
683
+ flowIds: z.ZodArray<FlowId>;
684
+ issueId: IssueId;
685
+ runId: RunId;
686
+ }, z.core.$strip>;
687
+ readonly kind: "write";
688
+ readonly name: "run.diagnose";
689
+ readonly output: z.ZodObject<{
690
+ issue: z.ZodObject<{
691
+ coveredFlowIds: z.ZodArray<FlowId>;
692
+ createdAt: z.ZodCoercedDate<unknown>;
693
+ description: z.ZodString;
694
+ issueId: IssueId;
695
+ name: z.ZodString;
696
+ number: z.ZodNumber;
697
+ priority: z.ZodEnum<{
698
+ unprioritized: "unprioritized";
699
+ low: "low";
700
+ medium: "medium";
701
+ high: "high";
702
+ urgent: "urgent";
703
+ }>;
704
+ reproductions: z.ZodArray<z.ZodObject<{
705
+ environmentId: EnvironmentId;
706
+ firstReproducedInRunId: RunId;
707
+ flowId: FlowId;
708
+ isActive: z.ZodBoolean;
709
+ lastReproducedInRunId: RunId;
710
+ }, z.core.$strip>>;
711
+ status: z.ZodEnum<{
712
+ pending: "pending";
713
+ inProgress: "inProgress";
714
+ paused: "paused";
715
+ resolved: "resolved";
716
+ canceled: "canceled";
717
+ archived: "archived";
718
+ }>;
719
+ type: z.ZodEnum<{
720
+ bug: "bug";
721
+ coverageRequest: "coverageRequest";
722
+ maintenance: "maintenance";
723
+ }>;
724
+ url: z.ZodURL;
725
+ }, z.core.$strip>;
726
+ }, z.core.$strip>;
727
+ };
631
728
  find: {
632
729
  readonly description: "List an environment's recent runs, newest first.";
633
730
  readonly input: z.ZodObject<{
@@ -1373,6 +1470,54 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
1373
1470
  };
1374
1471
  };
1375
1472
  export declare const publicContractsV1: {
1473
+ agent: {
1474
+ get: {
1475
+ readonly description: "Read what the QA Wolf AI has said and whether it is still working. Poll this after agent.send until the status settles. A status of \"waiting-for-you\" means the last reply is a question the work is blocked on, and answering it with agent.send is what unblocks it. Replies accumulate, so a caller that polls repeatedly sees the earlier ones again.";
1476
+ readonly input: z.ZodObject<{
1477
+ sessionId: PublicIdSchema;
1478
+ }, z.core.$strip>;
1479
+ readonly kind: "read";
1480
+ readonly name: "agent.get";
1481
+ readonly output: z.ZodObject<{
1482
+ replies: z.ZodArray<z.ZodObject<{
1483
+ askedAt: z.ZodISODateTime;
1484
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
1485
+ text: z.ZodString;
1486
+ }, z.core.$strip>>;
1487
+ sessionId: PublicIdSchema;
1488
+ status: z.ZodEnum<{
1489
+ working: "working";
1490
+ "waiting-for-you": "waiting-for-you";
1491
+ completed: "completed";
1492
+ failed: "failed";
1493
+ cancelled: "cancelled";
1494
+ }>;
1495
+ url: z.ZodURL;
1496
+ }, z.core.$strip>;
1497
+ };
1498
+ send: {
1499
+ readonly description: "Ask the QA Wolf AI to do a piece of work in plain language, such as covering a user journey, investigating a failing run, or fixing a broken flow. This is the one verb that starts work from nothing: every other write acts on a flow, run or issue that already exists. Answers as soon as the request is accepted, with the id to follow it by, because the work runs for minutes to tens of minutes. Poll agent.get for progress, and send here again to answer a question or add context to work already running.";
1500
+ readonly input: z.ZodObject<{
1501
+ environmentId: z.ZodOptional<PublicIdSchema>;
1502
+ message: z.ZodString;
1503
+ sessionId: z.ZodOptional<PublicIdSchema>;
1504
+ workspaceId: z.ZodOptional<PublicIdSchema>;
1505
+ }, z.core.$strip>;
1506
+ readonly kind: "write";
1507
+ readonly name: "agent.send";
1508
+ readonly output: z.ZodObject<{
1509
+ sessionId: PublicIdSchema;
1510
+ status: z.ZodEnum<{
1511
+ working: "working";
1512
+ "waiting-for-you": "waiting-for-you";
1513
+ completed: "completed";
1514
+ failed: "failed";
1515
+ cancelled: "cancelled";
1516
+ }>;
1517
+ url: z.ZodURL;
1518
+ }, z.core.$strip>;
1519
+ };
1520
+ };
1376
1521
  automate: {
1377
1522
  readonly description: "Request automation for draft flows. First create a named local .flow.ts draft for every requested journey that does not already have a matching draft; never reuse a generic starter or placeholder. Each new draft must start with a JSDoc Goal: description, import flow from @qawolf/flows/web, and use export default flow(...); a comment-only file or direct test(...) call is not a valid draft. Commit and push all changes with Git to publish them, then list remote drafts to resolve every selected ID. Do not use patch to create or rename a selected flow. Finally make one automation request containing all requested flow IDs.";
1378
1523
  readonly input: z.ZodObject<{
@@ -1976,13 +2121,61 @@ export declare const publicContractsV1: {
1976
2121
  }, z.core.$strip>>;
1977
2122
  runId: PublicIdSchema;
1978
2123
  tracking: z.ZodEnum<{
1979
- registered: "registered";
1980
2124
  failed: "failed";
2125
+ registered: "registered";
1981
2126
  "not-requested": "not-requested";
1982
2127
  }>;
1983
2128
  url: z.ZodURL;
1984
2129
  }, z.core.$strip>;
1985
2130
  };
2131
+ diagnose: {
2132
+ readonly description: string;
2133
+ readonly input: z.ZodObject<{
2134
+ flowIds: z.ZodArray<PublicIdSchema>;
2135
+ issueId: PublicIdSchema;
2136
+ runId: PublicIdSchema;
2137
+ }, z.core.$strip>;
2138
+ readonly kind: "write";
2139
+ readonly name: "run.diagnose";
2140
+ readonly output: z.ZodObject<{
2141
+ issue: z.ZodObject<{
2142
+ coveredFlowIds: z.ZodArray<PublicIdSchema>;
2143
+ createdAt: z.ZodCoercedDate<unknown>;
2144
+ description: z.ZodString;
2145
+ issueId: PublicIdSchema;
2146
+ name: z.ZodString;
2147
+ number: z.ZodNumber;
2148
+ priority: z.ZodEnum<{
2149
+ unprioritized: "unprioritized";
2150
+ low: "low";
2151
+ medium: "medium";
2152
+ high: "high";
2153
+ urgent: "urgent";
2154
+ }>;
2155
+ reproductions: z.ZodArray<z.ZodObject<{
2156
+ environmentId: PublicIdSchema;
2157
+ firstReproducedInRunId: PublicIdSchema;
2158
+ flowId: PublicIdSchema;
2159
+ isActive: z.ZodBoolean;
2160
+ lastReproducedInRunId: PublicIdSchema;
2161
+ }, z.core.$strip>>;
2162
+ status: z.ZodEnum<{
2163
+ pending: "pending";
2164
+ inProgress: "inProgress";
2165
+ paused: "paused";
2166
+ resolved: "resolved";
2167
+ canceled: "canceled";
2168
+ archived: "archived";
2169
+ }>;
2170
+ type: z.ZodEnum<{
2171
+ bug: "bug";
2172
+ coverageRequest: "coverageRequest";
2173
+ maintenance: "maintenance";
2174
+ }>;
2175
+ url: z.ZodURL;
2176
+ }, z.core.$strip>;
2177
+ }, z.core.$strip>;
2178
+ };
1986
2179
  find: {
1987
2180
  readonly description: "List an environment's recent runs, newest first.";
1988
2181
  readonly input: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAE,KAAK,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoC,CAAC"}
package/dist/v1/index.js CHANGED
@@ -1,9 +1,12 @@
1
+ export { agentSessionStatusSchema, } from "./agent/status.js";
1
2
  export { authConfigResponse } from "./auth/config.js";
2
3
  export { identityResponse } from "./identity/index.js";
3
4
  export { identityOrganizationsResponse, } from "./identity/organizations.js";
4
5
  export { defaultIdSchemas, } from "./ids.js";
5
6
  export { makeFlowSelectionSchema } from "./run/index.js";
6
7
  export * from "./runnerReexports.js";
8
+ import { makeAgentGetContract } from "./agent/get.js";
9
+ import { makeAgentSendContract } from "./agent/send.js";
7
10
  import { makeAutomateContract } from "./automate/index.js";
8
11
  import { makeDeleteEnvironmentVariableContract } from "./environment/deleteVariable.js";
9
12
  import { makeFindEnvironmentsContract } from "./environment/find.js";
@@ -18,6 +21,7 @@ import { makeAddFlowsToIssueContract } from "./issue/addFlows.js";
18
21
  import { makeCreateIssueContract } from "./issue/create.js";
19
22
  import { makeFindIssuesContract, makeGetIssueContract } from "./issue/index.js";
20
23
  import { makeUpdateIssueContract } from "./issue/update.js";
24
+ import { makeDiagnoseRunContract } from "./run/diagnose.js";
21
25
  import { makeFindRunsContract } from "./run/find.js";
22
26
  import { makeGetRunContract } from "./run/get.js";
23
27
  import { makeCreateRunContract } from "./run/index.js";
@@ -47,6 +51,10 @@ import { makeListTagsContract } from "./tag/list.js";
47
51
  export const makeContractsV1 = (ids) => {
48
52
  const resolvedIds = { ...defaultIdSchemas, ...ids };
49
53
  return {
54
+ agent: {
55
+ get: makeAgentGetContract(resolvedIds),
56
+ send: makeAgentSendContract(resolvedIds),
57
+ },
50
58
  // Top-level contract: the public command is the verb itself, with no
51
59
  // resource namespace (`qawolf automate`).
52
60
  automate: makeAutomateContract(resolvedIds),
@@ -74,6 +82,7 @@ export const makeContractsV1 = (ids) => {
74
82
  },
75
83
  run: {
76
84
  create: makeCreateRunContract(resolvedIds),
85
+ diagnose: makeDiagnoseRunContract(resolvedIds),
77
86
  find: makeFindRunsContract(resolvedIds),
78
87
  get: makeGetRunContract(resolvedIds),
79
88
  reattempt: makeReattemptRunContract(resolvedIds),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAM/E,OAAO,EAAyB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAEL,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EA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qB,CAAC,WAAW,CAAC;YAC1C,QAAQ,EAAE,uBAAuB,CAAC,WAAW,CAAC;YAC9C,IAAI,EAAE,oBAAoB,CAAC,WAAW,CAAC;YACvC,GAAG,EAAE,kBAAkB,CAAC,WAAW,CAAC;YACpC,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC;SACjD;QACD,MAAM,EAAE;YACN,eAAe,EAAE,mCAAmC,EAAE;YACtD,GAAG,EAAE,qBAAqB,EAAE;YAC5B,iBAAiB,EAAE,qCAAqC,EAAE;YAC1D,aAAa,EAAE,iCAAiC,EAAE;YAClD,OAAO,EAAE,2BAA2B,EAAE;YACtC,aAAa,EAAE,iCAAiC,EAAE;YAClD,MAAM,EAAE,wBAAwB,EAAE;YAClC,aAAa,EAAE,iCAAiC,EAAE;YAClD,eAAe,EAAE,mCAAmC,EAAE;YACtD,WAAW,EAAE,6BAA6B,EAAE;YAC5C,OAAO,EAAE,2BAA2B,CAAC,WAAW,CAAC;YACjD,OAAO,EAAE,2BAA2B,EAAE;YACtC,cAAc,EAAE,kCAAkC,EAAE;YACpD,SAAS,EAAE,2BAA2B,EAAE;SACzC;QACD,GAAG,EAAE;YACH,MAAM,EAAE,qBAAqB,CAAC,WAAW,CAAC;YAC1C,IAAI,EAAE,oBAAoB,CAAC,WAAW,CAAC;SACxC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC"}
@@ -17,7 +17,7 @@ export const makeAddFlowsToIssueContract = (ids) => {
17
17
  return {
18
18
  description: "Add flows to a coverage request owned by the caller's team. " +
19
19
  "Flows already covered stay covered. " +
20
- "Bug and maintenance reports link to flows through the runs that reproduce them, so their flows cannot be set directly.",
20
+ "Bug and maintenance reports link to flows through the runs that reproduce them; use run.diagnose to record one.",
21
21
  input,
22
22
  kind: "write",
23
23
  name: "issue.addFlows",
@@ -1 +1 @@
1
- {"version":3,"file":"addFlows.js","sourceRoot":"","sources":["../../../src/v1/issue/addFlows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAKzC,GAKD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,CAAC;YACP,yCAAyC;aACxC,GAAG,CAAC,GAAG,CAAC;aACR,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,EACrD,wBAAwB,CACzB;aACA,QAAQ,CAAC,wCAAwC,CAAC;QACrD,OAAO,EAAE,GAAG,CAAC,KAAK;KACnB,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,uBAAuB,CAAC,GAAG,CAAC;KACpC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,8DAA8D;YAC9D,sCAAsC;YACtC,wHAAwH;QAC1H,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"addFlows.js","sourceRoot":"","sources":["../../../src/v1/issue/addFlows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAKzC,GAKD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,CAAC;YACP,yCAAyC;aACxC,GAAG,CAAC,GAAG,CAAC;aACR,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,EACrD,wBAAwB,CACzB;aACA,QAAQ,CAAC,wCAAwC,CAAC;QACrD,OAAO,EAAE,GAAG,CAAC,KAAK;KACnB,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,uBAAuB,CAAC,GAAG,CAAC;KACpC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,8DAA8D;YAC9D,sCAAsC;YACtC,iHAAiH;QACnH,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export declare const makeDiagnoseRunContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, IssueId extends PublicIdSchema>(ids: {
4
+ environment: EnvironmentId;
5
+ flow: FlowId;
6
+ issue: IssueId;
7
+ run: RunId;
8
+ }) => {
9
+ readonly description: string;
10
+ readonly input: z.ZodObject<{
11
+ flowIds: z.ZodArray<FlowId>;
12
+ issueId: IssueId;
13
+ runId: RunId;
14
+ }, z.core.$strip>;
15
+ readonly kind: "write";
16
+ readonly name: "run.diagnose";
17
+ readonly output: z.ZodObject<{
18
+ issue: z.ZodObject<{
19
+ coveredFlowIds: z.ZodArray<FlowId>;
20
+ createdAt: z.ZodCoercedDate<unknown>;
21
+ description: z.ZodString;
22
+ issueId: IssueId;
23
+ name: z.ZodString;
24
+ number: z.ZodNumber;
25
+ priority: z.ZodEnum<{
26
+ unprioritized: "unprioritized";
27
+ low: "low";
28
+ medium: "medium";
29
+ high: "high";
30
+ urgent: "urgent";
31
+ }>;
32
+ reproductions: z.ZodArray<z.ZodObject<{
33
+ environmentId: EnvironmentId;
34
+ firstReproducedInRunId: RunId;
35
+ flowId: FlowId;
36
+ isActive: z.ZodBoolean;
37
+ lastReproducedInRunId: RunId;
38
+ }, z.core.$strip>>;
39
+ status: z.ZodEnum<{
40
+ pending: "pending";
41
+ inProgress: "inProgress";
42
+ paused: "paused";
43
+ resolved: "resolved";
44
+ canceled: "canceled";
45
+ archived: "archived";
46
+ }>;
47
+ type: z.ZodEnum<{
48
+ bug: "bug";
49
+ coverageRequest: "coverageRequest";
50
+ maintenance: "maintenance";
51
+ }>;
52
+ url: z.ZodURL;
53
+ }, z.core.$strip>;
54
+ }, z.core.$strip>;
55
+ };
56
+ //# sourceMappingURL=diagnose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../../src/v1/run/diagnose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,uBAAuB,GAClC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,cAAc,EAC9B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,KAAK,CAAC;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCA,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import { makeIssueResourceSchema } from "../issue/index.js";
3
+ export const makeDiagnoseRunContract = (ids) => {
4
+ const input = z.object({
5
+ flowIds: z
6
+ .array(ids.flow)
7
+ .min(1)
8
+ // Matches the run diagnosis cap.
9
+ .max(100)
10
+ .refine((flowIds) => new Set(flowIds).size === flowIds.length, "flowIds must be unique")
11
+ .describe("The flows that reproduced the issue in the run."),
12
+ issueId: ids.issue,
13
+ runId: ids.run,
14
+ });
15
+ const output = z.object({
16
+ issue: makeIssueResourceSchema(ids),
17
+ });
18
+ return {
19
+ description: "Diagnose failed flows in a run as reproductions of a bug or maintenance report owned by the caller's team. " +
20
+ "The issue's type selects the diagnosis. " +
21
+ "Each flow must have failed in the run. " +
22
+ "A flow that is already diagnosed moves to this issue. " +
23
+ "The diagnosis appears on the run, and the reproduction appears under the issue's reproductions. " +
24
+ "Coverage requests cannot be diagnosed; use issue.addFlows to cover flows instead.",
25
+ input,
26
+ kind: "write",
27
+ name: "run.diagnose",
28
+ output,
29
+ };
30
+ };
31
+ //# sourceMappingURL=diagnose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose.js","sourceRoot":"","sources":["../../../src/v1/run/diagnose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAKrC,GAKD,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,CAAC;YACP,iCAAiC;aAChC,GAAG,CAAC,GAAG,CAAC;aACR,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,EACrD,wBAAwB,CACzB;aACA,QAAQ,CAAC,iDAAiD,CAAC;QAC9D,OAAO,EAAE,GAAG,CAAC,KAAK;QAClB,KAAK,EAAE,GAAG,CAAC,GAAG;KACf,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,uBAAuB,CAAC,GAAG,CAAC;KACpC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,6GAA6G;YAC7G,0CAA0C;YAC1C,yCAAyC;YACzC,wDAAwD;YACxD,kGAAkG;YAClG,mFAAmF;QACrF,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,cAAc;QACpB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -35,8 +35,8 @@ export declare const makeCreateRunContract: <AiTaskId extends PublicIdSchema, Ch
35
35
  }, z.core.$strip>>;
36
36
  runId: RunId;
37
37
  tracking: z.ZodEnum<{
38
- registered: "registered";
39
38
  failed: "failed";
39
+ registered: "registered";
40
40
  "not-requested": "not-requested";
41
41
  }>;
42
42
  url: z.ZodURL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qawolf/api-contracts",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "private": false,
5
5
  "description": "Versioned contracts for the QA Wolf public API",
6
6
  "repository": {