@codesoul-co/hypha-testing / regression
- Package index:
@codesoul-co/hypha-testing - Source:
packages/testing/src/regression.ts - Exports: 7
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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
RegressionRunner | class | new RegressionRunner(options?: RegressionRunnerOptions): RegressionRunner | Regression Runner class with 4 public constructor or member entries; its exact declarations are listed below. |
RegressionCase | interface | interface RegressionCase | Regression Case interface with 6 public fields or methods. |
RegressionCaseResult | interface | interface RegressionCaseResult | Regression Case Result interface with 8 public fields or methods. |
RegressionRunnerOptions | interface | interface RegressionRunnerOptions | Regression Runner Options interface with 9 public fields or methods. |
RegressionRunResult | interface | interface RegressionRunResult | Regression Run Result interface with 7 public fields or methods. |
RegressionSpecRunInput | interface | interface RegressionSpecRunInput | Regression Spec Run Input interface with 9 public fields or methods. |
RegressionCheck | type | type 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
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options?: RegressionRunnerOptions): RegressionRunner | Creates an instance of this class. |
runCase | method | runCase(regressionCase: RegressionCase): RegressionCaseResult | Public method; parameters and return type are shown in the signature. |
runSpec | method | runSpec(input: RegressionSpecRunInput): RegressionRunResult | Public method; parameters and return type are shown in the signature. |
runSpecAndRecord | method | runSpecAndRecord(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
| Member | Kind | Signature | Description |
|---|---|---|---|
actualEvents | property | actualEvents?: FrameworkEvent<unknown>[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
fixture | property | fixture: ReplayFixture | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputContract | property | outputContract?: OutputContractSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
requiredChecks | property | requiredChecks?: 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
| Member | Kind | Signature | Description |
|---|---|---|---|
checks | property | checks: EvaluationCheckResult[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
fixtureId | property | fixtureId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputContractResult | property | outputContractResult?: EvaluationResult | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: EvaluationStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
traceDiff | property | traceDiff: TraceDiff | Public 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
| Member | Kind | Signature | Description |
|---|---|---|---|
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
eventRunId | property | eventRunId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
outputValidator | property | outputValidator?: OutputContractValidator | Public property; its type, readonly modifier and optionality are shown in the signature. |
replayEngine | property | replayEngine?: ReplayEngine | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
trace | property | trace?: TraceRecorder | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId?: string | Public 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
| Member | Kind | Signature | Description |
|---|---|---|---|
cases | property | cases: RegressionCaseResult[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
completedAt | property | completedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
specId | property | specId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
startedAt | property | startedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: EvaluationStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
summary | property | summary: { 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
| Member | Kind | Signature | Description |
|---|---|---|---|
actualEventsByFixtureId | property | actualEventsByFixtureId?: Map<string, FrameworkEvent<unknown>[]> | Public property; its type, readonly modifier and optionality are shown in the signature. |
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fixtures | property | fixtures: ReplayFixture[] | Map<string, ReplayFixture> | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputContractsByFixtureId | property | outputContractsByFixtureId?: Map<string, OutputContractSpec> | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
spec | property | spec: RegressionSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId?: string | Public 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';