@qawolf/api-contracts 0.109.0 → 0.114.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/v1/activity/wait.d.ts +72 -0
- package/dist/v1/activity/wait.d.ts.map +1 -0
- package/dist/v1/activity/wait.js +89 -0
- package/dist/v1/activity/wait.js.map +1 -0
- package/dist/v1/index.d.ts +308 -50
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +4 -0
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/investigation/get.d.ts +1 -1
- package/dist/v1/investigation/index.d.ts +31 -1
- package/dist/v1/investigation/index.d.ts.map +1 -1
- package/dist/v1/investigation/question/answer.d.ts +36 -0
- package/dist/v1/investigation/question/answer.d.ts.map +1 -0
- package/dist/v1/investigation/question/answer.js +65 -0
- package/dist/v1/investigation/question/answer.js.map +1 -0
- package/dist/v1/investigation/question/find.js +2 -2
- package/dist/v1/investigation/question/find.js.map +1 -1
- package/dist/v1/investigation/question/index.d.ts +30 -0
- package/dist/v1/investigation/question/index.d.ts.map +1 -1
- package/dist/v1/investigation/question/index.js +2 -0
- package/dist/v1/investigation/question/index.js.map +1 -1
- package/dist/v1/issue/create.js +1 -1
- package/dist/v1/issue/create.js.map +1 -1
- package/dist/v1/issue/index.d.ts.map +1 -1
- package/dist/v1/issue/index.js +3 -7
- package/dist/v1/issue/index.js.map +1 -1
- package/dist/v1/sharedSchemas.d.ts +1 -0
- package/dist/v1/sharedSchemas.d.ts.map +1 -1
- package/dist/v1/sharedSchemas.js +1 -0
- package/dist/v1/sharedSchemas.js.map +1 -1
- package/dist/v1/trigger/configuration.d.ts +8 -3
- package/dist/v1/trigger/configuration.d.ts.map +1 -1
- package/dist/v1/trigger/configuration.js +4 -2
- package/dist/v1/trigger/configuration.js.map +1 -1
- package/dist/v1/trigger/configurationRules.d.ts +4 -1
- package/dist/v1/trigger/configurationRules.d.ts.map +1 -1
- package/dist/v1/trigger/configurationRules.js +17 -6
- package/dist/v1/trigger/configurationRules.js.map +1 -1
- package/dist/v1/trigger/create.d.ts +14 -6
- package/dist/v1/trigger/create.d.ts.map +1 -1
- package/dist/v1/trigger/find.d.ts +7 -3
- package/dist/v1/trigger/find.d.ts.map +1 -1
- package/dist/v1/trigger/get.d.ts +7 -3
- package/dist/v1/trigger/get.d.ts.map +1 -1
- package/dist/v1/trigger/index.d.ts +56 -24
- package/dist/v1/trigger/index.d.ts.map +1 -1
- package/dist/v1/trigger/lifecycle.d.ts +14 -6
- package/dist/v1/trigger/lifecycle.d.ts.map +1 -1
- package/dist/v1/trigger/resource.d.ts +7 -3
- package/dist/v1/trigger/resource.d.ts.map +1 -1
- package/dist/v1/trigger/scheduleRepeatFields.d.ts +12 -0
- package/dist/v1/trigger/scheduleRepeatFields.d.ts.map +1 -0
- package/dist/v1/trigger/scheduleRepeatFields.js +27 -0
- package/dist/v1/trigger/scheduleRepeatFields.js.map +1 -0
- package/dist/v1/trigger/scheduleRepeatRules.d.ts +17 -0
- package/dist/v1/trigger/scheduleRepeatRules.d.ts.map +1 -0
- package/dist/v1/trigger/scheduleRepeatRules.js +78 -0
- package/dist/v1/trigger/scheduleRepeatRules.js.map +1 -0
- package/dist/v1/trigger/update.d.ts +14 -6
- package/dist/v1/trigger/update.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const maxActivityWaitItems = 50;
|
|
4
|
+
export declare const makeActivityWaitContract: <ChatSessionId extends PublicIdSchema, RunId extends PublicIdSchema>(ids: {
|
|
5
|
+
chatSession: ChatSessionId;
|
|
6
|
+
run: RunId;
|
|
7
|
+
}) => {
|
|
8
|
+
readonly annotationJustifications: {
|
|
9
|
+
readonly destructiveHint: "Does not cancel work, stop runs or edit tests.";
|
|
10
|
+
readonly openWorldHint: "Reads QA Wolf sessions and runs without posting to external services.";
|
|
11
|
+
readonly readOnlyHint: "Retrieves session replies and statuses and run statuses without sending work.";
|
|
12
|
+
};
|
|
13
|
+
readonly annotations: {
|
|
14
|
+
readonly destructiveHint: false;
|
|
15
|
+
readonly openWorldHint: false;
|
|
16
|
+
readonly readOnlyHint: true;
|
|
17
|
+
};
|
|
18
|
+
readonly description: "Wait on many QA Wolf AI (Tester) sessions and runs in one call. Pass every Tester session and run you are waiting on. The call returns as soon as any session replies or changes status or any run finishes, and reports every item with news. Send back open as the next call's input, and call again as soon as it returns. Pass waitSeconds above 45 only when your instructions say your client keeps the call open while progress arrives.";
|
|
19
|
+
readonly input: z.ZodObject<{
|
|
20
|
+
cursors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
21
|
+
runIds: z.ZodOptional<z.ZodArray<RunId>>;
|
|
22
|
+
sessionIds: z.ZodOptional<z.ZodArray<ChatSessionId>>;
|
|
23
|
+
waitSeconds: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
readonly kind: "read";
|
|
26
|
+
readonly name: "activity.wait";
|
|
27
|
+
readonly output: z.ZodObject<{
|
|
28
|
+
open: z.ZodObject<{
|
|
29
|
+
cursors: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
30
|
+
runIds: z.ZodArray<RunId>;
|
|
31
|
+
sessionIds: z.ZodArray<ChatSessionId>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
34
|
+
finished: z.ZodBoolean;
|
|
35
|
+
runId: RunId;
|
|
36
|
+
status: z.ZodEnum<{
|
|
37
|
+
failed: "failed";
|
|
38
|
+
queued: "queued";
|
|
39
|
+
running: "running";
|
|
40
|
+
passed: "passed";
|
|
41
|
+
canceled: "canceled";
|
|
42
|
+
superseded: "superseded";
|
|
43
|
+
"not-found": "not-found";
|
|
44
|
+
}>;
|
|
45
|
+
url: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
48
|
+
nextCursor: z.ZodString;
|
|
49
|
+
replies: z.ZodArray<z.ZodObject<{
|
|
50
|
+
askedAt: z.ZodISODateTime;
|
|
51
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
text: z.ZodString;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
sessionId: ChatSessionId;
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
working: "working";
|
|
58
|
+
"waiting-for-you": "waiting-for-you";
|
|
59
|
+
completed: "completed";
|
|
60
|
+
failed: "failed";
|
|
61
|
+
cancelled: "cancelled";
|
|
62
|
+
"not-found": "not-found";
|
|
63
|
+
}>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
waitSeconds: z.ZodNumber;
|
|
66
|
+
wokeOn: z.ZodEnum<{
|
|
67
|
+
timeout: "timeout";
|
|
68
|
+
activity: "activity";
|
|
69
|
+
}>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../../src/v1/activity/wait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,wBAAwB,GACnC,aAAa,SAAS,cAAc,EACpC,KAAK,SAAS,cAAc,EAC5B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,GAAG,EAAE,KAAK,CAAC;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwHA,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { agentReplySchema, agentSessionStatuses } from "../agent/status.js";
|
|
3
|
+
import { maxAgentWaitSeconds, maxAgentWaitSecondsWithProgress, } from "../agent/wait.js";
|
|
4
|
+
import { publicRunSummaryStatusValues } from "../run/summary.js";
|
|
5
|
+
export const maxActivityWaitItems = 50;
|
|
6
|
+
export const makeActivityWaitContract = (ids) => {
|
|
7
|
+
const cursors = z.record(z.string().min(1), z.string().min(1));
|
|
8
|
+
const runIds = z.array(ids.run);
|
|
9
|
+
const sessionIds = z.array(ids.chatSession);
|
|
10
|
+
const input = z.object({
|
|
11
|
+
cursors: cursors
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Each session's nextCursor from the previous answer, keyed by its session id. A session without one is read from its first reply."),
|
|
14
|
+
runIds: runIds
|
|
15
|
+
.max(maxActivityWaitItems)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe(`The runs you are waiting on, including a run still being created. Send at least one session or run, and at most ${maxActivityWaitItems} together.`),
|
|
18
|
+
sessionIds: sessionIds
|
|
19
|
+
.max(maxActivityWaitItems)
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("The Tester sessions you are waiting on, as agent.send answered with."),
|
|
22
|
+
waitSeconds: z
|
|
23
|
+
.number()
|
|
24
|
+
.int()
|
|
25
|
+
.min(0)
|
|
26
|
+
.optional()
|
|
27
|
+
.describe(`How long the server may hold this call open, in seconds. Defaults to ${maxAgentWaitSeconds}. A larger value clamps to ${maxAgentWaitSeconds}, or to ${maxAgentWaitSecondsWithProgress} when the call carries a progress token. Pass more than ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives.`),
|
|
28
|
+
});
|
|
29
|
+
const output = z.object({
|
|
30
|
+
open: z
|
|
31
|
+
.object({ cursors, runIds, sessionIds })
|
|
32
|
+
.describe("Everything still worth waiting on: each session whose status is not completed, failed, cancelled or not-found, with its new cursor, and each run that has not finished. Send it as the next call's input."),
|
|
33
|
+
runs: z
|
|
34
|
+
.array(z.object({
|
|
35
|
+
finished: z
|
|
36
|
+
.boolean()
|
|
37
|
+
.describe("True once the status is passed, failed, canceled, superseded or not-found. A finished run never changes again."),
|
|
38
|
+
runId: ids.run.describe("The run id you sent."),
|
|
39
|
+
status: z
|
|
40
|
+
.enum([...publicRunSummaryStatusValues, "not-found"])
|
|
41
|
+
.describe('The run\'s status, as run.get reports it. A run still being created reads "queued". "not-found" means no run has this id: its creation failed, was skipped or never finished, or the run is gone.'),
|
|
42
|
+
url: z
|
|
43
|
+
.string()
|
|
44
|
+
.optional()
|
|
45
|
+
.describe("Absolute URL of the run page. Absent while the run is still being created, and when it is not found."),
|
|
46
|
+
}))
|
|
47
|
+
.describe("Every run you sent, in the order you sent them."),
|
|
48
|
+
sessions: z
|
|
49
|
+
.array(z.object({
|
|
50
|
+
nextCursor: z
|
|
51
|
+
.string()
|
|
52
|
+
.min(1)
|
|
53
|
+
.describe("Send back under this session's id in cursors to read only what follows."),
|
|
54
|
+
replies: z
|
|
55
|
+
.array(agentReplySchema)
|
|
56
|
+
.describe("What the AI has said since the cursor, oldest first, as agent.get returns it. Empty when it said nothing new."),
|
|
57
|
+
sessionId: ids.chatSession,
|
|
58
|
+
status: z
|
|
59
|
+
.enum([...agentSessionStatuses, "not-found"])
|
|
60
|
+
.describe('Where the work stands, as agent.get reports it. "working" means the AI is still on it. "waiting-for-you" means it asked a question that agent.send must answer. "completed" means it finished, and a new agent.send continues it. "failed" and "cancelled" are settled. "not-found" means the session is gone and will not change.'),
|
|
61
|
+
}))
|
|
62
|
+
.describe("Every session you sent, in the order you sent them."),
|
|
63
|
+
waitSeconds: z
|
|
64
|
+
.number()
|
|
65
|
+
.int()
|
|
66
|
+
.describe("The hold this call was allowed, in seconds, after clamping."),
|
|
67
|
+
wokeOn: z
|
|
68
|
+
.enum(["activity", "timeout"])
|
|
69
|
+
.describe('"activity" means a session replied or changed status, or a run finished, or a session or run was not found; every item with news is in this answer. "timeout" means the hold ran out with nothing new.'),
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
annotationJustifications: {
|
|
73
|
+
destructiveHint: "Does not cancel work, stop runs or edit tests.",
|
|
74
|
+
openWorldHint: "Reads QA Wolf sessions and runs without posting to external services.",
|
|
75
|
+
readOnlyHint: "Retrieves session replies and statuses and run statuses without sending work.",
|
|
76
|
+
},
|
|
77
|
+
annotations: {
|
|
78
|
+
destructiveHint: false,
|
|
79
|
+
openWorldHint: false,
|
|
80
|
+
readOnlyHint: true,
|
|
81
|
+
},
|
|
82
|
+
description: `Wait on many QA Wolf AI (Tester) sessions and runs in one call. Pass every Tester session and run you are waiting on. The call returns as soon as any session replies or changes status or any run finishes, and reports every item with news. Send back open as the next call's input, and call again as soon as it returns. Pass waitSeconds above ${maxAgentWaitSeconds} only when your instructions say your client keeps the call open while progress arrives.`,
|
|
83
|
+
input,
|
|
84
|
+
kind: "read",
|
|
85
|
+
name: "activity.wait",
|
|
86
|
+
output,
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait.js","sourceRoot":"","sources":["../../../src/v1/activity/wait.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAGtC,GAGD,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,C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