Skip to content

@codesoul-co/hypha-harness / runtime ​

Using this module ​

Use the Runtime module for executing runtime behavior at this boundary. It exports 3 classes, 4 functions, 13 interfaces.

Import from the package entrypoint ​

ts
import {
  EventFirstRuntime,
  HarnessedReActFSMRunner,
  RunManager,
  projectAudit,
  projectReplay,
  projectRun,
  projectSession,
} from '@codesoul-co/hypha-harness';

import type {
  AppendRunEventInput,
  AuditProjection,
  CreateRunInput,
  CreateSessionInput,
  HarnessedReActFSMRunInput,
  HarnessedReActFSMRunnerOptions,
  HarnessedReActFSMRunResult,
  RegressionProjection,
} from '@codesoul-co/hypha-harness';

// The complete export list is documented below.

Usage patterns ​

  • Use the 13 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 4 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.

Public exports ​

SymbolKindSignatureDescription
EventFirstRuntimeclassnew EventFirstRuntime(events?: EventStore): EventFirstRuntimeEvent First Runtime class with 10 public constructor or member entries; its exact declarations are listed below.
HarnessedReActFSMRunnerclassnew HarnessedReActFSMRunner(options: HarnessedReActFSMRunnerOptions): HarnessedReActFSMRunnerHarnessed ReAct FSM Runner class with 2 public constructor or member entries; its exact declarations are listed below.
RunManagerclassnew RunManager(options?: RunManagerOptions): RunManagerRun Manager class with 36 public constructor or member entries; its exact declarations are listed below.
projectAuditfunctionprojectAudit(events: FrameworkEvent[]): AuditProjectionProject Audit function with 1 public call signature; parameters and return types are listed below.
projectReplayfunctionprojectReplay(events: FrameworkEvent[]): ReplayProjectionProject Replay function with 1 public call signature; parameters and return types are listed below.
projectRunfunctionprojectRun(events: FrameworkEvent[]): RuntimeRun | nullProject Run function with 1 public call signature; parameters and return types are listed below.
projectSessionfunctionprojectSession(events: FrameworkEvent[]): RuntimeSession | nullProject Session function with 1 public call signature; parameters and return types are listed below.
AppendRunEventInputinterfaceinterface AppendRunEventInputAppend Run Event Input interface with 11 public fields or methods.
AuditProjectioninterfaceinterface AuditProjectionAudit Projection interface with 8 public fields or methods.
CreateRunInputinterfaceinterface CreateRunInputCreate Run Input interface with 9 public fields or methods.
CreateSessionInputinterfaceinterface CreateSessionInputCreate Session Input interface with 6 public fields or methods.
HarnessedReActFSMRunInputinterfaceinterface HarnessedReActFSMRunInput extends ContextBuildInput<TInput>Harnessed ReAct FSM Run Input interface with 16 public fields or methods.
HarnessedReActFSMRunnerOptionsinterfaceinterface HarnessedReActFSMRunnerOptionsHarnessed ReAct FSM Runner Options interface with 22 public fields or methods.
HarnessedReActFSMRunResultinterfaceinterface HarnessedReActFSMRunResultHarnessed ReAct FSM Run Result interface with 4 public fields or methods.
RegressionProjectioninterfaceinterface RegressionProjectionRegression Projection interface with 8 public fields or methods.
ReplayProjectioninterfaceinterface ReplayProjectionReplay Projection interface with 16 public fields or methods.
RunExecutionContextinterfaceinterface RunExecutionContextRun Execution Context interface with 4 public fields or methods.
RunManagerOptionsinterfaceinterface RunManagerOptionsRun Manager Options interface with 2 public fields or methods.
RuntimeRuninterfaceinterface RuntimeRunRuntime Run interface with 12 public fields or methods.
RuntimeSessioninterfaceinterface RuntimeSessionRuntime Session interface with 8 public fields or methods.

EventFirstRuntime ​

Event First Runtime class with 10 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { EventFirstRuntime } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare class EventFirstRuntime {
    constructor(events?: EventStore);
    createSession(input: CreateSessionInput): Promise<RuntimeSession>;
    createRun(input: CreateRunInput): Promise<RuntimeRun>;
    appendRunEvent(input: AppendRunEventInput): Promise<FrameworkEvent>;
    projectSession(sessionId: string): Promise<RuntimeSession | null>;
    projectRun(runId: string): Promise<RuntimeRun | null>;
    projectReplay(runId: string): Promise<ReplayProjection>;
    projectAudit(runId: string): Promise<AuditProjection>;
    projectRegression(runId: string): Promise<RegressionProjection>;
    listEvents(runId: string): Promise<FrameworkEvent[]>;
}

Public members ​

MemberKindSignatureDescription
appendRunEventmethodappendRunEvent(input: AppendRunEventInput): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
constructorconstructor(events?: EventStore): EventFirstRuntimeCreates an instance of this class.
createRunmethodcreateRun(input: CreateRunInput): Promise<RuntimeRun>Public method; parameters and return type are shown in the signature.
createSessionmethodcreateSession(input: CreateSessionInput): Promise<RuntimeSession>Public method; parameters and return type are shown in the signature.
listEventsmethodlistEvents(runId: string): Promise<FrameworkEvent[]>Public method; parameters and return type are shown in the signature.
projectAuditmethodprojectAudit(runId: string): Promise<AuditProjection>Public method; parameters and return type are shown in the signature.
projectRegressionmethodprojectRegression(runId: string): Promise<RegressionProjection>Public method; parameters and return type are shown in the signature.
projectReplaymethodprojectReplay(runId: string): Promise<ReplayProjection>Public method; parameters and return type are shown in the signature.
projectRunmethodprojectRun(runId: string): Promise<RuntimeRun | null>Public method; parameters and return type are shown in the signature.
projectSessionmethodprojectSession(sessionId: string): Promise<RuntimeSession | null>Public method; parameters and return type are shown in the signature.

HarnessedReActFSMRunner ​

Harnessed ReAct FSM Runner class with 2 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { HarnessedReActFSMRunner } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare class HarnessedReActFSMRunner {
    constructor(options: HarnessedReActFSMRunnerOptions);
    run(input: HarnessedReActFSMRunInput): Promise<HarnessedReActFSMRunResult>;
}

Public members ​

MemberKindSignatureDescription
constructorconstructor(options: HarnessedReActFSMRunnerOptions): HarnessedReActFSMRunnerCreates an instance of this class.
runmethodrun(input: HarnessedReActFSMRunInput): Promise<HarnessedReActFSMRunResult>Public method; parameters and return type are shown in the signature.

RunManager ​

Run Manager class with 36 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { RunManager } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare class RunManager {
    constructor(options?: RunManagerOptions);
    eventRuntime(): EventFirstRuntime;
    createSession(input: CreateSessionInput): Promise<RuntimeSession>;
    createRun(input: CreateRunInput): Promise<RuntimeRun>;
    appendRunEvent(input: AppendRunEventInput): Promise<FrameworkEvent>;
    startRun(run: RuntimeRun, timestamp?: string): Promise<FrameworkEvent>;
    recordTransitionAccepted(context: RunExecutionContext, transition: StateTransition): Promise<FrameworkEvent>;
    recordStateEntered(context: RunExecutionContext, record: FSMStateEnteredRecord): Promise<FrameworkEvent>;
    recordContextBuildStarted(context: RunExecutionContext): Promise<FrameworkEvent>;
    recordContextBuildCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordSkillSelected(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordSkillLoaded(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordSkillCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordThinkingStarted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordThinkingCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordAgentDeliberationStarted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordAgentDeliberationCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordReasoningDecision(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>;
    recordReactStep(context: RunExecutionContext, step: ReActStep): Promise<FrameworkEvent>;
    recordReactContinuationCheckpoint(context: RunExecutionContext, checkpoint: ReActContinuationCheckpoint): Promise<FrameworkEvent>;
    recordReactContinuationResumed(context: RunExecutionContext, checkpoint: ReActContinuationCheckpoint, resumedAt: string): Promise<FrameworkEvent>;
    recordReactContinuationSuspended(context: RunExecutionContext, result: ReActRunResult): Promise<FrameworkEvent>;
    completeRun(context: RunExecutionContext, output: unknown, timestamp?: string): Promise<FrameworkEvent>;
    waitForHumanReview(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>;
    recordHumanReviewRequested(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>;
    recordHumanReviewApproved(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>;
    recordHumanReviewRejected(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>;
    recordContextCompacted(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>;
    cancelRun(context: RunExecutionContext, reason?: string, timestamp?: string): Promise<FrameworkEvent>;
    failRun(context: RunExecutionContext, error: unknown, timestamp?: string): Promise<FrameworkEvent>;
    listEvents(runId: string): Promise<FrameworkEvent[]>;
    projectRun(runId: string): Promise<RuntimeRun | null>;
    projectSession(sessionId: string): Promise<RuntimeSession | null>;
    projectReplay(runId: string): Promise<ReplayProjection>;
    projectAudit(runId: string): Promise<AuditProjection>;
    projectRegression(runId: string): Promise<RegressionProjection>;
}

Public members ​

MemberKindSignatureDescription
appendRunEventmethodappendRunEvent(input: AppendRunEventInput): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
cancelRunmethodcancelRun(context: RunExecutionContext, reason?: string, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
completeRunmethodcompleteRun(context: RunExecutionContext, output: unknown, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
constructorconstructor(options?: RunManagerOptions): RunManagerCreates an instance of this class.
createRunmethodcreateRun(input: CreateRunInput): Promise<RuntimeRun>Public method; parameters and return type are shown in the signature.
createSessionmethodcreateSession(input: CreateSessionInput): Promise<RuntimeSession>Public method; parameters and return type are shown in the signature.
eventRuntimemethodeventRuntime(): EventFirstRuntimePublic method; parameters and return type are shown in the signature.
failRunmethodfailRun(context: RunExecutionContext, error: unknown, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
listEventsmethodlistEvents(runId: string): Promise<FrameworkEvent[]>Public method; parameters and return type are shown in the signature.
projectAuditmethodprojectAudit(runId: string): Promise<AuditProjection>Public method; parameters and return type are shown in the signature.
projectRegressionmethodprojectRegression(runId: string): Promise<RegressionProjection>Public method; parameters and return type are shown in the signature.
projectReplaymethodprojectReplay(runId: string): Promise<ReplayProjection>Public method; parameters and return type are shown in the signature.
projectRunmethodprojectRun(runId: string): Promise<RuntimeRun | null>Public method; parameters and return type are shown in the signature.
projectSessionmethodprojectSession(sessionId: string): Promise<RuntimeSession | null>Public method; parameters and return type are shown in the signature.
recordAgentDeliberationCompletedmethodrecordAgentDeliberationCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordAgentDeliberationStartedmethodrecordAgentDeliberationStarted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordContextBuildCompletedmethodrecordContextBuildCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordContextBuildStartedmethodrecordContextBuildStarted(context: RunExecutionContext): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordContextCompactedmethodrecordContextCompacted(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordHumanReviewApprovedmethodrecordHumanReviewApproved(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordHumanReviewRejectedmethodrecordHumanReviewRejected(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordHumanReviewRequestedmethodrecordHumanReviewRequested(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordReactContinuationCheckpointmethodrecordReactContinuationCheckpoint(context: RunExecutionContext, checkpoint: ReActContinuationCheckpoint): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordReactContinuationResumedmethodrecordReactContinuationResumed(context: RunExecutionContext, checkpoint: ReActContinuationCheckpoint, resumedAt: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordReactContinuationSuspendedmethodrecordReactContinuationSuspended(context: RunExecutionContext, result: ReActRunResult): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordReactStepmethodrecordReactStep(context: RunExecutionContext, step: ReActStep): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordReasoningDecisionmethodrecordReasoningDecision(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordSkillCompletedmethodrecordSkillCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordSkillLoadedmethodrecordSkillLoaded(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordSkillSelectedmethodrecordSkillSelected(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordStateEnteredmethodrecordStateEntered(context: RunExecutionContext, record: FSMStateEnteredRecord): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordThinkingCompletedmethodrecordThinkingCompleted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordThinkingStartedmethodrecordThinkingStarted(context: RunExecutionContext, payload: Record<string, unknown>): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
recordTransitionAcceptedmethodrecordTransitionAccepted(context: RunExecutionContext, transition: StateTransition): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
startRunmethodstartRun(run: RuntimeRun, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.
waitForHumanReviewmethodwaitForHumanReview(context: RunExecutionContext, payload?: Record<string, unknown>, timestamp?: string): Promise<FrameworkEvent>Public method; parameters and return type are shown in the signature.

projectAudit ​

Project Audit function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { projectAudit } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare function projectAudit(events: FrameworkEvent[]): AuditProjection;

Call signature ​

text
projectAudit(events: FrameworkEvent[]): AuditProjection

Parameters ​

ParameterTypeRequiredDescription
eventsFrameworkEvent<unknown>[]YesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: AuditProjection
  • Description: The return contract is defined by the type shown above.

projectReplay ​

Project Replay function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { projectReplay } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare function projectReplay(events: FrameworkEvent[]): ReplayProjection;

Call signature ​

text
projectReplay(events: FrameworkEvent[]): ReplayProjection

Parameters ​

ParameterTypeRequiredDescription
eventsFrameworkEvent<unknown>[]YesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: ReplayProjection
  • Description: The return contract is defined by the type shown above.

projectRun ​

Project Run function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { projectRun } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare function projectRun(events: FrameworkEvent[]): RuntimeRun | null;

Call signature ​

text
projectRun(events: FrameworkEvent[]): RuntimeRun | null

Parameters ​

ParameterTypeRequiredDescription
eventsFrameworkEvent<unknown>[]YesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: RuntimeRun
  • Description: The return contract is defined by the type shown above.

projectSession ​

Project Session function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { projectSession } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export declare function projectSession(events: FrameworkEvent[]): RuntimeSession | null;

Call signature ​

text
projectSession(events: FrameworkEvent[]): RuntimeSession | null

Parameters ​

ParameterTypeRequiredDescription
eventsFrameworkEvent<unknown>[]YesRequired parameter; accepted values are defined by the type column.

Returns ​

  • Type: RuntimeSession
  • Description: The return contract is defined by the type shown above.

AppendRunEventInput ​

Append Run Event Input interface with 11 public fields or methods.

  • Kind: interface
  • Import: import type { AppendRunEventInput } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface AppendRunEventInput<TPayload = unknown> {
    id: string;
    type: FrameworkEvent['type'];
    runId: string;
    sessionId: string;
    userId: string;
    payload: TPayload;
    stepId?: string;
    fsmState?: string;
    agentId?: string;
    timestamp?: string;
    metadata?: Record<string, unknown>;
}

Contract members ​

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
fsmStatepropertyfsmState?: 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.
payloadpropertypayload: TPayloadPublic 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.
stepIdpropertystepId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
timestamppropertytimestamp?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
typepropertytype: import("/Users/erwin/Downloads/codespace/Hypha/packages/core/dist/events").FrameworkEventTypePublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

AuditProjection ​

Audit Projection interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { AuditProjection } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface AuditProjection {
    runId: string;
    eventCount: number;
    policyDecisionCount: number;
    memoryWriteCount: number;
    reasoningDecisionCount: number;
    skillActivationCount: number;
    toolCallCount: number;
    missingRunIds: string[];
}

Contract members ​

MemberKindSignatureDescription
eventCountpropertyeventCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryWriteCountpropertymemoryWriteCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
missingRunIdspropertymissingRunIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
policyDecisionCountpropertypolicyDecisionCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
reasoningDecisionCountpropertyreasoningDecisionCount: numberPublic 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.
skillActivationCountpropertyskillActivationCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
toolCallCountpropertytoolCallCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

CreateRunInput ​

Create Run Input interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { CreateRunInput } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface CreateRunInput {
    id: string;
    sessionId: string;
    userId: string;
    domainPackRef?: SpecRef;
    workflowRef?: SpecRef;
    agentRef?: SpecRef;
    input?: unknown;
    metadata?: Record<string, unknown>;
    timestamp?: string;
}

Contract members ​

MemberKindSignatureDescription
agentRefpropertyagentRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
domainPackRefpropertydomainPackRef?: SpecRefPublic 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.
inputpropertyinput?: unknownPublic 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.
sessionIdpropertysessionId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
timestamppropertytimestamp?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workflowRefpropertyworkflowRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.

CreateSessionInput ​

Create Session Input interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { CreateSessionInput } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface CreateSessionInput {
    id: string;
    userId: string;
    domainPackRef?: SpecRef;
    sessionProfileRef?: SpecRef;
    metadata?: Record<string, unknown>;
    timestamp?: string;
}

Contract members ​

MemberKindSignatureDescription
domainPackRefpropertydomainPackRef?: SpecRefPublic 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.
sessionProfileRefpropertysessionProfileRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
timestamppropertytimestamp?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

HarnessedReActFSMRunInput ​

Harnessed ReAct FSM Run Input interface with 16 public fields or methods.

  • Kind: interface
  • Import: import type { HarnessedReActFSMRunInput } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface HarnessedReActFSMRunInput<TInput = unknown> extends ContextBuildInput<TInput> {
    sessionId: string;
    userId: string;
    domainPackRef?: SpecRef;
    workflowRef?: SpecRef;
    createSession?: boolean;
    resumeFromCheckpoint?: boolean;
}

Contract members ​

MemberKindSignatureDescription
agentpropertyagent: ReActAgentSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
contextSpecpropertycontextSpec?: ContextSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
createSessionpropertycreateSession?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
domainPackRefpropertydomainPackRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
inputpropertyinput: TInputPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryScopepropertymemoryScope?: MemoryScopePublic property; its type, readonly modifier and optionality are shown in the signature.
messagespropertymessages?: ModelMessage[]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.
resumeFromCheckpointpropertyresumeFromCheckpoint?: booleanPublic 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.
stepIdpropertystepId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
toolExecutionScopepropertytoolExecutionScope?: ToolExecutionScopePublic property; its type, readonly modifier and optionality are shown in the signature.
toolPrincipalpropertytoolPrincipal?: ToolPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workflowRefpropertyworkflowRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.

HarnessedReActFSMRunnerOptions ​

Harnessed ReAct FSM Runner Options interface with 22 public fields or methods.

  • Kind: interface
  • Import: import type { HarnessedReActFSMRunnerOptions } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface HarnessedReActFSMRunnerOptions {
    inference: InferenceProvider;
    toolRunner?: ToolRunner;
    runManager?: RunManager;
    fsmSpec?: FSMProcessSpec;
    contextBuilder?: ContextBuilder;
    skillRegistry?: SkillRegistry;
    skillSelector?: SkillSelector;
    skillContextLoader?: SkillContextLoader;
    skillPolicy?: SkillPolicy;
    allowedSkills?: SkillContextBuilderOptions['allowedSkills'];
    requiredSkills?: SkillContextBuilderOptions['requiredSkills'];
    thinkingPlanner?: ThinkingPlanner;
    agenticReasoner?: AgenticReasoner;
    reasoningConfig?: ReasoningConfig;
    verifier?: Verifier;
    reactRuntime?: ReActAgentRuntime;
    maxIterations?: number;
    executionBudget?: Partial<ReActExecutionBudget>;
    reactCheckpointStore?: ReActContinuationCheckpointStore;
    continueAfterTool?: boolean;
    resolveToolExecutionScope?: (input: {
        fsmState: string;
        context: BuiltAgentContext;
        toolId: string;
    }) => ToolExecutionScope | undefined;
    now?: () => string;
}

Contract members ​

MemberKindSignatureDescription
agenticReasonerpropertyagenticReasoner?: AgenticReasonerPublic property; its type, readonly modifier and optionality are shown in the signature.
allowedSkillspropertyallowedSkills?: string[] | ((input: ContextBuildInput, base: BuiltAgentContext) => string[] | undefined | Promise<string[] | undefined>)Public property; its type, readonly modifier and optionality are shown in the signature.
contextBuilderpropertycontextBuilder?: ContextBuilderPublic property; its type, readonly modifier and optionality are shown in the signature.
continueAfterToolpropertycontinueAfterTool?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
executionBudgetpropertyexecutionBudget?: Partial<ReActExecutionBudget>Public property; its type, readonly modifier and optionality are shown in the signature.
fsmSpecpropertyfsmSpec?: FSMProcessSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
inferencepropertyinference: InferenceProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
maxIterationspropertymaxIterations?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
reactCheckpointStorepropertyreactCheckpointStore?: ReActContinuationCheckpointStorePublic property; its type, readonly modifier and optionality are shown in the signature.
reactRuntimepropertyreactRuntime?: ReActAgentRuntimePublic property; its type, readonly modifier and optionality are shown in the signature.
reasoningConfigpropertyreasoningConfig?: ReasoningConfigPublic property; its type, readonly modifier and optionality are shown in the signature.
requiredSkillspropertyrequiredSkills?: string[] | ((input: ContextBuildInput, base: BuiltAgentContext) => string[] | undefined | Promise<string[] | undefined>)Public property; its type, readonly modifier and optionality are shown in the signature.
resolveToolExecutionScopemethodresolveToolExecutionScope?(input: { fsmState: string; context: BuiltAgentContext; toolId: string; }): ToolExecutionScope | undefinedPublic method; parameters and return type are shown in the signature.
runManagerpropertyrunManager?: RunManagerPublic property; its type, readonly modifier and optionality are shown in the signature.
skillContextLoaderpropertyskillContextLoader?: SkillContextLoaderPublic property; its type, readonly modifier and optionality are shown in the signature.
skillPolicypropertyskillPolicy?: SkillPolicyPublic property; its type, readonly modifier and optionality are shown in the signature.
skillRegistrypropertyskillRegistry?: SkillRegistryPublic property; its type, readonly modifier and optionality are shown in the signature.
skillSelectorpropertyskillSelector?: SkillSelectorPublic property; its type, readonly modifier and optionality are shown in the signature.
thinkingPlannerpropertythinkingPlanner?: ThinkingPlannerPublic property; its type, readonly modifier and optionality are shown in the signature.
toolRunnerpropertytoolRunner?: ToolRunnerPublic property; its type, readonly modifier and optionality are shown in the signature.
verifierpropertyverifier?: VerifierPublic property; its type, readonly modifier and optionality are shown in the signature.

HarnessedReActFSMRunResult ​

Harnessed ReAct FSM Run Result interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { HarnessedReActFSMRunResult } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface HarnessedReActFSMRunResult {
    run: RuntimeRun;
    react: ReActRunResult;
    fsmSnapshot: ReturnType<FSMRuntime['getSnapshot']>;
    events: FrameworkEvent[];
}

Contract members ​

MemberKindSignatureDescription
eventspropertyevents: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
fsmSnapshotpropertyfsmSnapshot: import("/Users/erwin/Downloads/codespace/Hypha/packages/fsm/dist/index").FSMSnapshotPublic property; its type, readonly modifier and optionality are shown in the signature.
reactpropertyreact: ReActRunResultPublic property; its type, readonly modifier and optionality are shown in the signature.
runpropertyrun: RuntimeRunPublic property; its type, readonly modifier and optionality are shown in the signature.

RegressionProjection ​

Regression Projection interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { RegressionProjection } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface RegressionProjection {
    runId: string;
    eventTypes: string[];
    statePath: string[];
    toolCalls: Array<{
        toolId?: unknown;
        status: string;
    }>;
    memoryWriteCount: number;
    reasoningDecisionCount: number;
    skillActivationCount: number;
    finalOutput?: unknown;
}

Contract members ​

MemberKindSignatureDescription
eventTypespropertyeventTypes: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
finalOutputpropertyfinalOutput?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryWriteCountpropertymemoryWriteCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
reasoningDecisionCountpropertyreasoningDecisionCount: numberPublic 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.
skillActivationCountpropertyskillActivationCount: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
statePathpropertystatePath: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
toolCallspropertytoolCalls: { toolId?: unknown; status: string; }[]Public property; its type, readonly modifier and optionality are shown in the signature.

ReplayProjection ​

Replay Projection interface with 16 public fields or methods.

  • Kind: interface
  • Import: import type { ReplayProjection } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface ReplayProjection {
    runId: string;
    events: FrameworkEvent[];
    statePath: string[];
    toolCallEventIds: string[];
    policyDecisionEventIds: string[];
    memoryEventIds: string[];
    reasoningEventIds: string[];
    skillEventIds: string[];
    modelCalls: FrameworkEvent[];
    toolCalls: FrameworkEvent[];
    memoryReads: FrameworkEvent[];
    memoryWrites: FrameworkEvent[];
    reasoningEvents: FrameworkEvent[];
    skillEvents: FrameworkEvent[];
    policyDecisions: FrameworkEvent[];
    finalOutput?: unknown;
}

Contract members ​

MemberKindSignatureDescription
eventspropertyevents: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
finalOutputpropertyfinalOutput?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryEventIdspropertymemoryEventIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
memoryReadspropertymemoryReads: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
memoryWritespropertymemoryWrites: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
modelCallspropertymodelCalls: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
policyDecisionEventIdspropertypolicyDecisionEventIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
policyDecisionspropertypolicyDecisions: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
reasoningEventIdspropertyreasoningEventIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
reasoningEventspropertyreasoningEvents: FrameworkEvent<unknown>[]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.
skillEventIdspropertyskillEventIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
skillEventspropertyskillEvents: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.
statePathpropertystatePath: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
toolCallEventIdspropertytoolCallEventIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
toolCallspropertytoolCalls: FrameworkEvent<unknown>[]Public property; its type, readonly modifier and optionality are shown in the signature.

RunExecutionContext ​

Run Execution Context interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { RunExecutionContext } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface RunExecutionContext {
    runId: string;
    sessionId: string;
    userId: string;
    agentId?: string;
}

Contract members ​

MemberKindSignatureDescription
agentIdpropertyagentId?: stringPublic 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.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

RunManagerOptions ​

Run Manager Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { RunManagerOptions } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface RunManagerOptions {
    runtime?: EventFirstRuntime;
    operationalTelemetry?: RuntimeOperationalTelemetry;
}

Contract members ​

MemberKindSignatureDescription
operationalTelemetrypropertyoperationalTelemetry?: RuntimeOperationalTelemetryPublic property; its type, readonly modifier and optionality are shown in the signature.
runtimepropertyruntime?: EventFirstRuntimePublic property; its type, readonly modifier and optionality are shown in the signature.

RuntimeRun ​

Runtime Run interface with 12 public fields or methods.

  • Kind: interface
  • Import: import type { RuntimeRun } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface RuntimeRun {
    id: string;
    sessionId: string;
    userId: string;
    domainPackRef?: SpecRef;
    workflowRef?: SpecRef;
    agentRef?: SpecRef;
    status: 'queued' | 'running' | 'waiting_human' | 'completed' | 'failed' | 'cancelled';
    createdAt: string;
    updatedAt: string;
    completedAt?: string;
    input?: unknown;
    output?: unknown;
}

Contract members ​

MemberKindSignatureDescription
agentRefpropertyagentRef?: SpecRefPublic 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.
createdAtpropertycreatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
domainPackRefpropertydomainPackRef?: SpecRefPublic 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.
inputpropertyinput?: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.
outputpropertyoutput?: unknownPublic 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.
statuspropertystatus: "completed" | "queued" | "running" | "cancelled" | "failed" | "waiting_human"Public property; its type, readonly modifier and optionality are shown in the signature.
updatedAtpropertyupdatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workflowRefpropertyworkflowRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.

RuntimeSession ​

Runtime Session interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { RuntimeSession } from '@codesoul-co/hypha-harness';
  • Source module: runtime

Declaration ​

text
export interface RuntimeSession {
    id: string;
    userId: string;
    domainPackRef?: SpecRef;
    sessionProfileRef?: SpecRef;
    metadata: Record<string, unknown>;
    status: 'active' | 'closed';
    createdAt: string;
    updatedAt: string;
}

Contract members ​

MemberKindSignatureDescription
createdAtpropertycreatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
domainPackRefpropertydomainPackRef?: SpecRefPublic 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.
sessionProfileRefpropertysessionProfileRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
statuspropertystatus: "active" | "closed"Public property; its type, readonly modifier and optionality are shown in the signature.
updatedAtpropertyupdatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.