@codesoul-co/hypha-core / contracts/react-continuation
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/react-continuation.ts - Exports: 9
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
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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
CONTINUE_REACT_COMMAND_PAYLOAD_VERSION | constant | const CONTINUE_REACT_COMMAND_PAYLOAD_VERSION: "1.0.0" | CONTINUE REACT COMMAND PAYLOAD VERSION constant exported by the contracts/react-continuation module. |
REACT_QUANTUM_DESCRIPTOR_VERSION | constant | const REACT_QUANTUM_DESCRIPTOR_VERSION: "1.0.0" | REACT QUANTUM DESCRIPTOR VERSION constant exported by the contracts/react-continuation module. |
ContinuationReActQuantumDescriptor | interface | interface ContinuationReActQuantumDescriptor extends ReActQuantumDescriptorBase | Continuation ReAct Quantum Descriptor interface with 29 public fields or methods. |
ContinueReActCommandPayloadV1 | interface | interface ContinueReActCommandPayloadV1 | Continue ReAct Command Payload V1 interface with 24 public fields or methods. |
InitialReActQuantumDescriptor | interface | interface InitialReActQuantumDescriptor extends ReActQuantumDescriptorBase | Initial ReAct Quantum Descriptor interface with 22 public fields or methods. |
ReActGlobalBudget | interface | interface ReActGlobalBudget | ReAct Global Budget interface with 4 public fields or methods. |
ReActQuantumDescriptorBase | interface | interface ReActQuantumDescriptorBase | ReAct Quantum Descriptor Base interface with 21 public fields or methods. |
ContinueReActCommandPayload | type | type ContinueReActCommandPayload = ContinueReActCommandPayloadV1 | Public type alias for Continue ReAct Command Payload; the declaration contains its complete type expression. |
ReActQuantumDescriptor | type | type ReActQuantumDescriptor = InitialReActQuantumDescriptor | ContinuationReActQuantumDescriptor | Public 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
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
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
export interface ContinuationReActQuantumDescriptor extends ReActQuantumDescriptorBase {
trigger: 'continuation';
commandId: string;
commandPayloadHash: string;
claimToken: string;
leaseEpoch: number;
checkpointRef: string;
checkpointHash: string;
checkpointSequence: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentRef | property | agentRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
cancellationRevision | property | cancellationRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotHash | property | capabilitySnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotRef | property | capabilitySnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointHash | property | checkpointHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointRef | property | checkpointRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointSequence | property | checkpointSequence: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimToken | property | claimToken: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
commandPayloadHash | property | commandPayloadHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadlineAt | property | deadlineAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
domainPackRef | property | domainPackRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
executionRef | property | executionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
globalBudget | property | globalBudget: ReActGlobalBudget | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseEpoch | property | leaseEpoch: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryContextRef | property | memoryContextRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingOperationReceipts | property | pendingOperationReceipts?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotHash | property | promptSnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotRef | property | promptSnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
trigger | property | trigger: "continuation" | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
workflowRef | property | workflowRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceRef | property | workspaceRef?: string | Public 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
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
| Member | Kind | Signature | Description |
|---|---|---|---|
agentRef | property | agentRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
cancellationRevision | property | cancellationRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotHash | property | capabilitySnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotRef | property | capabilitySnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointHash | property | checkpointHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointRef | property | checkpointRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
checkpointSequence | property | checkpointSequence: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadlineAt | property | deadlineAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
domainPackRef | property | domainPackRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
executionRef | property | executionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
globalBudget | property | globalBudget: ReActGlobalBudget | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryContextRef | property | memoryContextRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingOperationReceipts | property | pendingOperationReceipts?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotHash | property | promptSnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotRef | property | promptSnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
workflowRef | property | workflowRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceRef | property | workspaceRef?: string | Public 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
export interface InitialReActQuantumDescriptor extends ReActQuantumDescriptorBase {
trigger: 'initial';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentRef | property | agentRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
cancellationRevision | property | cancellationRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotHash | property | capabilitySnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotRef | property | capabilitySnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadlineAt | property | deadlineAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
domainPackRef | property | domainPackRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
executionRef | property | executionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
globalBudget | property | globalBudget: ReActGlobalBudget | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryContextRef | property | memoryContextRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingOperationReceipts | property | pendingOperationReceipts?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotHash | property | promptSnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotRef | property | promptSnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
trigger | property | trigger: "initial" | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
workflowRef | property | workflowRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceRef | property | workspaceRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ReActGlobalBudget
ReAct Global Budget interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ReActGlobalBudget } from '@codesoul-co/hypha-core'; - Source module:
contracts/react-continuation
Declaration
export interface ReActGlobalBudget {
iterations: number;
modelCalls: number;
toolCalls: number;
totalTokens: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
iterations | property | iterations: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
modelCalls | property | modelCalls: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolCalls | property | toolCalls: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
totalTokens | property | totalTokens: number | Public 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
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
| Member | Kind | Signature | Description |
|---|---|---|---|
agentRef | property | agentRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
cancellationRevision | property | cancellationRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotHash | property | capabilitySnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilitySnapshotRef | property | capabilitySnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deadlineAt | property | deadlineAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
domainPackRef | property | domainPackRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
executionRef | property | executionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
globalBudget | property | globalBudget: ReActGlobalBudget | Public property; its type, readonly modifier and optionality are shown in the signature. |
memoryContextRef | property | memoryContextRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingOperationReceipts | property | pendingOperationReceipts?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotHash | property | promptSnapshotHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptSnapshotRef | property | promptSnapshotRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
workflowRef | property | workflowRef?: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceRef | property | workspaceRef?: string | Public 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.
- Kind: type
- Import:
import type { ContinueReActCommandPayload } from '@codesoul-co/hypha-core'; - Source module:
contracts/react-continuation
Declaration
export type ContinueReActCommandPayload = ContinueReActCommandPayloadV1;ReActQuantumDescriptor
Public type alias for ReAct Quantum Descriptor; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ReActQuantumDescriptor } from '@codesoul-co/hypha-core'; - Source module:
contracts/react-continuation
Declaration
export type ReActQuantumDescriptor = InitialReActQuantumDescriptor | ContinuationReActQuantumDescriptor;