@codesoul-co/hypha-core / modules/runtime/runtime-human-task
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/modules/runtime/runtime-human-task.ts - Exports: 5
Using this module
Use the Runtime human task module for executing runtime behavior at this boundary. It exports 5 functions.
Import from the package entrypoint
ts
import {
assertRuntimeHumanTaskDecision,
assertRuntimeHumanTaskResume,
projectRuntimeHumanTasks,
runtimeHumanTaskKind,
runtimeHumanTaskResolutionEventId,
} from '@codesoul-co/hypha-core';Usage patterns
- The module exposes 5 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
assertRuntimeHumanTaskDecision | function | assertRuntimeHumanTaskDecision<TTask extends RuntimeHumanTask>(task: TTask | undefined, command: Pick<RuntimeHumanTaskDecisionCommand, "expectedRevision" | "expectedSubjectHash" | "principal" | "decidedAt" | "decision">): TTask | Assert Runtime Human Task Decision function with 1 public call signature; parameters and return types are listed below. |
assertRuntimeHumanTaskResume | function | assertRuntimeHumanTaskResume<TTask extends RuntimeHumanTask>(task: TTask | undefined, expected: { taskId: string; kind: RuntimeHumanTaskKind; subjectRef: string; subjectHash: string; revision: number; requestedBy: string; resumedAt: string; checkpointRef?: string; policyRef?: string; providerRevision?: string; activityDescriptorRef?: string; activityDescriptorHash?: string; }): TTask | Assert Runtime Human Task Resume function with 1 public call signature; parameters and return types are listed below. |
projectRuntimeHumanTasks | function | projectRuntimeHumanTasks(events: readonly FrameworkEvent[]): RuntimeHumanTask[] | Project Runtime Human Tasks function with 1 public call signature; parameters and return types are listed below. |
runtimeHumanTaskKind | function | runtimeHumanTaskKind(value: string): RuntimeHumanTaskKind | undefined | Runtime Human Task Kind function with 1 public call signature; parameters and return types are listed below. |
runtimeHumanTaskResolutionEventId | function | runtimeHumanTaskResolutionEventId(input: { runId: string; taskId: string; expectedRevision: number; }): string | Runtime Human Task Resolution Event ID function with 1 public call signature; parameters and return types are listed below. |
assertRuntimeHumanTaskDecision
Assert Runtime Human Task Decision function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertRuntimeHumanTaskDecision } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-task
Declaration
text
export declare function assertRuntimeHumanTaskDecision<TTask extends RuntimeHumanTask>(task: TTask | undefined, command: Pick<RuntimeHumanTaskDecisionCommand, 'expectedRevision' | 'expectedSubjectHash' | 'principal' | 'decidedAt' | 'decision'>): TTask;Call signature
text
assertRuntimeHumanTaskDecision<TTask extends RuntimeHumanTask>(task: TTask | undefined, command: Pick<RuntimeHumanTaskDecisionCommand, "expectedRevision" | "expectedSubjectHash" | "principal" | "decidedAt" | "decision">): TTaskParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task | TTask | Yes | Required parameter; accepted values are defined by the type column. |
command | Pick<RuntimeHumanTaskDecisionCommand, "principal" | "decidedAt" | "expectedRevision" | "expectedSubjectHash" | "decision"> | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
TTask - Description: The return contract is defined by the type shown above.
assertRuntimeHumanTaskResume
Assert Runtime Human Task Resume function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { assertRuntimeHumanTaskResume } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-task
Declaration
text
export declare function assertRuntimeHumanTaskResume<TTask extends RuntimeHumanTask>(task: TTask | undefined, expected: {
taskId: string;
kind: RuntimeHumanTaskKind;
subjectRef: string;
subjectHash: string;
revision: number;
requestedBy: string;
resumedAt: string;
checkpointRef?: string;
policyRef?: string;
providerRevision?: string;
activityDescriptorRef?: string;
activityDescriptorHash?: string;
}): TTask;Call signature
text
assertRuntimeHumanTaskResume<TTask extends RuntimeHumanTask>(task: TTask | undefined, expected: { taskId: string; kind: RuntimeHumanTaskKind; subjectRef: string; subjectHash: string; revision: number; requestedBy: string; resumedAt: string; checkpointRef?: string; policyRef?: string; providerRevision?: string; activityDescriptorRef?: string; activityDescriptorHash?: string; }): TTaskParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task | TTask | Yes | Required parameter; accepted values are defined by the type column. |
expected | { taskId: string; kind: RuntimeHumanTaskKind; subjectRef: string; subjectHash: string; revision: number; requestedBy: string; resumedAt: string; checkpointRef?: string; policyRef?: string; providerRevision?: string; activityDescriptorRef?: string; activityDescriptorHash?: string; } | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
TTask - Description: The return contract is defined by the type shown above.
projectRuntimeHumanTasks
Project Runtime Human Tasks function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { projectRuntimeHumanTasks } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-task
Declaration
text
export declare function projectRuntimeHumanTasks(events: readonly FrameworkEvent[]): RuntimeHumanTask[];Call signature
text
projectRuntimeHumanTasks(events: readonly FrameworkEvent[]): RuntimeHumanTask[]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
events | readonly FrameworkEvent<unknown>[] | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeHumanTask[] - Description: The return contract is defined by the type shown above.
runtimeHumanTaskKind
Runtime Human Task Kind function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { runtimeHumanTaskKind } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-task
Declaration
text
export declare function runtimeHumanTaskKind(value: string): RuntimeHumanTaskKind | undefined;Call signature
text
runtimeHumanTaskKind(value: string): RuntimeHumanTaskKind | undefinedParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
"memory" | "skill" | "mcp" | "policy" | "tool" | "execution" | "prompt" - Description: The return contract is defined by the type shown above.
runtimeHumanTaskResolutionEventId
Runtime Human Task Resolution Event ID function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { runtimeHumanTaskResolutionEventId } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/runtime-human-task
Declaration
text
export declare function runtimeHumanTaskResolutionEventId(input: {
runId: string;
taskId: string;
expectedRevision: number;
}): string;Call signature
text
runtimeHumanTaskResolutionEventId(input: { runId: string; taskId: string; expectedRevision: number; }): stringParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | { runId: string; taskId: string; expectedRevision: number; } | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
string - Description: The return contract is defined by the type shown above.
