Skip to content

@codesoul-co/hypha-core / contracts/react-continuation ​

Using this module ​

Use the React continuation module for declaring and runtime-validating contracts. It exports 2 constants, 5 interfaces, 2 types.

Import from the package entrypoint ​

ts
import {
  CONTINUE_REACT_COMMAND_PAYLOAD_VERSION,
  REACT_QUANTUM_DESCRIPTOR_VERSION,
} from '@codesoul-co/hypha-core';

import type {
  ContinuationReActQuantumDescriptor,
  ContinueReActCommandPayloadV1,
  InitialReActQuantumDescriptor,
  ReActGlobalBudget,
  ReActQuantumDescriptorBase,
  ContinueReActCommandPayload,
  ReActQuantumDescriptor,
} from '@codesoul-co/hypha-core';

Usage patterns ​

  • Use the 7 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The 2 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Public exports ​

SymbolKindSignatureDescription
CONTINUE_REACT_COMMAND_PAYLOAD_VERSIONconstantconst CONTINUE_REACT_COMMAND_PAYLOAD_VERSION: "1.0.0"CONTINUE REACT COMMAND PAYLOAD VERSION constant exported by the contracts/react-continuation module.
REACT_QUANTUM_DESCRIPTOR_VERSIONconstantconst REACT_QUANTUM_DESCRIPTOR_VERSION: "1.0.0"REACT QUANTUM DESCRIPTOR VERSION constant exported by the contracts/react-continuation module.
ContinuationReActQuantumDescriptorinterfaceinterface ContinuationReActQuantumDescriptor extends ReActQuantumDescriptorBaseContinuation ReAct Quantum Descriptor interface with 29 public fields or methods.
ContinueReActCommandPayloadV1interfaceinterface ContinueReActCommandPayloadV1Continue ReAct Command Payload V1 interface with 24 public fields or methods.
InitialReActQuantumDescriptorinterfaceinterface InitialReActQuantumDescriptor extends ReActQuantumDescriptorBaseInitial ReAct Quantum Descriptor interface with 22 public fields or methods.
ReActGlobalBudgetinterfaceinterface ReActGlobalBudgetReAct Global Budget interface with 4 public fields or methods.
ReActQuantumDescriptorBaseinterfaceinterface ReActQuantumDescriptorBaseReAct Quantum Descriptor Base interface with 21 public fields or methods.
ContinueReActCommandPayloadtypetype ContinueReActCommandPayload = ContinueReActCommandPayloadV1Public type alias for Continue ReAct Command Payload; the declaration contains its complete type expression.
ReActQuantumDescriptortypetype ReActQuantumDescriptor = InitialReActQuantumDescriptor | ContinuationReActQuantumDescriptorPublic type alias for ReAct Quantum Descriptor; the declaration contains its complete type expression.

CONTINUE_REACT_COMMAND_PAYLOAD_VERSION ​

CONTINUE REACT COMMAND PAYLOAD VERSION constant exported by the contracts/react-continuation module.

  • Kind: constant
  • Import: import { CONTINUE_REACT_COMMAND_PAYLOAD_VERSION } from '@codesoul-co/hypha-core';
  • Source module: contracts/react-continuation

Declaration ​

text
export declare const CONTINUE_REACT_COMMAND_PAYLOAD_VERSION: "1.0.0";

REACT_QUANTUM_DESCRIPTOR_VERSION ​

REACT QUANTUM DESCRIPTOR VERSION constant exported by the contracts/react-continuation module.

  • Kind: constant
  • Import: import { REACT_QUANTUM_DESCRIPTOR_VERSION } from '@codesoul-co/hypha-core';
  • Source module: contracts/react-continuation

Declaration ​

text
export declare const REACT_QUANTUM_DESCRIPTOR_VERSION: "1.0.0";

ContinuationReActQuantumDescriptor ​

Continuation ReAct Quantum Descriptor interface with 29 public fields or methods.

  • Kind: interface
  • Import: import type { ContinuationReActQuantumDescriptor } from '@codesoul-co/hypha-core';
  • Source module: contracts/react-continuation

Declaration ​

text
export interface ContinuationReActQuantumDescriptor extends ReActQuantumDescriptorBase {
    trigger: 'continuation';
    commandId: string;
    commandPayloadHash: string;
    claimToken: string;
    leaseEpoch: number;
    checkpointRef: string;
    checkpointHash: string;
    checkpointSequence: number;
}

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.
capabilitySnapshotRefpropertycapabilitySnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
checkpointHashpropertycheckpointHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
checkpointRefpropertycheckpointRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
checkpointSequencepropertycheckpointSequence: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
claimTokenpropertyclaimToken: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
commandIdpropertycommandId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
commandPayloadHashpropertycommandPayloadHash: 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.
deadlineAtpropertydeadlineAt?: 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.
executionRefpropertyexecutionRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
globalBudgetpropertyglobalBudget: ReActGlobalBudgetPublic property; its type, readonly modifier and optionality are shown in the signature.
leaseEpochpropertyleaseEpoch: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryContextRefpropertymemoryContextRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
pendingOperationReceiptspropertypendingOperationReceipts?: string[]Public 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.
promptSnapshotRefpropertypromptSnapshotRef: 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.
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.
triggerpropertytrigger: "continuation"Public 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.
versionpropertyversion: "1.0.0"Public 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.
workspaceRefpropertyworkspaceRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ContinueReActCommandPayloadV1 ​

Continue ReAct Command Payload V1 interface with 24 public fields or methods.

  • Kind: interface
  • Import: import type { ContinueReActCommandPayloadV1 } from '@codesoul-co/hypha-core';
  • Source module: contracts/react-continuation

Declaration ​

text
export interface ContinueReActCommandPayloadV1 {
    version: typeof CONTINUE_REACT_COMMAND_PAYLOAD_VERSION;
    runId: string;
    sessionId: string;
    userId: string;
    stepId: string;
    checkpointRef: string;
    checkpointHash: string;
    checkpointSequence: number;
    scopeHash: string;
    agentRef: SpecRef;
    domainPackRef: SpecRef;
    workflowRef?: SpecRef;
    promptSnapshotRef: string;
    promptSnapshotHash: string;
    capabilitySnapshotRef: string;
    capabilitySnapshotHash: string;
    memoryContextRef?: string;
    workspaceRef?: string;
    executionRef?: string;
    pendingOperationReceipts?: string[];
    globalBudget: ReActGlobalBudget;
    deadlineAt?: string;
    cancellationRevision: number;
    createdAt: 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.
capabilitySnapshotRefpropertycapabilitySnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
checkpointHashpropertycheckpointHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
checkpointRefpropertycheckpointRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
checkpointSequencepropertycheckpointSequence: numberPublic 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.
deadlineAtpropertydeadlineAt?: 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.
executionRefpropertyexecutionRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
globalBudgetpropertyglobalBudget: ReActGlobalBudgetPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryContextRefpropertymemoryContextRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
pendingOperationReceiptspropertypendingOperationReceipts?: string[]Public 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.
promptSnapshotRefpropertypromptSnapshotRef: 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.
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.
userIdpropertyuserId: 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.
workflowRefpropertyworkflowRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceRefpropertyworkspaceRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

InitialReActQuantumDescriptor ​

Initial ReAct Quantum Descriptor interface with 22 public fields or methods.

  • Kind: interface
  • Import: import type { InitialReActQuantumDescriptor } from '@codesoul-co/hypha-core';
  • Source module: contracts/react-continuation

Declaration ​

text
export interface InitialReActQuantumDescriptor extends ReActQuantumDescriptorBase {
    trigger: 'initial';
}

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.
capabilitySnapshotRefpropertycapabilitySnapshotRef: 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.
deadlineAtpropertydeadlineAt?: 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.
executionRefpropertyexecutionRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
globalBudgetpropertyglobalBudget: ReActGlobalBudgetPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryContextRefpropertymemoryContextRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
pendingOperationReceiptspropertypendingOperationReceipts?: string[]Public 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.
promptSnapshotRefpropertypromptSnapshotRef: 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.
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.
triggerpropertytrigger: "initial"Public 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.
versionpropertyversion: "1.0.0"Public 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.
workspaceRefpropertyworkspaceRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActGlobalBudget ​

ReAct Global Budget interface with 4 public fields or methods.

Declaration ​

text
export interface ReActGlobalBudget {
    iterations: number;
    modelCalls: number;
    toolCalls: number;
    totalTokens: number;
}

Contract members ​

MemberKindSignatureDescription
iterationspropertyiterations: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
modelCallspropertymodelCalls: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
toolCallspropertytoolCalls: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
totalTokenspropertytotalTokens: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

ReActQuantumDescriptorBase ​

ReAct Quantum Descriptor Base interface with 21 public fields or methods.

  • Kind: interface
  • Import: import type { ReActQuantumDescriptorBase } from '@codesoul-co/hypha-core';
  • Source module: contracts/react-continuation

Declaration ​

text
export interface ReActQuantumDescriptorBase {
    version: typeof REACT_QUANTUM_DESCRIPTOR_VERSION;
    runId: string;
    sessionId: string;
    userId: string;
    stepId: string;
    scopeHash: string;
    agentRef: SpecRef;
    domainPackRef: SpecRef;
    workflowRef?: SpecRef;
    promptSnapshotRef: string;
    promptSnapshotHash: string;
    capabilitySnapshotRef: string;
    capabilitySnapshotHash: string;
    memoryContextRef?: string;
    workspaceRef?: string;
    executionRef?: string;
    pendingOperationReceipts?: string[];
    globalBudget: ReActGlobalBudget;
    deadlineAt?: string;
    cancellationRevision: number;
    createdAt: 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.
capabilitySnapshotRefpropertycapabilitySnapshotRef: 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.
deadlineAtpropertydeadlineAt?: 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.
executionRefpropertyexecutionRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
globalBudgetpropertyglobalBudget: ReActGlobalBudgetPublic property; its type, readonly modifier and optionality are shown in the signature.
memoryContextRefpropertymemoryContextRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
pendingOperationReceiptspropertypendingOperationReceipts?: string[]Public 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.
promptSnapshotRefpropertypromptSnapshotRef: 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.
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.
userIdpropertyuserId: 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.
workflowRefpropertyworkflowRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceRefpropertyworkspaceRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ContinueReActCommandPayload ​

Public type alias for Continue ReAct Command Payload; the declaration contains its complete type expression.

Declaration ​

text
export type ContinueReActCommandPayload = ContinueReActCommandPayloadV1;

ReActQuantumDescriptor ​

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

Declaration ​

text
export type ReActQuantumDescriptor = InitialReActQuantumDescriptor | ContinuationReActQuantumDescriptor;