@runcofactor/cli 0.10.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 (150) hide show
  1. package/README.md +125 -0
  2. package/dist/api-catalog-GFGCLVS4.js +401 -0
  3. package/dist/api-catalog-GFGCLVS4.js.map +1 -0
  4. package/dist/attachment-SJC7D7FY.js +276 -0
  5. package/dist/attachment-SJC7D7FY.js.map +1 -0
  6. package/dist/auth-EN6NQCJY.js +31 -0
  7. package/dist/auth-EN6NQCJY.js.map +1 -0
  8. package/dist/bin.js +7 -0
  9. package/dist/bin.js.map +1 -0
  10. package/dist/chunk-3CZU7XCS.js +272 -0
  11. package/dist/chunk-3CZU7XCS.js.map +1 -0
  12. package/dist/chunk-4NRDONSC.js +1048 -0
  13. package/dist/chunk-4NRDONSC.js.map +1 -0
  14. package/dist/chunk-4PNOV7OV.js +51980 -0
  15. package/dist/chunk-4PNOV7OV.js.map +1 -0
  16. package/dist/chunk-52IO7ACJ.js +2941 -0
  17. package/dist/chunk-52IO7ACJ.js.map +1 -0
  18. package/dist/chunk-6LEZCKKV.js +663 -0
  19. package/dist/chunk-6LEZCKKV.js.map +1 -0
  20. package/dist/chunk-A4OFTUVV.js +170 -0
  21. package/dist/chunk-A4OFTUVV.js.map +1 -0
  22. package/dist/chunk-B2VISN2V.js +2459 -0
  23. package/dist/chunk-B2VISN2V.js.map +1 -0
  24. package/dist/chunk-CLAWT7BJ.js +271 -0
  25. package/dist/chunk-CLAWT7BJ.js.map +1 -0
  26. package/dist/chunk-GKY2KXO5.js +281 -0
  27. package/dist/chunk-GKY2KXO5.js.map +1 -0
  28. package/dist/chunk-I4QLI3JO.js +413 -0
  29. package/dist/chunk-I4QLI3JO.js.map +1 -0
  30. package/dist/chunk-IMPZAX6L.js +180 -0
  31. package/dist/chunk-IMPZAX6L.js.map +1 -0
  32. package/dist/chunk-J6SH7GQT.js +241 -0
  33. package/dist/chunk-J6SH7GQT.js.map +1 -0
  34. package/dist/chunk-JDBCZ3Z2.js +298 -0
  35. package/dist/chunk-JDBCZ3Z2.js.map +1 -0
  36. package/dist/chunk-JICSYFRJ.js +46 -0
  37. package/dist/chunk-JICSYFRJ.js.map +1 -0
  38. package/dist/chunk-JWHYXEA2.js +32 -0
  39. package/dist/chunk-JWHYXEA2.js.map +1 -0
  40. package/dist/chunk-N7HFALX3.js +88 -0
  41. package/dist/chunk-N7HFALX3.js.map +1 -0
  42. package/dist/chunk-Q4BO4Z5V.js +178 -0
  43. package/dist/chunk-Q4BO4Z5V.js.map +1 -0
  44. package/dist/chunk-QFDOWABX.js +195 -0
  45. package/dist/chunk-QFDOWABX.js.map +1 -0
  46. package/dist/chunk-SJJW77WN.js +605 -0
  47. package/dist/chunk-SJJW77WN.js.map +1 -0
  48. package/dist/chunk-VKVL7WBN.js +50 -0
  49. package/dist/chunk-VKVL7WBN.js.map +1 -0
  50. package/dist/chunk-WOHL4FTB.js +353 -0
  51. package/dist/chunk-WOHL4FTB.js.map +1 -0
  52. package/dist/chunk-XQXVG7RA.js +426 -0
  53. package/dist/chunk-XQXVG7RA.js.map +1 -0
  54. package/dist/chunk-ZD3KHESI.js +94 -0
  55. package/dist/chunk-ZD3KHESI.js.map +1 -0
  56. package/dist/credential-COLTBV6D.js +450 -0
  57. package/dist/credential-COLTBV6D.js.map +1 -0
  58. package/dist/credential-template-EEPYFG7R.js +291 -0
  59. package/dist/credential-template-EEPYFG7R.js.map +1 -0
  60. package/dist/debug-workflow-KOVH5GOP.js +259 -0
  61. package/dist/debug-workflow-KOVH5GOP.js.map +1 -0
  62. package/dist/dist-44PZR7BQ.js +423 -0
  63. package/dist/dist-44PZR7BQ.js.map +1 -0
  64. package/dist/docs-3SSORHB5.js +366 -0
  65. package/dist/docs-3SSORHB5.js.map +1 -0
  66. package/dist/doctor-OTSIWV6G.js +132 -0
  67. package/dist/doctor-OTSIWV6G.js.map +1 -0
  68. package/dist/feature-flag-T2LRZME3.js +283 -0
  69. package/dist/feature-flag-T2LRZME3.js.map +1 -0
  70. package/dist/file-type-S3UUBVCT.js +4205 -0
  71. package/dist/file-type-S3UUBVCT.js.map +1 -0
  72. package/dist/index.d.ts +3 -0
  73. package/dist/index.js +982 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/init-TGWRECT2.js +208 -0
  76. package/dist/init-TGWRECT2.js.map +1 -0
  77. package/dist/install-DXSNWZKO.js +295 -0
  78. package/dist/install-DXSNWZKO.js.map +1 -0
  79. package/dist/issues-XIZOPX6T.js +564 -0
  80. package/dist/issues-XIZOPX6T.js.map +1 -0
  81. package/dist/knobs-NBINZIUB.js +295 -0
  82. package/dist/knobs-NBINZIUB.js.map +1 -0
  83. package/dist/list-3TDHK637.js +59 -0
  84. package/dist/list-3TDHK637.js.map +1 -0
  85. package/dist/local-HICVD6PU.js +100 -0
  86. package/dist/local-HICVD6PU.js.map +1 -0
  87. package/dist/login-UOIUXVUK.js +315 -0
  88. package/dist/login-UOIUXVUK.js.map +1 -0
  89. package/dist/mcp-54IJEOUA.js +1956 -0
  90. package/dist/mcp-54IJEOUA.js.map +1 -0
  91. package/dist/pdf-extract-ABWV3L5X.js +13 -0
  92. package/dist/pdf-extract-ABWV3L5X.js.map +1 -0
  93. package/dist/pdfjs-DQ2YA5S3.js +41561 -0
  94. package/dist/pdfjs-DQ2YA5S3.js.map +1 -0
  95. package/dist/property-UXLOLPTD.js +701 -0
  96. package/dist/property-UXLOLPTD.js.map +1 -0
  97. package/dist/property-skill-guide.md +189 -0
  98. package/dist/psql-BYUUNLGG.js +115 -0
  99. package/dist/psql-BYUUNLGG.js.map +1 -0
  100. package/dist/record-4TR2UIIS.js +233 -0
  101. package/dist/record-4TR2UIIS.js.map +1 -0
  102. package/dist/redis-35VBUYW7.js +116 -0
  103. package/dist/redis-35VBUYW7.js.map +1 -0
  104. package/dist/release-OOLTUBUT.js +354 -0
  105. package/dist/release-OOLTUBUT.js.map +1 -0
  106. package/dist/sandbox-XGSUU6G7.js +2046 -0
  107. package/dist/sandbox-XGSUU6G7.js.map +1 -0
  108. package/dist/scenarios-GWLJEGHA.js +280 -0
  109. package/dist/scenarios-GWLJEGHA.js.map +1 -0
  110. package/dist/session-MYFNZPRP.js +2414 -0
  111. package/dist/session-MYFNZPRP.js.map +1 -0
  112. package/dist/skill-KM34LDMO.js +1839 -0
  113. package/dist/skill-KM34LDMO.js.map +1 -0
  114. package/dist/skills/debug-run/SKILL.md +262 -0
  115. package/dist/skills/debug-run/history/1.0.0.md +244 -0
  116. package/dist/skills/debug-run/history/1.0.1.md +245 -0
  117. package/dist/skills/debug-run/history/1.0.2.md +254 -0
  118. package/dist/skills/debug-run/history/1.1.0.md +262 -0
  119. package/dist/skills/debug-run/version.json +3 -0
  120. package/dist/spec-RA3CFEKG.js +951 -0
  121. package/dist/spec-RA3CFEKG.js.map +1 -0
  122. package/dist/src-LB4HBTJQ.js +1516 -0
  123. package/dist/src-LB4HBTJQ.js.map +1 -0
  124. package/dist/src-N3TPKGTY.js +244 -0
  125. package/dist/src-N3TPKGTY.js.map +1 -0
  126. package/dist/src-UVDX5UP6.js +17 -0
  127. package/dist/src-UVDX5UP6.js.map +1 -0
  128. package/dist/start-PSEQSQA3.js +151 -0
  129. package/dist/start-PSEQSQA3.js.map +1 -0
  130. package/dist/tag-YY6YAABQ.js +22 -0
  131. package/dist/tag-YY6YAABQ.js.map +1 -0
  132. package/dist/task-IQC3YR5K.js +922 -0
  133. package/dist/task-IQC3YR5K.js.map +1 -0
  134. package/dist/test-suite-DZNJFXDW.js +394 -0
  135. package/dist/test-suite-DZNJFXDW.js.map +1 -0
  136. package/dist/trace-HXIW7U2D.js +14 -0
  137. package/dist/trace-HXIW7U2D.js.map +1 -0
  138. package/dist/triage-ORG45R5W.js +16 -0
  139. package/dist/triage-ORG45R5W.js.map +1 -0
  140. package/dist/upgrade-L2VYMP2V.js +61 -0
  141. package/dist/upgrade-L2VYMP2V.js.map +1 -0
  142. package/dist/workflow-XYFH5LTP.js +3708 -0
  143. package/dist/workflow-XYFH5LTP.js.map +1 -0
  144. package/dist/workflow-cache-NQJQFWMV.js +253 -0
  145. package/dist/workflow-cache-NQJQFWMV.js.map +1 -0
  146. package/dist/workflow-debug-BGD4UIXU.js +927 -0
  147. package/dist/workflow-debug-BGD4UIXU.js.map +1 -0
  148. package/dist/workflow-proposals-MTUDX46O.js +382 -0
  149. package/dist/workflow-proposals-MTUDX46O.js.map +1 -0
  150. package/package.json +61 -0
@@ -0,0 +1,605 @@
1
+ import { createRequire as __cr } from "module"; const require = __cr(import.meta.url);
2
+
3
+ // ../types/src/workflows.ts
4
+ var USER_SETTABLE_WORKFLOW_STATUSES = [
5
+ "draft",
6
+ "published"
7
+ ];
8
+
9
+ // ../types/src/sandbox-instance-size.ts
10
+ var INSTANCE_SIZES = ["small", "medium", "large", "xlarge", "2xlarge"];
11
+ var INSTANCE_SIZE_SPEC = {
12
+ small: {
13
+ ec2InstanceType: "t3.small",
14
+ vcpu: 2,
15
+ memoryMiB: 2048,
16
+ // 2 GiB instance — agent capped at min(2048, 0.4 × 2048) = 819
17
+ agentCapMiB: 819,
18
+ appSoftCapMiB: 1024,
19
+ proxyCapMiB: 256,
20
+ emulationCapMiB: 128,
21
+ storageCapMiB: 256,
22
+ appCpus: "1.0"
23
+ },
24
+ medium: {
25
+ ec2InstanceType: "t3.medium",
26
+ vcpu: 2,
27
+ memoryMiB: 4096,
28
+ agentCapMiB: 1536,
29
+ appSoftCapMiB: 1536,
30
+ proxyCapMiB: 256,
31
+ emulationCapMiB: 128,
32
+ storageCapMiB: 256,
33
+ appCpus: "1.0"
34
+ },
35
+ large: {
36
+ ec2InstanceType: "t3.large",
37
+ vcpu: 2,
38
+ memoryMiB: 8192,
39
+ agentCapMiB: 2048,
40
+ appSoftCapMiB: 5120,
41
+ proxyCapMiB: 256,
42
+ emulationCapMiB: 128,
43
+ storageCapMiB: 512,
44
+ // t3.large is memory-only — same 2 vCPU as medium.
45
+ appCpus: "1.0"
46
+ },
47
+ xlarge: {
48
+ ec2InstanceType: "t3.xlarge",
49
+ vcpu: 4,
50
+ memoryMiB: 16384,
51
+ agentCapMiB: 2048,
52
+ appSoftCapMiB: 12288,
53
+ proxyCapMiB: 256,
54
+ emulationCapMiB: 256,
55
+ storageCapMiB: 512,
56
+ appCpus: "2.5"
57
+ },
58
+ "2xlarge": {
59
+ ec2InstanceType: "t3.2xlarge",
60
+ vcpu: 8,
61
+ memoryMiB: 32768,
62
+ agentCapMiB: 2048,
63
+ appSoftCapMiB: 28672,
64
+ proxyCapMiB: 512,
65
+ emulationCapMiB: 512,
66
+ storageCapMiB: 1024,
67
+ appCpus: "6.5"
68
+ }
69
+ };
70
+ var INSTANCE_SIZE_SET = new Set(INSTANCE_SIZES);
71
+ function parseInstanceSize(s) {
72
+ return s && INSTANCE_SIZE_SET.has(s) ? s : null;
73
+ }
74
+
75
+ // ../types/src/node-type-labels.ts
76
+ var NODE_TYPE_LABEL = {
77
+ login: "Acting As",
78
+ navigate: "Navigate",
79
+ action: "Action",
80
+ assertion: "Assertion",
81
+ condition: "Condition",
82
+ wait: "Wait",
83
+ api_sequence: "API Sequence",
84
+ seed: "Seed Data",
85
+ setup: "Setup Flow",
86
+ notification: "Notification",
87
+ audio: "Audio input",
88
+ "audio-assertion": "Audio assertion",
89
+ end: "End"
90
+ };
91
+ function normalizeNodeType(input) {
92
+ if (input === "acting-as" || input === "acting_as") return "login";
93
+ return input;
94
+ }
95
+
96
+ // ../types/src/index.ts
97
+ import { z as z5 } from "zod";
98
+
99
+ // ../types/src/credentials.ts
100
+ import { z } from "zod";
101
+ var tokenRefreshPolicySchema = z.discriminatedUnion("kind", [
102
+ z.object({
103
+ kind: z.literal("firebase"),
104
+ refreshTokenPath: z.string().default("$.value.stsTokenManager.refreshToken"),
105
+ expirationPath: z.string().default("$.value.stsTokenManager.expirationTime"),
106
+ accessTokenPath: z.string().default("$.value.stsTokenManager.accessToken"),
107
+ apiKeyPath: z.string().default("$.value.apiKey")
108
+ })
109
+ ]);
110
+ var localStorageSourceSchema = z.object({
111
+ kind: z.literal("localStorage"),
112
+ origin: z.string().min(1),
113
+ key: z.string().min(1),
114
+ jsonPath: z.string().optional()
115
+ });
116
+ var indexedDBSourceSchema = z.object({
117
+ kind: z.literal("indexedDB"),
118
+ database: z.string().min(1),
119
+ store: z.string().min(1),
120
+ key: z.string().min(1),
121
+ jsonPath: z.string().min(1)
122
+ });
123
+ var cookieSourceSchema = z.object({
124
+ kind: z.literal("cookie"),
125
+ domain: z.string().min(1),
126
+ name: z.string().min(1)
127
+ });
128
+ var headerExtractorSourceSchema = z.discriminatedUnion("kind", [
129
+ localStorageSourceSchema,
130
+ indexedDBSourceSchema,
131
+ cookieSourceSchema
132
+ ]);
133
+ var headerExtractorSchema = z.object({
134
+ name: z.string().min(1),
135
+ header: z.string().min(1).optional(),
136
+ prefix: z.string().optional(),
137
+ source: headerExtractorSourceSchema,
138
+ refresh: tokenRefreshPolicySchema.optional()
139
+ });
140
+ var credentialMetadataSchema = z.object({
141
+ headerName: z.string().optional(),
142
+ tokenHeaderName: z.string().optional(),
143
+ tokenHeaderPrefix: z.string().optional(),
144
+ headerExtractors: z.array(headerExtractorSchema).optional()
145
+ }).passthrough();
146
+
147
+ // ../types/src/issues.ts
148
+ import { z as z2 } from "zod";
149
+ var clamp = (value, max) => value.length > max ? value.slice(0, max) : value;
150
+ var requiredLimitedString = (label, max) => z2.string().transform((value) => value.trim()).pipe(z2.string().min(1, `${label} is required`)).transform((value) => clamp(value, max));
151
+ var optionalLimitedString = (max) => z2.string().optional().nullable().transform((value) => {
152
+ if (typeof value !== "string") return null;
153
+ const trimmed = value.trim();
154
+ if (!trimmed) return null;
155
+ return clamp(trimmed, max);
156
+ });
157
+ var ISO_DATETIME = z2.string().datetime({ offset: true });
158
+ var UUID = z2.string().uuid();
159
+ var IssueSeveritySchema = z2.enum(["low", "medium", "high", "unknown"]);
160
+ var IssueStatusSchema = z2.enum(["open", "closed", "not_a_bug"]);
161
+ var IssueSourceKindSchema = z2.enum([
162
+ "crawler_analysis",
163
+ "exploratory_attempt",
164
+ "qa_page_test",
165
+ "workflow_test",
166
+ "chaos_test",
167
+ "adhoc_test"
168
+ ]);
169
+ var TITLE_LIMIT = 512;
170
+ var TLDR_LIMIT = 512;
171
+ var URL_LIMIT = 2048;
172
+ var STORAGE_KEY_LIMIT = 1024;
173
+ var DIAGNOSTIC_LIMIT = 4e3;
174
+ var NarrationTranscriptSegmentSchema = z2.object({
175
+ startMs: z2.number().int().min(0),
176
+ endMs: z2.number().int().min(1),
177
+ text: z2.string().min(1)
178
+ });
179
+ var RecordIssueOccurrencePayloadSchema = z2.object({
180
+ orgId: UUID,
181
+ propertyId: UUID,
182
+ canonicalPageId: UUID.optional().nullable().transform((value) => value ?? null),
183
+ credentialId: UUID.optional().nullable().transform((value) => value ?? null),
184
+ issueTitle: requiredLimitedString("Issue title", TITLE_LIMIT),
185
+ issueSeverity: IssueSeveritySchema,
186
+ issueCategoryId: UUID.optional().nullable().transform((value) => value ?? null),
187
+ issueCategoryKey: z2.string().min(1).max(64).optional().nullable().transform((value) => {
188
+ if (typeof value !== "string") return null;
189
+ const trimmed = value.trim();
190
+ return trimmed.length ? trimmed : null;
191
+ }),
192
+ issueConfidence: z2.number().int().min(0).max(100).optional().nullable().transform((value) => {
193
+ if (value === null || value === void 0) return null;
194
+ return value;
195
+ }),
196
+ detectedAt: ISO_DATETIME,
197
+ sourceKind: IssueSourceKindSchema,
198
+ sourceId: requiredLimitedString("Source identifier", STORAGE_KEY_LIMIT),
199
+ primaryUrl: requiredLimitedString("Primary URL", URL_LIMIT),
200
+ summary: requiredLimitedString("Summary", DIAGNOSTIC_LIMIT),
201
+ tldr: requiredLimitedString("TLDR", TLDR_LIMIT),
202
+ screenshotStorageKey: requiredLimitedString("Screenshot storage key", STORAGE_KEY_LIMIT),
203
+ screenshotCaption: optionalLimitedString(DIAGNOSTIC_LIMIT),
204
+ traceStorageKey: optionalLimitedString(STORAGE_KEY_LIMIT),
205
+ videoStorageKey: optionalLimitedString(STORAGE_KEY_LIMIT),
206
+ /** Action timeline for video overlay synchronization */
207
+ videoTimelineJson: z2.unknown().optional().nullable(),
208
+ /** Timed narration transcript for video overlay */
209
+ narrationTranscriptJson: z2.array(NarrationTranscriptSegmentSchema).optional().nullable(),
210
+ consoleLogExcerpt: optionalLimitedString(DIAGNOSTIC_LIMIT),
211
+ networkFailureUrl: optionalLimitedString(URL_LIMIT),
212
+ networkFailureStatus: z2.number().int().optional().nullable().transform((value) => value ?? null),
213
+ /** Structured network requests captured from Playwright trace */
214
+ networkRequestsJson: z2.array(z2.unknown()).optional().nullable(),
215
+ /** Structured console logs captured from Playwright trace */
216
+ consoleLogsJson: z2.array(z2.unknown()).optional().nullable(),
217
+ ticketReproSteps: optionalLimitedString(DIAGNOSTIC_LIMIT),
218
+ ticketUserFacingSummary: requiredLimitedString("Ticket summary", DIAGNOSTIC_LIMIT),
219
+ ticketDiagnosticsAnalysis: requiredLimitedString("Ticket diagnostics analysis", DIAGNOSTIC_LIMIT)
220
+ });
221
+
222
+ // ../types/src/local-browser.ts
223
+ var SESSION_EXPIRATION_MS = 60 * 60 * 1e3;
224
+
225
+ // ../types/src/benchmark.ts
226
+ import { z as z3 } from "zod";
227
+ var benchmarkWorkflowSuiteConfigSchema = z3.object({
228
+ runsPerWorkflow: z3.number().int().min(1).max(20).optional(),
229
+ runTimeoutMinutes: z3.number().int().min(1).max(720).optional(),
230
+ suiteTimeoutHours: z3.number().int().min(1).max(24).optional(),
231
+ sendSlackSummary: z3.boolean().optional()
232
+ });
233
+
234
+ // ../types/src/sandbox-tasks.ts
235
+ var CHECKLIST_ITEMS = [
236
+ {
237
+ id: "provisioned",
238
+ label: "Provisioned",
239
+ description: "Sandbox instance has been provisioned",
240
+ dependsOn: [],
241
+ producesArtifacts: [],
242
+ agentAutomatable: false
243
+ },
244
+ {
245
+ id: "code-cloned",
246
+ label: "Code Cloned",
247
+ description: "Repository has been cloned into the sandbox",
248
+ dependsOn: ["provisioned"],
249
+ producesArtifacts: [],
250
+ agentAutomatable: false
251
+ },
252
+ {
253
+ id: "environment-analyzed",
254
+ label: "Environment Analyzed",
255
+ description: "Repository analyzed for runtime, services, and dependencies",
256
+ dependsOn: ["code-cloned"],
257
+ producesArtifacts: ["environment-config"],
258
+ agentAutomatable: true,
259
+ promptTemplate: "env-checklist-analyze-environment"
260
+ },
261
+ {
262
+ id: "setup-script-created",
263
+ label: "Setup Script Created",
264
+ description: "Environment setup script for installing dependencies and build prerequisites",
265
+ dependsOn: ["environment-analyzed"],
266
+ producesArtifacts: ["setup-script"],
267
+ agentAutomatable: true,
268
+ promptTemplate: "env-checklist-create-setup-script"
269
+ },
270
+ {
271
+ id: "unit-tests-runnable",
272
+ label: "Unit Tests Runnable",
273
+ description: "Unit test suite can be executed successfully",
274
+ dependsOn: ["setup-script-created"],
275
+ producesArtifacts: [],
276
+ agentAutomatable: true,
277
+ promptTemplate: "env-checklist-verify-unit-tests"
278
+ },
279
+ {
280
+ id: "dockerfile-created",
281
+ label: "Dockerfile Created",
282
+ description: "Dockerfile generated from environment analysis",
283
+ dependsOn: ["environment-analyzed"],
284
+ producesArtifacts: ["dockerfile"],
285
+ agentAutomatable: true,
286
+ promptTemplate: "env-checklist-create-dockerfile"
287
+ },
288
+ {
289
+ id: "docker-compose-created",
290
+ label: "Docker Compose Created",
291
+ description: "Docker Compose file with application and service containers",
292
+ dependsOn: ["dockerfile-created"],
293
+ producesArtifacts: ["docker-compose"],
294
+ agentAutomatable: true,
295
+ promptTemplate: "env-checklist-create-docker-compose"
296
+ },
297
+ {
298
+ id: "integration-tests-runnable",
299
+ label: "Integration Tests Runnable",
300
+ description: "Integration tests can connect to services and run",
301
+ dependsOn: ["docker-compose-created"],
302
+ producesArtifacts: [],
303
+ agentAutomatable: true,
304
+ promptTemplate: "env-checklist-verify-integration-tests"
305
+ },
306
+ {
307
+ id: "seed-script-created",
308
+ label: "Seed Script Created",
309
+ description: "Database seed script for initial data population",
310
+ dependsOn: ["docker-compose-created"],
311
+ producesArtifacts: ["seed-script"],
312
+ agentAutomatable: true,
313
+ promptTemplate: "env-checklist-create-seed-script"
314
+ },
315
+ {
316
+ id: "server-running",
317
+ label: "Server Running",
318
+ description: "Application server started via startup script",
319
+ dependsOn: ["docker-compose-created"],
320
+ producesArtifacts: ["startup-script"],
321
+ agentAutomatable: true,
322
+ promptTemplate: "env-checklist-start-server"
323
+ },
324
+ {
325
+ id: "server-accessible",
326
+ label: "Server Accessible",
327
+ description: "Application server responds to health check requests",
328
+ dependsOn: ["server-running"],
329
+ producesArtifacts: [],
330
+ agentAutomatable: true,
331
+ promptTemplate: "env-checklist-verify-server"
332
+ },
333
+ {
334
+ id: "adhoc-test-ready",
335
+ label: "Ad Hoc Test Ready",
336
+ description: "Credential-producing sandbox action validated against a running instance for sandbox-backed ad hoc tests",
337
+ dependsOn: ["server-accessible"],
338
+ producesArtifacts: [],
339
+ agentAutomatable: true,
340
+ countsTowardVerification: false,
341
+ promptTemplate: "env-checklist-enable-adhoc-testing"
342
+ },
343
+ {
344
+ id: "template-verified",
345
+ label: "Template Verified",
346
+ description: "A fresh instance provisioned from this template comes up healthy",
347
+ dependsOn: ["server-accessible"],
348
+ producesArtifacts: [],
349
+ agentAutomatable: true,
350
+ promptTemplate: "env-checklist-verify-template"
351
+ }
352
+ ];
353
+ var CHECKLIST_ITEM_MAP = Object.fromEntries(CHECKLIST_ITEMS.map((item) => [item.id, item]));
354
+ var ALL_CHECKLIST_ITEM_IDS = CHECKLIST_ITEMS.map((item) => item.id);
355
+
356
+ // ../types/src/macros.ts
357
+ var MACRO_CATALOG = [
358
+ {
359
+ name: "UUID",
360
+ description: "Generate a random UUID v4",
361
+ args: [],
362
+ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
363
+ },
364
+ {
365
+ name: "NOW",
366
+ description: "Current ISO 8601 timestamp",
367
+ args: [],
368
+ example: "2026-02-19T14:30:00.000Z"
369
+ },
370
+ {
371
+ name: "TODAY",
372
+ description: "Current date (YYYY-MM-DD)",
373
+ args: [],
374
+ example: "2026-02-19"
375
+ },
376
+ {
377
+ name: "DATE",
378
+ description: "Date offset from today by N days (negative for past, positive for future)",
379
+ args: [{ name: "days", type: "number", description: "Number of days offset (e.g. -7, +30)" }],
380
+ example: "2026-02-26"
381
+ },
382
+ {
383
+ name: "TIMESTAMP",
384
+ description: "Current Unix timestamp in milliseconds",
385
+ args: [],
386
+ example: "1771520400000"
387
+ },
388
+ {
389
+ name: "RANDOM_INT",
390
+ description: "Random integer in range (inclusive)",
391
+ args: [
392
+ { name: "min", type: "number", description: "Minimum value" },
393
+ { name: "max", type: "number", description: "Maximum value" }
394
+ ],
395
+ example: "42"
396
+ },
397
+ {
398
+ name: "RANDOM_STRING",
399
+ description: "Random alphanumeric string",
400
+ args: [{ name: "length", type: "number", description: "Character count" }],
401
+ example: "xK9mQ"
402
+ },
403
+ {
404
+ name: "EMAIL",
405
+ description: "Generate a unique test email address",
406
+ args: [],
407
+ example: "test-a1b2@example-test.com"
408
+ },
409
+ {
410
+ name: "FIRST_NAME",
411
+ description: "Random first name",
412
+ args: [],
413
+ example: "Jordan"
414
+ },
415
+ {
416
+ name: "LAST_NAME",
417
+ description: "Random last name",
418
+ args: [],
419
+ example: "Chen"
420
+ },
421
+ {
422
+ name: "PHONE",
423
+ description: "Random US phone number",
424
+ args: [],
425
+ example: "+1-555-382-7491"
426
+ },
427
+ {
428
+ name: "SEQUENCE",
429
+ description: "Auto-incrementing counter (resets per run)",
430
+ args: [{ name: "name", type: "string", description: "Counter name" }],
431
+ example: "1"
432
+ },
433
+ {
434
+ name: "AI",
435
+ description: "AI-generated string for the given prompt (resolved once per run, cached by prompt)",
436
+ args: [{ name: "prompt", type: "string", description: 'Quoted description of what to generate, e.g. "email subject"' }],
437
+ example: "Quick question about your refund"
438
+ }
439
+ ];
440
+ var VALID_MACRO_NAMES = new Set(MACRO_CATALOG.map((m) => m.name));
441
+ var MACRO_ARG_COUNTS = new Map(MACRO_CATALOG.map((m) => [m.name, m.args.length]));
442
+
443
+ // ../types/src/workflow-node-schemas.ts
444
+ import { z as z4 } from "zod";
445
+ var FormFieldSchema = z4.object({
446
+ name: z4.string().describe('Unique field identifier (snake_case, e.g., "search_query", "recipient_email")'),
447
+ label: z4.string().describe('Human-friendly label (e.g., "Search Query", "Recipient Email")'),
448
+ type: z4.enum([
449
+ "text",
450
+ "email",
451
+ "password",
452
+ "number",
453
+ "textarea",
454
+ "select",
455
+ "checkbox",
456
+ "multiselect",
457
+ "file"
458
+ ]).optional().describe('Input type, defaults to "text"'),
459
+ required: z4.boolean().optional().describe("Whether this field is required"),
460
+ value: z4.string().describe("The value to use for this field"),
461
+ options: z4.array(z4.object({ value: z4.string(), label: z4.string() })).optional().describe("If type is select/multiselect, provide allowed options here")
462
+ });
463
+ var InlineAssertionSchema = z4.object({
464
+ condition: z4.string().describe("What to verify after the action"),
465
+ severity: z4.enum(["warn", "fail"]).describe("warn = log and continue on failure, fail = stop the test"),
466
+ agentic: z4.boolean().optional().describe("true if requires visual/complex evaluation that cannot be cached")
467
+ });
468
+ var NodeTypeEnum = z4.enum([
469
+ "login",
470
+ "navigate",
471
+ "action",
472
+ "assertion",
473
+ "seed",
474
+ "setup",
475
+ "wait",
476
+ "condition",
477
+ "api_sequence",
478
+ "end",
479
+ "notification",
480
+ "audio",
481
+ "audio-assertion"
482
+ ]);
483
+
484
+ // ../types/src/browser-viewport.ts
485
+ var BROWSER_VIEWPORT_PRESETS = {
486
+ desktop: { label: "Desktop", width: 1280, height: 800, device: "desktop" },
487
+ desktop_large: { label: "Large desktop", width: 1920, height: 1080, device: "desktop" },
488
+ laptop: { label: "Laptop", width: 1440, height: 900, device: "laptop" },
489
+ tablet: { label: "Tablet", width: 768, height: 1024, device: "tablet" },
490
+ mobile: { label: "Mobile", width: 390, height: 844, device: "mobile" }
491
+ };
492
+ var BROWSER_VIEWPORT_PRESET_KEYS = Object.keys(
493
+ BROWSER_VIEWPORT_PRESETS
494
+ );
495
+
496
+ // ../types/src/index.ts
497
+ var PLAYBOOK_STEP_ACTIONS = [
498
+ "click",
499
+ "fill",
500
+ "fill_form",
501
+ "select",
502
+ "navigate",
503
+ "wait",
504
+ "scroll",
505
+ "hover",
506
+ "upload",
507
+ "verify",
508
+ "press_key",
509
+ "drag",
510
+ "resize",
511
+ "capture",
512
+ "extract_table",
513
+ "python_execute",
514
+ "verify_download",
515
+ "verify_download_content",
516
+ "screenshot",
517
+ "agent_loop"
518
+ ];
519
+ function isPositiveIntegerString(value) {
520
+ if (!value || !/^\d+$/.test(value)) return false;
521
+ return Number(value) > 0;
522
+ }
523
+ var playbookStepAgentSchema = z5.object({
524
+ order: z5.number().describe("Step number (1-based)."),
525
+ action: z5.enum(PLAYBOOK_STEP_ACTIONS).describe(
526
+ 'The type of browser interaction. PREFER DETERMINISTIC VERBS even when verbose \u2014 three deterministic steps beat one agentic step, because deterministic steps replay via Playwright with no agent dispatch. Each replayable playbook step must be 1:1 with an exposed browser tool you actually used and must correspond to zero or one recorded actionRef. If you cannot accomplish the intent with the browser tools you have, do not add a playbook step for it; report the limitation outside playbookSteps. Do not summarize several recorded actions into one "other" step; report the same 1:1 browser primitives you actually used. The only multi-field exception is one fill_form step for one browser_fill_form action. Use "verify" for assertion checks \u2014 both inline assertions and completion assertions proving the action succeeded. Use "verify" for inspection language such as "inspect whether", "confirm", "observe", or "check" when the result is visible in the DOM. Use "capture" instead only when the observed value is needed by later steps. Use "fill" for single-field inputs. Use "fill_form" when browser_fill_form was called to fill multiple fields at once \u2014 one fill_form step per call. Use "click" for checkboxes, switches, toggle buttons, and click-to-focus interactions. There is no separate "toggle" or "focus" action. Use "upload" for file upload actions, including generated CSV/file, attach file, choose file, import file, and document/image attachment intents (browser_action action="upload"). Set params.path to the staged attachment handle, generated file variable, or filename reference used by the upload tool (e.g. {path: "$var.csv_file"}), and include actionRefs pointing to the recorded file_upload action. Do NOT use "other" for file attachment/upload/import intents. Use "scroll" only when scrolling is the user-visible action being tested; routine browser_scroll calls for visibility, inspection, or video framing are observation steps and should usually be omitted from playbookSteps. Use "press_key" for keyboard actions (Enter, Escape, Tab, arrows). Use "press_key" with params.key="Escape" to dismiss a popover, dropdown, panel, or modal when Escape was the recorded action; use "click" if the recorded action clicked a close button or outside target. There is no separate "dismiss" action. Use "drag" for drag-and-drop interactions. Use "resize" when browser_resize was used to resize the viewport. Set params.width and params.height to positive integer pixel values and include the actionRef pointing to the recorded resize action. Use "capture" to extract app-generated values (IDs, codes, URLs) for later steps via $var.name, but only from a visible DOM target or the current URL. Do not capture from performance/network timing, storage, hidden DOM, or app-global state. Use "screenshot" only when browser_screenshot itself is the requested evidence capture. Set params.label when a label was used, optionally params.fullPage="true". Do not use screenshot for routine visual checks after actions; use verify when a browser_assert proves visible state. Use "extract_table" when browser_extract_table was used to extract tabular data from the page. Use "python_execute" when python_execute was used with cache_label to run a data validation script. Use "verify_download" when browser_download(action="list") / browser_list_downloads proves that a file matching some pattern was downloaded. Set params.pattern to a glob (supports *, ?) or substring; optionally params.timeoutMs. This is currently agent-only at replay, so do not set actionRefs. Use "verify_download_content" when browser_download(action="read") / browser_read_download content proves CSV headers, PDF text, exported rows, or similar downloaded-file content. Set params.contains or params.pattern to the expected content predicate. This is currently agent-only at replay, so do not set actionRefs. Use "agent_loop" ONLY when the action set is genuinely unknown until runtime \u2014 variable count of items (e.g. "toggle row checkboxes until 3 selected"), conditional retry that depends on UI state, or a runtime predicate over non-DOM state. Set params.goal to a one-sentence checkable predicate (e.g. params.goal = "3 grid row checkboxes are selected"). DO NOT use agent_loop for: known-N iteration (write N deterministic steps), single click that might double-fire (use "click"), retry-on-flake (the runtime handles that). agent_loop steps replay via a Playwright override authored after first run; they are non-deterministic on first run, so the bar is high. Network/devtools/API inspections and unsupported browser environment mutations are diagnostic-only unless there is an exposed browser tool for the action. If visible page state proves the condition, record that as "verify"; otherwise omit the diagnostic observation from playbookSteps. Do not use "other". If no concrete browser-tool-backed action above fits, omit the observation from playbookSteps and report the limitation outside the playbook.'
527
+ ),
528
+ target: z5.string().describe(
529
+ `Human-readable element description using visible labels, placeholders, or aria-labels. Examples: "'Submit' button", "'Email' input field", "'Status' dropdown". For upload actions, describe the file input and include the attachment name (e.g. "CSV file input for 'testing-checklist.csv'"). Never use coordinates, ref IDs, or internal identifiers.`
530
+ ),
531
+ params: z5.record(z5.string(), z5.string()).optional().describe(
532
+ 'Data values using $var.name references and $MACRO() expressions \u2014 NEVER hard-coded literals. Common keys: value (for fill: {value: "$EMAIL()"}), option (for select: {option: "Admin"} \u2014 fixed app constants like dropdown options are allowed as literals), url (for navigate: {url: "$var.target_url"}), path (for upload: {path: "$var.file_path"}), key (for press_key: {key: "Enter"}, {key: "Escape"}), width and height (for resize: {width: "390", height: "844"}), label and fullPage (for screenshot: {label: "seats-table", fullPage: "true"}), pattern or contains (for download verification: {pattern: "report-*.csv"} or {contains: "Expected Header"}), expression + saveAs (for capture: prefer a visible DOM ref expression or "() => window.location.href"; do not use performance.getEntries() or other network/storage/global state; e.g. {saveAs: "order_confirmation_id"}). For fill_form: keys are field names from the fill_form call, values are $var.name or $MACRO() (e.g. {company: "$var.company", email: "$EMAIL()"}). Available macros: $UUID(), $EMAIL(), $FIRST_NAME(), $LAST_NAME(), $PHONE(), $RANDOM_STRING(n), $RANDOM_INT(min,max), $TODAY(), $DATE(days), $NOW(), $TIMESTAMP(), $SEQUENCE("name").'
533
+ ),
534
+ note: z5.string().optional().describe(
535
+ 'Timing or quirk notes ONLY (e.g. "Wait 1s for modal animation", "Scroll into view first"). Do NOT put data values, optional markers, or verification notes here.'
536
+ ),
537
+ actionRefs: z5.array(z5.number()).max(1).optional().describe(
538
+ 'Zero or one recorded browser action index that corresponds to this playbook step. Interaction tools, browser_resize, capture evaluates (browser_evaluate with saveAs), and browser_assert produce [Action #N] tags \u2014 collect those indices here. Read-only browser_snapshot and plain browser_evaluate without saveAs do NOT produce action indices. browser_scroll and browser_screenshot may produce action indices when they are the primary requested tool call; omit actionRefs when no action tag was emitted. If you took multiple cacheable UI actions, report multiple 1:1 playbook steps instead of putting multiple refs on one step or summarizing them as "other". A fill_form call is a single action \u2014 use one fill_form playbook step with one actionRef. For a click that triggers a native dialog, keep one click actionRef on the click step and set expectedDialogs rather than adding a separate dialog actionRef. Actions not referenced by any playbook step are considered exploratory and will be discarded by the cache compiler.'
539
+ ),
540
+ expectedDialogs: z5.enum(["accept", "dismiss"]).optional().describe(
541
+ 'Set when this step is known to fire a native browser dialog (alert/confirm/prompt) \u2014 e.g. clicking a "Delete" button that prompts "Are you sure?". On replay the runtime pre-arms the dialog handler with this action automatically. In free-form runs, you should call the dialog tool (browser_dialog for consolidated tools, browser_handle_dialog for legacy tools) with this action immediately before the step. Do not add a separate dialog step \u2014 keeping the pre-arm on the triggering step keeps the pre-arm and the triggering action in one place.'
542
+ )
543
+ }).superRefine((step, ctx) => {
544
+ if (step.action === "agent_loop") {
545
+ const goal = step.params?.goal;
546
+ if (!goal || goal.trim().length === 0) {
547
+ ctx.addIssue({
548
+ code: z5.ZodIssueCode.custom,
549
+ path: ["params", "goal"],
550
+ message: 'agent_loop steps must set params.goal to a one-sentence checkable predicate (e.g. "3 grid row checkboxes are selected").'
551
+ });
552
+ }
553
+ }
554
+ if (step.action === "verify_download") {
555
+ const pattern = step.params?.pattern;
556
+ if (!pattern || pattern.trim().length === 0) {
557
+ ctx.addIssue({
558
+ code: z5.ZodIssueCode.custom,
559
+ path: ["params", "pattern"],
560
+ message: "verify_download steps must set params.pattern to a glob (supports *, ?) or substring matching the expected filename."
561
+ });
562
+ }
563
+ }
564
+ if (step.action === "verify_download_content") {
565
+ const pattern = step.params?.pattern;
566
+ const contains = step.params?.contains;
567
+ if ((!pattern || pattern.trim().length === 0) && (!contains || contains.trim().length === 0)) {
568
+ ctx.addIssue({
569
+ code: z5.ZodIssueCode.custom,
570
+ path: ["params"],
571
+ message: "verify_download_content steps must set params.contains or params.pattern for the expected downloaded content."
572
+ });
573
+ }
574
+ }
575
+ if (step.action === "resize") {
576
+ const width = step.params?.width;
577
+ const height = step.params?.height;
578
+ if (!isPositiveIntegerString(width)) {
579
+ ctx.addIssue({
580
+ code: z5.ZodIssueCode.custom,
581
+ path: ["params", "width"],
582
+ message: "resize steps must set params.width to a positive integer pixel value."
583
+ });
584
+ }
585
+ if (!isPositiveIntegerString(height)) {
586
+ ctx.addIssue({
587
+ code: z5.ZodIssueCode.custom,
588
+ path: ["params", "height"],
589
+ message: "resize steps must set params.height to a positive integer pixel value."
590
+ });
591
+ }
592
+ }
593
+ });
594
+
595
+ export {
596
+ USER_SETTABLE_WORKFLOW_STATUSES,
597
+ INSTANCE_SIZES,
598
+ INSTANCE_SIZE_SPEC,
599
+ parseInstanceSize,
600
+ VALID_MACRO_NAMES,
601
+ InlineAssertionSchema,
602
+ NODE_TYPE_LABEL,
603
+ normalizeNodeType
604
+ };
605
+ //# sourceMappingURL=chunk-SJJW77WN.js.map