@codesoul-co/hypha-harness / index
- Package index:
@codesoul-co/hypha-harness - Source:
packages/harness/src/index.ts - Exports: 9
Using this module
Aggregates the public entrypoint exports for @codesoul-co/hypha-harness; applications import these symbols from the package entrypoint instead of internal file paths.
Import from the package entrypoint
import {
InMemoryTraceRecorder,
SessionProjector,
UserScopedSessionQueue,
createRunStartedEvent,
} from '@codesoul-co/hypha-harness';
import type {
QueueTask,
RegressionCase,
ReplayFixture,
RunRecord,
SessionView,
} from '@codesoul-co/hypha-harness';Usage patterns
- Use the 5 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 3 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 1 function as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
InMemoryTraceRecorder | class | new InMemoryTraceRecorder(): InMemoryTraceRecorder | In Memory Trace Recorder class with 3 public constructor or member entries; its exact declarations are listed below. |
SessionProjector | class | new SessionProjector(): SessionProjector | Session Projector class with 2 public constructor or member entries; its exact declarations are listed below. |
UserScopedSessionQueue | class | new UserScopedSessionQueue<T = unknown>(): UserScopedSessionQueue<T> | User Scoped Session Queue class with 4 public constructor or member entries; its exact declarations are listed below. |
createRunStartedEvent | function | createRunStartedEvent(run: RunRecord): FrameworkEvent | Create Run Started Event function with 1 public call signature; parameters and return types are listed below. |
QueueTask | interface | interface QueueTask | Queue Task interface with 4 public fields or methods. |
RegressionCase | interface | interface RegressionCase | Regression Case interface with 6 public fields or methods. |
ReplayFixture | interface | interface ReplayFixture | Replay Fixture interface with 15 public fields or methods. |
RunRecord | interface | interface RunRecord | Run Record interface with 10 public fields or methods. |
SessionView | interface | interface SessionView | Session View interface with 5 public fields or methods. |
InMemoryTraceRecorder
In Memory Trace Recorder class with 3 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { InMemoryTraceRecorder } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export declare class InMemoryTraceRecorder implements TraceRecorder {
record(event: FrameworkEvent): Promise<void>;
list(filter?: EventFilter): Promise<FrameworkEvent[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (): InMemoryTraceRecorder | Creates an instance of this class. |
list | method | list(filter?: EventFilter): Promise<FrameworkEvent[]> | Public method; parameters and return type are shown in the signature. |
record | method | record(event: FrameworkEvent): Promise<void> | Public method; parameters and return type are shown in the signature. |
SessionProjector
Session Projector class with 2 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { SessionProjector } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export declare class SessionProjector {
project(events: FrameworkEvent[]): SessionView[];
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (): SessionProjector | Creates an instance of this class. |
project | method | project(events: FrameworkEvent[]): SessionView[] | Public method; parameters and return type are shown in the signature. |
UserScopedSessionQueue
User Scoped Session Queue class with 4 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { UserScopedSessionQueue } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export declare class UserScopedSessionQueue<T = unknown> {
enqueue(task: QueueTask<T>): number;
dequeue(userId: string, sessionId: string): QueueTask<T> | null;
size(userId: string, sessionId: string): number;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | <T = unknown>(): UserScopedSessionQueue<T> | Creates an instance of this class. |
dequeue | method | dequeue(userId: string, sessionId: string): QueueTask<T> | null | Public method; parameters and return type are shown in the signature. |
enqueue | method | enqueue(task: QueueTask<T>): number | Public method; parameters and return type are shown in the signature. |
size | method | size(userId: string, sessionId: string): number | Public method; parameters and return type are shown in the signature. |
createRunStartedEvent
Create Run Started Event function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { createRunStartedEvent } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export declare function createRunStartedEvent(run: RunRecord): FrameworkEvent;Call signature
createRunStartedEvent(run: RunRecord): FrameworkEventParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
run | RunRecord<unknown, unknown> | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
FrameworkEvent<unknown> - Description: The return contract is defined by the type shown above.
QueueTask
Queue Task interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { QueueTask } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export interface QueueTask<T = unknown> {
id: string;
userId: string;
sessionId: string;
payload: T;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
payload | property | payload: T | 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. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality 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-harness'; - Source module:
index
Declaration
export interface RegressionCase {
id: string;
fixture: ReplayFixture;
actualEvents?: FrameworkEvent[];
requiredChecks?: Array<'event_types' | 'state_path' | 'tool_calls' | 'policy_decisions' | 'output_contract'>;
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?: ("output_contract" | "state_path" | "event_types" | "tool_calls" | "policy_decisions")[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ReplayFixture
Replay Fixture interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { ReplayFixture } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export interface ReplayFixture {
id: string;
version: string;
runId: string;
createdAt?: string;
replaySpecRef?: SpecRef;
events: FrameworkEvent[];
eventTypes?: string[];
statePath: string[];
finalOutput?: unknown;
toolCalls?: string[];
modelCalls?: string[];
policyDecisions?: string[];
memoryReadSet?: string[];
outputContract?: OutputContractSpec;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
events | property | events: FrameworkEvent<unknown>[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
eventTypes | property | eventTypes?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalOutput | property | finalOutput?: unknown | 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. |
memoryReadSet | property | memoryReadSet?: 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. |
modelCalls | property | modelCalls?: string[] | 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. |
policyDecisions | property | policyDecisions?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
replaySpecRef | property | replaySpecRef?: SpecRef | 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. |
statePath | property | statePath: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolCalls | property | toolCalls?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RunRecord
Run Record interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { RunRecord } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export interface RunRecord<TInput = unknown, TOutput = unknown> {
id: string;
sessionId?: string;
userId?: string;
agentSystemId: string;
status: 'queued' | 'running' | 'waiting_human' | 'completed' | 'failed' | 'cancelled';
input: TInput;
output?: TOutput;
fsmSnapshot?: FSMSnapshot;
createdAt: string;
completedAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentSystemId | property | agentSystemId: string | 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. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fsmSnapshot | property | fsmSnapshot?: FSMSnapshot | 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. |
input | property | input: TInput | Public property; its type, readonly modifier and optionality are shown in the signature. |
output | property | output?: TOutput | 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. |
status | property | status: "completed" | "queued" | "running" | "cancelled" | "failed" | "waiting_human" | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
SessionView
Session View interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { SessionView } from '@codesoul-co/hypha-harness'; - Source module:
index
Declaration
export interface SessionView {
id: string;
userId: string;
runIds: string[];
status: 'active' | 'closed';
updatedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runIds | property | runIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "active" | "closed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
