Skip to content

@codesoul-co/hypha-testing / regression

Using this module

Use the Regression module for using the public contracts and operations for this capability boundary. It exports 1 class, 5 interfaces, 1 type.

Import from the package entrypoint

ts
import {
  RegressionRunner,
} from '@codesoul-co/hypha-testing';

import type {
  RegressionCase,
  RegressionCaseResult,
  RegressionRunnerOptions,
  RegressionRunResult,
  RegressionSpecRunInput,
  RegressionCheck,
} from '@codesoul-co/hypha-testing';

Usage patterns

  • Use the 6 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
RegressionRunnerclassnew RegressionRunner(options?: RegressionRunnerOptions): RegressionRunnerRegression Runner class with 4 public constructor or member entries; its exact declarations are listed below.
RegressionCaseinterfaceinterface RegressionCaseRegression Case interface with 6 public fields or methods.
RegressionCaseResultinterfaceinterface RegressionCaseResultRegression Case Result interface with 8 public fields or methods.
RegressionRunnerOptionsinterfaceinterface RegressionRunnerOptionsRegression Runner Options interface with 9 public fields or methods.
RegressionRunResultinterfaceinterface RegressionRunResultRegression Run Result interface with 7 public fields or methods.
RegressionSpecRunInputinterfaceinterface RegressionSpecRunInputRegression Spec Run Input interface with 9 public fields or methods.
RegressionChecktypetype RegressionCheck = 'event_types' | 'state_path' | 'tool_calls' | 'policy_decisions' | 'output_contract'Public type alias for Regression Check; the declaration contains its complete type expression.

RegressionRunner

Regression Runner class with 4 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { RegressionRunner } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export declare class RegressionRunner {
    constructor(options?: RegressionRunnerOptions);
    runCase(regressionCase: RegressionCase): RegressionCaseResult;
    runSpec(input: RegressionSpecRunInput): RegressionRunResult;
    runSpecAndRecord(input: RegressionSpecRunInput): Promise<RegressionRunResult>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options?: RegressionRunnerOptions): RegressionRunnerCreates an instance of this class.
runCasemethodrunCase(regressionCase: RegressionCase): RegressionCaseResultPublic method; parameters and return type are shown in the signature.
runSpecmethodrunSpec(input: RegressionSpecRunInput): RegressionRunResultPublic method; parameters and return type are shown in the signature.
runSpecAndRecordmethodrunSpecAndRecord(input: RegressionSpecRunInput): Promise<RegressionRunResult>Public method; parameters and return type are shown in the signature.

RegressionCase

Regression Case interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { RegressionCase } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export interface RegressionCase {
    id: string;
    fixture: ReplayFixture;
    actualEvents?: FrameworkEvent[];
    requiredChecks?: RegressionCheck[];
    outputContract?: OutputContractSpec;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
actualEventspropertyactualEvents?: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
fixturepropertyfixture: ReplayFixturePublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
outputContractpropertyoutputContract?: OutputContractSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
requiredCheckspropertyrequiredChecks?: RegressionCheck[]Public property; its type, readonly modifier and optionality are shown in the signature.

RegressionCaseResult

Regression Case Result interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { RegressionCaseResult } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export interface RegressionCaseResult {
    id: string;
    fixtureId: string;
    runId: string;
    status: EvaluationStatus;
    checks: EvaluationCheckResult[];
    traceDiff: TraceDiff;
    outputContractResult?: EvaluationResult;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
checkspropertychecks: EvaluationCheckResult[]Public property; its type, readonly modifier and optionality are shown in the signature.
fixtureIdpropertyfixtureId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
outputContractResultpropertyoutputContractResult?: EvaluationResultPublic property; its type, readonly modifier and optionality are shown in the signature.
runIdpropertyrunId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
statuspropertystatus: EvaluationStatusPublic property; its type, readonly modifier and optionality are shown in the signature.
traceDiffpropertytraceDiff: TraceDiffPublic property; its type, readonly modifier and optionality are shown in the signature.

RegressionRunnerOptions

Regression Runner Options interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { RegressionRunnerOptions } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export interface RegressionRunnerOptions {
    replayEngine?: ReplayEngine;
    outputValidator?: OutputContractValidator;
    now?: () => string;
    trace?: TraceRecorder;
    eventRunId?: string;
    sessionId?: string;
    workspaceId?: string;
    agentId?: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
eventRunIdpropertyeventRunId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
outputValidatorpropertyoutputValidator?: OutputContractValidatorPublic property; its type, readonly modifier and optionality are shown in the signature.
replayEnginepropertyreplayEngine?: ReplayEnginePublic property; its type, readonly modifier and optionality are shown in the signature.
sessionIdpropertysessionId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
tracepropertytrace?: TraceRecorderPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

RegressionRunResult

Regression Run Result interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { RegressionRunResult } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export interface RegressionRunResult {
    id: string;
    status: EvaluationStatus;
    specId?: string;
    startedAt: string;
    completedAt: string;
    cases: RegressionCaseResult[];
    summary: {
        total: number;
        passed: number;
        failed: number;
    };
}

Contract members

MemberKindSignatureDescription
casespropertycases: RegressionCaseResult[]Public property; its type, readonly modifier and optionality are shown in the signature.
completedAtpropertycompletedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
specIdpropertyspecId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
startedAtpropertystartedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
statuspropertystatus: EvaluationStatusPublic property; its type, readonly modifier and optionality are shown in the signature.
summarypropertysummary: { total: number; passed: number; failed: number; }Public property; its type, readonly modifier and optionality are shown in the signature.

RegressionSpecRunInput

Regression Spec Run Input interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { RegressionSpecRunInput } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export interface RegressionSpecRunInput {
    spec: RegressionSpec;
    fixtures: ReplayFixture[] | Map<string, ReplayFixture>;
    actualEventsByFixtureId?: Map<string, FrameworkEvent[]>;
    outputContractsByFixtureId?: Map<string, OutputContractSpec>;
    runId?: string;
    sessionId?: string;
    workspaceId?: string;
    agentId?: string;
    metadata?: Record<string, unknown>;
}

Contract members

MemberKindSignatureDescription
actualEventsByFixtureIdpropertyactualEventsByFixtureId?: Map<string, FrameworkEvent<unknown>[]>Public property; its type, readonly modifier and optionality are shown in the signature.
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
fixturespropertyfixtures: ReplayFixture[] | Map<string, ReplayFixture>Public property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
outputContractsByFixtureIdpropertyoutputContractsByFixtureId?: Map<string, OutputContractSpec>Public property; its type, readonly modifier and optionality are shown in the signature.
runIdpropertyrunId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sessionIdpropertysessionId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
specpropertyspec: RegressionSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

RegressionCheck

Public type alias for Regression Check; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { RegressionCheck } from '@codesoul-co/hypha-testing';
  • Source module: regression

Declaration

text
export type RegressionCheck = 'event_types' | 'state_path' | 'tool_calls' | 'policy_decisions' | 'output_contract';