Skip to content

@codesoul-co/hypha-harness / long-horizon-react-supervisor

Using this module

Use the Long horizon react supervisor module for using the public contracts and operations for this capability boundary. It exports 2 classes, 1 function, 11 interfaces, 1 type.

Import from the package entrypoint

ts
import {
  LongHorizonReActSupervisor,
  ServerIngressReActContinuationScheduler,
  reActContinuationIdempotencyKey,
} from '@codesoul-co/hypha-harness';

import type {
  CoordinateReActQuantumResultInput,
  EnqueueReActContinuationCommandRequest,
  LongHorizonReActQuantumInput,
  LongHorizonReActQuantumResult,
  LongHorizonReActSupervisorOptions,
  ReActContinuationCommandIngress,
  ReActContinuationIntent,
  ReActContinuationScheduler,
} from '@codesoul-co/hypha-harness';

// The complete export list is documented below.

Usage patterns

  • Use the 12 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 2 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

SymbolKindSignatureDescription
LongHorizonReActSupervisorclassnew LongHorizonReActSupervisor(options: LongHorizonReActSupervisorOptions): LongHorizonReActSupervisorExecutes exactly one bounded ReAct quantum. It never hides an unbounded loop. A retryable quantum boundary is handed to a durable scheduler; global budget, deadline, and non-progress boundaries require an explicit operator/workflow decision.
ServerIngressReActContinuationSchedulerclassnew ServerIngressReActContinuationScheduler(options: ServerIngressReActContinuationSchedulerOptions): ServerIngressReActContinuationSchedulerSends a complete continuation envelope through the Server command ingress. The ingress owns payload persistence and Queue reference/hash generation.
reActContinuationIdempotencyKeyfunctionreActContinuationIdempotencyKey(input: ContinueReActCommandPayloadV1): stringRe Act Continuation Idempotency Key function with 1 public call signature; parameters and return types are listed below.
CoordinateReActQuantumResultInputinterfaceinterface CoordinateReActQuantumResultInputCoordinate ReAct Quantum Result Input interface with 2 public fields or methods.
EnqueueReActContinuationCommandRequestinterfaceinterface EnqueueReActContinuationCommandRequestEnqueue ReAct Continuation Command Request interface with 13 public fields or methods.
LongHorizonReActQuantumInputinterfaceinterface LongHorizonReActQuantumInputLong Horizon ReAct Quantum Input interface with 3 public fields or methods.
LongHorizonReActQuantumResultinterfaceinterface LongHorizonReActQuantumResultLong Horizon ReAct Quantum Result interface with 4 public fields or methods.
LongHorizonReActSupervisorOptionsinterfaceinterface LongHorizonReActSupervisorOptionsLong Horizon ReAct Supervisor Options interface with 3 public fields or methods.
ReActContinuationCommandIngressinterfaceinterface ReActContinuationCommandIngressReAct Continuation Command Ingress interface with 1 public fields or methods.
ReActContinuationIntentinterfaceinterface ReActContinuationIntentReAct Continuation Intent interface with 6 public fields or methods.
ReActContinuationSchedulerinterfaceinterface ReActContinuationSchedulerReAct Continuation Scheduler interface with 1 public fields or methods.
ReActContinuationScheduleRequestinterfaceinterface ReActContinuationScheduleRequestReAct Continuation Schedule Request interface with 7 public fields or methods.
ReActContinuationScheduleResultinterfaceinterface ReActContinuationScheduleResultReAct Continuation Schedule Result interface with 2 public fields or methods.
ServerIngressReActContinuationSchedulerOptionsinterfaceinterface ServerIngressReActContinuationSchedulerOptionsServer Ingress ReAct Continuation Scheduler Options interface with 2 public fields or methods.
LongHorizonReActDispositiontypetype LongHorizonReActDisposition = 'completed' | 'continuation_scheduled' | 'continuation_required' | 'waiting_human' | 'cancelled' | 'failed'Public type alias for Long Horizon ReAct Disposition; the declaration contains its complete type expression.

LongHorizonReActSupervisor

Executes exactly one bounded ReAct quantum. It never hides an unbounded loop. A retryable quantum boundary is handed to a durable scheduler; global budget, deadline, and non-progress boundaries require an explicit operator/workflow decision.

Declaration

text
export declare class LongHorizonReActSupervisor {
    constructor(options: LongHorizonReActSupervisorOptions);
    runQuantum(input: LongHorizonReActQuantumInput): Promise<LongHorizonReActQuantumResult>;
    coordinateResult(input: CoordinateReActQuantumResultInput): Promise<LongHorizonReActQuantumResult>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: LongHorizonReActSupervisorOptions): LongHorizonReActSupervisorCreates an instance of this class.
coordinateResultmethodcoordinateResult(input: CoordinateReActQuantumResultInput): Promise<LongHorizonReActQuantumResult>Public method; parameters and return type are shown in the signature.
runQuantummethodrunQuantum(input: LongHorizonReActQuantumInput): Promise<LongHorizonReActQuantumResult>Public method; parameters and return type are shown in the signature.

ServerIngressReActContinuationScheduler

Sends a complete continuation envelope through the Server command ingress. The ingress owns payload persistence and Queue reference/hash generation.

  • Kind: class
  • Import: import { ServerIngressReActContinuationScheduler } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export declare class ServerIngressReActContinuationScheduler implements ReActContinuationScheduler {
    constructor(options: ServerIngressReActContinuationSchedulerOptions);
    schedule(input: ReActContinuationScheduleRequest): Promise<ReActContinuationScheduleResult>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: ServerIngressReActContinuationSchedulerOptions): ServerIngressReActContinuationSchedulerCreates an instance of this class.
schedulemethodschedule(input: ReActContinuationScheduleRequest): Promise<ReActContinuationScheduleResult>Public method; parameters and return type are shown in the signature.

reActContinuationIdempotencyKey

Re Act Continuation Idempotency Key function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function reActContinuationIdempotencyKey(input: ContinueReActCommandPayloadV1): string;

Call signature

text
reActContinuationIdempotencyKey(input: ContinueReActCommandPayloadV1): string

Parameters

ParameterTypeRequiredDescription
inputContinueReActCommandPayloadV1YesRequired parameter; accepted values are defined by the type column.

Returns

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

CoordinateReActQuantumResultInput

Coordinate ReAct Quantum Result Input interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { CoordinateReActQuantumResultInput } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface CoordinateReActQuantumResultInput {
    react: ReActRunResult;
    continuation?: ReActContinuationIntent;
}

Contract members

MemberKindSignatureDescription
continuationpropertycontinuation?: ReActContinuationIntentPublic 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.

EnqueueReActContinuationCommandRequest

Enqueue ReAct Continuation Command Request interface with 13 public fields or methods.

  • Kind: interface
  • Import: import type { EnqueueReActContinuationCommandRequest } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface EnqueueReActContinuationCommandRequest {
    id: string;
    commandType: 'continue_react';
    idempotencyKey: string;
    tenantId?: string;
    userId: string;
    workspaceId?: string;
    sessionId: string;
    targetRunId: string;
    priority?: number;
    maxAttempts?: number;
    payload: ContinueReActCommandPayloadV1;
    createdAt: string;
    availableAt: string;
}

Contract members

MemberKindSignatureDescription
availableAtpropertyavailableAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
commandTypepropertycommandType: "continue_react"Public 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.
idpropertyid: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idempotencyKeypropertyidempotencyKey: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
maxAttemptspropertymaxAttempts?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
payloadpropertypayload: ContinueReActCommandPayloadV1Public property; its type, readonly modifier and optionality are shown in the signature.
prioritypropertypriority?: numberPublic 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.
targetRunIdpropertytargetRunId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
tenantIdpropertytenantId?: 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.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LongHorizonReActQuantumInput

Long Horizon ReAct Quantum Input interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { LongHorizonReActQuantumInput } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface LongHorizonReActQuantumInput {
    context: ReActRunContext;
    control?: ReActRunControl;
    continuation?: ReActContinuationIntent;
}

Contract members

MemberKindSignatureDescription
contextpropertycontext: ReActRunContextPublic property; its type, readonly modifier and optionality are shown in the signature.
continuationpropertycontinuation?: ReActContinuationIntentPublic property; its type, readonly modifier and optionality are shown in the signature.
controlpropertycontrol?: ReActRunControlPublic property; its type, readonly modifier and optionality are shown in the signature.

LongHorizonReActQuantumResult

Long Horizon ReAct Quantum Result interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { LongHorizonReActQuantumResult } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface LongHorizonReActQuantumResult {
    disposition: LongHorizonReActDisposition;
    react: ReActRunResult;
    scheduledTaskId?: string;
    scheduleReused?: boolean;
}

Contract members

MemberKindSignatureDescription
dispositionpropertydisposition: LongHorizonReActDispositionPublic 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.
scheduledTaskIdpropertyscheduledTaskId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
scheduleReusedpropertyscheduleReused?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

LongHorizonReActSupervisorOptions

Long Horizon ReAct Supervisor Options interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { LongHorizonReActSupervisorOptions } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface LongHorizonReActSupervisorOptions {
    runner: Pick<ReActRunner, 'run'>;
    scheduler?: ReActContinuationScheduler;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
runnerpropertyrunner: Pick<ReActRunner, "run">Public property; its type, readonly modifier and optionality are shown in the signature.
schedulerpropertyscheduler?: ReActContinuationSchedulerPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActContinuationCommandIngress

ReAct Continuation Command Ingress interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { ReActContinuationCommandIngress } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface ReActContinuationCommandIngress {
    enqueue(request: EnqueueReActContinuationCommandRequest): Promise<Pick<SessionCommandRecord, 'id' | 'status'>>;
}

Contract members

MemberKindSignatureDescription
enqueuemethodenqueue(request: EnqueueReActContinuationCommandRequest): Promise<Pick<SessionCommandRecord, "id" | "status">>Public method; parameters and return type are shown in the signature.

ReActContinuationIntent

ReAct Continuation Intent interface with 6 public fields or methods.

Declaration

text
export interface ReActContinuationIntent {
    tenantId?: string;
    workspaceId?: string;
    availableAt?: string;
    priority?: number;
    maxAttempts?: number;
    buildPayload(checkpoint: Readonly<ReActContinuationCheckpoint>): ContinueReActCommandPayloadV1 | Promise<ContinueReActCommandPayloadV1>;
}

Contract members

MemberKindSignatureDescription
availableAtpropertyavailableAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
buildPayloadmethodbuildPayload(checkpoint: Readonly<ReActContinuationCheckpoint>): ContinueReActCommandPayloadV1 | Promise<ContinueReActCommandPayloadV1>Public method; parameters and return type are shown in the signature.
maxAttemptspropertymaxAttempts?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
prioritypropertypriority?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
tenantIdpropertytenantId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActContinuationScheduler

ReAct Continuation Scheduler interface with 1 public fields or methods.

Declaration

text
export interface ReActContinuationScheduler {
    schedule(request: ReActContinuationScheduleRequest): Promise<ReActContinuationScheduleResult>;
}

Contract members

MemberKindSignatureDescription
schedulemethodschedule(request: ReActContinuationScheduleRequest): Promise<ReActContinuationScheduleResult>Public method; parameters and return type are shown in the signature.

ReActContinuationScheduleRequest

ReAct Continuation Schedule Request interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { ReActContinuationScheduleRequest } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface ReActContinuationScheduleRequest {
    version: '1.0.0';
    tenantId?: string;
    workspaceId?: string;
    payload: ContinueReActCommandPayloadV1;
    availableAt: string;
    priority?: number;
    maxAttempts?: number;
}

Contract members

MemberKindSignatureDescription
availableAtpropertyavailableAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
maxAttemptspropertymaxAttempts?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
payloadpropertypayload: ContinueReActCommandPayloadV1Public property; its type, readonly modifier and optionality are shown in the signature.
prioritypropertypriority?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
tenantIdpropertytenantId?: 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.
workspaceIdpropertyworkspaceId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActContinuationScheduleResult

ReAct Continuation Schedule Result interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { ReActContinuationScheduleResult } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface ReActContinuationScheduleResult {
    taskId: string;
    reused: boolean;
}

Contract members

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

ServerIngressReActContinuationSchedulerOptions

Server Ingress ReAct Continuation Scheduler Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { ServerIngressReActContinuationSchedulerOptions } from '@codesoul-co/hypha-harness';
  • Source module: long-horizon-react-supervisor

Declaration

text
export interface ServerIngressReActContinuationSchedulerOptions {
    ingress: ReActContinuationCommandIngress;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
ingresspropertyingress: ReActContinuationCommandIngressPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.

LongHorizonReActDisposition

Public type alias for Long Horizon ReAct Disposition; the declaration contains its complete type expression.

Declaration

text
export type LongHorizonReActDisposition = 'completed' | 'continuation_scheduled' | 'continuation_required' | 'waiting_human' | 'cancelled' | 'failed';