@codesoul-co/hypha-harness / bounded-fsm-driver
- Package index:
@codesoul-co/hypha-harness - Source:
packages/harness/src/bounded-fsm-driver.ts - Exports: 7
Using this module
Use the Bounded FSM driver module for using the public contracts and operations for this capability boundary. It exports 1 class, 5 interfaces, 1 type.
Import from the package entrypoint
ts
import {
FencedBoundedFSMDriver,
} from '@codesoul-co/hypha-harness';
import type {
BoundedFSMDriverResult,
BoundedFSMDriverRunInput,
BoundedStateExecutionDecision,
BoundedStateExecutorInput,
FencedBoundedFSMDriverOptions,
BoundedFSMDriverDisposition,
} from '@codesoul-co/hypha-harness';Usage patterns
- Use the 6 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 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
FencedBoundedFSMDriver | class | new FencedBoundedFSMDriver(options: FencedBoundedFSMDriverOptions): FencedBoundedFSMDriver | Fenced Bounded FSM Driver class with 2 public constructor or member entries; its exact declarations are listed below. |
BoundedFSMDriverResult | interface | interface BoundedFSMDriverResult | Bounded FSM Driver Result interface with 4 public fields or methods. |
BoundedFSMDriverRunInput | interface | interface BoundedFSMDriverRunInput | Bounded FSM Driver Run Input interface with 9 public fields or methods. |
BoundedStateExecutionDecision | interface | interface BoundedStateExecutionDecision | Bounded State Execution Decision interface with 3 public fields or methods. |
BoundedStateExecutorInput | interface | interface BoundedStateExecutorInput | Bounded State Executor Input interface with 7 public fields or methods. |
FencedBoundedFSMDriverOptions | interface | interface FencedBoundedFSMDriverOptions | Fenced Bounded FSM Driver Options interface with 9 public fields or methods. |
BoundedFSMDriverDisposition | type | type BoundedFSMDriverDisposition = 'completed' | 'failed' | 'cancelled' | 'waiting' | 'budget_exhausted' | 'lease_unavailable' | 'state_claim_unavailable' | Public type alias for Bounded FSM Driver Disposition; the declaration contains its complete type expression. |
FencedBoundedFSMDriver
Fenced Bounded FSM Driver class with 2 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { FencedBoundedFSMDriver } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export declare class FencedBoundedFSMDriver {
constructor(options: FencedBoundedFSMDriverOptions);
run(input: BoundedFSMDriverRunInput): Promise<BoundedFSMDriverResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: FencedBoundedFSMDriverOptions): FencedBoundedFSMDriver | Creates an instance of this class. |
run | method | run(input: BoundedFSMDriverRunInput): Promise<BoundedFSMDriverResult> | Public method; parameters and return type are shown in the signature. |
BoundedFSMDriverResult
Bounded FSM Driver Result interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { BoundedFSMDriverResult } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export interface BoundedFSMDriverResult {
disposition: BoundedFSMDriverDisposition;
steps: number;
projection: RuntimeOrchestrationProjection;
wait?: RuntimeWaitIntent;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
disposition | property | disposition: BoundedFSMDriverDisposition | Public property; its type, readonly modifier and optionality are shown in the signature. |
projection | property | projection: RuntimeOrchestrationProjection | Public property; its type, readonly modifier and optionality are shown in the signature. |
steps | property | steps: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
wait | property | wait?: RuntimeWaitIntent | Public property; its type, readonly modifier and optionality are shown in the signature. |
BoundedFSMDriverRunInput
Bounded FSM Driver Run Input interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { BoundedFSMDriverRunInput } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export interface BoundedFSMDriverRunInput {
scope: RuntimeScope;
process: FSMProcessSpec;
ownerId: string;
commandId?: string;
maxSteps: number;
leaseTtlMs: number;
stateClaimTtlMs: number;
deadlineAt?: string;
abortSignal?: AbortSignal;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
abortSignal | property | abortSignal?: AbortSignal | 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. |
deadlineAt | property | deadlineAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
leaseTtlMs | property | leaseTtlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxSteps | property | maxSteps: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
process | property | process: FSMProcessSpec | 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. |
stateClaimTtlMs | property | stateClaimTtlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
BoundedStateExecutionDecision
Bounded State Execution Decision interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { BoundedStateExecutionDecision } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export interface BoundedStateExecutionDecision {
result: RuntimeStateExecutionResult;
transition?: RuntimeTransitionProposal;
guardContext?: FSMGuardContext;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
guardContext | property | guardContext?: FSMGuardContext | Public property; its type, readonly modifier and optionality are shown in the signature. |
result | property | result: RuntimeStateExecutionResult | Public property; its type, readonly modifier and optionality are shown in the signature. |
transition | property | transition?: RuntimeTransitionProposal | Public property; its type, readonly modifier and optionality are shown in the signature. |
BoundedStateExecutorInput
Bounded State Executor Input interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { BoundedStateExecutorInput } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export interface BoundedStateExecutorInput {
scope: Readonly<RuntimeScope>;
process: Readonly<FSMProcessSpec>;
state: Readonly<FSMStateSpec>;
projection: Readonly<RuntimeOrchestrationProjection>;
runLease: Readonly<FencedRunLease>;
stateClaim: Readonly<StateExecutionClaim>;
abortSignal: AbortSignal;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
abortSignal | property | abortSignal: AbortSignal | Public property; its type, readonly modifier and optionality are shown in the signature. |
process | property | process: Readonly<FSMProcessSpec> | Public property; its type, readonly modifier and optionality are shown in the signature. |
projection | property | projection: Readonly<RuntimeOrchestrationProjection> | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLease | property | runLease: Readonly<FencedRunLease> | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: Readonly<RuntimeScope> | Public property; its type, readonly modifier and optionality are shown in the signature. |
state | property | state: Readonly<FSMStateSpec> | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateClaim | property | stateClaim: Readonly<StateExecutionClaim> | Public property; its type, readonly modifier and optionality are shown in the signature. |
FencedBoundedFSMDriverOptions
Fenced Bounded FSM Driver Options interface with 9 public fields or methods.
- Kind: interface
- Import:
import type { FencedBoundedFSMDriverOptions } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export interface FencedBoundedFSMDriverOptions {
events: EventRuntime;
projections: ProjectionEngine;
projectionStore: ProjectionStore<RuntimeOrchestrationProjection>;
runLeases: RunLeaseStore;
stateClaims: StateExecutionClaimStore;
executeState(input: BoundedStateExecutorInput): Promise<BoundedStateExecutionDecision>;
evaluateGuard?: (transition: Readonly<FSMTransitionSpec>, context: Readonly<FSMGuardContext>) => Promise<boolean> | boolean;
now?: () => string;
nextId?: (namespace: string) => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
evaluateGuard | method | evaluateGuard?(transition: Readonly<FSMTransitionSpec>, context: Readonly<FSMGuardContext>): Promise<boolean> | boolean | Public method; parameters and return type are shown in the signature. |
events | property | events: EventRuntime | Public property; its type, readonly modifier and optionality are shown in the signature. |
executeState | method | executeState(input: BoundedStateExecutorInput): Promise<BoundedStateExecutionDecision> | Public method; parameters and return type are shown in the signature. |
nextId | method | nextId?(namespace: string): string | Public method; parameters and return type are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
projections | property | projections: ProjectionEngine | Public property; its type, readonly modifier and optionality are shown in the signature. |
projectionStore | property | projectionStore: ProjectionStore<RuntimeOrchestrationProjection> | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLeases | property | runLeases: RunLeaseStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateClaims | property | stateClaims: StateExecutionClaimStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
BoundedFSMDriverDisposition
Public type alias for Bounded FSM Driver Disposition; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { BoundedFSMDriverDisposition } from '@codesoul-co/hypha-harness'; - Source module:
bounded-fsm-driver
Declaration
text
export type BoundedFSMDriverDisposition = 'completed' | 'failed' | 'cancelled' | 'waiting' | 'budget_exhausted' | 'lease_unavailable' | 'state_claim_unavailable';