intellitester 0.2.35 → 0.2.41

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/README.md CHANGED
@@ -12,6 +12,33 @@ npx playwright install chromium
12
12
  npx playwright install
13
13
  ```
14
14
 
15
+ ## AI Assistant Integration
16
+
17
+ IntelliTester can generate comprehensive documentation for AI assistants (Claude, GPT, etc.) to help them write effective tests.
18
+
19
+ ### Generate Guide
20
+
21
+ Use the `guide` command to create an `intellitester_guide.md` file in your project:
22
+
23
+ ```bash
24
+ intellitester guide
25
+ # Or use the alias:
26
+ intellitester init-guide
27
+ ```
28
+
29
+ This generates a detailed reference document that AI assistants can read to understand:
30
+ - All action types and their syntax
31
+ - Target selector options (testId, text, css, xpath, role, description)
32
+ - Variable interpolation and built-in generators
33
+ - Best practices for test organization
34
+ - Common testing patterns (login flows, form submissions, email verification)
35
+ - Configuration options for tests, workflows, and pipelines
36
+
37
+ The guide is particularly useful when:
38
+ - Using AI assistants to generate test files
39
+ - Onboarding team members who use AI coding tools
40
+ - Maintaining consistent test patterns across a team
41
+
15
42
  ## Editor Configuration
16
43
 
17
44
  IntelliTester provides JSON schemas for YAML configuration files to enable autocomplete and validation in VS Code and other editors.
@@ -25,7 +52,8 @@ Add this to your `.vscode/settings.json` (or workspace settings):
25
52
  "yaml.schemas": {
26
53
  "./node_modules/intellitester/schemas/intellitester.config.schema.json": "intellitester.config.yaml",
27
54
  "./node_modules/intellitester/schemas/test.schema.json": "*.test.yaml",
28
- "./node_modules/intellitester/schemas/workflow.schema.json": "*.workflow.yaml"
55
+ "./node_modules/intellitester/schemas/workflow.schema.json": "*.workflow.yaml",
56
+ "./node_modules/intellitester/schemas/pipeline.schema.json": "*.pipeline.yaml"
29
57
  }
30
58
  }
31
59
  ```
@@ -45,7 +73,8 @@ If you're working on IntelliTester itself or want to use local schemas, use thes
45
73
  "yaml.schemas": {
46
74
  "./schemas/intellitester.config.schema.json": "intellitester.config.yaml",
47
75
  "./schemas/test.schema.json": "*.test.yaml",
48
- "./schemas/workflow.schema.json": "*.workflow.yaml"
76
+ "./schemas/workflow.schema.json": "*.workflow.yaml",
77
+ "./schemas/pipeline.schema.json": "*.pipeline.yaml"
49
78
  }
50
79
  }
51
80
  ```
@@ -84,6 +113,37 @@ When execution pauses, you can:
84
113
  - Examine selectors and elements
85
114
  - Continue execution when ready
86
115
 
116
+ ## Fast-Fail Conditions (errorIf)
117
+
118
+ Use `errorIf` to fail a step immediately when a condition is met, without waiting for timeouts:
119
+
120
+ ```yaml
121
+ steps:
122
+ - type: tap
123
+ target: { testId: login-btn }
124
+ errorIf: not-found # Fail immediately if element not found
125
+
126
+ - type: assert
127
+ target: { testId: welcome-msg }
128
+ errorIf: not-visible # Fail if element exists but not visible
129
+
130
+ - type: input
131
+ target: { testId: email }
132
+ value: test@example.com
133
+ errorIf: disabled # Fail if input is disabled
134
+ ```
135
+
136
+ **Available conditions:**
137
+
138
+ | Condition | Description |
139
+ |-----------|-------------|
140
+ | `not-found` | Element doesn't exist in DOM |
141
+ | `not-visible` | Element exists but not visible |
142
+ | `disabled` | Element is disabled |
143
+ | `empty` | Element has no text content |
144
+
145
+ > **Note:** `testId` now matches `data-testid`, `id`, and `class` attributes in that order.
146
+
87
147
  ## Resource Cleanup
88
148
 
89
149
  IntelliTester automatically tracks resources created during tests and cleans them up after execution. This ensures tests don't leave behind database rows, files, users, or other artifacts.
@@ -215,3 +275,126 @@ intellitester run --session-id my-session --track-dir .intellitester/track
215
275
  ```
216
276
 
217
277
  If `INTELLITESTER_TRACK_URL` is set, `track()` will send HTTP requests and also append to the track file (when available). If only the file is set, `track()` writes locally.
278
+
279
+ ## Pipelines & Workflows
280
+
281
+ IntelliTester supports three levels of test organization:
282
+
283
+ ### Test Files (`*.test.yaml`)
284
+
285
+ A single test with a sequence of steps. The most basic building block.
286
+
287
+ ```yaml
288
+ name: Login Test
289
+ platform: web
290
+ variables:
291
+ EMAIL: test@example.com
292
+ steps:
293
+ - type: navigate
294
+ value: /login
295
+ - type: input
296
+ target: { testId: email }
297
+ value: ${EMAIL}
298
+ - type: input
299
+ target: { testId: password }
300
+ value: secret123
301
+ - type: tap
302
+ target: { text: Sign In }
303
+ - type: assert
304
+ target: { text: Welcome }
305
+ ```
306
+
307
+ ### Workflows (`*.workflow.yaml`)
308
+
309
+ Multiple tests run in sequence with a shared browser session. Tests share cookies, local storage, and authentication state.
310
+
311
+ ```yaml
312
+ name: User Onboarding
313
+ platform: web
314
+ config:
315
+ web:
316
+ baseUrl: http://localhost:3000
317
+ continueOnFailure: false
318
+ tests:
319
+ - file: ./signup.test.yaml
320
+ id: signup
321
+ - file: ./verify-email.test.yaml
322
+ id: verify
323
+ variables:
324
+ EMAIL: ${signup.EMAIL}
325
+ - file: ./complete-profile.test.yaml
326
+ ```
327
+
328
+ ### Pipelines (`*.pipeline.yaml`)
329
+
330
+ Multiple workflows with shared browser session, dependencies, and variables. Pipelines orchestrate complex test suites with control over execution order and failure handling.
331
+
332
+ ```yaml
333
+ name: Full E2E Suite
334
+ platform: web
335
+ on_failure: skip # skip | fail | ignore
336
+ cleanup_on_failure: true
337
+ config:
338
+ web:
339
+ baseUrl: http://localhost:3000
340
+ webServer:
341
+ command: npm run dev
342
+ url: http://localhost:3000
343
+ reuseExistingServer: true
344
+ timeout: 30000
345
+ workflows:
346
+ - file: ./auth.workflow.yaml
347
+ id: auth
348
+ on_failure: fail # Stop pipeline if auth fails
349
+
350
+ - file: ./dashboard.workflow.yaml
351
+ id: dashboard
352
+ depends_on: [auth]
353
+ variables:
354
+ USER_TOKEN: ${auth.TOKEN}
355
+
356
+ - file: ./settings.workflow.yaml
357
+ depends_on: [auth]
358
+ on_failure: ignore # Continue even if settings tests fail
359
+
360
+ - file: ./cleanup.workflow.yaml
361
+ depends_on: [dashboard, settings]
362
+ ```
363
+
364
+ ### Pipeline Features
365
+
366
+ **Workflow Properties:**
367
+
368
+ | Property | Description |
369
+ |----------|-------------|
370
+ | `file` | Path to the workflow file (required) |
371
+ | `id` | Identifier for referencing in `depends_on` and variable passing |
372
+ | `depends_on` | Array of workflow IDs that must complete first |
373
+ | `variables` | Variables to inject, can reference outputs from dependencies |
374
+ | `on_failure` | How to handle failure: `skip`, `fail`, or `ignore` |
375
+
376
+ **Failure Handling (`on_failure`):**
377
+
378
+ - `skip` - Skip dependent workflows, continue independent ones (default)
379
+ - `fail` - Stop the entire pipeline immediately
380
+ - `ignore` - Continue as if the workflow succeeded
381
+
382
+ **Web Server (`config.webServer`):**
383
+
384
+ Start a dev server automatically before running tests:
385
+
386
+ ```yaml
387
+ config:
388
+ webServer:
389
+ command: npm run dev # Command to start server
390
+ url: http://localhost:3000 # Wait for this URL
391
+ reuseExistingServer: true # Use existing if running
392
+ timeout: 30000 # Startup timeout (ms)
393
+ ```
394
+
395
+ **Shared Browser Session:**
396
+
397
+ All workflows in a pipeline share the same browser context, preserving:
398
+ - Cookies and session storage
399
+ - Authentication state
400
+ - Local storage data
@@ -18,6 +18,7 @@ var trackSchema = zod.z.object({
18
18
  var trackableSchema = zod.z.object({
19
19
  track: trackSchema.optional()
20
20
  });
21
+ var errorIfSchema = zod.z.enum(["not-found", "not-visible", "disabled", "empty"]).describe("Fail immediately if this condition is met (no waiting)");
21
22
  var LocatorSchema = zod.z.object({
22
23
  description: zod.z.string().trim().optional().describe("AI-friendly description of the element to find"),
23
24
  testId: zod.z.string().trim().optional().describe("data-testid attribute value"),
@@ -38,52 +39,63 @@ var navigateActionSchema = zod.z.object({
38
39
  }).describe("Navigate to a URL");
39
40
  var tapActionSchema = zod.z.object({
40
41
  type: zod.z.literal("tap"),
41
- target: LocatorSchema
42
+ target: LocatorSchema,
43
+ errorIf: errorIfSchema.optional()
42
44
  }).describe("Click or tap on an element");
43
45
  var inputActionSchema = zod.z.object({
44
46
  type: zod.z.literal("input"),
45
47
  target: LocatorSchema,
46
- value: zod.z.string().describe("Text to input (can reference variables with ${VAR_NAME})")
48
+ value: zod.z.string().describe("Text to input (can reference variables with ${VAR_NAME})"),
49
+ errorIf: errorIfSchema.optional()
47
50
  }).describe("Input text into a field");
48
51
  var clearActionSchema = zod.z.object({
49
52
  type: zod.z.literal("clear"),
50
- target: LocatorSchema
53
+ target: LocatorSchema,
54
+ errorIf: errorIfSchema.optional()
51
55
  }).describe("Clear the contents of an input field");
52
56
  var hoverActionSchema = zod.z.object({
53
57
  type: zod.z.literal("hover"),
54
- target: LocatorSchema
58
+ target: LocatorSchema,
59
+ errorIf: errorIfSchema.optional()
55
60
  }).describe("Hover over an element");
56
61
  var selectActionSchema = zod.z.object({
57
62
  type: zod.z.literal("select"),
58
63
  target: LocatorSchema,
59
- value: zod.z.string().describe("Option value, label, or index to select")
64
+ value: zod.z.string().describe("Option value, label, or index to select"),
65
+ errorIf: errorIfSchema.optional()
60
66
  }).describe("Select an option from a dropdown");
61
67
  var checkActionSchema = zod.z.object({
62
68
  type: zod.z.literal("check"),
63
- target: LocatorSchema
69
+ target: LocatorSchema,
70
+ errorIf: errorIfSchema.optional()
64
71
  }).describe("Check a checkbox");
65
72
  var uncheckActionSchema = zod.z.object({
66
73
  type: zod.z.literal("uncheck"),
67
- target: LocatorSchema
74
+ target: LocatorSchema,
75
+ errorIf: errorIfSchema.optional()
68
76
  }).describe("Uncheck a checkbox");
69
77
  var pressActionSchema = zod.z.object({
70
78
  type: zod.z.literal("press"),
71
79
  key: nonEmptyString.describe("Key to press (e.g., Enter, Tab, Escape, ArrowDown)"),
72
- target: LocatorSchema.optional().describe("Element to focus before pressing key")
80
+ target: LocatorSchema.optional().describe("Element to focus before pressing key"),
81
+ errorIf: errorIfSchema.optional()
73
82
  }).describe("Press a keyboard key");
74
83
  var focusActionSchema = zod.z.object({
75
84
  type: zod.z.literal("focus"),
76
- target: LocatorSchema
85
+ target: LocatorSchema,
86
+ errorIf: errorIfSchema.optional()
77
87
  }).describe("Focus an element");
78
88
  var assertActionSchema = zod.z.object({
79
89
  type: zod.z.literal("assert"),
80
90
  target: LocatorSchema,
81
- value: zod.z.string().optional().describe("Expected text content")
91
+ value: zod.z.string().optional().describe("Expected text content"),
92
+ errorIf: errorIfSchema.optional()
82
93
  }).describe("Assert that an element exists or contains expected text");
83
94
  var waitActionSchema = zod.z.object({
84
95
  type: zod.z.literal("wait"),
85
96
  target: LocatorSchema.optional().describe("Element to wait for"),
86
- timeout: zod.z.number().int().positive().optional().describe("Time to wait in milliseconds")
97
+ timeout: zod.z.number().int().positive().optional().describe("Time to wait in milliseconds"),
98
+ errorIf: errorIfSchema.optional()
87
99
  }).describe("Wait for an element or timeout").refine((action) => action.target || action.timeout, {
88
100
  message: "wait requires a target or timeout"
89
101
  });
@@ -91,7 +103,8 @@ var scrollActionSchema = zod.z.object({
91
103
  type: zod.z.literal("scroll"),
92
104
  target: LocatorSchema.optional().describe("Element to scroll"),
93
105
  direction: zod.z.enum(["up", "down"]).optional().describe("Direction to scroll"),
94
- amount: zod.z.number().int().positive().optional().describe("Amount to scroll in pixels")
106
+ amount: zod.z.number().int().positive().optional().describe("Amount to scroll in pixels"),
107
+ errorIf: errorIfSchema.optional()
95
108
  }).describe("Scroll the page or an element");
96
109
  var screenshotActionSchema = zod.z.object({
97
110
  type: zod.z.literal("screenshot"),
@@ -136,7 +149,8 @@ var waitForSelectorActionSchema = zod.z.object({
136
149
  type: zod.z.literal("waitForSelector"),
137
150
  target: LocatorSchema,
138
151
  state: zod.z.enum(["enabled", "disabled", "visible", "hidden", "attached", "detached"]).describe("Element state to wait for"),
139
- timeout: zod.z.number().int().positive().optional().describe("Time to wait in milliseconds")
152
+ timeout: zod.z.number().int().positive().optional().describe("Time to wait in milliseconds"),
153
+ errorIf: errorIfSchema.optional()
140
154
  }).describe("Wait for an element to reach a specific state");
141
155
  var failActionSchema = zod.z.object({
142
156
  type: zod.z.literal("fail"),
@@ -347,7 +361,9 @@ var workflowWebServerSchema = zod.z.object({
347
361
  auto: zod.z.boolean().optional().describe("Auto-detect server start command from package.json"),
348
362
  url: nonEmptyString2.url().describe("URL to wait for before starting tests"),
349
363
  reuseExistingServer: zod.z.boolean().default(true).describe("Use existing server if already running at the URL"),
350
- timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to start")
364
+ timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to start"),
365
+ workdir: nonEmptyString2.optional().describe("Working directory for the web server command"),
366
+ cwd: nonEmptyString2.optional().describe("Deprecated: use workdir instead")
351
367
  }).describe("Configuration for starting a web server before tests");
352
368
  var workflowConfigSchema = zod.z.object({
353
369
  web: workflowWebConfigSchema.optional(),
@@ -403,7 +419,9 @@ var pipelineWebServerSchema = zod.z.object({
403
419
  auto: zod.z.boolean().optional().describe("Auto-detect server start command from package.json"),
404
420
  url: nonEmptyString3.url().describe("URL to wait for before starting workflows"),
405
421
  reuseExistingServer: zod.z.boolean().default(true).describe("Use existing server if already running at the URL"),
406
- timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to start")
422
+ timeout: zod.z.number().int().positive().default(3e4).describe("Timeout in milliseconds to wait for server to start"),
423
+ workdir: nonEmptyString3.optional().describe("Working directory for the web server command"),
424
+ cwd: nonEmptyString3.optional().describe("Deprecated: use workdir instead")
407
425
  }).describe("Configuration for starting a web server before workflows");
408
426
  var pipelineConfigSchema = zod.z.object({
409
427
  web: pipelineWebConfigSchema.optional(),
@@ -533,6 +551,7 @@ exports.TestDefinitionSchema = TestDefinitionSchema;
533
551
  exports.cleanupConfigSchema = cleanupConfigSchema;
534
552
  exports.cleanupDiscoverSchema = cleanupDiscoverSchema;
535
553
  exports.collectMissingEnvVars = collectMissingEnvVars;
554
+ exports.errorIfSchema = errorIfSchema;
536
555
  exports.isPipelineContent = isPipelineContent;
537
556
  exports.isPipelineFile = isPipelineFile;
538
557
  exports.isWorkflowContent = isWorkflowContent;
@@ -546,5 +565,5 @@ exports.parsePipelineDefinition = parsePipelineDefinition;
546
565
  exports.parseTestDefinition = parseTestDefinition;
547
566
  exports.parseWorkflowDefinition = parseWorkflowDefinition;
548
567
  exports.previewConfigSchema = previewConfigSchema;
549
- //# sourceMappingURL=chunk-DPT2LVTT.cjs.map
550
- //# sourceMappingURL=chunk-DPT2LVTT.cjs.map
568
+ //# sourceMappingURL=chunk-2ZBKD7WW.cjs.map
569
+ //# sourceMappingURL=chunk-2ZBKD7WW.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/schema.ts","../src/core/workflowSchema.ts","../src/core/pipelineSchema.ts","../src/core/loader.ts"],"names":["z","nonEmptyString","parse","fs"],"mappings":";;;;;;;;;;;AAEA,IAAM,cAAA,GAAiBA,MAAE,MAAA,EAAO,CAAE,MAAK,CAAE,GAAA,CAAI,GAAG,uBAAuB,CAAA;AAEvE,IAAM,WAAA,GAAcA,MAAE,MAAA,CAAO;AAAA,EAC3B,IAAA,EAAM,cAAA,CAAe,QAAA,CAAS,+CAA+C,CAAA;AAAA,EAC7E,EAAA,EAAI,cAAA,CAAe,QAAA,CAAS,qBAAqB,CAAA;AAAA,EACjD,oBAAoBA,KAAA,CAAE,OAAA,GAAU,QAAA,EAAS,CAAE,SAAS,4CAA4C;AAClG,CAAC,CAAA,CAAE,WAAA,EAAY,CAAE,QAAA,CAAS,wCAAwC,CAAA;AAElE,IAAM,eAAA,GAAkBA,MAAE,MAAA,CAAO;AAAA,EAC/B,KAAA,EAAO,YAAY,QAAA;AACrB,CAAC,CAAA;AAGM,IAAM,aAAA,GAAgBA,KAAA,CAAE,IAAA,CAAK,CAAC,WAAA,EAAa,aAAA,EAAe,UAAA,EAAY,OAAO,CAAC,CAAA,CAClF,QAAA,CAAS,wDAAwD;AAE7D,IAAM,aAAA,GAAgBA,MAC1B,MAAA,CAAO;AAAA,EACN,WAAA,EAAaA,MAAE,MAAA,EAAO,CAAE,MAAK,CAAE,QAAA,EAAS,CAAE,QAAA,CAAS,gDAAgD,CAAA;AAAA,EACnG,MAAA,EAAQA,MAAE,MAAA,EAAO,CAAE,MAAK,CAAE,QAAA,EAAS,CA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AAO,CAAA;AAAA,QACtB;AAAA,MACF;AAAA,IACF,CAAA,MAAA,IAAW,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,EAAG;AAC/B,MAAA,KAAA,CAAM,QAAQ,OAAO,CAAA;AAAA,IACvB,CAAA,MAAA,IAAW,KAAA,KAAU,IAAA,IAAQ,OAAO,UAAU,QAAA,EAAU;AACtD,MAAA,MAAA,CAAO,MAAA,CAAO,KAAK,CAAA,CAAE,OAAA,CAAQ,OAAO,CAAA;AAAA,IACtC;AAAA,EACF,CAAA;AAEA,EAAA,OAAA,CAAQ,GAAG,CAAA;AACX,EAAA,OAAO,OAAA;AACT;AAKO,IAAM,iBAAA,GAAoB,CAAC,OAAA,KAA6B;AAC7D,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAASD,WAAM,OAAO,CAAA;AAC5B,IAAA,OAAO,MAAA,IAAU,KAAA,CAAM,OAAA,CAAQ,MAAA,CAAO,KAAK,KAAK,CAAC,MAAA,CAAO,KAAA,IAAS,CAAC,MAAA,CAAO,SAAA;AAAA,EAC3E,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAKO,IAAM,iBAAA,GAAoB,CAAC,OAAA,KAA6B;AAC7D,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAASA,WAAM,OAAO,CAAA;AAC5B,IAAA,OAAO,UAAU,KAAA,CAAM,OAAA,CAAQ,OAAO,SAAS,CAAA,IAAK,CAAC,MAAA,CAAO,KAAA;AAAA,EAC9D,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF","file":"chunk-2ZBKD7WW.cjs","sourcesContent":["import { z } from 'zod';\n\nconst nonEmptyString = z.string().trim().min(1, 'Value cannot be empty');\n\nconst trackSchema = z.object({\n type: nonEmptyString.describe('Tracked resource type (e.g., row, user, file)'),\n id: nonEmptyString.describe('Tracked resource ID'),\n includeStepContext: z.boolean().optional().describe('Include step context with tracked resource'),\n}).passthrough().describe('Optional tracking metadata for cleanup');\n\nconst trackableSchema = z.object({\n track: trackSchema.optional(),\n});\n\n// Error condition for immediate failure (no waiting)\nexport const errorIfSchema = z.enum(['not-found', 'not-visible', 'disabled', 'empty'])\n .describe('Fail immediately if this condition is met (no waiting)');\n\nexport const LocatorSchema = z\n .object({\n description: z.string().trim().optional().describe('AI-friendly description of the element to find'),\n testId: z.string().trim().optional().describe('data-testid attribute value'),\n text: z.string().trim().optional().describe('Visible text content'),\n css: z.string().trim().optional().describe('CSS selector'),\n xpath: z.string().trim().optional().describe('XPath selector'),\n role: z.string().trim().optional().describe('ARIA role'),\n name: z.string().trim().optional().describe('Accessible name'),\n })\n .describe('Defines how to locate an element on the page. At least one selector must be provided.')\n .refine(\n (locator) =>\n Boolean(\n locator.description ||\n locator.testId ||\n locator.text ||\n locator.css ||\n locator.xpath ||\n locator.role ||\n locator.name,\n ),\n { message: 'Locator requires at least one selector or description' },\n );\n\nconst navigateActionSchema = z.object({\n type: z.literal('navigate'),\n value: nonEmptyString.describe('URL or path to navigate to'),\n}).describe('Navigate to a URL');\n\nconst tapActionSchema = z.object({\n type: z.literal('tap'),\n target: LocatorSchema,\n errorIf: errorIfSchema.optional(),\n}).describe('Click or tap on an element');\n\nconst inputActionSchema = z.object({\n type: z.literal('input'),\n target: LocatorSchema,\n value: z.string().describe('Text to input (can reference variables with ${VAR_NAME})'),\n errorIf: errorIfSchema.optional(),\n}).describe('Input text into a field');\n\nconst clearActionSchema = z.object({\n type: z.literal('clear'),\n target: LocatorSchema,\n errorIf: errorIfSchema.optional(),\n}).describe('Clear the contents of an input field');\n\nconst hoverActionSchema = z.object({\n type: z.literal('hover'),\n target: LocatorSchema,\n errorIf: errorIfSchema.optional(),\n}).describe('Hover over an element');\n\nconst selectActionSchema = z.object({\n type: z.literal('select'),\n target: LocatorSchema,\n value: z.string().describe('Option value, label, or index to select'),\n errorIf: errorIfSchema.optional(),\n}).describe('Select an option from a dropdown');\n\nconst checkActionSchema = z.object({\n type: z.literal('check'),\n target: LocatorSchema,\n errorIf: errorIfSchema.optional(),\n}).describe('Check a checkbox');\n\nconst uncheckActionSchema = z.object({\n type: z.literal('uncheck'),\n target: LocatorSchema,\n errorIf: errorIfSchema.optional(),\n}).describe('Uncheck a checkbox');\n\nconst pressActionSchema = z.object({\n type: z.literal('press'),\n key: nonEmptyString.describe('Key to press (e.g., Enter, Tab, Escape, ArrowDown)'),\n target: LocatorSchema.optional().describe('Element to focus before pressing key'),\n errorIf: errorIfSchema.optional(),\n}).describe('Press a keyboard key');\n\nconst focusActionSchema = z.object({\n type: z.literal('focus'),\n target: LocatorSchema,\n errorIf: errorIfSchema.optional(),\n}).describe('Focus an element');\n\nconst assertActionSchema = z.object({\n type: z.literal('assert'),\n target: LocatorSchema,\n value: z.string().optional().describe('Expected text content'),\n errorIf: errorIfSchema.optional(),\n}).describe('Assert that an element exists or contains expected text');\n\nconst waitActionSchema = z\n .object({\n type: z.literal('wait'),\n target: LocatorSchema.optional().describe('Element to wait for'),\n timeout: z.number().int().positive().optional().describe('Time to wait in milliseconds'),\n errorIf: errorIfSchema.optional(),\n })\n .describe('Wait for an element or timeout')\n .refine((action) => action.target || action.timeout, {\n message: 'wait requires a target or timeout',\n });\n\nconst scrollActionSchema = z.object({\n type: z.literal('scroll'),\n target: LocatorSchema.optional().describe('Element to scroll'),\n direction: z.enum(['up', 'down']).optional().describe('Direction to scroll'),\n amount: z.number().int().positive().optional().describe('Amount to scroll in pixels'),\n errorIf: errorIfSchema.optional(),\n}).describe('Scroll the page or an element');\n\nconst screenshotActionSchema = z.object({\n type: z.literal('screenshot'),\n name: z.string().optional().describe('Name for the screenshot file'),\n waitBefore: z.number().int().nonnegative().optional().describe('Milliseconds to wait before capturing for visual stability (default: 500)'),\n}).describe('Take a screenshot');\n\nconst setVarActionSchema = z.object({\n type: z.literal('setVar'),\n name: nonEmptyString.describe('Variable name to set'),\n value: z.string().optional().describe('Static value to set'),\n from: z.enum(['response', 'element', 'email']).optional().describe('Extract value from a source'),\n path: z.string().optional().describe('JSON path or selector for extraction'),\n pattern: z.string().optional().describe('Regular expression pattern for extraction'),\n}).describe('Set a variable for use in later steps');\n\nconst emailWaitForActionSchema = z.object({\n type: z.literal('email.waitFor'),\n mailbox: nonEmptyString.describe('Email address or mailbox to check'),\n timeout: z.number().int().positive().optional().describe('How long to wait for email in milliseconds'),\n subjectContains: z.string().optional().describe('Filter by email subject'),\n}).describe('Wait for an email to arrive');\n\nconst emailExtractCodeActionSchema = z.object({\n type: z.literal('email.extractCode'),\n saveTo: nonEmptyString.describe('Variable name to save the extracted code'),\n pattern: z.string().optional().describe('Regular expression to extract code'),\n}).describe('Extract a verification code from email');\n\nconst emailExtractLinkActionSchema = z.object({\n type: z.literal('email.extractLink'),\n saveTo: nonEmptyString.describe('Variable name to save the extracted link'),\n pattern: z.string().optional().describe('Regular expression to match specific links'),\n}).describe('Extract a link from email');\n\nconst emailClearActionSchema = z.object({\n type: z.literal('email.clear'),\n mailbox: nonEmptyString.describe('Email address or mailbox to clear'),\n}).describe('Clear emails from a mailbox');\n\nconst appwriteVerifyEmailActionSchema = z.object({\n type: z.literal('appwrite.verifyEmail'),\n}).describe('Verify email using Appwrite');\n\nconst debugActionSchema = z.object({\n type: z.literal('debug'),\n}).describe('Pause execution and open Playwright Inspector for debugging');\n\nconst waitForSelectorActionSchema = z.object({\n type: z.literal('waitForSelector'),\n target: LocatorSchema,\n state: z.enum(['enabled', 'disabled', 'visible', 'hidden', 'attached', 'detached'])\n .describe('Element state to wait for'),\n timeout: z.number().int().positive().optional()\n .describe('Time to wait in milliseconds'),\n errorIf: errorIfSchema.optional(),\n}).describe('Wait for an element to reach a specific state');\n\nconst failActionSchema = z.object({\n type: z.literal('fail'),\n message: nonEmptyString.describe('Error message to display when test fails'),\n}).describe('Explicitly fail the test with a custom message');\n\n// Base action schema without conditional (used for nested steps in conditional)\nconst BaseActionSchema = z.discriminatedUnion('type', [\n navigateActionSchema,\n tapActionSchema,\n inputActionSchema,\n clearActionSchema,\n hoverActionSchema,\n selectActionSchema,\n checkActionSchema,\n uncheckActionSchema,\n pressActionSchema,\n focusActionSchema,\n assertActionSchema,\n waitActionSchema,\n scrollActionSchema,\n screenshotActionSchema,\n setVarActionSchema,\n emailWaitForActionSchema,\n emailExtractCodeActionSchema,\n emailExtractLinkActionSchema,\n emailClearActionSchema,\n appwriteVerifyEmailActionSchema,\n debugActionSchema,\n waitForSelectorActionSchema,\n failActionSchema,\n]);\n\nconst TrackableBaseActionSchema = z.intersection(BaseActionSchema, trackableSchema);\n\nconst conditionalActionSchema = z.intersection(z.object({\n type: z.literal('conditional'),\n condition: z.object({\n type: z.enum(['exists', 'notExists', 'visible', 'hidden']),\n target: LocatorSchema,\n }).describe('Condition to check'),\n then: z.array(TrackableBaseActionSchema).describe('Steps to execute if condition is true'),\n else: z.array(TrackableBaseActionSchema).optional().describe('Steps to execute if condition is false'),\n}).describe('Execute steps conditionally based on element state'), trackableSchema);\n\n// Branch definition - can be inline actions OR a workflow file reference\nconst branchSchema = z.union([\n z.array(TrackableBaseActionSchema), // Inline actions\n z.object({\n workflow: z.string().trim().min(1).describe('Path to workflow file relative to current file'),\n variables: z.record(z.string(), z.string()).optional().describe('Variables to pass to the workflow'),\n }),\n]).describe('Actions to execute - either inline steps or a workflow file reference');\n\nconst waitForBranchActionSchema = z.intersection(z.object({\n type: z.literal('waitForBranch'),\n target: LocatorSchema.describe('Element to wait for'),\n timeout: z.number().int().positive().optional().describe('Maximum time to wait for element in milliseconds (default: 30000)'),\n state: z.enum(['visible', 'attached', 'enabled']).optional().describe('Element state to wait for (default: visible)'),\n onAppear: branchSchema.describe('Actions to execute when element appears within timeout'),\n onTimeout: branchSchema.optional().describe('Actions to execute if timeout occurs (silent continue if omitted)'),\n pollInterval: z.number().int().positive().optional().describe('How often to check for element in milliseconds (default: 100)'),\n}).describe('Wait for an element and branch based on whether it appears or times out'), trackableSchema);\n\nexport const ActionSchema = z.union([TrackableBaseActionSchema, conditionalActionSchema, waitForBranchActionSchema]);\n\nconst defaultsSchema = z.object({\n timeout: z.number().int().positive().optional().describe('Default timeout in milliseconds for all actions'),\n screenshots: z.enum(['on-failure', 'always', 'never']).optional().describe('When to capture screenshots during test execution'),\n}).describe('Default settings that apply to all tests unless overridden');\n\nconst webConfigSchema = z.object({\n baseUrl: nonEmptyString.url().optional().describe('Base URL for the web application'),\n browser: z.string().trim().optional().describe('Browser to use for testing'),\n headless: z.boolean().optional().describe('Run browser in headless mode'),\n timeout: z.number().int().positive().optional().describe('Timeout in milliseconds for web actions'),\n}).describe('Web platform configuration');\n\nconst androidConfigSchema = z.object({\n appId: z.string().trim().optional().describe('Android application ID'),\n device: z.string().trim().optional().describe('Device name or ID to run tests on'),\n}).describe('Android platform configuration');\n\nconst iosConfigSchema = z.object({\n bundleId: z.string().trim().optional().describe('iOS bundle identifier'),\n simulator: z.string().trim().optional().describe('Simulator name to run tests on'),\n}).describe('iOS platform configuration');\n\nconst emailConfigSchema = z.object({\n provider: z.literal('inbucket').describe('Email testing provider'),\n endpoint: nonEmptyString.url().optional().describe('Email service endpoint URL'),\n}).describe('Email testing configuration');\n\nconst appwriteConfigSchema = z.object({\n endpoint: nonEmptyString.url().describe('Appwrite API endpoint'),\n projectId: nonEmptyString.describe('Appwrite project ID'),\n apiKey: nonEmptyString.describe('Appwrite API key with appropriate permissions'),\n cleanup: z.boolean().optional().describe('Enable automatic cleanup of created resources'),\n cleanupOnFailure: z.boolean().optional().describe('Clean up resources even when test fails'),\n}).describe('Appwrite backend configuration');\n\nconst healingSchema = z.object({\n enabled: z.boolean().optional().describe('Enable self-healing capabilities'),\n strategies: z.array(z.string().trim()).optional().describe('Healing strategies to use'),\n}).describe('Self-healing test configuration');\n\nconst webServerSchema = z\n .object({\n command: nonEmptyString.optional().describe('Command to start the web server'),\n auto: z.boolean().optional().describe('Automatically detect and run the dev server from package.json'),\n static: z.string().optional().describe('Serve a static directory instead of running a command'),\n url: nonEmptyString.url().describe('URL to wait for before starting tests'),\n port: z.number().int().positive().optional().describe('Port number for the web server'),\n reuseExistingServer: z.boolean().default(true).describe('Use existing server if already running at the specified URL'),\n timeout: z.number().int().positive().default(30000).describe('Timeout in milliseconds to wait for server to become available'),\n cwd: z.string().optional().describe('Working directory for the server command'),\n })\n .describe('Configuration for starting a web server before running tests')\n .refine((config) => config.command || config.auto || config.static, {\n message: 'WebServerConfig requires command, auto: true, or static directory',\n });\n\nconst aiSourceSchema = z.object({\n pagesDir: z.string().optional().describe('Directory containing page components'),\n componentsDir: z.string().optional().describe('Directory containing reusable components'),\n extensions: z.array(z.string()).default(['.vue', '.astro', '.tsx', '.jsx', '.svelte']).describe('File extensions to include in source code analysis'),\n}).optional().describe('Source code directories for AI to analyze when generating tests');\n\nconst aiConfigSchema = z.object({\n provider: z.enum(['anthropic', 'openai', 'ollama']).describe('AI provider to use for test generation'),\n model: nonEmptyString.describe('Model name to use'),\n apiKey: z.string().trim().optional().describe('API key for the AI provider'),\n baseUrl: z.string().trim().url().optional().describe('Base URL for the AI API (required for Ollama)'),\n temperature: z.number().min(0).max(2).default(0.2).describe('Temperature for AI generation (0 = deterministic, 2 = very creative)'),\n maxTokens: z.number().int().positive().default(4096).describe('Maximum tokens for AI responses'),\n source: aiSourceSchema,\n}).describe('AI configuration for test generation and healing');\n\n// Cleanup discovery configuration\nexport const cleanupDiscoverSchema = z.object({\n enabled: z.boolean().default(true).describe('Enable auto-discovery of cleanup handlers in specified paths'),\n paths: z.array(z.string()).default(['./tests/cleanup']).describe('Directories to search for cleanup handler files'),\n pattern: z.string().default('**/*.ts').describe('Glob pattern to match handler files'),\n}).optional().describe('Auto-discovery configuration for cleanup handlers');\n\n// Main cleanup configuration\nexport const cleanupConfigSchema = z.object({\n provider: z.string().optional().describe('Primary cleanup provider to use'),\n parallel: z.boolean().default(false).describe('Execute cleanup operations in parallel'),\n retries: z.number().min(1).max(10).default(3).describe('Number of retry attempts for failed cleanup operations'),\n types: z.record(z.string(), z.string()).optional().describe('Map resource types to cleanup handler methods'),\n handlers: z.array(z.string()).optional().describe('Explicit paths to custom cleanup handler files'),\n discover: cleanupDiscoverSchema,\n scanUntracked: z.boolean().optional().describe('Scan for untracked resources using provider heuristics'),\n}).passthrough().describe('Comprehensive resource cleanup configuration'); // Allow provider-specific configs like appwrite: {...}\n\n// Export the inferred type\nexport type CleanupConfig = z.infer<typeof cleanupConfigSchema>;\n\nconst platformsSchema = z.object({\n web: webConfigSchema.optional(),\n android: androidConfigSchema.optional(),\n ios: iosConfigSchema.optional(),\n}).describe('Platform-specific configurations');\n\n// Preview configuration for --preview flag\nexport const previewConfigSchema = z.object({\n build: z.object({\n command: z.string().optional().describe('Command to build the project'),\n }).optional().describe('Build configuration'),\n preview: z.object({\n command: z.string().optional().describe('Command to start the preview server after build'),\n }).optional().describe('Preview server configuration'),\n url: z.string().url().optional().describe('URL to wait for before starting tests'),\n timeout: z.number().int().positive().optional().describe('Timeout in milliseconds to wait for preview server'),\n}).describe('Configuration for the --preview flag (build and serve production build)');\n\nexport const TestConfigSchema = z.object({\n defaults: defaultsSchema.optional(),\n web: webConfigSchema.optional(),\n android: androidConfigSchema.optional(),\n ios: iosConfigSchema.optional(),\n email: emailConfigSchema.optional(),\n appwrite: appwriteConfigSchema.optional(),\n}).describe('Test-specific configuration that overrides global settings');\n\nexport const TestDefinitionSchema = z.object({\n name: nonEmptyString.describe('The name of the test'),\n platform: z.enum(['web', 'android', 'ios']).describe('The platform to run the test on'),\n variables: z.record(z.string(), z.string()).optional().describe('Variables that can be referenced in test steps using ${VARIABLE_NAME} syntax'),\n config: TestConfigSchema.optional(),\n steps: z.array(ActionSchema).min(1).describe('The sequence of actions to execute in this test'),\n}).describe('Schema for IntelliTester test definition files');\n\nexport const IntellitesterConfigSchema = z.object({\n defaults: defaultsSchema.optional(),\n ai: aiConfigSchema.optional(),\n platforms: platformsSchema.optional(),\n healing: healingSchema.optional(),\n email: emailConfigSchema.optional(),\n appwrite: appwriteConfigSchema.optional(),\n cleanup: cleanupConfigSchema.optional(),\n webServer: webServerSchema.optional(),\n preview: previewConfigSchema.optional(),\n secrets: z.record(z.string(), z.string().trim()).optional().describe('Secret values that can be referenced in tests'),\n}).describe('Global configuration file for IntelliTester');\n","import { z } from 'zod';\n\nconst nonEmptyString = z.string().trim().min(1, 'Value cannot be empty');\n\n// Reference to a test file in the workflow\nconst testReferenceSchema = z.object({\n file: nonEmptyString.describe('Path to the test file relative to the workflow file'),\n id: nonEmptyString.optional().describe('Optional ID for referencing this test in variables or dependencies'),\n variables: z.record(z.string(), z.string()).optional().describe('Variables to inject or override for this specific test'),\n}).describe('Reference to a test file');\n\n// Workflow-specific web config\nconst workflowWebConfigSchema = z.object({\n baseUrl: nonEmptyString.url().optional().describe('Base URL for all tests in this workflow'),\n browser: z.enum(['chromium', 'firefox', 'webkit']).optional().describe('Browser to use for all web tests'),\n headless: z.boolean().optional().describe('Run browser in headless mode'),\n}).describe('Web platform configuration for the workflow');\n\n// Workflow-specific Appwrite config\nconst workflowAppwriteConfigSchema = z.object({\n endpoint: nonEmptyString.url().describe('Appwrite API endpoint'),\n projectId: nonEmptyString.describe('Appwrite project ID'),\n apiKey: nonEmptyString.describe('Appwrite API key'),\n cleanup: z.boolean().default(true).describe('Enable automatic cleanup of created resources'),\n cleanupOnFailure: z.boolean().default(true).describe('Clean up resources even when tests fail'),\n}).describe('Appwrite backend configuration for the workflow');\n\n// Cleanup discovery configuration for workflows\nconst workflowCleanupDiscoverSchema = z.object({\n enabled: z.boolean().default(true).describe('Enable auto-discovery of cleanup handlers'),\n paths: z.array(z.string()).default(['./tests/cleanup']).describe('Directories to search for cleanup handlers'),\n pattern: z.string().default('**/*.ts').describe('Glob pattern for handler files'),\n}).optional().describe('Auto-discovery configuration for cleanup handlers');\n\n// Workflow cleanup configuration\nconst workflowCleanupConfigSchema = z.object({\n provider: z.string().optional().describe('Cleanup provider to use'),\n parallel: z.boolean().default(false).describe('Run cleanup tasks in parallel'),\n retries: z.number().min(1).max(10).default(3).describe('Number of retry attempts for failed cleanup operations'),\n types: z.record(z.string(), z.string()).optional().describe('Map resource types to cleanup handler methods'),\n handlers: z.array(z.string()).optional().describe('Explicit paths to custom cleanup handler files'),\n discover: workflowCleanupDiscoverSchema,\n scanUntracked: z.boolean().optional().describe('Scan for untracked resources using provider heuristics'),\n}).passthrough().describe('Resource cleanup configuration'); // Allow provider-specific configs like appwrite: {...}\n\n// Workflow-specific web server config\nconst workflowWebServerSchema = z.object({\n command: nonEmptyString.optional().describe('Command to start the web server'),\n auto: z.boolean().optional().describe('Auto-detect server start command from package.json'),\n url: nonEmptyString.url().describe('URL to wait for before starting tests'),\n reuseExistingServer: z.boolean().default(true).describe('Use existing server if already running at the URL'),\n timeout: z.number().int().positive().default(30000).describe('Timeout in milliseconds to wait for server to start'),\n workdir: nonEmptyString.optional().describe('Working directory for the web server command'),\n cwd: nonEmptyString.optional().describe('Deprecated: use workdir instead'),\n}).describe('Configuration for starting a web server before tests');\n\n// Workflow configuration\nconst workflowConfigSchema = z.object({\n web: workflowWebConfigSchema.optional(),\n appwrite: workflowAppwriteConfigSchema.optional(),\n cleanup: workflowCleanupConfigSchema.optional(),\n webServer: workflowWebServerSchema.optional(),\n}).describe('Workflow-level configuration that applies to all tests');\n\n// Main workflow definition schema\nexport const WorkflowDefinitionSchema = z.object({\n name: nonEmptyString.describe('The name of the workflow'),\n platform: z.enum(['web', 'android', 'ios']).default('web').describe('The platform to run the workflow on'),\n variables: z.record(z.string(), z.string()).optional().describe('Workflow-level variables available to all tests'),\n config: workflowConfigSchema.optional(),\n continueOnFailure: z.boolean().default(false).describe('Continue running subsequent tests even if a test fails'),\n tests: z.array(testReferenceSchema).min(1, 'Workflow must contain at least one test').describe('List of test files to execute in this workflow'),\n}).describe('Schema for IntelliTester workflow files that orchestrate multiple tests');\n\n// Export inferred types\nexport type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;\nexport type TestReference = z.infer<typeof testReferenceSchema>;\nexport type WorkflowConfig = z.infer<typeof workflowConfigSchema>;\nexport type WorkflowWebConfig = z.infer<typeof workflowWebConfigSchema>;\nexport type WorkflowAppwriteConfig = z.infer<typeof workflowAppwriteConfigSchema>;\nexport type WorkflowCleanupConfig = z.infer<typeof workflowCleanupConfigSchema>;\nexport type WorkflowWebServerConfig = z.infer<typeof workflowWebServerSchema>;\n","import { z } from 'zod';\n\nconst nonEmptyString = z.string().trim().min(1, 'Value cannot be empty');\n\n// Workflow reference within a pipeline\nconst workflowReferenceSchema = z.object({\n file: nonEmptyString.describe('Path to the workflow file'),\n id: nonEmptyString.optional().describe('Optional ID for referencing this workflow in dependencies'),\n depends_on: z.array(nonEmptyString).optional().describe('IDs of workflows that must complete before this one'),\n on_failure: z.enum(['skip', 'fail', 'ignore']).optional().describe('How to handle failure of this workflow'),\n variables: z.record(z.string(), z.string()).optional().describe('Variables to inject or override for this workflow'),\n}).describe('Reference to a workflow file');\n\n// Pipeline-specific web config (matches workflow web config pattern)\nconst pipelineWebConfigSchema = z.object({\n baseUrl: nonEmptyString.url().optional().describe('Base URL for all workflows in this pipeline'),\n browser: z.enum(['chromium', 'firefox', 'webkit']).optional().describe('Browser to use for all web tests'),\n headless: z.boolean().optional().describe('Run browser in headless mode'),\n}).describe('Web platform configuration for the pipeline');\n\n// Pipeline-specific Appwrite config\nconst pipelineAppwriteConfigSchema = z.object({\n endpoint: nonEmptyString.url().describe('Appwrite API endpoint'),\n projectId: nonEmptyString.describe('Appwrite project ID'),\n apiKey: nonEmptyString.describe('Appwrite API key'),\n cleanup: z.boolean().default(true).describe('Enable automatic cleanup of created resources'),\n cleanupOnFailure: z.boolean().default(true).describe('Clean up resources even when workflows fail'),\n}).describe('Appwrite backend configuration for the pipeline');\n\n// Pipeline cleanup discovery configuration\nconst pipelineCleanupDiscoverSchema = z.object({\n enabled: z.boolean().default(true).describe('Enable auto-discovery of cleanup handlers'),\n paths: z.array(z.string()).default(['./tests/cleanup']).describe('Directories to search for cleanup handlers'),\n pattern: z.string().default('**/*.ts').describe('Glob pattern for handler files'),\n}).optional().describe('Auto-discovery configuration for cleanup handlers');\n\n// Pipeline cleanup configuration\nconst pipelineCleanupConfigSchema = z.object({\n provider: z.string().optional().describe('Cleanup provider to use'),\n parallel: z.boolean().default(false).describe('Run cleanup tasks in parallel'),\n retries: z.number().min(1).max(10).default(3).describe('Number of retry attempts for failed cleanup operations'),\n types: z.record(z.string(), z.string()).optional().describe('Map resource types to cleanup handler methods'),\n handlers: z.array(z.string()).optional().describe('Explicit paths to custom cleanup handler files'),\n discover: pipelineCleanupDiscoverSchema,\n scanUntracked: z.boolean().optional().describe('Scan for untracked resources using provider heuristics'),\n on_failure: z.boolean().default(true).describe('Run cleanup even if pipeline fails'),\n}).passthrough().describe('Resource cleanup configuration'); // Allow provider-specific configs like appwrite: {...}\n\n// Pipeline-specific web server config\nconst pipelineWebServerSchema = z.object({\n command: nonEmptyString.optional().describe('Command to start the web server'),\n auto: z.boolean().optional().describe('Auto-detect server start command from package.json'),\n url: nonEmptyString.url().describe('URL to wait for before starting workflows'),\n reuseExistingServer: z.boolean().default(true).describe('Use existing server if already running at the URL'),\n timeout: z.number().int().positive().default(30000).describe('Timeout in milliseconds to wait for server to start'),\n workdir: nonEmptyString.optional().describe('Working directory for the web server command'),\n cwd: nonEmptyString.optional().describe('Deprecated: use workdir instead'),\n}).describe('Configuration for starting a web server before workflows');\n\n// Pipeline configuration (similar to workflow config)\nconst pipelineConfigSchema = z.object({\n web: pipelineWebConfigSchema.optional(),\n appwrite: pipelineAppwriteConfigSchema.optional(),\n cleanup: pipelineCleanupConfigSchema.optional(),\n webServer: pipelineWebServerSchema.optional(),\n}).describe('Pipeline-level configuration that applies to all workflows');\n\n// Main pipeline definition schema\nexport const PipelineDefinitionSchema = z.object({\n name: nonEmptyString.describe('The name of the pipeline'),\n platform: z.enum(['web', 'android', 'ios']).default('web').describe('The platform to run the pipeline on'),\n config: pipelineConfigSchema.optional(),\n on_failure: z.enum(['skip', 'fail', 'ignore']).default('skip').describe('Default failure handling for workflows'),\n cleanup_on_failure: z.boolean().default(true).describe('Run cleanup even when pipeline fails'),\n workflows: z.array(workflowReferenceSchema).min(1, 'Pipeline must contain at least one workflow').describe('List of workflow files to execute in this pipeline'),\n}).describe('Schema for IntelliTester pipeline files that orchestrate multiple workflows');\n\n// Export inferred types\nexport type PipelineDefinition = z.infer<typeof PipelineDefinitionSchema>;\nexport type WorkflowReference = z.infer<typeof workflowReferenceSchema>;\nexport type PipelineConfig = z.infer<typeof pipelineConfigSchema>;\nexport type PipelineWebConfig = z.infer<typeof pipelineWebConfigSchema>;\nexport type PipelineAppwriteConfig = z.infer<typeof pipelineAppwriteConfigSchema>;\nexport type PipelineCleanupConfig = z.infer<typeof pipelineCleanupConfigSchema>;\nexport type PipelineWebServerConfig = z.infer<typeof pipelineWebServerSchema>;\n","import fs from 'node:fs/promises';\n\nimport type { ZodIssue, ZodType } from 'zod';\nimport { parse } from 'yaml';\n\nimport { IntellitesterConfigSchema, TestDefinitionSchema } from './schema';\nimport type { IntellitesterConfig, TestDefinition } from './types';\nimport { WorkflowDefinitionSchema, type WorkflowDefinition } from './workflowSchema';\nimport { PipelineDefinitionSchema, type PipelineDefinition } from './pipelineSchema';\n\nconst formatIssues = (issues: ZodIssue[]): string =>\n issues\n .map((issue) => {\n const path = issue.path.join('.') || '<root>';\n return `${path}: ${issue.message}`;\n })\n .join('; ');\n\n/**\n * Interpolates environment variables in a parsed YAML object.\n * Recursively replaces ${VAR_NAME} patterns with environment variable values.\n */\nconst interpolateEnvVars = (obj: unknown): unknown => {\n if (typeof obj === 'string') {\n // Replace ${VAR_NAME} with environment variable value\n return obj.replace(/\\$\\{([^}]+)\\}/g, (_, varName) => {\n const value = process.env[varName];\n if (value === undefined) {\n throw new Error(`Environment variable ${varName} is not defined`);\n }\n return value;\n });\n }\n\n if (Array.isArray(obj)) {\n return obj.map(interpolateEnvVars);\n }\n\n if (obj !== null && typeof obj === 'object') {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(obj)) {\n result[key] = interpolateEnvVars(value);\n }\n return result;\n }\n\n return obj;\n};\n\nconst parseWithSchema = <T>(content: string, schema: ZodType<T>, subject: string): T => {\n let parsed: unknown;\n try {\n parsed = parse(content);\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new Error(`Invalid YAML for ${subject}: ${message}`);\n }\n\n // Interpolate environment variables in the parsed content\n const interpolated = interpolateEnvVars(parsed);\n\n const result = schema.safeParse(interpolated);\n if (!result.success) {\n throw new Error(`Invalid ${subject}: ${formatIssues(result.error.issues)}`);\n }\n\n return result.data;\n};\n\nexport const parseTestDefinition = (content: string): TestDefinition =>\n parseWithSchema(content, TestDefinitionSchema, 'test definition');\n\nexport const loadTestDefinition = async (filePath: string): Promise<TestDefinition> => {\n const fileContent = await fs.readFile(filePath, 'utf8');\n return parseTestDefinition(fileContent);\n};\n\nexport const parseIntellitesterConfig = (content: string): IntellitesterConfig =>\n parseWithSchema(content, IntellitesterConfigSchema, 'config');\n\nexport const loadIntellitesterConfig = async (filePath: string): Promise<IntellitesterConfig> => {\n const fileContent = await fs.readFile(filePath, 'utf8');\n return parseIntellitesterConfig(fileContent);\n};\n\nexport const parseWorkflowDefinition = (content: string): WorkflowDefinition =>\n parseWithSchema(content, WorkflowDefinitionSchema, 'workflow definition');\n\nexport const loadWorkflowDefinition = async (filePath: string): Promise<WorkflowDefinition> => {\n const fileContent = await fs.readFile(filePath, 'utf8');\n return parseWorkflowDefinition(fileContent);\n};\n\nexport const isWorkflowFile = (filePath: string): boolean => {\n return filePath.endsWith('.workflow.yaml') || filePath.endsWith('.workflow.yml');\n};\n\n/**\n * Check if a file is a pipeline file based on naming convention.\n * Pipeline files end with .pipeline.yaml or .pipeline.yml\n */\nexport const isPipelineFile = (filePath: string): boolean => {\n return filePath.endsWith('.pipeline.yaml') || filePath.endsWith('.pipeline.yml');\n};\n\n/**\n * Parse pipeline definition from string content.\n */\nexport const parsePipelineDefinition = (content: string): PipelineDefinition =>\n parseWithSchema(content, PipelineDefinitionSchema, 'pipeline definition');\n\n/**\n * Load and validate a pipeline definition from a YAML file.\n */\nexport const loadPipelineDefinition = async (filePath: string): Promise<PipelineDefinition> => {\n const fileContent = await fs.readFile(filePath, 'utf8');\n return parsePipelineDefinition(fileContent);\n};\n\n/**\n * Recursively collects all environment variable names that are referenced\n * but not defined in the process environment.\n */\nexport const collectMissingEnvVars = (obj: unknown): string[] => {\n const missing: string[] = [];\n\n const collect = (value: unknown): void => {\n if (typeof value === 'string') {\n const matches = value.matchAll(/\\$\\{([^}]+)\\}/g);\n for (const match of matches) {\n const varName = match[1];\n if (process.env[varName] === undefined && !missing.includes(varName)) {\n missing.push(varName);\n }\n }\n } else if (Array.isArray(value)) {\n value.forEach(collect);\n } else if (value !== null && typeof value === 'object') {\n Object.values(value).forEach(collect);\n }\n };\n\n collect(obj);\n return missing;\n};\n\n/**\n * Detect if YAML content is a workflow by checking for 'tests' array.\n */\nexport const isWorkflowContent = (content: string): boolean => {\n try {\n const parsed = parse(content);\n return parsed && Array.isArray(parsed.tests) && !parsed.steps && !parsed.workflows;\n } catch {\n return false;\n }\n};\n\n/**\n * Detect if YAML content is a pipeline by checking for 'workflows' array.\n */\nexport const isPipelineContent = (content: string): boolean => {\n try {\n const parsed = parse(content);\n return parsed && Array.isArray(parsed.workflows) && !parsed.steps;\n } catch {\n return false;\n }\n};\n"]}