@codesoul-co/hypha-core / contracts/runtime-helpers
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-helpers.ts - Exports: 33
Using this module
Use the Runtime helpers module for declaring and runtime-validating contracts. It exports 2 constants, 27 interfaces, 4 types.
Import from the package entrypoint
import {
RUNTIME_DETERMINISTIC_OBSERVATION_KINDS,
RUNTIME_WAIT_INTENT_TYPES,
} from '@codesoul-co/hypha-core';
import type {
HumanWaitRequest,
PauseRequest,
RuntimeClockHelper,
RuntimeDeterminismResolution,
RuntimeDeterminismResolveRequest,
RuntimeDeterminismScope,
RuntimeDeterminismStore,
RuntimeDeterministicObservation,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 31 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 |
|---|---|---|---|
RUNTIME_DETERMINISTIC_OBSERVATION_KINDS | constant | const RUNTIME_DETERMINISTIC_OBSERVATION_KINDS: readonly ["clock", "id"] | RUNTIME DETERMINISTIC OBSERVATION KINDS constant exported by the contracts/runtime-helpers module. |
RUNTIME_WAIT_INTENT_TYPES | constant | const RUNTIME_WAIT_INTENT_TYPES: readonly ["human", "signal", "timer", "pause"] | RUNTIME WAIT INTENT TYPES constant exported by the contracts/runtime-helpers module. |
HumanWaitRequest | interface | interface HumanWaitRequest | Human Wait Request interface with 5 public fields or methods. |
PauseRequest | interface | interface PauseRequest | Pause Request interface with 3 public fields or methods. |
RuntimeClockHelper | interface | interface RuntimeClockHelper | Runtime Clock Helper interface with 2 public fields or methods. |
RuntimeDeterminismResolution | interface | interface RuntimeDeterminismResolution | Runtime Determinism Resolution interface with 2 public fields or methods. |
RuntimeDeterminismResolveRequest | interface | interface RuntimeDeterminismResolveRequest | Runtime Determinism Resolve Request interface with 3 public fields or methods. |
RuntimeDeterminismScope | interface | interface RuntimeDeterminismScope | Runtime Determinism Scope interface with 5 public fields or methods. |
RuntimeDeterminismStore | interface | interface RuntimeDeterminismStore | Runtime Determinism Store interface with 1 public fields or methods. |
RuntimeDeterministicObservation | interface | interface RuntimeDeterministicObservation | Runtime Deterministic Observation interface with 4 public fields or methods. |
RuntimeEventAppendOptions | interface | interface RuntimeEventAppendOptions | Runtime Event Append Options interface with 4 public fields or methods. |
RuntimeEventCommitPort | interface | interface RuntimeEventCommitPort | Runtime Event Commit Port interface with 2 public fields or methods. |
RuntimeEventCommitRequest | interface | interface RuntimeEventCommitRequest | Runtime Event Commit Request interface with 4 public fields or methods. |
RuntimeEventHelper | interface | interface RuntimeEventHelper | Runtime Event Helper interface with 3 public fields or methods. |
RuntimeHelperExecutionScope | interface | interface RuntimeHelperExecutionScope | Runtime Helper Execution Scope interface with 6 public fields or methods. |
RuntimeHelperSdk | interface | interface RuntimeHelperSdk | Runtime Helper Sdk interface with 4 public fields or methods. |
RuntimeIdHelper | interface | interface RuntimeIdHelper | Runtime ID Helper interface with 1 public fields or methods. |
RuntimeIoHelperSdk | interface | interface RuntimeIoHelperSdk | Runtime Io Helper Sdk interface with 2 public fields or methods. |
RuntimeObservationEventInput | interface | interface RuntimeObservationEventInput | Runtime Observation Event Input interface with 3 public fields or methods. |
RuntimeResourceAcquireOptions | interface | interface RuntimeResourceAcquireOptions | Runtime Resource Acquire Options interface with 2 public fields or methods. |
RuntimeResourceHelper | interface | interface RuntimeResourceHelper | Runtime Resource Helper interface with 4 public fields or methods. |
RuntimeResourceHelperDependencies | interface | interface RuntimeResourceHelperDependencies | Runtime Resource Helper Dependencies interface with 5 public fields or methods. |
RuntimeResourceRenewOptions | interface | interface RuntimeResourceRenewOptions | Runtime Resource Renew Options interface with 1 public fields or methods. |
RuntimeTransitionHelper | interface | interface RuntimeTransitionHelper | Runtime Transition Helper interface with 4 public fields or methods. |
RuntimeTransitionProposal | interface | interface RuntimeTransitionProposal | Runtime Transition Proposal interface with 3 public fields or methods. |
RuntimeWaitHelper | interface | interface RuntimeWaitHelper | Runtime Wait Helper interface with 4 public fields or methods. |
RuntimeWaitIntent | interface | interface RuntimeWaitIntent | Runtime Wait Intent interface with 8 public fields or methods. |
SignalWaitRequest | interface | interface SignalWaitRequest | Signal Wait Request interface with 5 public fields or methods. |
TimerWaitRequest | interface | interface TimerWaitRequest | Timer Wait Request interface with 3 public fields or methods. |
RuntimeDeterministicObservationKind | type | type RuntimeDeterministicObservationKind = (typeof RUNTIME_DETERMINISTIC_OBSERVATION_KINDS)[number] | Public type alias for Runtime Deterministic Observation Kind; the declaration contains its complete type expression. |
RuntimeJsonValue | type | type RuntimeJsonValue = null | boolean | number | string | RuntimeJsonValue[] | { [key: string]: RuntimeJsonValue; } | Public type alias for Runtime JSON Value; the declaration contains its complete type expression. |
RuntimeStateExecutionResult | type | type RuntimeStateExecutionResult = { kind: 'completed'; output?: RuntimeJsonValue; variablesPatch?: Record<string, RuntimeJsonValue>; } | { kind: 'continued'; observation?: RuntimeJsonValue; } | { kind: 'failed'; error: NormalizedRuntimeError; } | { kind: 'waiting'; wait: RuntimeWaitIntent; } | Public type alias for Runtime State Execution Result; the declaration contains its complete type expression. |
RuntimeWaitIntentType | type | type RuntimeWaitIntentType = (typeof RUNTIME_WAIT_INTENT_TYPES)[number] | Public type alias for Runtime Wait Intent Type; the declaration contains its complete type expression. |
RUNTIME_DETERMINISTIC_OBSERVATION_KINDS
RUNTIME DETERMINISTIC OBSERVATION KINDS constant exported by the contracts/runtime-helpers module.
- Kind: constant
- Import:
import { RUNTIME_DETERMINISTIC_OBSERVATION_KINDS } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export declare const RUNTIME_DETERMINISTIC_OBSERVATION_KINDS: readonly ["clock", "id"];RUNTIME_WAIT_INTENT_TYPES
RUNTIME WAIT INTENT TYPES constant exported by the contracts/runtime-helpers module.
- Kind: constant
- Import:
import { RUNTIME_WAIT_INTENT_TYPES } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export declare const RUNTIME_WAIT_INTENT_TYPES: readonly ["human", "signal", "timer", "pause"];HumanWaitRequest
Human Wait Request interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { HumanWaitRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface HumanWaitRequest {
key?: string;
expiresAt?: string;
timeoutTransitionId?: string;
pendingActionRef?: string;
metadata?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
expiresAt | property | expiresAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
key | property | key?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingActionRef | property | pendingActionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutTransitionId | property | timeoutTransitionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
PauseRequest
Pause Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { PauseRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface PauseRequest {
reason: string;
resumeKey?: string;
metadata?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
metadata | property | metadata?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resumeKey | property | resumeKey?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeClockHelper
Runtime Clock Helper interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeClockHelper } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeClockHelper {
now(): Promise<string>;
sleepUntil(isoTime: string): Promise<RuntimeStateExecutionResult>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
now | method | now(): Promise<string> | Public method; parameters and return type are shown in the signature. |
sleepUntil | method | sleepUntil(isoTime: string): Promise<RuntimeStateExecutionResult> | Public method; parameters and return type are shown in the signature. |
RuntimeDeterminismResolution
Runtime Determinism Resolution interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeDeterminismResolution } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeDeterminismResolution<T extends RuntimeJsonValue = RuntimeJsonValue> {
observation: RuntimeDeterministicObservation<T>;
reused: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
observation | property | observation: RuntimeDeterministicObservation<T> | Public property; its type, readonly modifier and optionality are shown in the signature. |
reused | property | reused: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeDeterminismResolveRequest
Runtime Determinism Resolve Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeDeterminismResolveRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeDeterminismResolveRequest {
scope: RuntimeDeterminismScope;
key: string;
kind: RuntimeDeterministicObservationKind;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
key | property | key: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
kind | property | kind: "clock" | "id" | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeDeterminismScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeDeterminismScope
Runtime Determinism Scope interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeDeterminismScope } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeDeterminismScope {
tenantId?: string;
userId: string;
runId: string;
stateId: string;
stateAttempt: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateAttempt | property | stateAttempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: 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. |
RuntimeDeterminismStore
Runtime Determinism Store interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeDeterminismStore } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeDeterminismStore {
resolve<T extends RuntimeJsonValue>(request: RuntimeDeterminismResolveRequest, produce: () => T | Promise<T>): Promise<RuntimeDeterminismResolution<T>>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
resolve | method | resolve<T extends RuntimeJsonValue>(request: RuntimeDeterminismResolveRequest, produce: () => T | Promise<T>): Promise<RuntimeDeterminismResolution<T>> | Public method; parameters and return type are shown in the signature. |
RuntimeDeterministicObservation
Runtime Deterministic Observation interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeDeterministicObservation } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeDeterministicObservation<T extends RuntimeJsonValue = RuntimeJsonValue> {
scope: RuntimeDeterminismScope;
key: string;
kind: RuntimeDeterministicObservationKind;
value: T;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
key | property | key: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
kind | property | kind: "clock" | "id" | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeDeterminismScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
value | property | value: T | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeEventAppendOptions
Runtime Event Append Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeEventAppendOptions } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeEventAppendOptions {
idempotencyKey?: string;
causationId?: string;
parentEventId?: string;
metadata?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
causationId | property | causationId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
parentEventId | property | parentEventId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeEventCommitPort
Runtime Event Commit Port interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeEventCommitPort } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeEventCommitPort {
append(request: RuntimeEventCommitRequest): Promise<FrameworkEvent[]>;
readSince(scope: RuntimeScope, sequence: number): Promise<FrameworkEvent[]>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
append | method | append(request: RuntimeEventCommitRequest): Promise<FrameworkEvent[]> | Public method; parameters and return type are shown in the signature. |
readSince | method | readSince(scope: RuntimeScope, sequence: number): Promise<FrameworkEvent[]> | Public method; parameters and return type are shown in the signature. |
RuntimeEventCommitRequest
Runtime Event Commit Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeEventCommitRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeEventCommitRequest {
scope: RuntimeHelperExecutionScope;
events: EventCreateInput[];
fencingToken: number;
idempotencyKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
events | property | events: EventCreateInput<unknown>[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeHelperExecutionScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeEventHelper
Runtime Event Helper interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeEventHelper } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeEventHelper {
append<T extends RuntimeJsonValue>(type: RuntimeObservationEventType, payload: T, options?: RuntimeEventAppendOptions): Promise<FrameworkEvent<T>>;
appendBatch(inputs: RuntimeObservationEventInput[]): Promise<FrameworkEvent[]>;
readSince(sequence: number): Promise<FrameworkEvent[]>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
append | method | append<T extends RuntimeJsonValue>(type: RuntimeObservationEventType, payload: T, options?: RuntimeEventAppendOptions): Promise<FrameworkEvent<T>> | Public method; parameters and return type are shown in the signature. |
appendBatch | method | appendBatch(inputs: RuntimeObservationEventInput[]): Promise<FrameworkEvent[]> | Public method; parameters and return type are shown in the signature. |
readSince | method | readSince(sequence: number): Promise<FrameworkEvent[]> | Public method; parameters and return type are shown in the signature. |
RuntimeHelperExecutionScope
Runtime Helper Execution Scope interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHelperExecutionScope } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeHelperExecutionScope {
scope: RuntimeScope;
stateId: string;
stateAttempt: number;
fencingToken: number;
correlationId: string;
causationId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
causationId | property | causationId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
correlationId | property | correlationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateAttempt | property | stateAttempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeHelperSdk
Runtime Helper Sdk interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHelperSdk } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeHelperSdk {
readonly transitions: RuntimeTransitionHelper;
readonly waits: RuntimeWaitHelper;
readonly clock: RuntimeClockHelper;
readonly ids: RuntimeIdHelper;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
clock | property | readonly clock: RuntimeClockHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
ids | property | readonly ids: RuntimeIdHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
transitions | property | readonly transitions: RuntimeTransitionHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
waits | property | readonly waits: RuntimeWaitHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeIdHelper
Runtime ID Helper interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeIdHelper } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeIdHelper {
next(namespace: string): Promise<string>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
next | method | next(namespace: string): Promise<string> | Public method; parameters and return type are shown in the signature. |
RuntimeIoHelperSdk
Runtime Io Helper Sdk interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeIoHelperSdk } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeIoHelperSdk {
readonly events: RuntimeEventHelper;
readonly resources: RuntimeResourceHelper;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
events | property | readonly events: RuntimeEventHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
resources | property | readonly resources: RuntimeResourceHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeObservationEventInput
Runtime Observation Event Input interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeObservationEventInput } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeObservationEventInput<T extends RuntimeJsonValue = RuntimeJsonValue> {
type: RuntimeObservationEventType;
payload: T;
options?: RuntimeEventAppendOptions;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
options | property | options?: RuntimeEventAppendOptions | Public property; its type, readonly modifier and optionality are shown in the signature. |
payload | property | payload: T | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeResourceAcquireOptions
Runtime Resource Acquire Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceAcquireOptions } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeResourceAcquireOptions {
ttlMs: number;
idempotencyKey?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
idempotencyKey | property | idempotencyKey?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeResourceHelper
Runtime Resource Helper interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceHelper } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeResourceHelper {
acquire(resources: Omit<RuntimeResourceRequest, 'requestedClaimId'>[], options: RuntimeResourceAcquireOptions): Promise<RuntimeResourceClaim[]>;
renew(claims: RuntimeResourceClaim[], options: RuntimeResourceRenewOptions): Promise<RuntimeResourceClaim[]>;
release(claims: RuntimeResourceClaim[]): Promise<void>;
assertCurrent(claim: RuntimeResourceClaim): Promise<RuntimeResourceClaim>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquire | method | acquire(resources: Omit<RuntimeResourceRequest, "requestedClaimId">[], options: RuntimeResourceAcquireOptions): Promise<RuntimeResourceClaim[]> | Public method; parameters and return type are shown in the signature. |
assertCurrent | method | assertCurrent(claim: RuntimeResourceClaim): Promise<RuntimeResourceClaim> | Public method; parameters and return type are shown in the signature. |
release | method | release(claims: RuntimeResourceClaim[]): Promise<void> | Public method; parameters and return type are shown in the signature. |
renew | method | renew(claims: RuntimeResourceClaim[], options: RuntimeResourceRenewOptions): Promise<RuntimeResourceClaim[]> | Public method; parameters and return type are shown in the signature. |
RuntimeResourceHelperDependencies
Runtime Resource Helper Dependencies interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceHelperDependencies } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeResourceHelperDependencies {
runLease: RunLeaseAuthorization;
coordinator: RuntimeResourceCoordinator;
ids: RuntimeIdHelper;
clock: RuntimeClockHelper;
stateId: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
clock | property | clock: RuntimeClockHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
coordinator | property | coordinator: RuntimeResourceCoordinator | Public property; its type, readonly modifier and optionality are shown in the signature. |
ids | property | ids: RuntimeIdHelper | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: RunLeaseAuthorization | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateId | property | stateId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeResourceRenewOptions
Runtime Resource Renew Options interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResourceRenewOptions } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeResourceRenewOptions {
ttlMs: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
ttlMs | property | ttlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeTransitionHelper
Runtime Transition Helper interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeTransitionHelper } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeTransitionHelper {
propose(to: string, reason?: string, variablesPatch?: Record<string, RuntimeJsonValue>): RuntimeTransitionProposal;
complete(output?: RuntimeJsonValue, variablesPatch?: Record<string, RuntimeJsonValue>): RuntimeStateExecutionResult;
continue(observation?: RuntimeJsonValue): RuntimeStateExecutionResult;
fail(error: NormalizedRuntimeError): RuntimeStateExecutionResult;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
complete | method | complete(output?: RuntimeJsonValue, variablesPatch?: Record<string, RuntimeJsonValue>): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
continue | method | continue(observation?: RuntimeJsonValue): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
fail | method | fail(error: NormalizedRuntimeError): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
propose | method | propose(to: string, reason?: string, variablesPatch?: Record<string, RuntimeJsonValue>): RuntimeTransitionProposal | Public method; parameters and return type are shown in the signature. |
RuntimeTransitionProposal
Runtime Transition Proposal interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeTransitionProposal } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeTransitionProposal {
to: string;
reason?: string;
variablesPatch?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
reason | property | reason?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
to | property | to: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
variablesPatch | property | variablesPatch?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeWaitHelper
Runtime Wait Helper interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeWaitHelper } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeWaitHelper {
human(request: HumanWaitRequest): RuntimeStateExecutionResult;
signal(request: SignalWaitRequest): RuntimeStateExecutionResult;
timer(request: TimerWaitRequest): RuntimeStateExecutionResult;
pause(request: PauseRequest): RuntimeStateExecutionResult;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
human | method | human(request: HumanWaitRequest): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
pause | method | pause(request: PauseRequest): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
signal | method | signal(request: SignalWaitRequest): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
timer | method | timer(request: TimerWaitRequest): RuntimeStateExecutionResult | Public method; parameters and return type are shown in the signature. |
RuntimeWaitIntent
Runtime Wait Intent interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeWaitIntent } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface RuntimeWaitIntent {
type: RuntimeWaitIntentType;
key?: string;
expectedSchema?: JsonSchema;
expiresAt?: string;
timeoutTransitionId?: string;
pendingActionRef?: string;
reason?: string;
metadata?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
expectedSchema | property | expectedSchema?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
key | property | key?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingActionRef | property | pendingActionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutTransitionId | property | timeoutTransitionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "human" | "signal" | "timer" | "pause" | Public property; its type, readonly modifier and optionality are shown in the signature. |
SignalWaitRequest
Signal Wait Request interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { SignalWaitRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface SignalWaitRequest {
key: string;
expectedSchema?: JsonSchema;
expiresAt?: string;
timeoutTransitionId?: string;
metadata?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
expectedSchema | property | expectedSchema?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
expiresAt | property | expiresAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
key | property | key: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutTransitionId | property | timeoutTransitionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
TimerWaitRequest
Timer Wait Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { TimerWaitRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export interface TimerWaitRequest {
fireAt: string;
timeoutTransitionId?: string;
metadata?: Record<string, RuntimeJsonValue>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fireAt | property | fireAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, RuntimeJsonValue> | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutTransitionId | property | timeoutTransitionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeDeterministicObservationKind
Public type alias for Runtime Deterministic Observation Kind; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeDeterministicObservationKind } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export type RuntimeDeterministicObservationKind = (typeof RUNTIME_DETERMINISTIC_OBSERVATION_KINDS)[number];RuntimeJsonValue
Public type alias for Runtime JSON Value; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeJsonValue } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export type RuntimeJsonValue = null | boolean | number | string | RuntimeJsonValue[] | {
[key: string]: RuntimeJsonValue;
};RuntimeStateExecutionResult
Public type alias for Runtime State Execution Result; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeStateExecutionResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export type RuntimeStateExecutionResult = {
kind: 'completed';
output?: RuntimeJsonValue;
variablesPatch?: Record<string, RuntimeJsonValue>;
} | {
kind: 'continued';
observation?: RuntimeJsonValue;
} | {
kind: 'failed';
error: NormalizedRuntimeError;
} | {
kind: 'waiting';
wait: RuntimeWaitIntent;
};RuntimeWaitIntentType
Public type alias for Runtime Wait Intent Type; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeWaitIntentType } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-helpers
Declaration
export type RuntimeWaitIntentType = (typeof RUNTIME_WAIT_INTENT_TYPES)[number];