@salesforce/agents
    Preparing search index...

    Variable validateCltSpecConst

    validateCltSpec: (
        spec: unknown,
        ctx: { target: CltRunTarget },
    ) => asserts spec is CltTestSpec = ...

    Validate a conversation-level test spec before any API call.

    Strict about the spec's structure and non-strict about values Core owns, as validateNgtSpec is:

    • Errors (thrown, first failure wins): unknown fields, so a typo can't be silently dropped; wrong YAML shapes and types; missing required values; a missing expected on a known scorer that needs one; and agent_handoff_match, which Core accepts but scores wrongly.
    • Warnings (lifecycle emitWarning): values Core may change between releases. These are unknown scorers, scorers not supported for this target, unknown persona or evaluationMode values, maxTurns over the target's limit, and more than CLT_MAX_TEST_CASES test cases. The spec is sent as written and Core decides; its error comes back through ConversationTestRejected.

    Type Declaration

      • (spec: unknown, ctx: { target: CltRunTarget }): asserts spec is CltTestSpec
      • Parameters

        • spec: unknown

          The parsed YAML spec. On success it's narrowed to CltTestSpec.

        • ctx: { target: CltRunTarget }
          • target: CltRunTarget

            ephemeral (run without saving) or saved (create-and-run). Only ephemeral has a converter today; saved keeps the saved-suite limits for the command that will save suites.

        Returns asserts spec is CltTestSpec