@codesoul-co/hypha-harness / manual-fsm-transition
- Package index:
@codesoul-co/hypha-harness - Source:
packages/harness/src/manual-fsm-transition.ts - Exports: 6
Using this module
Use the Manual FSM transition module for using the public contracts and operations for this capability boundary. It exports 1 class, 1 constant, 4 interfaces.
Import from the package entrypoint
ts
import {
GovernedFSMTransitionService,
MANUAL_FSM_TRANSITION_PERMISSION,
} from '@codesoul-co/hypha-harness';
import type {
GovernedFSMTransitionServiceOptions,
ManualFSMRunView,
ManualFSMTransitionCommand,
ManualFSMTransitionResult,
} from '@codesoul-co/hypha-harness';Usage patterns
- Use the 4 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.
- The 1 constant/enum export provides stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
GovernedFSMTransitionService | class | new GovernedFSMTransitionService(options: GovernedFSMTransitionServiceOptions): GovernedFSMTransitionService | Applies an explicitly requested FSM edge under owner scope, permission, optimistic revision, Run Lease, fencing, Policy, guard, trace, and replay. It never mutates a snapshot or projection directly. |
MANUAL_FSM_TRANSITION_PERMISSION | constant | const MANUAL_FSM_TRANSITION_PERMISSION: "runtime.fsm.transition" | MANUAL FSM TRANSITION PERMISSION constant exported by the manual-fsm-transition module. |
GovernedFSMTransitionServiceOptions | interface | interface GovernedFSMTransitionServiceOptions | Governed FSM Transition Service Options interface with 7 public fields or methods. |
ManualFSMRunView | interface | interface ManualFSMRunView | Manual FSM Run View interface with 10 public fields or methods. |
ManualFSMTransitionCommand | interface | interface ManualFSMTransitionCommand | Manual FSM Transition Command interface with 15 public fields or methods. |
ManualFSMTransitionResult | interface | interface ManualFSMTransitionResult | Manual FSM Transition Result interface with 5 public fields or methods. |
GovernedFSMTransitionService
Applies an explicitly requested FSM edge under owner scope, permission, optimistic revision, Run Lease, fencing, Policy, guard, trace, and replay. It never mutates a snapshot or projection directly.
- Kind: class
- Import:
import { GovernedFSMTransitionService } from '@codesoul-co/hypha-harness'; - Source module:
manual-fsm-transition
Declaration
text
export declare class GovernedFSMTransitionService {
constructor(options: GovernedFSMTransitionServiceOptions);
inspect(scope: RuntimeScope, process: FSMProcessSpec): Promise<ManualFSMRunView>;
transition(process: FSMProcessSpec, input: ManualFSMTransitionCommand): Promise<ManualFSMTransitionResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: GovernedFSMTransitionServiceOptions): GovernedFSMTransitionService | Creates an instance of this class. |
inspect | method | inspect(scope: RuntimeScope, process: FSMProcessSpec): Promise<ManualFSMRunView> | Public method; parameters and return type are shown in the signature. |
transition | method | transition(process: FSMProcessSpec, input: ManualFSMTransitionCommand): Promise<ManualFSMTransitionResult> | Public method; parameters and return type are shown in the signature. |
MANUAL_FSM_TRANSITION_PERMISSION
MANUAL FSM TRANSITION PERMISSION constant exported by the manual-fsm-transition module.
- Kind: constant
- Import:
import { MANUAL_FSM_TRANSITION_PERMISSION } from '@codesoul-co/hypha-harness'; - Source module:
manual-fsm-transition
Declaration
text
export declare const MANUAL_FSM_TRANSITION_PERMISSION: "runtime.fsm.transition";GovernedFSMTransitionServiceOptions
Governed FSM Transition Service Options interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { GovernedFSMTransitionServiceOptions } from '@codesoul-co/hypha-harness'; - Source module:
manual-fsm-transition
Declaration
text
export interface GovernedFSMTransitionServiceOptions {
events: EventRuntime;
projections: ProjectionEngine;
projectionStore: ProjectionStore<RuntimeOrchestrationProjection>;
runLeases: RunLeaseStore;
policy?: PolicyEngine;
now?: () => string;
nextId?: (namespace: string) => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
events | property | events: EventRuntime | Public property; its type, readonly modifier and optionality 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. |
policy | property | policy?: PolicyEngine | Public property; its type, readonly modifier and optionality 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. |
ManualFSMRunView
Manual FSM Run View interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { ManualFSMRunView } from '@codesoul-co/hypha-harness'; - Source module:
manual-fsm-transition
Declaration
text
export interface ManualFSMRunView {
runId: string;
processId: string;
processVersion: string;
runRevision: number;
runStatus: RuntimeOrchestrationProjection['runStatus'];
currentState?: string;
statePath: string[];
stateAttempt: number;
terminalStates: string[];
allowedTransitions: Array<{
to: string;
guard?: string;
description?: string;
}>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowedTransitions | property | allowedTransitions: { to: string; guard?: string; description?: string; }[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
currentState | property | currentState?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
processId | property | processId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
processVersion | property | processVersion: 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. |
runRevision | property | runRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
runStatus | property | runStatus: import("/Users/erwin/Downloads/codespace/Hypha/packages/core/dist/index").RuntimeOrchestrationRunStatus | 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. |
statePath | property | statePath: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
terminalStates | property | terminalStates: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ManualFSMTransitionCommand
Manual FSM Transition Command interface with 15 public fields or methods.
- Kind: interface
- Import:
import type { ManualFSMTransitionCommand } from '@codesoul-co/hypha-harness'; - Source module:
manual-fsm-transition
Declaration
text
export interface ManualFSMTransitionCommand {
commandId: string;
scope: RuntimeScope;
principal: RuntimePrincipal;
ownerId: string;
leaseTtlMs: number;
processId: string;
processVersion: string;
expectedState: string;
expectedRunRevision: number;
targetState: string;
reason: string;
requestedAt: string;
guardContext?: FSMGuardContext;
variablesPatch?: Record<string, RuntimeJsonValue>;
idempotencyKey: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedRunRevision | property | expectedRunRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedState | property | expectedState: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
guardContext | property | guardContext?: FSMGuardContext | 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. |
leaseTtlMs | property | leaseTtlMs: 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. |
principal | property | principal: RuntimePrincipal | Public property; its type, readonly modifier and optionality are shown in the signature. |
processId | property | processId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
processVersion | property | processVersion: 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. |
requestedAt | property | requestedAt: string | 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. |
targetState | property | targetState: 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. |
ManualFSMTransitionResult
Manual FSM Transition Result interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { ManualFSMTransitionResult } from '@codesoul-co/hypha-harness'; - Source module:
manual-fsm-transition
Declaration
text
export interface ManualFSMTransitionResult {
commandId: string;
disposition: 'applied' | 'reused' | 'lease_unavailable';
eventIds: string[];
runRevision: number;
view: ManualFSMRunView;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
disposition | property | disposition: "applied" | "reused" | "lease_unavailable" | Public property; its type, readonly modifier and optionality are shown in the signature. |
eventIds | property | eventIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
runRevision | property | runRevision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
view | property | view: ManualFSMRunView | Public property; its type, readonly modifier and optionality are shown in the signature. |
