@qawolf/api-contracts 0.59.0 → 0.63.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.
Files changed (102) hide show
  1. package/dist/v1/agent/send.d.ts +1 -0
  2. package/dist/v1/agent/send.d.ts.map +1 -1
  3. package/dist/v1/agent/send.js +4 -0
  4. package/dist/v1/agent/send.js.map +1 -1
  5. package/dist/v1/environment/create.d.ts +1 -1
  6. package/dist/v1/environment/create.d.ts.map +1 -1
  7. package/dist/v1/environment/create.js.map +1 -1
  8. package/dist/v1/environment/deleteVariable.d.ts +1 -1
  9. package/dist/v1/environment/deleteVariable.d.ts.map +1 -1
  10. package/dist/v1/environment/deleteVariable.js.map +1 -1
  11. package/dist/v1/environment/getVariable.d.ts +1 -1
  12. package/dist/v1/environment/getVariable.d.ts.map +1 -1
  13. package/dist/v1/environment/getVariable.js.map +1 -1
  14. package/dist/v1/environment/index.d.ts +3 -3
  15. package/dist/v1/environment/index.d.ts.map +1 -1
  16. package/dist/v1/environment/index.js.map +1 -1
  17. package/dist/v1/environment/update.d.ts +1 -1
  18. package/dist/v1/environment/update.d.ts.map +1 -1
  19. package/dist/v1/environment/update.js.map +1 -1
  20. package/dist/v1/flow/addTag.d.ts.map +1 -1
  21. package/dist/v1/flow/addTag.js +0 -1
  22. package/dist/v1/flow/addTag.js.map +1 -1
  23. package/dist/v1/ids.d.ts +4 -3
  24. package/dist/v1/ids.d.ts.map +1 -1
  25. package/dist/v1/ids.js +4 -1
  26. package/dist/v1/ids.js.map +1 -1
  27. package/dist/v1/index.d.ts +717 -43
  28. package/dist/v1/index.d.ts.map +1 -1
  29. package/dist/v1/index.js +9 -49
  30. package/dist/v1/index.js.map +1 -1
  31. package/dist/v1/legacyTrigger/find.d.ts +89 -0
  32. package/dist/v1/legacyTrigger/find.d.ts.map +1 -0
  33. package/dist/v1/legacyTrigger/find.js +35 -0
  34. package/dist/v1/legacyTrigger/find.js.map +1 -0
  35. package/dist/v1/legacyTrigger/index.d.ts +129 -0
  36. package/dist/v1/legacyTrigger/index.d.ts.map +1 -0
  37. package/dist/v1/legacyTrigger/index.js +13 -0
  38. package/dist/v1/legacyTrigger/index.js.map +1 -0
  39. package/dist/v1/legacyTrigger/lifecycle.d.ts +41 -0
  40. package/dist/v1/legacyTrigger/lifecycle.d.ts.map +1 -0
  41. package/dist/v1/legacyTrigger/lifecycle.js +46 -0
  42. package/dist/v1/legacyTrigger/lifecycle.js.map +1 -0
  43. package/dist/v1/legacyTrigger/resource.d.ts +68 -0
  44. package/dist/v1/legacyTrigger/resource.d.ts.map +1 -0
  45. package/dist/v1/legacyTrigger/resource.js +66 -0
  46. package/dist/v1/legacyTrigger/resource.js.map +1 -0
  47. package/dist/v1/mcpToolDescription.d.ts.map +1 -1
  48. package/dist/v1/mcpToolDescription.js +2 -1
  49. package/dist/v1/mcpToolDescription.js.map +1 -1
  50. package/dist/v1/runner/actionSequence.d.ts +12 -0
  51. package/dist/v1/runner/actionSequence.d.ts.map +1 -0
  52. package/dist/v1/runner/actionSequence.js +11 -0
  53. package/dist/v1/runner/actionSequence.js.map +1 -0
  54. package/dist/v1/runner/catalog.d.ts +807 -0
  55. package/dist/v1/runner/catalog.d.ts.map +1 -0
  56. package/dist/v1/runner/catalog.js +34 -0
  57. package/dist/v1/runner/catalog.js.map +1 -0
  58. package/dist/v1/runner/performActions.d.ts +124 -0
  59. package/dist/v1/runner/performActions.d.ts.map +1 -0
  60. package/dist/v1/runner/performActions.js +83 -0
  61. package/dist/v1/runner/performActions.js.map +1 -0
  62. package/dist/v1/runner/performActionsSteps.d.ts +85 -0
  63. package/dist/v1/runner/performActionsSteps.d.ts.map +1 -0
  64. package/dist/v1/runner/performActionsSteps.js +80 -0
  65. package/dist/v1/runner/performActionsSteps.js.map +1 -0
  66. package/dist/v1/runnerReexports.d.ts +2 -0
  67. package/dist/v1/runnerReexports.d.ts.map +1 -1
  68. package/dist/v1/runnerReexports.js +2 -0
  69. package/dist/v1/runnerReexports.js.map +1 -1
  70. package/dist/v1/skill/index.d.ts +82 -0
  71. package/dist/v1/skill/index.d.ts.map +1 -0
  72. package/dist/v1/skill/index.js +63 -0
  73. package/dist/v1/skill/index.js.map +1 -0
  74. package/dist/v1/trigger/configuration.d.ts +20 -0
  75. package/dist/v1/trigger/configuration.d.ts.map +1 -1
  76. package/dist/v1/trigger/configuration.js +17 -3
  77. package/dist/v1/trigger/configuration.js.map +1 -1
  78. package/dist/v1/trigger/configurationRules.d.ts +2 -1
  79. package/dist/v1/trigger/configurationRules.d.ts.map +1 -1
  80. package/dist/v1/trigger/configurationRules.js +37 -21
  81. package/dist/v1/trigger/configurationRules.js.map +1 -1
  82. package/dist/v1/trigger/create.d.ts +20 -0
  83. package/dist/v1/trigger/create.d.ts.map +1 -1
  84. package/dist/v1/trigger/find.d.ts +10 -0
  85. package/dist/v1/trigger/find.d.ts.map +1 -1
  86. package/dist/v1/trigger/get.d.ts +10 -0
  87. package/dist/v1/trigger/get.d.ts.map +1 -1
  88. package/dist/v1/trigger/index.d.ts +578 -0
  89. package/dist/v1/trigger/index.d.ts.map +1 -1
  90. package/dist/v1/trigger/index.js +14 -0
  91. package/dist/v1/trigger/index.js.map +1 -1
  92. package/dist/v1/trigger/lifecycle.d.ts +20 -0
  93. package/dist/v1/trigger/lifecycle.d.ts.map +1 -1
  94. package/dist/v1/trigger/resource.d.ts +10 -0
  95. package/dist/v1/trigger/resource.d.ts.map +1 -1
  96. package/dist/v1/trigger/update.d.ts +20 -0
  97. package/dist/v1/trigger/update.d.ts.map +1 -1
  98. package/package.json +1 -1
  99. package/dist/v1/automate/index.d.ts +0 -24
  100. package/dist/v1/automate/index.d.ts.map +0 -1
  101. package/dist/v1/automate/index.js +0 -39
  102. package/dist/v1/automate/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAA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.js";
3
+ import { makeHighlightSelectorOnRunnerContract } from "./highlightSelector.js";
4
+ import { makeImportPackageOnRunnerContract } from "./importPackage.js";
5
+ import { makeLaunchRunnerContract, makeTerminateRunnerContract, } from "./index.js";
6
+ import { makeInspectOnRunnerContract } from "./inspect.js";
7
+ import { makeInspectMobileOnRunnerContract } from "./inspectMobile.js";
8
+ import { makeListRunnersContract } from "./list.js";
9
+ import { makePerformActionOnRunnerContract } from "./performAction.js";
10
+ import { makePerformActionsOnRunnerContract } from "./performActions.js";
11
+ import { makePromoteSnapshotOnRunnerContract } from "./promoteSnapshot.js";
12
+ import { makeReadRunnerJournalContract } from "./readJournal.js";
13
+ import { makeRunFlowOnRunnerContract } from "./runFlow.js";
14
+ import { makeStopRunOnRunnerContract } from "./stopRun.js";
15
+ import { makeTakeScreenshotOnRunnerContract } from "./takeScreenshot.js";
16
+ export const makeRunnerContracts = (ids) => ({
17
+ evaluateSnippet: makeEvaluateSnippetOnRunnerContract(ids),
18
+ get: makeGetRunnerContract(ids),
19
+ highlightSelector: makeHighlightSelectorOnRunnerContract(ids),
20
+ importPackage: makeImportPackageOnRunnerContract(ids),
21
+ inspect: makeInspectOnRunnerContract(ids),
22
+ inspectMobile: makeInspectMobileOnRunnerContract(ids),
23
+ launch: makeLaunchRunnerContract(ids),
24
+ list: makeListRunnersContract(ids),
25
+ performAction: makePerformActionOnRunnerContract(ids),
26
+ performActions: makePerformActionsOnRunnerContract(ids),
27
+ promoteSnapshot: makePromoteSnapshotOnRunnerContract(ids),
28
+ readJournal: makeReadRunnerJournalContract(ids),
29
+ runFlow: makeRunFlowOnRunnerContract(ids),
30
+ stopRun: makeStopRunOnRunnerContract(ids),
31
+ takeScreenshot: makeTakeScreenshotOnRunnerContract(ids),
32
+ terminate: makeTerminateRunnerContract(ids),
33
+ });
34
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/v1/runner/catalog.ts"],"names":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AAC,GAAG,CAAC;IAClC,aAAa,EAAE,iCAAiC,CAAC,GAAG,CAAC;IACrD,cAAc,EAAE,kCAAkC,CAAC,GAAG,CAAC;IACvD,eAAe,EAAE,mCAAmC,CAAC,GAAG,CAAC;IACzD,WAAW,EAAE,6BAA6B,CAAC,GAAG,CAAC;IAC/C,OAAO,EAAE,2BAA2B,CAAC,GAAG,CAAC;IACzC,OAAO,EAAE,2BAA2B,CAAC,GAAG,CAAC;IACzC,cAAc,EAAE,kCAAkC,CAAC,GAAG,CAAC;IACvD,SAAS,EAAE,2BAA2B,CAAC,GAAG,CAAC;CAC5C,CAAC,CAAC"}
@@ -0,0 +1,124 @@
1
+ import { z } from "zod";
2
+ import type { PublicIdSchema } from "../ids.js";
3
+ export { type ActionStepResult, type FailedActionStep, type PerformedActionStep, outOfTimeFailureReason, unconfirmedFailureReason, } from "./performActionsSteps.js";
4
+ export declare const makePerformActionsOnRunnerContract: <WorkspaceId extends PublicIdSchema>(ids: {
5
+ workspace: WorkspaceId;
6
+ }) => {
7
+ readonly annotations: {
8
+ readonly destructiveHint: true;
9
+ readonly openWorldHint: true;
10
+ readonly readOnlyHint: false;
11
+ };
12
+ readonly description: "Perform a sequence of raw browser 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` and `action-not-supported-on-mobile` reasons holds for each action here.";
13
+ readonly input: z.ZodObject<{
14
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ button: z.ZodLiteral<"left" | "right" | "wheel" | "back" | "forward">;
16
+ type: z.ZodLiteral<"click">;
17
+ x: z.ZodInt;
18
+ y: z.ZodInt;
19
+ }, z.core.$strict>, z.ZodObject<{
20
+ type: z.ZodLiteral<"double_click">;
21
+ x: z.ZodInt;
22
+ y: z.ZodInt;
23
+ }, z.core.$strict>, z.ZodObject<{
24
+ scroll_x: z.ZodInt;
25
+ scroll_y: z.ZodInt;
26
+ type: z.ZodLiteral<"scroll">;
27
+ x: z.ZodInt;
28
+ y: z.ZodInt;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ type: z.ZodLiteral<"move">;
31
+ x: z.ZodInt;
32
+ y: z.ZodInt;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ path: z.ZodArray<z.ZodObject<{
35
+ x: z.ZodInt;
36
+ y: z.ZodInt;
37
+ }, z.core.$strict>>;
38
+ type: z.ZodLiteral<"drag">;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ keys: z.ZodArray<z.ZodString>;
41
+ type: z.ZodLiteral<"keypress">;
42
+ }, z.core.$strict>, z.ZodObject<{
43
+ type: z.ZodLiteral<"navigate">;
44
+ url: z.ZodURL;
45
+ }, z.core.$strict>, z.ZodObject<{
46
+ text: z.ZodString;
47
+ type: z.ZodLiteral<"type">;
48
+ }, z.core.$strict>], "type">>;
49
+ id: z.ZodString;
50
+ screenshotMode: z.ZodOptional<z.ZodEnum<{
51
+ none: "none";
52
+ final: "final";
53
+ each: "each";
54
+ }>>;
55
+ stopOnFailure: z.ZodOptional<z.ZodBoolean>;
56
+ workspaceId: z.ZodOptional<WorkspaceId>;
57
+ }, z.core.$strip>;
58
+ readonly kind: "write";
59
+ readonly name: "runner.performActions";
60
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
61
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
62
+ lastCompletedIndex: z.ZodInt;
63
+ outcome: z.ZodLiteral<"success">;
64
+ results: z.ZodArray<z.ZodObject<{
65
+ effect: z.ZodLiteral<"performed">;
66
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
67
+ index: z.ZodInt;
68
+ outcome: z.ZodLiteral<"success">;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ errorMessage: z.ZodOptional<z.ZodString>;
72
+ failedIndex: z.ZodInt;
73
+ failureReason: z.ZodEnum<{
74
+ "runner-unreachable": "runner-unreachable";
75
+ "screen-needs-a-run": "screen-needs-a-run";
76
+ "screen-not-ready": "screen-not-ready";
77
+ "action-failed": "action-failed";
78
+ "runner-has-no-screen": "runner-has-no-screen";
79
+ "action-not-supported-on-mobile": "action-not-supported-on-mobile";
80
+ "out-of-time": "out-of-time";
81
+ "action-unconfirmed": "action-unconfirmed";
82
+ }>;
83
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
84
+ lastCompletedIndex: z.ZodOptional<z.ZodInt>;
85
+ outcome: z.ZodLiteral<"failure">;
86
+ results: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
87
+ effect: z.ZodLiteral<"performed">;
88
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
89
+ index: z.ZodInt;
90
+ outcome: z.ZodLiteral<"success">;
91
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
92
+ effect: z.ZodLiteral<"not-performed">;
93
+ errorMessage: z.ZodString;
94
+ failureReason: z.ZodLiteral<"action-failed">;
95
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
96
+ index: z.ZodInt;
97
+ outcome: z.ZodLiteral<"failure">;
98
+ }, z.core.$strip>, z.ZodObject<{
99
+ effect: z.ZodLiteral<"unknown">;
100
+ failureReason: z.ZodLiteral<"runner-unreachable">;
101
+ index: z.ZodInt;
102
+ outcome: z.ZodLiteral<"failure">;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ effect: z.ZodLiteral<"unknown">;
105
+ errorMessage: z.ZodString;
106
+ failureReason: z.ZodLiteral<"action-unconfirmed">;
107
+ index: z.ZodInt;
108
+ outcome: z.ZodLiteral<"failure">;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ effect: z.ZodLiteral<"not-performed">;
111
+ failureReason: z.ZodEnum<{
112
+ "screen-needs-a-run": "screen-needs-a-run";
113
+ "screen-not-ready": "screen-not-ready";
114
+ "runner-has-no-screen": "runner-has-no-screen";
115
+ "action-not-supported-on-mobile": "action-not-supported-on-mobile";
116
+ "out-of-time": "out-of-time";
117
+ }>;
118
+ index: z.ZodInt;
119
+ outcome: z.ZodLiteral<"failure">;
120
+ }, z.core.$strip>], "failureReason">], "outcome">>;
121
+ stoppedEarly: z.ZodBoolean;
122
+ }, z.core.$strip>], "outcome">;
123
+ };
124
+ //# sourceMappingURL=performActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performActions.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAchD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAalC,eAAO,MAAM,kCAAkC,GAC7C,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FA,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { z } from "zod";
2
+ import { maxActionsPerRequest, screenshotModes } from "./actionSequence.js";
3
+ import { browserActionSchema } from "./browserAction.js";
4
+ import { runnerIdSchema, runnerWorkspaceIdDescription } from "./identity.js";
5
+ import { maxActionErrorMessageLength } from "./performAction.js";
6
+ import { actionIndexSchema, performedStepSchema, sequenceFailureReasons, stepResultSchema, } from "./performActionsSteps.js";
7
+ import { screenshotImageSchema } from "./screen.js";
8
+ export { outOfTimeFailureReason, unconfirmedFailureReason, } from "./performActionsSteps.js";
9
+ const actionsDescription = `The actions to perform, in order, each exactly what \`runner.performAction\` takes: coordinates are whole pixels on the runner's virtual desktop, in the same space as \`runner.takeScreenshot\`, and the shapes follow the computer-use vocabulary. At most ${maxActionsPerRequest} per request. For when the next several steps are already known — click a field, type into it, press Enter — and one look at the screen at the end is enough. They run back to back on the runner, with no pause between them: put in one request only steps whose targets are all on the screen you last saw and are not moved by the steps before them, and when a step changes the page — a submit, a navigation, opening a menu — make it the last one and read the frame.`;
10
+ const screenshotModeDescription = "`final`, the default, answers with one screenshot in `imageJpegBase64`: the screen after the last action, or, after a stop, as it stands. `each` puts a screenshot after every action on its entry in `results`, for when each step must be checked; every frame is a full image, so keep such sequences short. `none` sends no screenshot.";
11
+ const stopOnFailureDescription = "`true`, the default, leaves the remaining actions unperformed once one fails. `false` carries on past an action that reached the runner and did not take effect (`action-failed`, `action-not-supported-on-mobile`), so use it only for actions that do not depend on each other: a `type` after a `click` that failed goes to whatever has focus. A runner that cannot be reached, a screen that cannot serve, or running out of time ends the sequence either way.";
12
+ const finalImageDescription = "Present with `screenshotMode: final` when the runner still answered: the screen after the last action performed, or, after a stop, as it stands.";
13
+ export const makePerformActionsOnRunnerContract = (ids) => {
14
+ const input = z.object({
15
+ actions: z
16
+ .array(browserActionSchema)
17
+ .min(1)
18
+ .max(maxActionsPerRequest)
19
+ .describe(actionsDescription),
20
+ id: runnerIdSchema.describe("Id of the runner to act on."),
21
+ screenshotMode: z
22
+ .enum(screenshotModes)
23
+ .optional()
24
+ .describe(screenshotModeDescription),
25
+ stopOnFailure: z.boolean().optional().describe(stopOnFailureDescription),
26
+ workspaceId: ids.workspace
27
+ .optional()
28
+ .describe(runnerWorkspaceIdDescription),
29
+ });
30
+ const output = z.discriminatedUnion("outcome", [
31
+ z.object({
32
+ imageJpegBase64: screenshotImageSchema
33
+ .optional()
34
+ .describe(finalImageDescription),
35
+ lastCompletedIndex: actionIndexSchema.describe("Index of the last action that took effect: here, the last one sent."),
36
+ outcome: z.literal("success"),
37
+ results: z
38
+ .array(performedStepSchema)
39
+ .min(1)
40
+ .max(maxActionsPerRequest)
41
+ .describe("One entry per action, in order."),
42
+ }),
43
+ z.object({
44
+ errorMessage: z
45
+ .string()
46
+ .max(maxActionErrorMessageLength)
47
+ .optional()
48
+ .describe("What stopped the first failed action, when its reason is `action-failed` or `action-unconfirmed`."),
49
+ failedIndex: actionIndexSchema.describe("Index of the first action that did not take effect."),
50
+ failureReason: z
51
+ .enum(sequenceFailureReasons)
52
+ .describe("Why that action did not take effect, the same as on its entry in `results`."),
53
+ imageJpegBase64: screenshotImageSchema
54
+ .optional()
55
+ .describe(finalImageDescription),
56
+ lastCompletedIndex: actionIndexSchema
57
+ .optional()
58
+ .describe("Index of the last action that took effect. Absent when none did. With `stopOnFailure: false` it can follow a failed action, so `results` says which ones before it took effect."),
59
+ outcome: z.literal("failure"),
60
+ results: z
61
+ .array(stepResultSchema)
62
+ .min(1)
63
+ .max(maxActionsPerRequest)
64
+ .describe("One entry per action reached, in order. Actions after a stop have no entry."),
65
+ stoppedEarly: z
66
+ .boolean()
67
+ .describe("Whether actions after the failure were left unperformed. False when every action was attempted."),
68
+ }),
69
+ ]);
70
+ return {
71
+ annotations: {
72
+ destructiveHint: true,
73
+ openWorldHint: true,
74
+ readOnlyHint: false,
75
+ },
76
+ description: "Perform a sequence of raw browser 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` and `action-not-supported-on-mobile` reasons holds for each action here.",
77
+ input,
78
+ kind: "write",
79
+ name: "runner.performActions",
80
+ output,
81
+ };
82
+ };
83
+ //# sourceMappingURL=performActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performActions.js","sourceRoot":"","sources":["../../../src/v1/runner/performActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAIL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,MAAM,kBAAkB,GAAG,gQAAgQ,oBAAoB,gdAAgd,CAAC;AAEhwB,MAAM,yBAAyB,GAC7B,6UAA6U,CAAC;AAEhV,MAAM,wBAAwB,GAC5B,scAAsc,CAAC;AAEzc,MAAM,qBAAqB,GACzB,kJA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QAAQ,CACP,mGAAmG,CACpG;YACH,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CACrC,qDAAqD,CACtD;YACD,aAAa,EAAE,CAAC;iBACb,IAAI,CAAC,sBAAsB,CAAC;iBAC5B,QAAQ,CACP,6EAA6E,CAC9E;YACH,eAAe,EAAE,qBAAqB;iBACnC,QAAQ,EAAE;iBACV,QAAQ,CAAC,qBAAqB,CAAC;YAClC,kBAAkB,EAAE,iBAAiB;iBAClC,QAAQ,EAAE;iBACV,QAAQ,CACP,iLAAiL,CAClL;YACH,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;YAC7B,OAAO,EAAE,CAAC;iBACP,KAAK,CAAC,gBAAgB,CAAC;iBACvB,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,oBAAoB,CAAC;iBACzB,QAAQ,CACP,6EAA6E,CAC9E;YACH,YAAY,EAAE,CAAC;iBACZ,OAAO,EAAE;iBACT,QAAQ,CACP,iGAAiG,CAClG;SACJ,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE;YACX,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,KAAK;SACpB;QACD,WAAW,EACT,+zCAA+zC;QACj0C,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,uBAAuB;QAC7B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { z } from "zod";
2
+ /** The reason on an action the sequence did not reach in time. */
3
+ export declare const outOfTimeFailureReason = "out-of-time";
4
+ /**
5
+ * The reason on an action the runner's screen went quiet on: it may have taken
6
+ * effect, and nothing after it was attempted.
7
+ */
8
+ export declare const unconfirmedFailureReason = "action-unconfirmed";
9
+ export declare const actionIndexSchema: z.ZodInt;
10
+ export declare const performedStepSchema: z.ZodObject<{
11
+ effect: z.ZodLiteral<"performed">;
12
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
13
+ index: z.ZodInt;
14
+ outcome: z.ZodLiteral<"success">;
15
+ }, z.core.$strip>;
16
+ export type PerformedActionStep = z.infer<typeof performedStepSchema>;
17
+ export declare const failedStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ effect: z.ZodLiteral<"not-performed">;
19
+ errorMessage: z.ZodString;
20
+ failureReason: z.ZodLiteral<"action-failed">;
21
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
22
+ index: z.ZodInt;
23
+ outcome: z.ZodLiteral<"failure">;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ effect: z.ZodLiteral<"unknown">;
26
+ failureReason: z.ZodLiteral<"runner-unreachable">;
27
+ index: z.ZodInt;
28
+ outcome: z.ZodLiteral<"failure">;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ effect: z.ZodLiteral<"unknown">;
31
+ errorMessage: z.ZodString;
32
+ failureReason: z.ZodLiteral<"action-unconfirmed">;
33
+ index: z.ZodInt;
34
+ outcome: z.ZodLiteral<"failure">;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ effect: z.ZodLiteral<"not-performed">;
37
+ failureReason: z.ZodEnum<{
38
+ "screen-needs-a-run": "screen-needs-a-run";
39
+ "screen-not-ready": "screen-not-ready";
40
+ "runner-has-no-screen": "runner-has-no-screen";
41
+ "action-not-supported-on-mobile": "action-not-supported-on-mobile";
42
+ "out-of-time": "out-of-time";
43
+ }>;
44
+ index: z.ZodInt;
45
+ outcome: z.ZodLiteral<"failure">;
46
+ }, z.core.$strip>], "failureReason">;
47
+ export type FailedActionStep = z.infer<typeof failedStepSchema>;
48
+ export declare const stepResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
49
+ effect: z.ZodLiteral<"performed">;
50
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
51
+ index: z.ZodInt;
52
+ outcome: z.ZodLiteral<"success">;
53
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
54
+ effect: z.ZodLiteral<"not-performed">;
55
+ errorMessage: z.ZodString;
56
+ failureReason: z.ZodLiteral<"action-failed">;
57
+ imageJpegBase64: z.ZodOptional<z.ZodString>;
58
+ index: z.ZodInt;
59
+ outcome: z.ZodLiteral<"failure">;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ effect: z.ZodLiteral<"unknown">;
62
+ failureReason: z.ZodLiteral<"runner-unreachable">;
63
+ index: z.ZodInt;
64
+ outcome: z.ZodLiteral<"failure">;
65
+ }, z.core.$strip>, z.ZodObject<{
66
+ effect: z.ZodLiteral<"unknown">;
67
+ errorMessage: z.ZodString;
68
+ failureReason: z.ZodLiteral<"action-unconfirmed">;
69
+ index: z.ZodInt;
70
+ outcome: z.ZodLiteral<"failure">;
71
+ }, z.core.$strip>, z.ZodObject<{
72
+ effect: z.ZodLiteral<"not-performed">;
73
+ failureReason: z.ZodEnum<{
74
+ "screen-needs-a-run": "screen-needs-a-run";
75
+ "screen-not-ready": "screen-not-ready";
76
+ "runner-has-no-screen": "runner-has-no-screen";
77
+ "action-not-supported-on-mobile": "action-not-supported-on-mobile";
78
+ "out-of-time": "out-of-time";
79
+ }>;
80
+ index: z.ZodInt;
81
+ outcome: z.ZodLiteral<"failure">;
82
+ }, z.core.$strip>], "failureReason">], "outcome">;
83
+ export type ActionStepResult = z.infer<typeof stepResultSchema>;
84
+ export declare const sequenceFailureReasons: readonly ["action-failed", "runner-has-no-screen", "screen-needs-a-run", "screen-not-ready", "action-not-supported-on-mobile", "out-of-time", "action-unconfirmed", "runner-unreachable"];
85
+ //# sourceMappingURL=performActionsSteps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performActionsSteps.d.ts","sourceRoot":"","sources":["../../../src/v1/runner/performActionsSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D,eAAO,MAAM,iBAAiB,UAI2C,CAAC;AAI1E,eAAO,MAAM,mBAAmB;;;;;iBAK9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMtE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAwC3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAG3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,sBAAsB,2LAOzB,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { z } from "zod";
2
+ import { maxActionsPerRequest } from "./actionSequence.js";
3
+ import { maxActionErrorMessageLength } from "./performAction.js";
4
+ import { screenFailureReasons, screenshotImageSchema } from "./screen.js";
5
+ import { runnerUnreachableFailureReason } from "./unreachable.js";
6
+ /** The reason on an action the sequence did not reach in time. */
7
+ export const outOfTimeFailureReason = "out-of-time";
8
+ /**
9
+ * The reason on an action the runner's screen went quiet on: it may have taken
10
+ * effect, and nothing after it was attempted.
11
+ */
12
+ export const unconfirmedFailureReason = "action-unconfirmed";
13
+ export const actionIndexSchema = z
14
+ .int()
15
+ .min(0)
16
+ .max(maxActionsPerRequest - 1)
17
+ .describe("Position of the action in the request's `actions`, from 0.");
18
+ const screenshotAfterStep = screenshotImageSchema.optional();
19
+ export const performedStepSchema = z.object({
20
+ effect: z.literal("performed"),
21
+ imageJpegBase64: screenshotAfterStep,
22
+ index: actionIndexSchema,
23
+ outcome: z.literal("success"),
24
+ });
25
+ // `effect` is fixed per reason rather than reported: a caller deciding whether
26
+ // to send an action again needs the promise, not a field the server may fill
27
+ // in differently one day. `runner-unreachable` and `action-unconfirmed` are
28
+ // the reasons where the action may have taken effect without saying so.
29
+ export const failedStepSchema = z.discriminatedUnion("failureReason", [
30
+ z.object({
31
+ effect: z.literal("not-performed"),
32
+ errorMessage: z
33
+ .string()
34
+ .max(maxActionErrorMessageLength)
35
+ .describe("What stopped the action from taking effect."),
36
+ failureReason: z.literal("action-failed"),
37
+ imageJpegBase64: screenshotAfterStep,
38
+ index: actionIndexSchema,
39
+ outcome: z.literal("failure"),
40
+ }),
41
+ z.object({
42
+ effect: z.literal("unknown"),
43
+ failureReason: z.literal(runnerUnreachableFailureReason),
44
+ index: actionIndexSchema,
45
+ outcome: z.literal("failure"),
46
+ }),
47
+ z.object({
48
+ effect: z.literal("unknown"),
49
+ errorMessage: z
50
+ .string()
51
+ .max(maxActionErrorMessageLength)
52
+ .describe("How the runner's screen went quiet with the action in flight."),
53
+ failureReason: z.literal(unconfirmedFailureReason),
54
+ index: actionIndexSchema,
55
+ outcome: z.literal("failure"),
56
+ }),
57
+ z.object({
58
+ effect: z.literal("not-performed"),
59
+ failureReason: z.enum([
60
+ ...screenFailureReasons,
61
+ "action-not-supported-on-mobile",
62
+ outOfTimeFailureReason,
63
+ ]),
64
+ index: actionIndexSchema,
65
+ outcome: z.literal("failure"),
66
+ }),
67
+ ]);
68
+ export const stepResultSchema = z.discriminatedUnion("outcome", [
69
+ performedStepSchema,
70
+ failedStepSchema,
71
+ ]);
72
+ export const sequenceFailureReasons = [
73
+ "action-failed",
74
+ ...screenFailureReasons,
75
+ "action-not-supported-on-mobile",
76
+ outOfTimeFailureReason,
77
+ unconfirmedFailureReason,
78
+ runnerUnreachableFailureReason,
79
+ ];
80
+ //# sourceMappingURL=performActionsSteps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performActionsSteps.js","sourceRoot":"","sources":["../../../src/v1/runner/performActionsSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,O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B,CAAC"}
@@ -1,3 +1,4 @@
1
+ export { type ScreenshotMode, maxActionsPerRequest, screenshotModes, } from "./runner/actionSequence.js";
1
2
  export { type BrowserAction, browserActionSchema, maxTypedTextLength, } from "./runner/browserAction.js";
2
3
  export { runEnvironmentSchema } from "./runner/environment.js";
3
4
  export { isShippableRunFilePath, runFilePathSchema, runPackageJsonPath, shippableRunFileExtensions, } from "./runner/files.js";
@@ -7,5 +8,6 @@ export { type InspectMobileRequest, inspectMobileRequestSchema, } from "./runner
7
8
  export { type JournalEntry, type JournalStream, type KnownJournalStream, type ReadJournalRequest, type ReadJournalResponse, journalEntrySchema, journalStreamSchema, knownJournalStreams, maxJournalStreamNameLength, readJournalRequestSchema, readJournalResponseSchema, } from "./runner/journal.js";
8
9
  export { type RunFiles, maxRunFilesByteLength, maxRunnerRequestEncodedByteLength, runFilesByteLength, runFilesSchema, } from "./runner/payloadSize.js";
9
10
  export { maxActionErrorMessageLength } from "./runner/performAction.js";
11
+ export { type ActionStepResult, type FailedActionStep, type PerformedActionStep, outOfTimeFailureReason, unconfirmedFailureReason, } from "./runner/performActions.js";
10
12
  export { type RunSelection, runSelectionSchema, } from "./runner/runSelection.js";
11
13
  //# sourceMappingURL=runnerReexports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runnerReexports.d.ts","sourceRoot":"","sources":["../../src/v1/runnerReexports.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAClB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAK/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,sBAAsB,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,oBAAoB,EACzB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EACb,qBAAqB,EACrB,iCAAiC,EACjC,kBAAkB,EAClB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACL,KAAK,YAAY,EACjB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"runnerReexports.d.ts","sourceRoot":"","sources":["../../src/v1/runnerReexports.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,eAAe,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,aAAa,EAClB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAK/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,sBAAsB,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,oBAAoB,EACzB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EACb,qBAAqB,EACrB,iCAAiC,EACjC,kBAAkB,EAClB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,YAAY,EACjB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  // The `runner` resource's shared types and schemas, re-exported here rather
2
2
  // than restated by every server and client that needs them. Split out of
3
3
  // `index.ts` to keep that file under the line limit.
4
+ export { maxActionsPerRequest, screenshotModes, } from "./runner/actionSequence.js";
4
5
  export { browserActionSchema, maxTypedTextLength, } from "./runner/browserAction.js";
5
6
  // Carries the reservation of QA Wolf's own variable names, which the server
6
7
  // validates with rather than restating — a second copy of that rule is how the
@@ -19,5 +20,6 @@ export { inspectMobileRequestSchema, } from "./runner/inspectMobile.js";
19
20
  export { journalEntrySchema, journalStreamSchema, knownJournalStreams, maxJournalStreamNameLength, readJournalRequestSchema, readJournalResponseSchema, } from "./runner/journal.js";
20
21
  export { maxRunFilesByteLength, maxRunnerRequestEncodedByteLength, runFilesByteLength, runFilesSchema, } from "./runner/payloadSize.js";
21
22
  export { maxActionErrorMessageLength } from "./runner/performAction.js";
23
+ export { outOfTimeFailureReason, unconfirmedFailureReason, } from "./runner/performActions.js";
22
24
  export { runSelectionSchema, } from "./runner/runSelection.js";
23
25
  //# sourceMappingURL=runnerReexports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runnerReexports.js","sourceRoot":"","sources":["../../src/v1/runnerReexports.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,qDAAqD;AACrD,OAAO,EAEL,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,4EAA4E;AAC5E,+EAA+E;AAC/E,6DAA6D;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAC/E,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AACnC,gFAAgF;AAChF,yEAAyE;AACzE,OAAO,EAML,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,qBAAqB,EACrB,iCAAiC,EACjC,kBAAkB,EAClB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAEL,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"runnerReexports.js","sourceRoot":"","sources":["../../src/v1/runnerReexports.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,qDAAqD;AACrD,OAAO,EAEL,oBAAoB,EACpB,eAAe,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,4EAA4E;AAC5E,+EAA+E;AAC/E,6DAA6D;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,iFAAiF;AACjF,iFAAiF;AACjF,+EAA+E;AAC/E,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AACnC,gFAAgF;AAChF,yEAAyE;AACzE,OAAO,EAML,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,qBAAqB,EACrB,iCAAiC,EACjC,kBAAkB,EAClB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAIL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,kBAAkB,GACnB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { z } from "zod";
2
+ export declare const makeListSkillsContract: () => {
3
+ readonly annotations: {
4
+ readonly destructiveHint: false;
5
+ readonly openWorldHint: false;
6
+ readonly readOnlyHint: true;
7
+ };
8
+ readonly description: "List the QA Wolf skills, each with its name and the description that says when to use it. A skill is the instructions a coding agent follows for one kind of QA Wolf work, such as onboarding an application, creating a flow, repairing a failing flow, or setting up triggers. Call this before any QA Wolf work, pick the skill whose description matches the request, and read it with skill.get.";
9
+ readonly input: z.ZodObject<{}, z.core.$strip>;
10
+ readonly kind: "read";
11
+ readonly name: "skill.list";
12
+ readonly output: z.ZodObject<{
13
+ skills: z.ZodArray<z.ZodObject<{
14
+ description: z.ZodString;
15
+ name: z.ZodString;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ };
19
+ export declare const makeGetSkillContract: () => {
20
+ readonly annotations: {
21
+ readonly destructiveHint: false;
22
+ readonly openWorldHint: false;
23
+ readonly readOnlyHint: true;
24
+ };
25
+ readonly description: "Read a QA Wolf skill: the instructions a coding agent follows for one kind of QA Wolf work. The reply carries the skill's SKILL.md and every file under its references directory, so nothing else has to be fetched for it. Read the skill before starting the work it covers and follow it. A link in the reply of the form ../<skill>/SKILL.md names another skill, which this call reads by that name.";
26
+ readonly input: z.ZodObject<{
27
+ name: z.ZodString;
28
+ }, z.core.$strip>;
29
+ readonly kind: "read";
30
+ readonly name: "skill.get";
31
+ readonly output: z.ZodObject<{
32
+ description: z.ZodString;
33
+ name: z.ZodString;
34
+ instructions: z.ZodString;
35
+ references: z.ZodArray<z.ZodObject<{
36
+ path: z.ZodString;
37
+ text: z.ZodString;
38
+ }, z.core.$strip>>;
39
+ }, z.core.$strip>;
40
+ };
41
+ export declare const makeSkillContracts: () => {
42
+ get: {
43
+ readonly annotations: {
44
+ readonly destructiveHint: false;
45
+ readonly openWorldHint: false;
46
+ readonly readOnlyHint: true;
47
+ };
48
+ readonly description: "Read a QA Wolf skill: the instructions a coding agent follows for one kind of QA Wolf work. The reply carries the skill's SKILL.md and every file under its references directory, so nothing else has to be fetched for it. Read the skill before starting the work it covers and follow it. A link in the reply of the form ../<skill>/SKILL.md names another skill, which this call reads by that name.";
49
+ readonly input: z.ZodObject<{
50
+ name: z.ZodString;
51
+ }, z.core.$strip>;
52
+ readonly kind: "read";
53
+ readonly name: "skill.get";
54
+ readonly output: z.ZodObject<{
55
+ description: z.ZodString;
56
+ name: z.ZodString;
57
+ instructions: z.ZodString;
58
+ references: z.ZodArray<z.ZodObject<{
59
+ path: z.ZodString;
60
+ text: z.ZodString;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>;
63
+ };
64
+ list: {
65
+ readonly annotations: {
66
+ readonly destructiveHint: false;
67
+ readonly openWorldHint: false;
68
+ readonly readOnlyHint: true;
69
+ };
70
+ readonly description: "List the QA Wolf skills, each with its name and the description that says when to use it. A skill is the instructions a coding agent follows for one kind of QA Wolf work, such as onboarding an application, creating a flow, repairing a failing flow, or setting up triggers. Call this before any QA Wolf work, pick the skill whose description matches the request, and read it with skill.get.";
71
+ readonly input: z.ZodObject<{}, z.core.$strip>;
72
+ readonly kind: "read";
73
+ readonly name: "skill.list";
74
+ readonly output: z.ZodObject<{
75
+ skills: z.ZodArray<z.ZodObject<{
76
+ description: z.ZodString;
77
+ name: z.ZodString;
78
+ }, z.core.$strip>>;
79
+ }, z.core.$strip>;
80
+ };
81
+ };
82
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/skill/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0BxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAsBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAgChC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG7B,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { z } from "zod";
2
+ const skillName = z
3
+ .string()
4
+ .trim()
5
+ .min(1)
6
+ .max(255)
7
+ .describe("The skill's name as skill.list reports it, such as qawolf-onboarding. The qawolf- prefix is optional, so onboarding names the same skill.");
8
+ const skillSummary = z.object({
9
+ description: z
10
+ .string()
11
+ .describe("When to use the skill, in the words the agent routes on."),
12
+ name: z.string().describe("The skill's name. Read it with skill.get."),
13
+ });
14
+ const readOnlyAnnotations = {
15
+ destructiveHint: false,
16
+ openWorldHint: false,
17
+ readOnlyHint: true,
18
+ };
19
+ export const makeListSkillsContract = () => {
20
+ const input = z.object({});
21
+ const output = z.object({
22
+ skills: z
23
+ .array(skillSummary)
24
+ .describe("Every skill the server serves, in catalog order."),
25
+ });
26
+ return {
27
+ annotations: readOnlyAnnotations,
28
+ description: "List the QA Wolf skills, each with its name and the description that says when to use it. A skill is the instructions a coding agent follows for one kind of QA Wolf work, such as onboarding an application, creating a flow, repairing a failing flow, or setting up triggers. Call this before any QA Wolf work, pick the skill whose description matches the request, and read it with skill.get.",
29
+ input,
30
+ kind: "read",
31
+ name: "skill.list",
32
+ output,
33
+ };
34
+ };
35
+ export const makeGetSkillContract = () => {
36
+ const input = z.object({ name: skillName });
37
+ const output = skillSummary.extend({
38
+ instructions: z
39
+ .string()
40
+ .describe("The skill's SKILL.md, frontmatter included."),
41
+ references: z
42
+ .array(z.object({
43
+ path: z
44
+ .string()
45
+ .describe("The file's path relative to the skill directory."),
46
+ text: z.string().describe("The file's content."),
47
+ }))
48
+ .describe("The files the skill links to under its directory."),
49
+ });
50
+ return {
51
+ annotations: readOnlyAnnotations,
52
+ description: "Read a QA Wolf skill: the instructions a coding agent follows for one kind of QA Wolf work. The reply carries the skill's SKILL.md and every file under its references directory, so nothing else has to be fetched for it. Read the skill before starting the work it covers and follow it. A link in the reply of the form ../<skill>/SKILL.md names another skill, which this call reads by that name.",
53
+ input,
54
+ kind: "read",
55
+ name: "skill.get",
56
+ output,
57
+ };
58
+ };
59
+ export const makeSkillContracts = () => ({
60
+ get: makeGetSkillContract(),
61
+ list: makeListSkillsContract(),
62
+ });
63
+ //# sourceMappingURL=index.js.map