@codesoul-co/hypha-core / contracts/runtime-projection
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-projection.ts - Exports: 6
Using this module
Use the Runtime projection module for declaring and runtime-validating contracts. It exports 5 interfaces, 1 type.
Import from the package entrypoint
ts
import type {
RuntimeCancellationProjection,
RuntimeOrchestrationProjection,
RuntimePendingTransitionProjection,
RuntimePendingWaitProjection,
RuntimeResumeProjection,
RuntimeOrchestrationRunStatus,
} from '@codesoul-co/hypha-core';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.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
RuntimeCancellationProjection | interface | interface RuntimeCancellationProjection | Runtime Cancellation Projection interface with 4 public fields or methods. |
RuntimeOrchestrationProjection | interface | interface RuntimeOrchestrationProjection | Runtime Orchestration Projection interface with 13 public fields or methods. |
RuntimePendingTransitionProjection | interface | interface RuntimePendingTransitionProjection | Runtime Pending Transition Projection interface with 3 public fields or methods. |
RuntimePendingWaitProjection | interface | interface RuntimePendingWaitProjection | Runtime Pending Wait Projection interface with 10 public fields or methods. |
RuntimeResumeProjection | interface | interface RuntimeResumeProjection | Runtime Resume Projection interface with 7 public fields or methods. |
RuntimeOrchestrationRunStatus | type | type RuntimeOrchestrationRunStatus = 'not_created' | RuntimeRunStatus | Public type alias for Runtime Orchestration Run Status; the declaration contains its complete type expression. |
RuntimeCancellationProjection
Runtime Cancellation Projection interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeCancellationProjection } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-projection
Declaration
text
export interface RuntimeCancellationProjection {
commandId: string;
principalId: string;
reason: string;
requestedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
commandId | property | commandId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
principalId | property | principalId: 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. |
RuntimeOrchestrationProjection
Runtime Orchestration Projection interface with 13 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeOrchestrationProjection } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-projection
Declaration
text
export interface RuntimeOrchestrationProjection {
runId: string;
runStatus: RuntimeOrchestrationRunStatus;
currentState?: string;
terminalState?: string;
statePath: string[];
stateVisitCounts: Record<string, number>;
stateAttempt: number;
pendingTransition?: RuntimePendingTransitionProjection;
pendingHumanActionRef?: string;
pendingWait?: RuntimePendingWaitProjection;
lastResume?: RuntimeResumeProjection;
cancellation?: RuntimeCancellationProjection;
pendingActivityIds: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
cancellation | property | cancellation?: RuntimeCancellationProjection | 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. |
lastResume | property | lastResume?: RuntimeResumeProjection | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingActivityIds | property | pendingActivityIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingHumanActionRef | property | pendingHumanActionRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingTransition | property | pendingTransition?: RuntimePendingTransitionProjection | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingWait | property | pendingWait?: RuntimePendingWaitProjection | 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. |
runStatus | property | runStatus: 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. |
stateVisitCounts | property | stateVisitCounts: Record<string, number> | Public property; its type, readonly modifier and optionality are shown in the signature. |
terminalState | property | terminalState?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimePendingTransitionProjection
Runtime Pending Transition Projection interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RuntimePendingTransitionProjection } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-projection
Declaration
text
export interface RuntimePendingTransitionProjection {
eventId: string;
from: string;
to: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
eventId | property | eventId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
from | property | from: 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. |
RuntimePendingWaitProjection
Runtime Pending Wait Projection interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { RuntimePendingWaitProjection } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-projection
Declaration
text
export interface RuntimePendingWaitProjection {
waitId: string;
stateId: string;
stateAttempt: number;
type: RuntimeWaitIntentType;
key?: string;
pendingActionRef?: string;
reason?: string;
expectedSchema?: JsonSchema;
expiresAt?: string;
createdAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createdAt | property | createdAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
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. |
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. |
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. |
type | property | type: "human" | "signal" | "timer" | "pause" | Public property; its type, readonly modifier and optionality are shown in the signature. |
waitId | property | waitId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeResumeProjection
Runtime Resume Projection interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeResumeProjection } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-projection
Declaration
text
export interface RuntimeResumeProjection {
commandId: string;
kind: 'manual' | 'signal' | 'timer';
waitId: string;
principalId: string;
key?: string;
payload?: RuntimeJsonValue;
resumedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
commandId | property | commandId: 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. |
kind | property | kind: "manual" | "signal" | "timer" | Public property; its type, readonly modifier and optionality are shown in the signature. |
payload | property | payload?: RuntimeJsonValue | Public property; its type, readonly modifier and optionality are shown in the signature. |
principalId | property | principalId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resumedAt | property | resumedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
waitId | property | waitId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeOrchestrationRunStatus
Public type alias for Runtime Orchestration Run Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { RuntimeOrchestrationRunStatus } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-projection
Declaration
text
export type RuntimeOrchestrationRunStatus = 'not_created' | RuntimeRunStatus;