@codesoul-co/hypha-core / modules/runtime/runtime-human-wait-service
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/modules/runtime/runtime-human-wait-service.ts - Exports: 6
Using this module
Use the Runtime human wait service module for executing runtime behavior at this boundary. It exports 1 class, 5 interfaces.
Import from the package entrypoint
ts
import {
RuntimeHumanWaitService,
} from '@codesoul-co/hypha-core';
import type {
RuntimeHumanWaitCreateCommand,
RuntimeHumanWaitResolveCommand,
RuntimeHumanWaitResult,
RuntimeHumanWaitServiceOptions,
RuntimeHumanWaitSupersedeCommand,
} from '@codesoul-co/hypha-core';Usage patterns
- Use the 5 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 |
|---|---|---|---|
RuntimeHumanWaitService | class | new RuntimeHumanWaitService(options: RuntimeHumanWaitServiceOptions): RuntimeHumanWaitService | Runtime Human Wait Service class with 4 public constructor or member entries; its exact declarations are listed below. |
RuntimeHumanWaitCreateCommand | interface | interface RuntimeHumanWaitCreateCommand | Runtime Human Wait Create Command interface with 10 public fields or methods. |
RuntimeHumanWaitResolveCommand | interface | interface RuntimeHumanWaitResolveCommand | Runtime Human Wait Resolve Command interface with 11 public fields or methods. |
RuntimeHumanWaitResult | interface | interface RuntimeHumanWaitResult | Runtime Human Wait Result interface with 5 public fields or methods. |
RuntimeHumanWaitServiceOptions | interface | interface RuntimeHumanWaitServiceOptions | Runtime Human Wait Service Options interface with 6 public fields or methods. |
RuntimeHumanWaitSupersedeCommand | interface | interface RuntimeHumanWaitSupersedeCommand | Runtime Human Wait Supersede Command interface with 11 public fields or methods. |
RuntimeHumanWaitService
Runtime Human Wait Service class with 4 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { RuntimeHumanWaitService } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-wait-service
Declaration
text
export declare class RuntimeHumanWaitService {
constructor(options: RuntimeHumanWaitServiceOptions);
create(input: RuntimeHumanWaitCreateCommand): Promise<RuntimeHumanWaitResult>;
resolve(input: RuntimeHumanWaitResolveCommand): Promise<RuntimeHumanWaitResult>;
supersede(input: RuntimeHumanWaitSupersedeCommand): Promise<RuntimeHumanWaitResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: RuntimeHumanWaitServiceOptions): RuntimeHumanWaitService | Creates an instance of this class. |
create | method | create(input: RuntimeHumanWaitCreateCommand): Promise<RuntimeHumanWaitResult> | Public method; parameters and return type are shown in the signature. |
resolve | method | resolve(input: RuntimeHumanWaitResolveCommand): Promise<RuntimeHumanWaitResult> | Public method; parameters and return type are shown in the signature. |
supersede | method | supersede(input: RuntimeHumanWaitSupersedeCommand): Promise<RuntimeHumanWaitResult> | Public method; parameters and return type are shown in the signature. |
RuntimeHumanWaitCreateCommand
Runtime Human Wait Create Command interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHumanWaitCreateCommand } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-wait-service
Declaration
text
export interface RuntimeHumanWaitCreateCommand {
commandId: string;
scope: RuntimeScope;
ownerId: string;
leaseTtlMs: number;
waitId: string;
pendingActionRef: string;
reason: string;
requestedAt: string;
humanTasks?: RuntimeHumanTaskRequest[];
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. |
humanTasks | property | humanTasks?: RuntimeHumanTaskRequest[] | 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. |
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. |
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. |
waitId | property | waitId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeHumanWaitResolveCommand
Runtime Human Wait Resolve Command interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHumanWaitResolveCommand } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-wait-service
Declaration
text
export interface RuntimeHumanWaitResolveCommand {
commandId: string;
scope: RuntimeScope;
ownerId: string;
leaseTtlMs: number;
waitId?: string;
pendingActionRef: string;
principalId: string;
decision: 'approved' | 'rejected' | 'expired' | 'cancelled';
resolvedAt: string;
humanTaskDecision?: RuntimeHumanTaskDecisionCommand;
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. |
decision | property | decision: "rejected" | "cancelled" | "expired" | "approved" | Public property; its type, readonly modifier and optionality are shown in the signature. |
humanTaskDecision | property | humanTaskDecision?: RuntimeHumanTaskDecisionCommand | 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. |
pendingActionRef | property | pendingActionRef: 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. |
resolvedAt | property | resolvedAt: 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. |
waitId | property | waitId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeHumanWaitResult
Runtime Human Wait Result interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHumanWaitResult } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-wait-service
Declaration
text
export interface RuntimeHumanWaitResult {
commandId: string;
disposition: 'applied' | 'reused' | 'lease_unavailable';
eventIds: string[];
runRevision: number;
projection: RuntimeOrchestrationProjection;
}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. |
projection | property | projection: RuntimeOrchestrationProjection | 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. |
RuntimeHumanWaitServiceOptions
Runtime Human Wait Service Options interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHumanWaitServiceOptions } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-wait-service
Declaration
text
export interface RuntimeHumanWaitServiceOptions {
events: EventRuntime;
projections: ProjectionEngine;
projectionStore: ProjectionStore<RuntimeOrchestrationProjection>;
runLeases: RunLeaseStore;
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. |
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. |
RuntimeHumanWaitSupersedeCommand
Runtime Human Wait Supersede Command interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeHumanWaitSupersedeCommand } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-wait-service
Declaration
text
export interface RuntimeHumanWaitSupersedeCommand {
commandId: string;
scope: RuntimeScope;
ownerId: string;
leaseTtlMs: number;
waitId?: string;
pendingActionRef: string;
principalId: string;
supersededAt: string;
humanTaskDecision: RuntimeHumanTaskDecisionCommand;
replacementTask: RuntimeHumanTaskRequest;
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. |
humanTaskDecision | property | humanTaskDecision: RuntimeHumanTaskDecisionCommand | 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. |
pendingActionRef | property | pendingActionRef: 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. |
replacementTask | property | replacementTask: RuntimeHumanTaskRequest | 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. |
supersededAt | property | supersededAt: 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. |
