@runcofactor/cli 0.13.0 → 0.15.1
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/account-62I7FG5G.js +255 -0
- package/dist/account-62I7FG5G.js.map +1 -0
- package/dist/{api-catalog-7HLEN7C2.js → api-catalog-CAJUASVC.js} +5 -5
- package/dist/{attachment-OVNQD6Z2.js → attachment-RL4AZUJE.js} +5 -5
- package/dist/augmentor-GAF3MFY6.js +198 -0
- package/dist/augmentor-GAF3MFY6.js.map +1 -0
- package/dist/{auth-VUHL74FH.js → auth-DURHUZDW.js} +3 -3
- package/dist/{chunk-YN763NWQ.js → chunk-26U3DGUM.js} +10 -4
- package/dist/chunk-26U3DGUM.js.map +1 -0
- package/dist/{chunk-JZMJUPZP.js → chunk-32P26BZT.js} +3 -3
- package/dist/chunk-32P26BZT.js.map +1 -0
- package/dist/{chunk-QQVWGWPI.js → chunk-5R4HMSNX.js} +8561 -1511
- package/dist/chunk-5R4HMSNX.js.map +1 -0
- package/dist/{chunk-VGTKUOYS.js → chunk-AQPJQ5AE.js} +2 -2
- package/dist/{chunk-CQE46HSM.js → chunk-CFJXYPTF.js} +14 -8
- package/dist/chunk-CFJXYPTF.js.map +1 -0
- package/dist/{chunk-NL7CVG56.js → chunk-CJEKEW7R.js} +57 -10
- package/dist/chunk-CJEKEW7R.js.map +1 -0
- package/dist/{chunk-Z5LUTUDN.js → chunk-G5SXUXSU.js} +3 -3
- package/dist/{chunk-ZTOE3ND3.js → chunk-HKQ5XQAQ.js} +4 -4
- package/dist/{chunk-PZ4LCN6K.js → chunk-IGHDIWZU.js} +2 -2
- package/dist/{chunk-QGI4UCJX.js → chunk-IWKJQZJQ.js} +124 -74
- package/dist/chunk-IWKJQZJQ.js.map +1 -0
- package/dist/{chunk-ZD3KHESI.js → chunk-KRWRUU6R.js} +27 -7
- package/dist/chunk-KRWRUU6R.js.map +1 -0
- package/dist/{chunk-CRHPDPRS.js → chunk-PXFDH6YL.js} +63 -8
- package/dist/{chunk-CRHPDPRS.js.map → chunk-PXFDH6YL.js.map} +1 -1
- package/dist/{chunk-EJ4U242G.js → chunk-UZ2ZA5A6.js} +2 -2
- package/dist/{chunk-EEN2TZUQ.js → chunk-VKBTI5EF.js} +3 -3
- package/dist/{chunk-ENDHMYEJ.js → chunk-ZXRVFFCY.js} +3 -3
- package/dist/{credential-LO2SEEHU.js → credential-JGVSEGVH.js} +5 -5
- package/dist/{credential-template-ZN7W7734.js → credential-template-CWWMOKB2.js} +5 -5
- package/dist/{debug-workflow-R3RYYAXK.js → debug-workflow-BXRU72YZ.js} +5 -5
- package/dist/{docs-DIAFBDXQ.js → docs-PVBXPTGR.js} +95 -11
- package/dist/docs-PVBXPTGR.js.map +1 -0
- package/dist/{doctor-NZPUSCRE.js → doctor-RHMKD4W5.js} +3 -3
- package/dist/{environment-RQVU4P5M.js → environment-WZKIO3R3.js} +5 -5
- package/dist/{feature-flag-XG26RURR.js → feature-flag-K5REGGDY.js} +98 -12
- package/dist/feature-flag-K5REGGDY.js.map +1 -0
- package/dist/index.js +107 -51
- package/dist/index.js.map +1 -1
- package/dist/{init-EDNLKGPT.js → init-FFUZO5D7.js} +5 -5
- package/dist/{install-FYZ3HNZK.js → install-XRKEQAFZ.js} +5 -5
- package/dist/{issues-NNRVTJ4L.js → issues-I3V6GEXU.js} +5 -5
- package/dist/{knobs-A2BOBH22.js → knobs-6WLJMB44.js} +7 -6
- package/dist/knobs-6WLJMB44.js.map +1 -0
- package/dist/{list-F33VZ4BJ.js → list-PHC7VYNS.js} +5 -5
- package/dist/{local-DQDTM3XA.js → local-VGYRSW22.js} +7 -7
- package/dist/{login-BUMVIB36.js → login-QPU2BKG2.js} +5 -5
- package/dist/{mcp-B5Y5CDMQ.js → mcp-LA452TOA.js} +9 -9
- package/dist/{mcp-B5Y5CDMQ.js.map → mcp-LA452TOA.js.map} +1 -1
- package/dist/{pdf-extract-ABWV3L5X.js → pdf-extract-YHE54XU4.js} +2 -2
- package/dist/product-RSZV5HMB.js +346 -0
- package/dist/product-RSZV5HMB.js.map +1 -0
- package/dist/{property-NJ4SRXQG.js → property-YP4GHQAR.js} +5 -5
- package/dist/{psql-VBZFCMNR.js → psql-XGLBI6T7.js} +3 -3
- package/dist/{record-WAO36O7G.js → record-KWKHP2ZY.js} +6 -6
- package/dist/{redis-DHZXHL4S.js → redis-VJGCUJPV.js} +3 -3
- package/dist/redis-VJGCUJPV.js.map +1 -0
- package/dist/{release-STJKUKTE.js → release-NDRHPW6V.js} +5 -5
- package/dist/{sandbox-DWSGLY7B.js → sandbox-OOCANWOG.js} +51 -7
- package/dist/sandbox-OOCANWOG.js.map +1 -0
- package/dist/{scenarios-HCIDY725.js → scenarios-2HRLCGFY.js} +5 -5
- package/dist/{session-Y5RHU54D.js → session-M4ULYDYP.js} +8 -9
- package/dist/session-M4ULYDYP.js.map +1 -0
- package/dist/{skill-23WAHUOB.js → skill-4DGPRDUC.js} +10 -10
- package/dist/{skill-23WAHUOB.js.map → skill-4DGPRDUC.js.map} +1 -1
- package/dist/skills/debug-run/SKILL.md +7 -1
- package/dist/skills/debug-run/history/1.3.1.md +279 -0
- package/dist/skills/debug-run/version.json +1 -1
- package/dist/skills/optimize-cache/SKILL.md +41 -4
- package/dist/{spec-LM5XHOQ5.js → spec-XZ2TKUFZ.js} +5 -5
- package/dist/{src-BGDRMOKC.js → src-2FK3JHGW.js} +315 -104
- package/dist/src-2FK3JHGW.js.map +1 -0
- package/dist/{src-NCJPUAE6.js → src-CV57ZD6I.js} +10 -8
- package/dist/{src-22RI5VP2.js → src-HL7HEJIW.js} +2 -2
- package/dist/{src-Y3K7UJEF.js → src-OU7544PM.js} +6 -4
- package/dist/{start-SWY55CZX.js → start-IYKF3C3X.js} +5 -5
- package/dist/{tag-YSU2XXPI.js → tag-T45MMSCH.js} +6 -6
- package/dist/{task-NLBKLD7D.js → task-MCUHAVTD.js} +5 -5
- package/dist/{test-suite-QCPWZ2LS.js → test-suite-BICBRSBP.js} +10 -8
- package/dist/{test-suite-QCPWZ2LS.js.map → test-suite-BICBRSBP.js.map} +1 -1
- package/dist/trace-2BAPMYAS.js +16 -0
- package/dist/{triage-TT4BMDBU.js → triage-M3RZ2ASB.js} +6 -6
- package/dist/{upgrade-6ZUFETKX.js → upgrade-4QCRAUHP.js} +3 -3
- package/dist/{workflow-2CX3ZNOQ.js → workflow-4J23FV7K.js} +86 -15
- package/dist/workflow-4J23FV7K.js.map +1 -0
- package/dist/{workflow-cache-GXNE6SU2.js → workflow-cache-XPSK6KC7.js} +26 -13
- package/dist/workflow-cache-XPSK6KC7.js.map +1 -0
- package/dist/{workflow-debug-PRX3DWGD.js → workflow-debug-W4USZH35.js} +9 -9
- package/dist/{workflow-proposals-BW327WGL.js → workflow-proposals-5E3DTYZB.js} +5 -7
- package/dist/workflow-proposals-5E3DTYZB.js.map +1 -0
- package/package.json +5 -1
- package/dist/chunk-CQE46HSM.js.map +0 -1
- package/dist/chunk-JZMJUPZP.js.map +0 -1
- package/dist/chunk-NL7CVG56.js.map +0 -1
- package/dist/chunk-QGI4UCJX.js.map +0 -1
- package/dist/chunk-QQVWGWPI.js.map +0 -1
- package/dist/chunk-YN763NWQ.js.map +0 -1
- package/dist/chunk-ZD3KHESI.js.map +0 -1
- package/dist/docs-DIAFBDXQ.js.map +0 -1
- package/dist/feature-flag-XG26RURR.js.map +0 -1
- package/dist/knobs-A2BOBH22.js.map +0 -1
- package/dist/redis-DHZXHL4S.js.map +0 -1
- package/dist/sandbox-DWSGLY7B.js.map +0 -1
- package/dist/session-Y5RHU54D.js.map +0 -1
- package/dist/src-BGDRMOKC.js.map +0 -1
- package/dist/trace-A3ZY6K26.js +0 -16
- package/dist/workflow-2CX3ZNOQ.js.map +0 -1
- package/dist/workflow-cache-GXNE6SU2.js.map +0 -1
- package/dist/workflow-proposals-BW327WGL.js.map +0 -1
- /package/dist/{api-catalog-7HLEN7C2.js.map → api-catalog-CAJUASVC.js.map} +0 -0
- /package/dist/{attachment-OVNQD6Z2.js.map → attachment-RL4AZUJE.js.map} +0 -0
- /package/dist/{auth-VUHL74FH.js.map → auth-DURHUZDW.js.map} +0 -0
- /package/dist/{chunk-VGTKUOYS.js.map → chunk-AQPJQ5AE.js.map} +0 -0
- /package/dist/{chunk-Z5LUTUDN.js.map → chunk-G5SXUXSU.js.map} +0 -0
- /package/dist/{chunk-ZTOE3ND3.js.map → chunk-HKQ5XQAQ.js.map} +0 -0
- /package/dist/{chunk-PZ4LCN6K.js.map → chunk-IGHDIWZU.js.map} +0 -0
- /package/dist/{chunk-EJ4U242G.js.map → chunk-UZ2ZA5A6.js.map} +0 -0
- /package/dist/{chunk-EEN2TZUQ.js.map → chunk-VKBTI5EF.js.map} +0 -0
- /package/dist/{chunk-ENDHMYEJ.js.map → chunk-ZXRVFFCY.js.map} +0 -0
- /package/dist/{credential-LO2SEEHU.js.map → credential-JGVSEGVH.js.map} +0 -0
- /package/dist/{credential-template-ZN7W7734.js.map → credential-template-CWWMOKB2.js.map} +0 -0
- /package/dist/{debug-workflow-R3RYYAXK.js.map → debug-workflow-BXRU72YZ.js.map} +0 -0
- /package/dist/{doctor-NZPUSCRE.js.map → doctor-RHMKD4W5.js.map} +0 -0
- /package/dist/{environment-RQVU4P5M.js.map → environment-WZKIO3R3.js.map} +0 -0
- /package/dist/{init-EDNLKGPT.js.map → init-FFUZO5D7.js.map} +0 -0
- /package/dist/{install-FYZ3HNZK.js.map → install-XRKEQAFZ.js.map} +0 -0
- /package/dist/{issues-NNRVTJ4L.js.map → issues-I3V6GEXU.js.map} +0 -0
- /package/dist/{list-F33VZ4BJ.js.map → list-PHC7VYNS.js.map} +0 -0
- /package/dist/{local-DQDTM3XA.js.map → local-VGYRSW22.js.map} +0 -0
- /package/dist/{login-BUMVIB36.js.map → login-QPU2BKG2.js.map} +0 -0
- /package/dist/{pdf-extract-ABWV3L5X.js.map → pdf-extract-YHE54XU4.js.map} +0 -0
- /package/dist/{property-NJ4SRXQG.js.map → property-YP4GHQAR.js.map} +0 -0
- /package/dist/{psql-VBZFCMNR.js.map → psql-XGLBI6T7.js.map} +0 -0
- /package/dist/{record-WAO36O7G.js.map → record-KWKHP2ZY.js.map} +0 -0
- /package/dist/{release-STJKUKTE.js.map → release-NDRHPW6V.js.map} +0 -0
- /package/dist/{scenarios-HCIDY725.js.map → scenarios-2HRLCGFY.js.map} +0 -0
- /package/dist/{spec-LM5XHOQ5.js.map → spec-XZ2TKUFZ.js.map} +0 -0
- /package/dist/{src-NCJPUAE6.js.map → src-CV57ZD6I.js.map} +0 -0
- /package/dist/{src-22RI5VP2.js.map → src-HL7HEJIW.js.map} +0 -0
- /package/dist/{src-Y3K7UJEF.js.map → src-OU7544PM.js.map} +0 -0
- /package/dist/{start-SWY55CZX.js.map → start-IYKF3C3X.js.map} +0 -0
- /package/dist/{tag-YSU2XXPI.js.map → tag-T45MMSCH.js.map} +0 -0
- /package/dist/{task-NLBKLD7D.js.map → task-MCUHAVTD.js.map} +0 -0
- /package/dist/{trace-A3ZY6K26.js.map → trace-2BAPMYAS.js.map} +0 -0
- /package/dist/{triage-TT4BMDBU.js.map → triage-M3RZ2ASB.js.map} +0 -0
- /package/dist/{upgrade-6ZUFETKX.js.map → upgrade-4QCRAUHP.js.map} +0 -0
- /package/dist/{workflow-debug-PRX3DWGD.js.map → workflow-debug-W4USZH35.js.map} +0 -0
|
@@ -95,7 +95,7 @@ function normalizeNodeType(input) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// ../types/src/index.ts
|
|
98
|
-
import { z as
|
|
98
|
+
import { z as z7 } from "zod";
|
|
99
99
|
|
|
100
100
|
// ../types/src/credentials.ts
|
|
101
101
|
import { z } from "zod";
|
|
@@ -172,11 +172,6 @@ var TLDR_LIMIT = 512;
|
|
|
172
172
|
var URL_LIMIT = 2048;
|
|
173
173
|
var STORAGE_KEY_LIMIT = 1024;
|
|
174
174
|
var DIAGNOSTIC_LIMIT = 4e3;
|
|
175
|
-
var NarrationTranscriptSegmentSchema = z2.object({
|
|
176
|
-
startMs: z2.number().int().min(0),
|
|
177
|
-
endMs: z2.number().int().min(1),
|
|
178
|
-
text: z2.string().min(1)
|
|
179
|
-
});
|
|
180
175
|
var RecordIssueOccurrencePayloadSchema = z2.object({
|
|
181
176
|
orgId: UUID,
|
|
182
177
|
propertyId: UUID,
|
|
@@ -206,8 +201,6 @@ var RecordIssueOccurrencePayloadSchema = z2.object({
|
|
|
206
201
|
videoStorageKey: optionalLimitedString(STORAGE_KEY_LIMIT),
|
|
207
202
|
/** Action timeline for video overlay synchronization */
|
|
208
203
|
videoTimelineJson: z2.unknown().optional().nullable(),
|
|
209
|
-
/** Timed narration transcript for video overlay */
|
|
210
|
-
narrationTranscriptJson: z2.array(NarrationTranscriptSegmentSchema).optional().nullable(),
|
|
211
204
|
consoleLogExcerpt: optionalLimitedString(DIAGNOSTIC_LIMIT),
|
|
212
205
|
networkFailureUrl: optionalLimitedString(URL_LIMIT),
|
|
213
206
|
networkFailureStatus: z2.number().int().optional().nullable().transform((value) => value ?? null),
|
|
@@ -220,16 +213,118 @@ var RecordIssueOccurrencePayloadSchema = z2.object({
|
|
|
220
213
|
ticketDiagnosticsAnalysis: requiredLimitedString("Ticket diagnostics analysis", DIAGNOSTIC_LIMIT)
|
|
221
214
|
});
|
|
222
215
|
|
|
216
|
+
// ../types/src/workflow-cache.ts
|
|
217
|
+
import { z as z5 } from "zod";
|
|
218
|
+
|
|
219
|
+
// ../types/src/workflow-node-schemas.ts
|
|
220
|
+
import { z as z4 } from "zod";
|
|
221
|
+
|
|
222
|
+
// ../types/src/api-sequence.ts
|
|
223
|
+
import { z as z3 } from "zod";
|
|
224
|
+
var ValidationOperatorSchema = z3.enum([
|
|
225
|
+
"equals",
|
|
226
|
+
"not_equals",
|
|
227
|
+
"gt",
|
|
228
|
+
"lt",
|
|
229
|
+
"gte",
|
|
230
|
+
"lte",
|
|
231
|
+
"contains",
|
|
232
|
+
"not_contains",
|
|
233
|
+
"is_set",
|
|
234
|
+
"is_not_set"
|
|
235
|
+
]);
|
|
236
|
+
|
|
237
|
+
// ../types/src/workflow-node-schemas.ts
|
|
238
|
+
var FormFieldSchema = z4.object({
|
|
239
|
+
name: z4.string().describe('Unique field identifier (snake_case, e.g., "search_query", "recipient_email")'),
|
|
240
|
+
label: z4.string().describe('Human-friendly label (e.g., "Search Query", "Recipient Email")'),
|
|
241
|
+
type: z4.enum([
|
|
242
|
+
"text",
|
|
243
|
+
"email",
|
|
244
|
+
"password",
|
|
245
|
+
"number",
|
|
246
|
+
"textarea",
|
|
247
|
+
"select",
|
|
248
|
+
"checkbox",
|
|
249
|
+
"multiselect",
|
|
250
|
+
"file"
|
|
251
|
+
]).optional().describe('Input type, defaults to "text"'),
|
|
252
|
+
required: z4.boolean().optional().describe("Whether this field is required"),
|
|
253
|
+
value: z4.string().describe("The value to use for this field"),
|
|
254
|
+
options: z4.array(z4.object({ value: z4.string(), label: z4.string() })).optional().describe("If type is select/multiselect, provide allowed options here")
|
|
255
|
+
});
|
|
256
|
+
var AssertionSeverityEnum = z4.enum(["warn", "fail", "fatal"]);
|
|
257
|
+
var InlineAssertionSchema = z4.object({
|
|
258
|
+
condition: z4.string().describe("What to verify after the action"),
|
|
259
|
+
severity: AssertionSeverityEnum.describe(
|
|
260
|
+
"fatal = stop the test immediately on failure, fail = mark the run failed but keep going, warn = log a warning and continue (run still passes)"
|
|
261
|
+
),
|
|
262
|
+
agentic: z4.boolean().optional().describe("true if requires visual/complex evaluation that cannot be cached")
|
|
263
|
+
});
|
|
264
|
+
var ConditionSubjectSchema = z4.discriminatedUnion("kind", [
|
|
265
|
+
z4.object({
|
|
266
|
+
kind: z4.literal("variable"),
|
|
267
|
+
name: z4.string().describe('Input/variable name, e.g. "count" for $var.count')
|
|
268
|
+
}),
|
|
269
|
+
z4.object({
|
|
270
|
+
kind: z4.literal("acting_as")
|
|
271
|
+
})
|
|
272
|
+
]);
|
|
273
|
+
var ConditionPredicateSchema = z4.object({
|
|
274
|
+
subject: ConditionSubjectSchema,
|
|
275
|
+
operator: ValidationOperatorSchema,
|
|
276
|
+
/**
|
|
277
|
+
* Right-hand operand. For a `variable` subject this is a literal (or `$var`
|
|
278
|
+
* reference); for `acting_as` it is a credential template id. Omitted for the
|
|
279
|
+
* unary operators `is_set` / `is_not_set`.
|
|
280
|
+
*/
|
|
281
|
+
value: z4.string().optional()
|
|
282
|
+
});
|
|
283
|
+
var NodeTypeEnum = z4.enum([
|
|
284
|
+
"login",
|
|
285
|
+
"navigate",
|
|
286
|
+
"action",
|
|
287
|
+
"assertion",
|
|
288
|
+
"seed",
|
|
289
|
+
"setup",
|
|
290
|
+
"wait",
|
|
291
|
+
"condition",
|
|
292
|
+
"api_sequence",
|
|
293
|
+
"end",
|
|
294
|
+
"notification",
|
|
295
|
+
"audio",
|
|
296
|
+
"audio-assertion",
|
|
297
|
+
"sandbox_action"
|
|
298
|
+
]);
|
|
299
|
+
|
|
300
|
+
// ../types/src/workflow-cache.ts
|
|
301
|
+
var assertionSpecSchema = z5.object({
|
|
302
|
+
type: z5.enum([
|
|
303
|
+
"text_present",
|
|
304
|
+
"text_absent",
|
|
305
|
+
"element_visible",
|
|
306
|
+
"element_hidden",
|
|
307
|
+
"evaluate",
|
|
308
|
+
"toast_present"
|
|
309
|
+
]),
|
|
310
|
+
condition: z5.string(),
|
|
311
|
+
expected: z5.unknown().optional(),
|
|
312
|
+
strict: z5.boolean().optional(),
|
|
313
|
+
severity: AssertionSeverityEnum.optional(),
|
|
314
|
+
inlineAssertionId: z5.string().optional(),
|
|
315
|
+
label: z5.string().optional()
|
|
316
|
+
});
|
|
317
|
+
|
|
223
318
|
// ../types/src/local-browser.ts
|
|
224
319
|
var SESSION_EXPIRATION_MS = 60 * 60 * 1e3;
|
|
225
320
|
|
|
226
321
|
// ../types/src/benchmark.ts
|
|
227
|
-
import { z as
|
|
228
|
-
var benchmarkWorkflowSuiteConfigSchema =
|
|
229
|
-
runsPerWorkflow:
|
|
230
|
-
runTimeoutMinutes:
|
|
231
|
-
suiteTimeoutHours:
|
|
232
|
-
sendSlackSummary:
|
|
322
|
+
import { z as z6 } from "zod";
|
|
323
|
+
var benchmarkWorkflowSuiteConfigSchema = z6.object({
|
|
324
|
+
runsPerWorkflow: z6.number().int().min(1).max(20).optional(),
|
|
325
|
+
runTimeoutMinutes: z6.number().int().min(1).max(720).optional(),
|
|
326
|
+
suiteTimeoutHours: z6.number().int().min(1).max(24).optional(),
|
|
327
|
+
sendSlackSummary: z6.boolean().optional()
|
|
233
328
|
});
|
|
234
329
|
|
|
235
330
|
// ../types/src/sandbox-tasks.ts
|
|
@@ -442,51 +537,6 @@ var VALID_MACRO_NAMES = new Set(MACRO_CATALOG.map((m) => m.name));
|
|
|
442
537
|
var MACRO_ARG_COUNTS = new Map(MACRO_CATALOG.map((m) => [m.name, m.args.length]));
|
|
443
538
|
var MACRO_PATTERN = /(?<!\\)\$([A-Z_]+)\(([^)]*)\)/g;
|
|
444
539
|
|
|
445
|
-
// ../types/src/workflow-node-schemas.ts
|
|
446
|
-
import { z as z4 } from "zod";
|
|
447
|
-
var FormFieldSchema = z4.object({
|
|
448
|
-
name: z4.string().describe('Unique field identifier (snake_case, e.g., "search_query", "recipient_email")'),
|
|
449
|
-
label: z4.string().describe('Human-friendly label (e.g., "Search Query", "Recipient Email")'),
|
|
450
|
-
type: z4.enum([
|
|
451
|
-
"text",
|
|
452
|
-
"email",
|
|
453
|
-
"password",
|
|
454
|
-
"number",
|
|
455
|
-
"textarea",
|
|
456
|
-
"select",
|
|
457
|
-
"checkbox",
|
|
458
|
-
"multiselect",
|
|
459
|
-
"file"
|
|
460
|
-
]).optional().describe('Input type, defaults to "text"'),
|
|
461
|
-
required: z4.boolean().optional().describe("Whether this field is required"),
|
|
462
|
-
value: z4.string().describe("The value to use for this field"),
|
|
463
|
-
options: z4.array(z4.object({ value: z4.string(), label: z4.string() })).optional().describe("If type is select/multiselect, provide allowed options here")
|
|
464
|
-
});
|
|
465
|
-
var AssertionSeverityEnum = z4.enum(["warn", "fail", "fatal"]);
|
|
466
|
-
var InlineAssertionSchema = z4.object({
|
|
467
|
-
condition: z4.string().describe("What to verify after the action"),
|
|
468
|
-
severity: AssertionSeverityEnum.describe(
|
|
469
|
-
"fatal = stop the test immediately on failure, fail = mark the run failed but keep going, warn = log a warning and continue (run still passes)"
|
|
470
|
-
),
|
|
471
|
-
agentic: z4.boolean().optional().describe("true if requires visual/complex evaluation that cannot be cached")
|
|
472
|
-
});
|
|
473
|
-
var NodeTypeEnum = z4.enum([
|
|
474
|
-
"login",
|
|
475
|
-
"navigate",
|
|
476
|
-
"action",
|
|
477
|
-
"assertion",
|
|
478
|
-
"seed",
|
|
479
|
-
"setup",
|
|
480
|
-
"wait",
|
|
481
|
-
"condition",
|
|
482
|
-
"api_sequence",
|
|
483
|
-
"end",
|
|
484
|
-
"notification",
|
|
485
|
-
"audio",
|
|
486
|
-
"audio-assertion",
|
|
487
|
-
"sandbox_action"
|
|
488
|
-
]);
|
|
489
|
-
|
|
490
540
|
// ../types/src/browser-viewport.ts
|
|
491
541
|
var BROWSER_VIEWPORT_PRESETS = {
|
|
492
542
|
desktop: { label: "Desktop", width: 1280, height: 800, device: "desktop" },
|
|
@@ -580,24 +630,24 @@ function isPositiveIntegerString(value) {
|
|
|
580
630
|
if (!value || !/^\d+$/.test(value)) return false;
|
|
581
631
|
return Number(value) > 0;
|
|
582
632
|
}
|
|
583
|
-
var playbookStepAgentSchema =
|
|
584
|
-
order:
|
|
585
|
-
action:
|
|
633
|
+
var playbookStepAgentSchema = z7.object({
|
|
634
|
+
order: z7.number().describe("Step number (1-based)."),
|
|
635
|
+
action: z7.enum(PLAYBOOK_STEP_ACTIONS).describe(
|
|
586
636
|
'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.'
|
|
587
637
|
),
|
|
588
|
-
target:
|
|
638
|
+
target: z7.string().describe(
|
|
589
639
|
`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.`
|
|
590
640
|
),
|
|
591
|
-
params:
|
|
641
|
+
params: z7.record(z7.string(), z7.string()).optional().describe(
|
|
592
642
|
'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").'
|
|
593
643
|
),
|
|
594
|
-
note:
|
|
644
|
+
note: z7.string().optional().describe(
|
|
595
645
|
'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.'
|
|
596
646
|
),
|
|
597
|
-
actionRefs:
|
|
647
|
+
actionRefs: z7.array(z7.number()).max(1).optional().describe(
|
|
598
648
|
'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.'
|
|
599
649
|
),
|
|
600
|
-
expectedDialogs:
|
|
650
|
+
expectedDialogs: z7.enum(["accept", "dismiss"]).optional().describe(
|
|
601
651
|
'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.'
|
|
602
652
|
)
|
|
603
653
|
}).superRefine((step, ctx) => {
|
|
@@ -605,7 +655,7 @@ var playbookStepAgentSchema = z5.object({
|
|
|
605
655
|
const goal = step.params?.goal;
|
|
606
656
|
if (!goal || goal.trim().length === 0) {
|
|
607
657
|
ctx.addIssue({
|
|
608
|
-
code:
|
|
658
|
+
code: z7.ZodIssueCode.custom,
|
|
609
659
|
path: ["params", "goal"],
|
|
610
660
|
message: 'agent_loop steps must set params.goal to a one-sentence checkable predicate (e.g. "3 grid row checkboxes are selected").'
|
|
611
661
|
});
|
|
@@ -615,7 +665,7 @@ var playbookStepAgentSchema = z5.object({
|
|
|
615
665
|
const pattern = step.params?.pattern;
|
|
616
666
|
if (!pattern || pattern.trim().length === 0) {
|
|
617
667
|
ctx.addIssue({
|
|
618
|
-
code:
|
|
668
|
+
code: z7.ZodIssueCode.custom,
|
|
619
669
|
path: ["params", "pattern"],
|
|
620
670
|
message: "verify_download steps must set params.pattern to a glob (supports *, ?) or substring matching the expected filename."
|
|
621
671
|
});
|
|
@@ -626,7 +676,7 @@ var playbookStepAgentSchema = z5.object({
|
|
|
626
676
|
const contains = step.params?.contains;
|
|
627
677
|
if ((!pattern || pattern.trim().length === 0) && (!contains || contains.trim().length === 0)) {
|
|
628
678
|
ctx.addIssue({
|
|
629
|
-
code:
|
|
679
|
+
code: z7.ZodIssueCode.custom,
|
|
630
680
|
path: ["params"],
|
|
631
681
|
message: "verify_download_content steps must set params.contains or params.pattern for the expected downloaded content."
|
|
632
682
|
});
|
|
@@ -637,14 +687,14 @@ var playbookStepAgentSchema = z5.object({
|
|
|
637
687
|
const height = step.params?.height;
|
|
638
688
|
if (!isPositiveIntegerString(width)) {
|
|
639
689
|
ctx.addIssue({
|
|
640
|
-
code:
|
|
690
|
+
code: z7.ZodIssueCode.custom,
|
|
641
691
|
path: ["params", "width"],
|
|
642
692
|
message: "resize steps must set params.width to a positive integer pixel value."
|
|
643
693
|
});
|
|
644
694
|
}
|
|
645
695
|
if (!isPositiveIntegerString(height)) {
|
|
646
696
|
ctx.addIssue({
|
|
647
|
-
code:
|
|
697
|
+
code: z7.ZodIssueCode.custom,
|
|
648
698
|
path: ["params", "height"],
|
|
649
699
|
message: "resize steps must set params.height to a positive integer pixel value."
|
|
650
700
|
});
|
|
@@ -654,16 +704,16 @@ var playbookStepAgentSchema = z5.object({
|
|
|
654
704
|
|
|
655
705
|
export {
|
|
656
706
|
USER_SETTABLE_WORKFLOW_STATUSES,
|
|
707
|
+
InlineAssertionSchema,
|
|
657
708
|
INSTANCE_SIZES,
|
|
658
709
|
INSTANCE_SIZE_SPEC,
|
|
659
710
|
parseInstanceSize,
|
|
660
711
|
VALID_MACRO_NAMES,
|
|
661
712
|
MACRO_PATTERN,
|
|
662
|
-
InlineAssertionSchema,
|
|
663
713
|
NODE_TYPE_LABEL,
|
|
664
714
|
normalizeNodeType,
|
|
665
715
|
isVolatileIdentifier,
|
|
666
716
|
stableIdentifierPrefix,
|
|
667
717
|
stableAttrSelector
|
|
668
718
|
};
|
|
669
|
-
//# sourceMappingURL=chunk-
|
|
719
|
+
//# sourceMappingURL=chunk-IWKJQZJQ.js.map
|