Skip to content

@codesoul-co/hypha-harness / react-quantum-executor

Using this module

Use the React quantum executor module for executing runtime behavior at this boundary. It exports 3 classes, 1 constant, 1 function, 13 interfaces, 1 type.

Import from the package entrypoint

ts
import {
  ArtifactReActContextSnapshotStore,
  ContinuationIdentityValidator,
  ReActQuantumExecutor,
  REACT_CONTEXT_SNAPSHOT_VERSION,
  createContinuationReActQuantumDescriptor,
} from '@codesoul-co/hypha-harness';

import type {
  ArtifactReActContextSnapshotStoreOptions,
  ExecuteReActQuantumRequest,
  ExecuteReActQuantumResult,
  ReActContextSnapshot,
  ReActContextSnapshotPutResult,
  ReActContextSnapshotStore,
  ReActOperationReceiptReconciler,
  ReActQuantumExecutorOptions,
} from '@codesoul-co/hypha-harness';

// The complete export list is documented below.

Usage patterns

  • Use the 14 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.
  • The 1 constant/enum export provides stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Public exports

SymbolKindSignatureDescription
ArtifactReActContextSnapshotStoreclassnew ArtifactReActContextSnapshotStore(options: ArtifactReActContextSnapshotStoreOptions): ArtifactReActContextSnapshotStoreDurable content-addressed Context snapshots selected by the checkpoint scope hash.
ContinuationIdentityValidatorclassnew ContinuationIdentityValidator(): ContinuationIdentityValidatorContinuation Identity Validator class with 5 public constructor or member entries; its exact declarations are listed below.
ReActQuantumExecutorclassnew ReActQuantumExecutor(options: ReActQuantumExecutorOptions): ReActQuantumExecutorRebuilds and executes exactly one fenced ReAct quantum from durable Runtime evidence.
REACT_CONTEXT_SNAPSHOT_VERSIONconstantconst REACT_CONTEXT_SNAPSHOT_VERSION: "1.0.0"REACT CONTEXT SNAPSHOT VERSION constant exported by the react-quantum-executor module.
createContinuationReActQuantumDescriptorfunctioncreateContinuationReActQuantumDescriptor(command: Readonly<SessionCommandRecord>, input: unknown): ContinuationReActQuantumDescriptorCreate Continuation ReAct Quantum Descriptor function with 1 public call signature; parameters and return types are listed below.
ArtifactReActContextSnapshotStoreOptionsinterfaceinterface ArtifactReActContextSnapshotStoreOptionsArtifact ReAct Context Snapshot Store Options interface with 2 public fields or methods.
ExecuteReActQuantumRequestinterfaceinterface ExecuteReActQuantumRequestExecute ReAct Quantum Request interface with 3 public fields or methods.
ExecuteReActQuantumResultinterfaceinterface ExecuteReActQuantumResultExecute ReAct Quantum Result interface with 2 public fields or methods.
ReActContextSnapshotinterfaceinterface ReActContextSnapshotReAct Context Snapshot interface with 7 public fields or methods.
ReActContextSnapshotPutResultinterfaceinterface ReActContextSnapshotPutResultReAct Context Snapshot Put Result interface with 3 public fields or methods.
ReActContextSnapshotStoreinterfaceinterface ReActContextSnapshotStoreReAct Context Snapshot Store interface with 3 public fields or methods.
ReActOperationReceiptReconcilerinterfaceinterface ReActOperationReceiptReconcilerReAct Operation Receipt Reconciler interface with 1 public fields or methods.
ReActQuantumExecutorOptionsinterfaceinterface ReActQuantumExecutorOptionsReAct Quantum Executor Options interface with 10 public fields or methods.
ReActQuantumOutcomeRecorderinterfaceinterface ReActQuantumOutcomeRecorderReAct Quantum Outcome Recorder interface with 1 public fields or methods.
ReActQuantumRevisionValidatorinterfaceinterface ReActQuantumRevisionValidatorReAct Quantum Revision Validator interface with 1 public fields or methods.
ReActQuantumRunnerFactoryinterfaceinterface ReActQuantumRunnerFactoryReAct Quantum Runner Factory interface with 1 public fields or methods.
ReActQuantumRuntimeReaderinterfaceinterface ReActQuantumRuntimeReaderReAct Quantum Runtime Reader interface with 1 public fields or methods.
ReActQuantumRuntimeStateinterfaceinterface ReActQuantumRuntimeStateReAct Quantum Runtime State interface with 10 public fields or methods.
ReActQuantumRuntimeStatustypetype ReActQuantumRuntimeStatus = 'created' | 'running' | 'waiting_human' | 'completed' | 'failed' | 'cancelled'Public type alias for ReAct Quantum Runtime Status; the declaration contains its complete type expression.

ArtifactReActContextSnapshotStore

Durable content-addressed Context snapshots selected by the checkpoint scope hash.

  • Kind: class
  • Import: import { ArtifactReActContextSnapshotStore } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export declare class ArtifactReActContextSnapshotStore implements ReActContextSnapshotStore {
    constructor(options: ArtifactReActContextSnapshotStoreOptions);
    put(input: ReActContextSnapshot): Promise<ReActContextSnapshotPutResult>;
    get(scopeHash: string): Promise<ReActContextSnapshot | null>;
    delete(scopeHash: string): Promise<boolean>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: ArtifactReActContextSnapshotStoreOptions): ArtifactReActContextSnapshotStoreCreates an instance of this class.
deletemethoddelete(scopeHash: string): Promise<boolean>Public method; parameters and return type are shown in the signature.
getmethodget(scopeHash: string): Promise<ReActContextSnapshot | null>Public method; parameters and return type are shown in the signature.
putmethodput(input: ReActContextSnapshot): Promise<ReActContextSnapshotPutResult>Public method; parameters and return type are shown in the signature.

ContinuationIdentityValidator

Continuation Identity Validator class with 5 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { ContinuationIdentityValidator } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export declare class ContinuationIdentityValidator {
    validateCommand(command: Readonly<SessionCommandRecord>, descriptor: Readonly<ContinuationReActQuantumDescriptor>): void;
    validateCheckpoint(descriptor: Readonly<ContinuationReActQuantumDescriptor>, checkpoint: Readonly<ReActContinuationCheckpoint>, checkpointRef: string): void;
    validateSnapshot(descriptor: Readonly<ReActQuantumDescriptor>, snapshot: Readonly<ReActContextSnapshot>): void;
    validateRuntimeState(descriptor: Readonly<ReActQuantumDescriptor>, state: Readonly<ReActQuantumRuntimeState>): void;
}

Public members

MemberKindSignatureDescription
constructorconstructor(): ContinuationIdentityValidatorCreates an instance of this class.
validateCheckpointmethodvalidateCheckpoint(descriptor: Readonly<ContinuationReActQuantumDescriptor>, checkpoint: Readonly<ReActContinuationCheckpoint>, checkpointRef: string): voidPublic method; parameters and return type are shown in the signature.
validateCommandmethodvalidateCommand(command: Readonly<SessionCommandRecord>, descriptor: Readonly<ContinuationReActQuantumDescriptor>): voidPublic method; parameters and return type are shown in the signature.
validateRuntimeStatemethodvalidateRuntimeState(descriptor: Readonly<ReActQuantumDescriptor>, state: Readonly<ReActQuantumRuntimeState>): voidPublic method; parameters and return type are shown in the signature.
validateSnapshotmethodvalidateSnapshot(descriptor: Readonly<ReActQuantumDescriptor>, snapshot: Readonly<ReActContextSnapshot>): voidPublic method; parameters and return type are shown in the signature.

ReActQuantumExecutor

Rebuilds and executes exactly one fenced ReAct quantum from durable Runtime evidence.

  • Kind: class
  • Import: import { ReActQuantumExecutor } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export declare class ReActQuantumExecutor {
    constructor(options: ReActQuantumExecutorOptions);
    runOneQuantum(input: ExecuteReActQuantumRequest): Promise<ExecuteReActQuantumResult>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: ReActQuantumExecutorOptions): ReActQuantumExecutorCreates an instance of this class.
runOneQuantummethodrunOneQuantum(input: ExecuteReActQuantumRequest): Promise<ExecuteReActQuantumResult>Public method; parameters and return type are shown in the signature.

REACT_CONTEXT_SNAPSHOT_VERSION

REACT CONTEXT SNAPSHOT VERSION constant exported by the react-quantum-executor module.

  • Kind: constant
  • Import: import { REACT_CONTEXT_SNAPSHOT_VERSION } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export declare const REACT_CONTEXT_SNAPSHOT_VERSION: "1.0.0";

createContinuationReActQuantumDescriptor

Create Continuation ReAct Quantum Descriptor function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { createContinuationReActQuantumDescriptor } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export declare function createContinuationReActQuantumDescriptor(command: Readonly<SessionCommandRecord>, input: unknown): ContinuationReActQuantumDescriptor;

Call signature

text
createContinuationReActQuantumDescriptor(command: Readonly<SessionCommandRecord>, input: unknown): ContinuationReActQuantumDescriptor

Parameters

ParameterTypeRequiredDescription
commandReadonly<SessionCommandRecord>YesRequired parameter; accepted values are defined by the type column.
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

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

ArtifactReActContextSnapshotStoreOptions

Artifact ReAct Context Snapshot Store Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { ArtifactReActContextSnapshotStoreOptions } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ArtifactReActContextSnapshotStoreOptions {
    artifacts: ArtifactStoreProvider;
    maxSnapshotBytes?: number;
}

Contract members

MemberKindSignatureDescription
artifactspropertyartifacts: ArtifactStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
maxSnapshotBytespropertymaxSnapshotBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecuteReActQuantumRequest

Execute ReAct Quantum Request interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ExecuteReActQuantumRequest } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ExecuteReActQuantumRequest {
    command?: Readonly<SessionCommandRecord>;
    descriptor: ReActQuantumDescriptor;
    signal: AbortSignal;
}

Contract members

MemberKindSignatureDescription
commandpropertycommand?: Readonly<SessionCommandRecord>Public property; its type, readonly modifier and optionality are shown in the signature.
descriptorpropertydescriptor: ReActQuantumDescriptorPublic property; its type, readonly modifier and optionality are shown in the signature.
signalpropertysignal: AbortSignalPublic property; its type, readonly modifier and optionality are shown in the signature.

ExecuteReActQuantumResult

Execute ReAct Quantum Result interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { ExecuteReActQuantumResult } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ExecuteReActQuantumResult {
    disposition: 'completed' | 'suspended' | 'waiting_human' | 'cancelled' | 'failed' | 'terminal';
    react?: ReActRunResult;
}

Contract members

MemberKindSignatureDescription
dispositionpropertydisposition: "completed" | "cancelled" | "failed" | "suspended" | "waiting_human" | "terminal"Public 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.

ReActContextSnapshot

ReAct Context Snapshot interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { ReActContextSnapshot } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActContextSnapshot {
    version: typeof REACT_CONTEXT_SNAPSHOT_VERSION;
    runId: string;
    stepId: string;
    scopeHash: string;
    agentRef: SpecRef;
    context: ReActRunContext;
    createdAt: string;
}

Contract members

MemberKindSignatureDescription
agentRefpropertyagentRef: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
contextpropertycontext: ReActRunContextPublic 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.
runIdpropertyrunId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
scopeHashpropertyscopeHash: 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.
versionpropertyversion: "1.0.0"Public property; its type, readonly modifier and optionality are shown in the signature.

ReActContextSnapshotPutResult

ReAct Context Snapshot Put Result interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ReActContextSnapshotPutResult } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActContextSnapshotPutResult {
    snapshot: ReActContextSnapshot;
    snapshotHash: string;
    reused: boolean;
}

Contract members

MemberKindSignatureDescription
reusedpropertyreused: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotpropertysnapshot: ReActContextSnapshotPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotHashpropertysnapshotHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActContextSnapshotStore

ReAct Context Snapshot Store interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { ReActContextSnapshotStore } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActContextSnapshotStore {
    put(snapshot: ReActContextSnapshot): Promise<ReActContextSnapshotPutResult>;
    get(scopeHash: string): Promise<ReActContextSnapshot | null>;
    delete(scopeHash: string): Promise<boolean>;
}

Contract members

MemberKindSignatureDescription
deletemethoddelete(scopeHash: string): Promise<boolean>Public method; parameters and return type are shown in the signature.
getmethodget(scopeHash: string): Promise<ReActContextSnapshot | null>Public method; parameters and return type are shown in the signature.
putmethodput(snapshot: ReActContextSnapshot): Promise<ReActContextSnapshotPutResult>Public method; parameters and return type are shown in the signature.

ReActOperationReceiptReconciler

ReAct Operation Receipt Reconciler interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { ReActOperationReceiptReconciler } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActOperationReceiptReconciler {
    reconcile(input: {
        descriptor: Readonly<ReActQuantumDescriptor>;
        receiptRefs: readonly string[];
        signal: AbortSignal;
    }): Promise<void>;
}

Contract members

MemberKindSignatureDescription
reconcilemethodreconcile(input: { descriptor: Readonly<ReActQuantumDescriptor>; receiptRefs: readonly string[]; signal: AbortSignal; }): Promise<void>Public method; parameters and return type are shown in the signature.

ReActQuantumExecutorOptions

ReAct Quantum Executor Options interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumExecutorOptions } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActQuantumExecutorOptions {
    checkpoints: ReActContinuationCheckpointStore;
    contextSnapshots: ReActContextSnapshotStore;
    runtime: ReActQuantumRuntimeReader;
    runnerFactory: ReActQuantumRunnerFactory;
    outcomeRecorder: ReActQuantumOutcomeRecorder;
    revisionValidator?: ReActQuantumRevisionValidator;
    receiptReconciler?: ReActOperationReceiptReconciler;
    checkpointReferenceFor?: (checkpoint: Readonly<ReActContinuationCheckpoint>) => string;
    quantumIterations: number;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
checkpointReferenceFormethodcheckpointReferenceFor?(checkpoint: Readonly<ReActContinuationCheckpoint>): stringPublic method; parameters and return type are shown in the signature.
checkpointspropertycheckpoints: ReActContinuationCheckpointStorePublic property; its type, readonly modifier and optionality are shown in the signature.
contextSnapshotspropertycontextSnapshots: ReActContextSnapshotStorePublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
outcomeRecorderpropertyoutcomeRecorder: ReActQuantumOutcomeRecorderPublic property; its type, readonly modifier and optionality are shown in the signature.
quantumIterationspropertyquantumIterations: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
receiptReconcilerpropertyreceiptReconciler?: ReActOperationReceiptReconcilerPublic property; its type, readonly modifier and optionality are shown in the signature.
revisionValidatorpropertyrevisionValidator?: ReActQuantumRevisionValidatorPublic property; its type, readonly modifier and optionality are shown in the signature.
runnerFactorypropertyrunnerFactory: ReActQuantumRunnerFactoryPublic property; its type, readonly modifier and optionality are shown in the signature.
runtimepropertyruntime: ReActQuantumRuntimeReaderPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActQuantumOutcomeRecorder

ReAct Quantum Outcome Recorder interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumOutcomeRecorder } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActQuantumOutcomeRecorder {
    record(input: {
        descriptor: Readonly<ReActQuantumDescriptor>;
        state: Readonly<ReActQuantumRuntimeState>;
        react: Readonly<ReActRunResult>;
        disposition: Exclude<ExecuteReActQuantumResult['disposition'], 'terminal'>;
        signal: AbortSignal;
    }): Promise<void>;
}

Contract members

MemberKindSignatureDescription
recordmethodrecord(input: { descriptor: Readonly<ReActQuantumDescriptor>; state: Readonly<ReActQuantumRuntimeState>; react: Readonly<ReActRunResult>; disposition: Exclude<ExecuteReActQuantumResult["disposition"], "terminal">; signal: AbortSignal; }): Promise<void>Public method; parameters and return type are shown in the signature.

ReActQuantumRevisionValidator

ReAct Quantum Revision Validator interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumRevisionValidator } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActQuantumRevisionValidator {
    validate(descriptor: Readonly<ReActQuantumDescriptor>, state: Readonly<ReActQuantumRuntimeState>): Promise<void>;
}

Contract members

MemberKindSignatureDescription
validatemethodvalidate(descriptor: Readonly<ReActQuantumDescriptor>, state: Readonly<ReActQuantumRuntimeState>): Promise<void>Public method; parameters and return type are shown in the signature.

ReActQuantumRunnerFactory

ReAct Quantum Runner Factory interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumRunnerFactory } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActQuantumRunnerFactory {
    create(input: {
        descriptor: Readonly<ReActQuantumDescriptor>;
        state: Readonly<ReActQuantumRuntimeState>;
        snapshot: Readonly<ReActContextSnapshot>;
        signal: AbortSignal;
    }): Promise<Pick<ReActRunner, 'run'>>;
}

Contract members

MemberKindSignatureDescription
createmethodcreate(input: { descriptor: Readonly<ReActQuantumDescriptor>; state: Readonly<ReActQuantumRuntimeState>; snapshot: Readonly<ReActContextSnapshot>; signal: AbortSignal; }): Promise<Pick<ReActRunner, "run">>Public method; parameters and return type are shown in the signature.

ReActQuantumRuntimeReader

ReAct Quantum Runtime Reader interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumRuntimeReader } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActQuantumRuntimeReader {
    replay(descriptor: Readonly<ReActQuantumDescriptor>): Promise<ReActQuantumRuntimeState>;
}

Contract members

MemberKindSignatureDescription
replaymethodreplay(descriptor: Readonly<ReActQuantumDescriptor>): Promise<ReActQuantumRuntimeState>Public method; parameters and return type are shown in the signature.

ReActQuantumRuntimeState

ReAct Quantum Runtime State interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumRuntimeState } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export interface ReActQuantumRuntimeState {
    runId: string;
    sessionId: string;
    userId: string;
    status: ReActQuantumRuntimeStatus;
    cancellationRevision: number;
    agentRef: SpecRef;
    domainPackRef: SpecRef;
    workflowRef?: SpecRef;
    promptSnapshotHash: string;
    capabilitySnapshotHash: string;
}

Contract members

MemberKindSignatureDescription
agentRefpropertyagentRef: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
cancellationRevisionpropertycancellationRevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
capabilitySnapshotHashpropertycapabilitySnapshotHash: 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.
promptSnapshotHashpropertypromptSnapshotHash: 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.
statuspropertystatus: ReActQuantumRuntimeStatusPublic 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.

ReActQuantumRuntimeStatus

Public type alias for ReAct Quantum Runtime Status; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { ReActQuantumRuntimeStatus } from '@codesoul-co/hypha-harness';
  • Source module: react-quantum-executor

Declaration

text
export type ReActQuantumRuntimeStatus = 'created' | 'running' | 'waiting_human' | 'completed' | 'failed' | 'cancelled';