{
  "name": "scenario",
  "specifier": "@probitas/scenario",
  "version": "0.2.9",
  "moduleDoc": "Core scenario definition types and utilities.\n\nThis package provides the fundamental type definitions that represent scenario\nstructures, along with utilities for loading scenario files and filtering\nscenarios using selectors. It serves as the foundation layer that other\nProbitas packages build upon.\n\n## Links\n\n- [GitHub Repository](https://github.com/jsr-probitas/probitas)\n- [@probitas/probitas](https://jsr.io/@probitas/probitas) - Main package (recommended for most users)\n\n## Related Packages\n\n| Package | Description |\n|---------|-------------|\n| [@probitas/builder](https://jsr.io/@probitas/builder) | Uses these types to build scenarios |\n| [@probitas/runner](https://jsr.io/@probitas/runner) | Executes scenario definitions |\n| [@probitas/discover](https://jsr.io/@probitas/discover) | Discovers scenario files to load |\n\n## Type Definitions\n\nThe type system is designed around immutable data structures:\n\n- {@linkcode ScenarioDefinition} - Complete scenario with name, options, and entries\n- {@linkcode StepDefinition} - Individual step with function, options, and source\n- {@linkcode SetupDefinition} - Setup hook with cleanup function support\n- {@linkcode ResourceDefinition} - Named resource with fn function\n- {@linkcode StepContext} - Context object passed to all functions\n- {@linkcode Entry} - Discriminated union of step, setup, or resource\n\n## Options Types\n\n- {@linkcode ScenarioOptions} - Scenario-level configuration (tags, default step options)\n- {@linkcode StepOptions} - Step execution settings (timeout, retry strategy)\n- {@linkcode Source} - File and line number for error reporting\n\n## Function Types\n\n- {@linkcode StepFunction} - Signature for step execution functions\n- {@linkcode SetupFunction} - Signature for setup hooks (returns cleanup)\n- {@linkcode ResourceFunction} - Signature for resource creation functions\n- {@linkcode SetupCleanup} - Return type of setup functions\n\n## Loader Utilities\n\n- {@linkcode loadScenarios} - Load scenario definitions from file paths\n- {@linkcode LoadScenariosOptions} - Options for the loader\n\n## Selector Utilities\n\nSelectors provide powerful filtering capabilities:\n\n- {@linkcode applySelectors} - Filter scenarios using selector strings\n- {@linkcode parseSelector} - Parse selector string into Selector objects\n- {@linkcode matchesSelector} - Check if a scenario matches a single selector\n- {@linkcode Selector} - Parsed selector object\n- {@linkcode SelectorType} - Type of selector (\"tag\" or \"name\")\n",
  "exports": [
    {
      "name": "ScenarioOptions",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
        "line": 22,
        "col": 0,
        "byteIndex": 529
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Configuration options for scenario execution.\n\nDefines metadata and default behavior for an entire scenario.\n",
        "tags": [
          {
            "kind": "example",
            "doc": "```ts\nconst options: ScenarioOptions = {\n  tags: [\"api\", \"integration\", \"slow\"],\n  stepOptions: {\n    timeout: 60000,\n    retry: { maxAttempts: 2, backoff: \"linear\" }\n  }\n};\n```\n"
          },
          {
            "kind": "see",
            "doc": "{@linkcode StepOptions} for step-level configuration"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "tags",
            "jsDoc": {
              "doc": "Tags for filtering and organizing scenarios.\n\nTags can be used with the CLI to run specific subsets:\n```bash\nprobitas run -s \"tag:api\"           # Run scenarios tagged \"api\"\nprobitas run -s \"tag:api,tag:fast\"  # Run scenarios with both tags\nprobitas run -s \"!tag:slow\"         # Exclude slow scenarios\n```"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 33,
              "col": 2,
              "byteIndex": 923
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              }
            },
            "typeParams": []
          },
          {
            "name": "stepOptions",
            "jsDoc": {
              "doc": "Default options applied to all steps in this scenario.\n\nIndividual steps can override these defaults by specifying\ntheir own options in the `.step()` call."
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 41,
              "col": 2,
              "byteIndex": 1148
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "StepOptions",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "StepOptions"
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "ScenarioDefinition",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
        "line": 75,
        "col": 0,
        "byteIndex": 2320
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Complete, immutable definition of a scenario.\n\nThis is the core type produced by the builder and consumed by the runner.\nIt contains everything needed to execute a scenario: its name, options,\nand ordered sequence of entries (steps, resources, setups).\n",
        "tags": [
          {
            "kind": "unsupported",
            "value": "@remarks\nScenario definitions are:\n- **Immutable**: The entries array is frozen after creation\n- **Self-contained**: All options have defaults applied\n- **Portable**: Can be serialized (minus functions) for tooling\n"
          },
          {
            "kind": "example",
            "doc": "Typical scenario structure\n```ts\n// Created by: scenario(\"Login Flow\").step(...).build()\nconst definition: ScenarioDefinition = {\n  name: \"Login Flow\",\n  options: {\n    tags: [\"auth\", \"smoke\"],\n    stepOptions: { timeout: 30000, retry: { maxAttempts: 1, backoff: \"linear\" } }\n  },\n  entries: [\n    { kind: \"resource\", value: { name: \"api\", fn: ... } },\n    { kind: \"step\", value: { name: \"Login\", fn: ..., options: ... } },\n    { kind: \"step\", value: { name: \"Verify\", fn: ..., options: ... } }\n  ],\n  source: { file: \"/tests/auth.probitas.ts\", line: 5 }\n};\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "name",
            "jsDoc": {
              "doc": "Human-readable scenario name (displayed in reports and CLI)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 77,
              "col": 2,
              "byteIndex": 2429
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "string",
              "kind": "keyword",
              "keyword": "string"
            },
            "typeParams": []
          },
          {
            "name": "tags",
            "jsDoc": {
              "doc": "Tags for filtering and organizing scenarios.\n\nTags can be used with the CLI to run specific subsets:\n```bash\nprobitas run -s \"tag:api\"           # Run scenarios tagged \"api\"\nprobitas run -s \"tag:api,tag:fast\"  # Run scenarios with both tags\nprobitas run -s \"!tag:slow\"         # Exclude slow scenarios\n```"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 89,
              "col": 2,
              "byteIndex": 2812
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              }
            },
            "typeParams": []
          },
          {
            "name": "steps",
            "jsDoc": {
              "doc": "Ordered sequence of entries (resources → setups → steps)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 92,
              "col": 2,
              "byteIndex": 2919
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "StepDefinition",
                    "kind": "typeRef",
                    "typeRef": {
                      "typeParams": null,
                      "typeName": "StepDefinition"
                    }
                  }
                }
              }
            },
            "typeParams": []
          },
          {
            "name": "source",
            "jsDoc": {
              "doc": "Source source where the scenario was defined"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 95,
              "col": 2,
              "byteIndex": 3019
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "Source",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "Source"
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "ScenarioMetadata",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
        "line": 116,
        "col": 0,
        "byteIndex": 3575
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Serializable scenario metadata (without executable functions).\n\nUsed by the JSON reporter and tooling to output scenario information\nwithout including non-serializable function references.\n",
        "tags": [
          {
            "kind": "example",
            "doc": "JSON reporter output\n```json\n{\n  \"name\": \"Login Flow\",\n  \"options\": { \"tags\": [\"auth\"], \"stepOptions\": { ... } },\n  \"entries\": [\n    { \"kind\": \"step\", \"value\": { \"name\": \"Login\", \"options\": { ... } } }\n  ],\n  \"source\": { \"file\": \"/tests/auth.probitas.ts\", \"line\": 5 }\n}\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "name",
            "jsDoc": {
              "doc": "Scenario name"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 118,
              "col": 2,
              "byteIndex": 3636
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "string",
              "kind": "keyword",
              "keyword": "string"
            },
            "typeParams": []
          },
          {
            "name": "tags",
            "jsDoc": {
              "doc": "Tags for filtering and organizing scenarios.\n\nTags can be used with the CLI to run specific subsets:\n```bash\nprobitas run -s \"tag:api\"           # Run scenarios tagged \"api\"\nprobitas run -s \"tag:api,tag:fast\"  # Run scenarios with both tags\nprobitas run -s \"!tag:slow\"         # Exclude slow scenarios\n```"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 130,
              "col": 2,
              "byteIndex": 4019
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              }
            },
            "typeParams": []
          },
          {
            "name": "steps",
            "jsDoc": {
              "doc": "Entry metadata (functions omitted for serialization)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 133,
              "col": 2,
              "byteIndex": 4118
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "StepMetadata",
                    "kind": "typeRef",
                    "typeRef": {
                      "typeParams": null,
                      "typeName": "StepMetadata"
                    }
                  }
                }
              }
            },
            "typeParams": []
          },
          {
            "name": "source",
            "jsDoc": {
              "doc": "Source source where the scenario was defined"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/scenario.ts",
              "line": 136,
              "col": 2,
              "byteIndex": 4216
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "Source",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "Source"
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "Source",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/source.ts",
        "line": 16,
        "col": 0,
        "byteIndex": 350
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Source source in a file for error reporting and debugging.\n\nCaptured automatically when defining scenarios, steps, and setups.\nUsed by reporters to show meaningful stack traces.\n",
        "tags": [
          {
            "kind": "example",
            "doc": "```ts\n// Example source object\nconst source: Source = {\n  file: \"/project/tests/auth.probitas.ts\",\n  line: 42\n};\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "file",
            "jsDoc": {
              "doc": "Absolute file path where the element was defined"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/source.ts",
              "line": 18,
              "col": 2,
              "byteIndex": 436
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "string",
              "kind": "keyword",
              "keyword": "string"
            },
            "typeParams": []
          },
          {
            "name": "line",
            "jsDoc": {
              "doc": "Line number in the file (1-indexed)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/source.ts",
              "line": 21,
              "col": 2,
              "byteIndex": 507
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "number",
              "kind": "keyword",
              "keyword": "number"
            },
            "typeParams": []
          },
          {
            "name": "column",
            "jsDoc": {
              "doc": "Column number in the file (1-indexed)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/source.ts",
              "line": 24,
              "col": 2,
              "byteIndex": 581
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "number",
              "kind": "keyword",
              "keyword": "number"
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "StepOptions",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
        "line": 22,
        "col": 0,
        "byteIndex": 546
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Configuration options for individual step execution.\n\nControls timeout and retry behavior for a step. These options can be set at:\n1. Step level (highest priority)\n2. Scenario level (applies to all steps in scenario)\n3. Default values (30s timeout, no retry)\n",
        "tags": [
          {
            "kind": "example",
            "doc": "```ts\nconst options: StepOptions = {\n  timeout: 60000,  // 60 seconds\n  retry: {\n    maxAttempts: 3,\n    backoff: \"exponential\"  // Waits 1s, 2s, 4s between retries\n  }\n};\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "timeout",
            "jsDoc": {
              "doc": "Maximum execution time in milliseconds.\n\nIf the step takes longer, a {@linkcode TimeoutError} is thrown.\nDefault: 30000 (30 seconds)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 29,
              "col": 2,
              "byteIndex": 743
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "number",
              "kind": "keyword",
              "keyword": "number"
            },
            "typeParams": []
          },
          {
            "name": "retry",
            "jsDoc": {
              "doc": "Retry configuration for handling transient failures"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 32,
              "col": 2,
              "byteIndex": 834
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "",
              "kind": "typeLiteral",
              "typeLiteral": {
                "constructors": [],
                "methods": [],
                "properties": [
                  {
                    "name": "maxAttempts",
                    "jsDoc": {
                      "doc": "Maximum number of execution attempts.\n\n- `1` = No retry (fail immediately on error)\n- `2` = One retry (2 total attempts)\n- `n` = n-1 retries (n total attempts)\n\nDefault: 1 (no retry)"
                    },
                    "location": {
                      "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
                      "line": 42,
                      "col": 4,
                      "byteIndex": 1103
                    },
                    "params": [],
                    "readonly": true,
                    "computed": false,
                    "optional": true,
                    "tsType": {
                      "repr": "number",
                      "kind": "keyword",
                      "keyword": "number"
                    },
                    "typeParams": []
                  },
                  {
                    "name": "backoff",
                    "jsDoc": {
                      "doc": "Backoff strategy for delay between retry attempts.\n\n- `\"linear\"`: Fixed 1 second delay between attempts\n- `\"exponential\"`: Doubles delay each attempt (1s, 2s, 4s, 8s...)\n\nDefault: \"linear\""
                    },
                    "location": {
                      "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
                      "line": 52,
                      "col": 4,
                      "byteIndex": 1384
                    },
                    "params": [],
                    "readonly": true,
                    "computed": false,
                    "optional": true,
                    "tsType": {
                      "repr": "",
                      "kind": "union",
                      "union": [
                        {
                          "repr": "linear",
                          "kind": "literal",
                          "literal": {
                            "kind": "string",
                            "string": "linear"
                          }
                        },
                        {
                          "repr": "exponential",
                          "kind": "literal",
                          "literal": {
                            "kind": "string",
                            "string": "exponential"
                          }
                        }
                      ]
                    },
                    "typeParams": []
                  }
                ],
                "callSignatures": [],
                "indexSignatures": []
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "SetupCleanup",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
        "line": 89,
        "col": 0,
        "byteIndex": 2408
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Cleanup handler returned by setup functions.\n\nSetup functions can return various cleanup mechanisms that are automatically\ninvoked after the scenario completes (regardless of success or failure).\n\nSupported cleanup patterns:\n- `void` / `undefined`: No cleanup needed\n- `() => void`: Synchronous cleanup function\n- `() => Promise<void>`: Async cleanup function\n- `Disposable`: Object with `[Symbol.dispose]()` method\n- `AsyncDisposable`: Object with `[Symbol.asyncDispose]()` method\n",
        "tags": [
          {
            "kind": "example",
            "doc": "Cleanup function\n```ts\nscenario(\"File Test\")\n  .setup(() => {\n    const file = Deno.makeTempFileSync();\n    return () => Deno.removeSync(file);  // Cleanup function\n  })\n  .build();\n```\n"
          },
          {
            "kind": "example",
            "doc": "Disposable object\n```ts\nscenario(\"Connection Test\")\n  .setup(async () => {\n    const conn = await connect();\n    return conn;  // If conn implements AsyncDisposable\n  })\n  .build();\n```"
          }
        ]
      },
      "kind": "typeAlias",
      "typeAliasDef": {
        "tsType": {
          "repr": "",
          "kind": "union",
          "union": [
            {
              "repr": "void",
              "kind": "keyword",
              "keyword": "void"
            },
            {
              "repr": "",
              "kind": "parenthesized",
              "parenthesized": {
                "repr": "",
                "kind": "fnOrConstructor",
                "fnOrConstructor": {
                  "constructor": false,
                  "tsType": {
                    "repr": "",
                    "kind": "union",
                    "union": [
                      {
                        "repr": "void",
                        "kind": "keyword",
                        "keyword": "void"
                      },
                      {
                        "repr": "Promise",
                        "kind": "typeRef",
                        "typeRef": {
                          "typeParams": [
                            {
                              "repr": "void",
                              "kind": "keyword",
                              "keyword": "void"
                            }
                          ],
                          "typeName": "Promise"
                        }
                      }
                    ]
                  },
                  "params": [],
                  "typeParams": []
                }
              }
            },
            {
              "repr": "Disposable",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "Disposable"
              }
            },
            {
              "repr": "AsyncDisposable",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "AsyncDisposable"
              }
            }
          ]
        },
        "typeParams": []
      }
    },
    {
      "name": "StepContext",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
        "line": 128,
        "col": 0,
        "byteIndex": 3462
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Execution context provided to steps, resources, and setup hooks.\n\nThe context provides access to:\n- Previous step results with full type inference\n- All accumulated results as a typed tuple\n- Named resources registered with `.resource()`\n- Shared storage for cross-step communication\n- Abort signal for timeout and cancellation handling\n",
        "tags": [
          {
            "kind": "example",
            "doc": "Accessing previous result\n```ts\nscenario(\"Chained Steps\")\n  .step(\"First\", () => ({ id: 123 }))\n  .step(\"Second\", (ctx) => {\n    console.log(ctx.previous.id);  // 123 (typed as number)\n  })\n  .build();\n```\n"
          },
          {
            "kind": "example",
            "doc": "Using shared store\n```ts\nscenario(\"Store Example\")\n  .setup((ctx) => {\n    ctx.store.set(\"startTime\", Date.now());\n  })\n  .step(\"Check duration\", (ctx) => {\n    const start = ctx.store.get(\"startTime\") as number;\n    console.log(`Elapsed: ${Date.now() - start}ms`);\n  })\n  .build();\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "index",
            "jsDoc": {
              "doc": "Current step index (0-based).\n\nUseful for conditional logic based on position in the scenario."
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 134,
              "col": 2,
              "byteIndex": 3616
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "number",
              "kind": "keyword",
              "keyword": "number"
            },
            "typeParams": []
          },
          {
            "name": "previous",
            "jsDoc": {
              "doc": "Result from the previous step.\n\nFully typed based on what the previous step returned.\nFor the first step, this is `unknown`."
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 142,
              "col": 2,
              "byteIndex": 3799
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "unknown",
              "kind": "keyword",
              "keyword": "unknown"
            },
            "typeParams": []
          },
          {
            "name": "results",
            "jsDoc": {
              "doc": "All accumulated results as a typed tuple.\n\nAllows accessing any previous result by index:\n```ts\nctx.results[0]  // First step's result\nctx.results[1]  // Second step's result\n```"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 153,
              "col": 2,
              "byteIndex": 4055
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "unknown",
                    "kind": "keyword",
                    "keyword": "unknown"
                  }
                }
              }
            },
            "typeParams": []
          },
          {
            "name": "store",
            "jsDoc": {
              "doc": "Shared key-value storage for cross-step communication.\n\nUse this for data that doesn't fit the step result pattern,\nsuch as metadata or configuration set during setup."
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 161,
              "col": 2,
              "byteIndex": 4295
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "Map",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": [
                  {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  },
                  {
                    "repr": "unknown",
                    "kind": "keyword",
                    "keyword": "unknown"
                  }
                ],
                "typeName": "Map"
              }
            },
            "typeParams": []
          },
          {
            "name": "resources",
            "jsDoc": {
              "doc": "Named resources registered with `.resource()`.\n\nResources are typed based on their registration:\n```ts\n.resource(\"db\", () => createDbConnection())\n.step((ctx) => ctx.resources.db.query(...))\n```"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 172,
              "col": 2,
              "byteIndex": 4577
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "Record",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": [
                  {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  },
                  {
                    "repr": "unknown",
                    "kind": "keyword",
                    "keyword": "unknown"
                  }
                ],
                "typeName": "Record"
              }
            },
            "typeParams": []
          },
          {
            "name": "signal",
            "jsDoc": {
              "doc": "Abort signal that fires on timeout or manual cancellation.\n\nPass this to fetch() or other APIs that support AbortSignal\nfor proper timeout handling."
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 180,
              "col": 2,
              "byteIndex": 4805
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "AbortSignal",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "AbortSignal"
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "StepFunction",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
        "line": 206,
        "col": 0,
        "byteIndex": 5447
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Function signature for step execution.\n\nA step function receives the execution context and returns a value\n(sync or async) that becomes available to subsequent steps.\n",
        "tags": [
          {
            "kind": "template",
            "name": "T",
            "doc": "- Type of this step's return value\n"
          },
          {
            "kind": "example",
            "doc": "Sync step returning data\n```ts\nconst step: StepFunction<{ name: string }> = (ctx) => {\n  return { name: \"Alice\" };\n};\n```\n"
          },
          {
            "kind": "example",
            "doc": "Async step with API call\n```ts\nconst step: StepFunction<User> = async (ctx) => {\n  const response = await fetch(\"/api/user\", { signal: ctx.signal });\n  return response.json();\n};\n```"
          }
        ]
      },
      "kind": "typeAlias",
      "typeAliasDef": {
        "tsType": {
          "repr": "",
          "kind": "fnOrConstructor",
          "fnOrConstructor": {
            "constructor": false,
            "tsType": {
              "repr": "",
              "kind": "union",
              "union": [
                {
                  "repr": "T",
                  "kind": "typeRef",
                  "typeRef": {
                    "typeParams": null,
                    "typeName": "T"
                  }
                },
                {
                  "repr": "Promise",
                  "kind": "typeRef",
                  "typeRef": {
                    "typeParams": [
                      {
                        "repr": "T",
                        "kind": "typeRef",
                        "typeRef": {
                          "typeParams": null,
                          "typeName": "T"
                        }
                      }
                    ],
                    "typeName": "Promise"
                  }
                }
              ]
            },
            "params": [
              {
                "kind": "identifier",
                "name": "ctx",
                "optional": false,
                "tsType": {
                  "repr": "StepContext",
                  "kind": "typeRef",
                  "typeRef": {
                    "typeParams": null,
                    "typeName": "StepContext"
                  }
                }
              }
            ],
            "typeParams": []
          }
        },
        "typeParams": [
          {
            "name": "T",
            "default": {
              "repr": "unknown",
              "kind": "keyword",
              "keyword": "unknown"
            }
          }
        ]
      }
    },
    {
      "name": "StepDefinition",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
        "line": 220,
        "col": 0,
        "byteIndex": 5910
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Immutable definition of a scenario step.\n\nContains all information needed to execute a single step:\nthe step function, its options, and debugging metadata.\n",
        "tags": [
          {
            "kind": "template",
            "name": "T",
            "doc": "- Type of this step's return value\n"
          },
          {
            "kind": "unsupported",
            "value": "@remarks\nStep definitions are created by the builder and consumed by the runner.\nThey are immutable and should not be modified after creation."
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "kind",
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 221,
              "col": 2,
              "byteIndex": 5959
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "union",
              "union": [
                {
                  "repr": "step",
                  "kind": "literal",
                  "literal": {
                    "kind": "string",
                    "string": "step"
                  }
                },
                {
                  "repr": "resource",
                  "kind": "literal",
                  "literal": {
                    "kind": "string",
                    "string": "resource"
                  }
                },
                {
                  "repr": "setup",
                  "kind": "literal",
                  "literal": {
                    "kind": "string",
                    "string": "setup"
                  }
                }
              ]
            },
            "typeParams": []
          },
          {
            "name": "name",
            "jsDoc": {
              "doc": "Human-readable step name (displayed in reports)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 224,
              "col": 2,
              "byteIndex": 6065
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "string",
              "kind": "keyword",
              "keyword": "string"
            },
            "typeParams": []
          },
          {
            "name": "fn",
            "jsDoc": {
              "doc": "Step function to execute"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 227,
              "col": 2,
              "byteIndex": 6125
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "StepFunction",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": [
                  {
                    "repr": "T",
                    "kind": "typeRef",
                    "typeRef": {
                      "typeParams": null,
                      "typeName": "T"
                    }
                  }
                ],
                "typeName": "StepFunction"
              }
            },
            "typeParams": []
          },
          {
            "name": "timeout",
            "jsDoc": {
              "doc": "Maximum execution time in milliseconds.\n\nIf the step takes longer, a {@linkcode TimeoutError} is thrown.\nDefault: 30000 (30 seconds)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 235,
              "col": 2,
              "byteIndex": 6322
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "number",
              "kind": "keyword",
              "keyword": "number"
            },
            "typeParams": []
          },
          {
            "name": "retry",
            "jsDoc": {
              "doc": "Retry configuration for handling transient failures"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 238,
              "col": 2,
              "byteIndex": 6412
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeLiteral",
              "typeLiteral": {
                "constructors": [],
                "methods": [],
                "properties": [
                  {
                    "name": "maxAttempts",
                    "jsDoc": {
                      "doc": "Maximum number of execution attempts.\n\n- `1` = No retry (fail immediately on error)\n- `2` = One retry (2 total attempts)\n- `n` = n-1 retries (n total attempts)\n\nDefault: 1 (no retry)"
                    },
                    "location": {
                      "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
                      "line": 248,
                      "col": 4,
                      "byteIndex": 6680
                    },
                    "params": [],
                    "readonly": true,
                    "computed": false,
                    "optional": false,
                    "tsType": {
                      "repr": "number",
                      "kind": "keyword",
                      "keyword": "number"
                    },
                    "typeParams": []
                  },
                  {
                    "name": "backoff",
                    "jsDoc": {
                      "doc": "Backoff strategy for delay between retry attempts.\n\n- `\"linear\"`: Fixed 1 second delay between attempts\n- `\"exponential\"`: Doubles delay each attempt (1s, 2s, 4s, 8s...)\n\nDefault: \"linear\""
                    },
                    "location": {
                      "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
                      "line": 258,
                      "col": 4,
                      "byteIndex": 6960
                    },
                    "params": [],
                    "readonly": true,
                    "computed": false,
                    "optional": false,
                    "tsType": {
                      "repr": "",
                      "kind": "union",
                      "union": [
                        {
                          "repr": "linear",
                          "kind": "literal",
                          "literal": {
                            "kind": "string",
                            "string": "linear"
                          }
                        },
                        {
                          "repr": "exponential",
                          "kind": "literal",
                          "literal": {
                            "kind": "string",
                            "string": "exponential"
                          }
                        }
                      ]
                    },
                    "typeParams": []
                  }
                ],
                "callSignatures": [],
                "indexSignatures": []
              }
            },
            "typeParams": []
          },
          {
            "name": "source",
            "jsDoc": {
              "doc": "Source source where the step was defined (for error messages)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
              "line": 262,
              "col": 2,
              "byteIndex": 7083
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "Source",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "Source"
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": [
          {
            "name": "T",
            "default": {
              "repr": "unknown",
              "kind": "keyword",
              "keyword": "unknown"
            }
          }
        ]
      }
    },
    {
      "name": "StepMetadata",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/types/step.ts",
        "line": 270,
        "col": 0,
        "byteIndex": 7250
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Serializable step metadata (without the function).\n\nUsed for JSON output, tooling, and inspection without executing code."
      },
      "kind": "typeAlias",
      "typeAliasDef": {
        "tsType": {
          "repr": "Omit",
          "kind": "typeRef",
          "typeRef": {
            "typeParams": [
              {
                "repr": "StepDefinition",
                "kind": "typeRef",
                "typeRef": {
                  "typeParams": null,
                  "typeName": "StepDefinition"
                }
              },
              {
                "repr": "fn",
                "kind": "literal",
                "literal": {
                  "kind": "string",
                  "string": "fn"
                }
              }
            ],
            "typeName": "Omit"
          }
        },
        "typeParams": []
      }
    },
    {
      "name": "LoadScenariosOptions",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/loader.ts",
        "line": 25,
        "col": 0,
        "byteIndex": 522
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Options for loading scenarios from files.\n",
        "tags": [
          {
            "kind": "example",
            "doc": "Handling import errors\n```ts\nconst scenarios = await loadScenarios(files, {\n  onImportError: (file, err) => {\n    console.error(`Failed to load ${file}:`, err);\n  }\n});\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "onImportError",
            "jsDoc": {
              "doc": "Callback invoked when a scenario file fails to import.\n\nUse this for custom error handling or logging. If not provided,\nimport errors are logged but otherwise silently ignored (the file\nis skipped and loading continues with other files).\n",
              "tags": [
                {
                  "kind": "param",
                  "name": "scenarioFile",
                  "doc": "- The file path or URL that failed to import"
                },
                {
                  "kind": "param",
                  "name": "err",
                  "doc": "- The error that occurred during import"
                }
              ]
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/loader.ts",
              "line": 36,
              "col": 2,
              "byteIndex": 969
            },
            "params": [],
            "computed": false,
            "optional": true,
            "tsType": {
              "repr": "",
              "kind": "fnOrConstructor",
              "fnOrConstructor": {
                "constructor": false,
                "tsType": {
                  "repr": "void",
                  "kind": "keyword",
                  "keyword": "void"
                },
                "params": [
                  {
                    "kind": "identifier",
                    "name": "scenarioFile",
                    "optional": false,
                    "tsType": {
                      "repr": "",
                      "kind": "union",
                      "union": [
                        {
                          "repr": "string",
                          "kind": "keyword",
                          "keyword": "string"
                        },
                        {
                          "repr": "URL",
                          "kind": "typeRef",
                          "typeRef": {
                            "typeParams": null,
                            "typeName": "URL"
                          }
                        }
                      ]
                    }
                  },
                  {
                    "kind": "identifier",
                    "name": "err",
                    "optional": false,
                    "tsType": {
                      "repr": "unknown",
                      "kind": "keyword",
                      "keyword": "unknown"
                    }
                  }
                ],
                "typeParams": []
              }
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "loadScenarios",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/loader.ts",
        "line": 73,
        "col": 0,
        "byteIndex": 2127
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Load scenario definitions from file paths.\n\nDynamically imports scenario files and extracts their default exports.\nSupports both single scenario exports and arrays of scenarios.\n",
        "tags": [
          {
            "kind": "param",
            "name": "scenarioFiles",
            "doc": "- Absolute file paths or file:// URLs to load"
          },
          {
            "kind": "param",
            "name": "options",
            "doc": "- Optional error handling configuration"
          },
          {
            "kind": "return",
            "doc": "Array of loaded scenario definitions\n"
          },
          {
            "kind": "unsupported",
            "value": "@remarks\n- Files must export a default value (single scenario or array)\n- Import errors are logged and skipped (won't throw)\n- Use with {@linkcode discoverScenarioFiles} from `@probitas/discover`\n"
          },
          {
            "kind": "example",
            "doc": "Loading discovered files\n```ts\nimport { discoverScenarioFiles } from \"@probitas/discover\";\nimport { loadScenarios } from \"@probitas/scenario\";\n\nconst files = await discoverScenarioFiles({\n  includes: [\"**\\/*.probitas.ts\"]\n});\nconst scenarios = await loadScenarios(files);\n```\n"
          },
          {
            "kind": "example",
            "doc": "Loading specific files\n```ts\nconst scenarios = await loadScenarios([\n  \"/project/tests/auth.probitas.ts\",\n  \"/project/tests/api.probitas.ts\"\n]);\n```"
          }
        ]
      },
      "kind": "function",
      "functionDef": {
        "params": [
          {
            "kind": "identifier",
            "name": "scenarioFiles",
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "",
                    "kind": "parenthesized",
                    "parenthesized": {
                      "repr": "",
                      "kind": "union",
                      "union": [
                        {
                          "repr": "string",
                          "kind": "keyword",
                          "keyword": "string"
                        },
                        {
                          "repr": "URL",
                          "kind": "typeRef",
                          "typeRef": {
                            "typeParams": null,
                            "typeName": "URL"
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "kind": "identifier",
            "name": "options",
            "optional": true,
            "tsType": {
              "repr": "LoadScenariosOptions",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "LoadScenariosOptions"
              }
            }
          }
        ],
        "returnType": {
          "repr": "Promise",
          "kind": "typeRef",
          "typeRef": {
            "typeParams": [
              {
                "repr": "",
                "kind": "array",
                "array": {
                  "repr": "ScenarioDefinition",
                  "kind": "typeRef",
                  "typeRef": {
                    "typeParams": null,
                    "typeName": "ScenarioDefinition"
                  }
                }
              }
            ],
            "typeName": "Promise"
          }
        },
        "hasBody": true,
        "isAsync": true,
        "isGenerator": false,
        "typeParams": []
      }
    },
    {
      "name": "SelectorType",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
        "line": 18,
        "col": 0,
        "byteIndex": 385
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Type of selector for filtering scenarios.\n\n- `\"tag\"`: Match against scenario tags\n- `\"name\"`: Match against scenario name"
      },
      "kind": "typeAlias",
      "typeAliasDef": {
        "tsType": {
          "repr": "",
          "kind": "union",
          "union": [
            {
              "repr": "tag",
              "kind": "literal",
              "literal": {
                "kind": "string",
                "string": "tag"
              }
            },
            {
              "repr": "name",
              "kind": "literal",
              "literal": {
                "kind": "string",
                "string": "name"
              }
            }
          ]
        },
        "typeParams": []
      }
    },
    {
      "name": "Selector",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
        "line": 36,
        "col": 0,
        "byteIndex": 784
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Parsed selector for filtering scenarios.\n\nCreated by {@linkcode parseSelector}. Used by {@linkcode matchesSelector}\nand {@linkcode applySelectors} to filter scenarios.\n",
        "tags": [
          {
            "kind": "example",
            "doc": "```ts\n// Result of parseSelector(\"tag:api\")\nconst selector: Selector = {\n  type: \"tag\",\n  value: /api/i,\n  negated: false\n};\n```"
          }
        ]
      },
      "kind": "interface",
      "interfaceDef": {
        "extends": [],
        "constructors": [],
        "methods": [],
        "properties": [
          {
            "name": "type",
            "jsDoc": {
              "doc": "Type of match: \"tag\" for tags, \"name\" for scenario name"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
              "line": 38,
              "col": 2,
              "byteIndex": 879
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "SelectorType",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "SelectorType"
              }
            },
            "typeParams": []
          },
          {
            "name": "value",
            "jsDoc": {
              "doc": "Regular expression pattern for matching (case-insensitive)"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
              "line": 41,
              "col": 2,
              "byteIndex": 979
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "RegExp",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "RegExp"
              }
            },
            "typeParams": []
          },
          {
            "name": "negated",
            "jsDoc": {
              "doc": "If true, selector matches scenarios that do NOT match the pattern"
            },
            "location": {
              "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
              "line": 44,
              "col": 2,
              "byteIndex": 1081
            },
            "params": [],
            "readonly": true,
            "computed": false,
            "optional": false,
            "tsType": {
              "repr": "boolean",
              "kind": "keyword",
              "keyword": "boolean"
            },
            "typeParams": []
          }
        ],
        "callSignatures": [],
        "indexSignatures": [],
        "typeParams": []
      }
    },
    {
      "name": "parseSelector",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
        "line": 85,
        "col": 0,
        "byteIndex": 2326
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Parse a selector string into an array of Selector objects.\n\nSelector syntax:\n- `tag:pattern` - Match scenarios with a tag matching the pattern\n- `name:pattern` - Match scenarios with a name matching the pattern\n- `pattern` - Shorthand for `name:pattern`\n- `!selector` - Negate the selector (exclude matches)\n- `sel1,sel2` - Combine selectors with AND logic\n",
        "tags": [
          {
            "kind": "param",
            "name": "input",
            "doc": "- Selector string to parse"
          },
          {
            "kind": "return",
            "doc": "Array of parsed Selector objects (comma-separated = multiple selectors)"
          },
          {
            "kind": "throws",
            "type": "Error",
            "doc": "If selector type is invalid (must be \"tag\" or \"name\")\n"
          },
          {
            "kind": "example",
            "doc": "Basic selectors\n```ts\nparseSelector(\"tag:api\");\n// → [{ type: \"tag\", value: /api/i, negated: false }]\n\nparseSelector(\"login\");  // Shorthand for name:login\n// → [{ type: \"name\", value: /login/i, negated: false }]\n```\n"
          },
          {
            "kind": "example",
            "doc": "Negation\n```ts\nparseSelector(\"!tag:slow\");\n// → [{ type: \"tag\", value: /slow/i, negated: true }]\n```\n"
          },
          {
            "kind": "example",
            "doc": "Combined selectors (AND logic)\n```ts\nparseSelector(\"tag:api,!tag:slow\");\n// → [\n//     { type: \"tag\", value: /api/i, negated: false },\n//     { type: \"tag\", value: /slow/i, negated: true }\n//   ]\n```"
          }
        ]
      },
      "kind": "function",
      "functionDef": {
        "params": [
          {
            "kind": "identifier",
            "name": "input",
            "optional": false,
            "tsType": {
              "repr": "string",
              "kind": "keyword",
              "keyword": "string"
            }
          }
        ],
        "returnType": {
          "repr": "",
          "kind": "array",
          "array": {
            "repr": "Selector",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "Selector"
            }
          }
        },
        "hasBody": true,
        "isAsync": false,
        "isGenerator": false,
        "typeParams": []
      }
    },
    {
      "name": "matchesSelector",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
        "line": 151,
        "col": 0,
        "byteIndex": 4165
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Check if a scenario matches a single selector.\n\nTests whether the scenario's name or tags match the selector's pattern.\nDoes not apply negation - returns the raw match result.\n",
        "tags": [
          {
            "kind": "param",
            "name": "scenario",
            "doc": "- Scenario definition to test"
          },
          {
            "kind": "param",
            "name": "selector",
            "doc": "- Selector containing the pattern to match"
          },
          {
            "kind": "return",
            "doc": "`true` if the scenario matches the pattern (before negation)\n"
          },
          {
            "kind": "example",
            "doc": "```ts\nconst scenario = { name: \"Login Test\", options: { tags: [\"auth\"] } };\n\nmatchesSelector(scenario, { type: \"tag\", value: /auth/i, negated: false });\n// → true\n\nmatchesSelector(scenario, { type: \"name\", value: /login/i, negated: false });\n// → true\n\nmatchesSelector(scenario, { type: \"tag\", value: /api/i, negated: false });\n// → false\n```"
          }
        ]
      },
      "kind": "function",
      "functionDef": {
        "params": [
          {
            "kind": "identifier",
            "name": "scenario",
            "optional": false,
            "tsType": {
              "repr": "ScenarioDefinition",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "ScenarioDefinition"
              }
            }
          },
          {
            "kind": "identifier",
            "name": "selector",
            "optional": false,
            "tsType": {
              "repr": "Selector",
              "kind": "typeRef",
              "typeRef": {
                "typeParams": null,
                "typeName": "Selector"
              }
            }
          }
        ],
        "returnType": {
          "repr": "boolean",
          "kind": "keyword",
          "keyword": "boolean"
        },
        "hasBody": true,
        "isAsync": false,
        "isGenerator": false,
        "typeParams": []
      }
    },
    {
      "name": "applySelectors",
      "isDefault": false,
      "location": {
        "filename": "https://jsr.io/@probitas/scenario/0.2.9/selector.ts",
        "line": 208,
        "col": 0,
        "byteIndex": 5792
      },
      "declarationKind": "export",
      "jsDoc": {
        "doc": "Filter scenarios using selector strings with AND/OR/NOT logic.\n\nThis is the main entry point for scenario filtering. It combines\nmultiple selector strings with the following logic:\n\n- **Multiple strings**: OR condition (match any)\n- **Comma-separated in string**: AND condition (match all)\n- **`!` prefix**: NOT condition (exclude matches)\n",
        "tags": [
          {
            "kind": "param",
            "name": "scenarios",
            "doc": "- Array of scenarios to filter"
          },
          {
            "kind": "param",
            "name": "selectorInputs",
            "doc": "- Selector strings from CLI `-s` flags"
          },
          {
            "kind": "return",
            "doc": "Filtered scenarios matching the selector criteria\n"
          },
          {
            "kind": "unsupported",
            "value": "@remarks\nIf no selectors are provided, all scenarios are returned unchanged.\n"
          },
          {
            "kind": "example",
            "doc": "OR logic - match any selector string\n```ts\n// Scenarios with \"api\" tag OR \"db\" tag\napplySelectors(scenarios, [\"tag:api\", \"tag:db\"]);\n```\n"
          },
          {
            "kind": "example",
            "doc": "AND logic - match all within comma-separated\n```ts\n// Scenarios with BOTH \"api\" AND \"critical\" tags\napplySelectors(scenarios, [\"tag:api,tag:critical\"]);\n```\n"
          },
          {
            "kind": "example",
            "doc": "Combined AND/OR/NOT\n```ts\n// (api AND critical) OR (db AND !slow)\napplySelectors(scenarios, [\n  \"tag:api,tag:critical\",\n  \"tag:db,!tag:slow\"\n]);\n```\n"
          },
          {
            "kind": "example",
            "doc": "Exclude by name pattern\n```ts\n// All scenarios except those with \"wip\" in name\napplySelectors(scenarios, [\"!wip\"]);\n```"
          }
        ]
      },
      "kind": "function",
      "functionDef": {
        "params": [
          {
            "kind": "identifier",
            "name": "scenarios",
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "array",
              "array": {
                "repr": "ScenarioDefinition",
                "kind": "typeRef",
                "typeRef": {
                  "typeParams": null,
                  "typeName": "ScenarioDefinition"
                }
              }
            }
          },
          {
            "kind": "identifier",
            "name": "selectorInputs",
            "optional": false,
            "tsType": {
              "repr": "",
              "kind": "typeOperator",
              "typeOperator": {
                "operator": "readonly",
                "tsType": {
                  "repr": "",
                  "kind": "array",
                  "array": {
                    "repr": "string",
                    "kind": "keyword",
                    "keyword": "string"
                  }
                }
              }
            }
          }
        ],
        "returnType": {
          "repr": "",
          "kind": "array",
          "array": {
            "repr": "ScenarioDefinition",
            "kind": "typeRef",
            "typeRef": {
              "typeParams": null,
              "typeName": "ScenarioDefinition"
            }
          }
        },
        "hasBody": true,
        "isAsync": false,
        "isGenerator": false,
        "typeParams": []
      }
    }
  ]
}
