emit:
  - "@typra/emitter"
options:
  "@typra/emitter":
    emitter-output-dir: "{cwd}/generated/dispatch-seam"
    root-object: "Typra.Fixtures.DispatchSeam.Root"
    deterministic-output: true
    # This fixture is an illustrative, eyeball-oriented reference: it emits the
    # per-language MODELS (including the polymorphic discriminator de/serialization),
    # the @dispatch seam scaffold (compile-only), the Part III TYPED dispatch
    # resolver beside the seam (e.g. csharp/RendererResolver.cs,
    # python/_renderer_resolver.py — provider + resolver twin of the shape Load
    # switch), the IR goldens (.typra-generated/json-ast, export-surfaces.json,
    # vectors.json), AND the per-language test surface (per-model round-trip tests
    # + the vector-conformance harness + emitted vector-runner) so the generated
    # tests can be read too.
    #
    # Caveat — the emitted vector-conformance tree is illustrative here (this
    # fixture keeps `protocol-scaffolds: compile-only` and sets no
    # `vector-adapter-path`, so validate-fixtures does not compile or run it):
    #   * running it requires a hand-authored `./vector-adapters` module (selected
    #     via `vector-adapter-path`) that is not emitted — that runtime seam is
    #     Part I (runner extraction).
    # As of Part II-B the emitted vector-runner + harness ARE @dispatch-aware: for
    # a dispatched seam the harness passes the resolved discriminator access path
    # and the runner walks it over the vector input to select the concrete
    # implementation from a per-discriminator registry keyed
    # `Contract.operation#<value>`. That emitted routing is proven runnable and
    # load-bearing end-to-end (TypeScript + Python, positive + negative control)
    # by test/dispatch-emission.closed-loop.test.ts, which compiles THIS spec; the
    # in-process test/dispatch-seam.conformance.test.ts remains the Part II-A guard
    # that the resolved path itself is correct. Part III's typed resolver is a
    # separate library rail: the emitted conformance still routes via `#value`,
    # and the resolver is proven by test/dispatch-resolver.typed-<lang>.test.ts.
    emit-targets:
      - type: TypeScript
        output-dir: "generated/dispatch-seam/typescript"
        test-dir: "generated/dispatch-seam/typescript/tests"
        import-path: "../index"
        format: false
        protocol-scaffolds: "compile-only"
      - type: TypeScript
        output-dir: "generated/dispatch-seam/typescript-zod"
        test-dir: "generated/dispatch-seam/typescript-zod/tests"
        import-path: "../index"
        format: false
        native-serialization: "zod"
        protocol-scaffolds: "compile-only"
      - type: Python
        output-dir: "generated/dispatch-seam/python"
        test-dir: "generated/dispatch-seam/python/tests"
        import-path: "fixtures"
        format: false
        protocol-scaffolds: "compile-only"
      - type: Python
        output-dir: "generated/dispatch-seam/python_pydantic"
        test-dir: "generated/dispatch-seam/python_pydantic/tests"
        import-path: "fixtures_pydantic"
        format: false
        native-serialization: "pydantic"
        protocol-scaffolds: "compile-only"
      - type: Go
        output-dir: "generated/dispatch-seam/go"
        test-dir: "generated/dispatch-seam/go/tests"
        import-path: "fixtures"
        package-name: "fixtures"
        format: false
        protocol-scaffolds: "compile-only"
      - type: Java
        output-dir: "generated/dispatch-seam/java"
        test-dir: "generated/dispatch-seam/java/tests"
        package-name: "typra.fixtures"
        format: false
        protocol-scaffolds: "compile-only"
      - type: Java
        output-dir: "generated/dispatch-seam/java-jackson"
        test-dir: "generated/dispatch-seam/java-jackson/tests"
        package-name: "typra.fixtures"
        format: false
        native-serialization: "jackson"
        protocol-scaffolds: "compile-only"
      - type: CSharp
        output-dir: "generated/dispatch-seam/csharp"
        test-dir: "generated/dispatch-seam/csharp/tests"
        namespace: "Typra.Fixtures"
        format: false
        protocol-scaffolds: "compile-only"
      - type: Rust
        output-dir: "generated/dispatch-seam/rust"
        test-dir: "generated/dispatch-seam/rust/tests"
        import-path: "fixtures::model"
        enum-parsing: "case-insensitive"
        format: false
        protocol-scaffolds: "compile-only"
      - type: Rust
        output-dir: "generated/dispatch-seam/rust-serde"
        test-dir: "generated/dispatch-seam/rust-serde/tests"
        import-path: "fixtures_serde::model"
        enum-parsing: "case-insensitive"
        format: false
        native-serialization: "serde"
        protocol-scaffolds: "compile-only"
      - type: Swift
        output-dir: "generated/dispatch-seam/swift"
        test-dir: "generated/dispatch-seam/swift/tests"
        package-name: "TypraFixtures"
        format: false
        protocol-scaffolds: "compile-only"
      - type: Swift
        output-dir: "generated/dispatch-seam/swift-codable"
        test-dir: "generated/dispatch-seam/swift-codable/tests"
        package-name: "TypraFixtures"
        format: false
        native-serialization: "codable"
        protocol-scaffolds: "compile-only"
      - type: Markdown
        output-dir: "generated/dispatch-seam/markdown"
        format: false
