@codesoul-co/hypha-core / contracts/execution-human-task
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/execution-human-task.ts - Exports: 10
Using this module
Use the Execution human task module for declaring and runtime-validating contracts. It exports 1 constant, 9 interfaces.
Import from the package entrypoint
import {
EXECUTION_HUMAN_TASK_SUBJECT_VERSION,
} from '@codesoul-co/hypha-core';
import type {
ExecutionHumanTaskActivityIdentity,
ExecutionHumanTaskCommandSnapshot,
ExecutionHumanTaskEnvironmentSnapshot,
ExecutionHumanTaskExpectedEffects,
ExecutionHumanTaskNetworkSnapshot,
ExecutionHumanTaskRiskSnapshot,
ExecutionHumanTaskSubject,
ExecutionHumanTaskSubjectEnvelope,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 9 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - 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 |
|---|---|---|---|
EXECUTION_HUMAN_TASK_SUBJECT_VERSION | constant | const EXECUTION_HUMAN_TASK_SUBJECT_VERSION: "1.0.0" | EXECUTION HUMAN TASK SUBJECT VERSION constant exported by the contracts/execution-human-task module. |
ExecutionHumanTaskActivityIdentity | interface | interface ExecutionHumanTaskActivityIdentity | Execution Human Task Activity Identity interface with 7 public fields or methods. |
ExecutionHumanTaskCommandSnapshot | interface | interface ExecutionHumanTaskCommandSnapshot | Execution Human Task Command Snapshot interface with 12 public fields or methods. |
ExecutionHumanTaskEnvironmentSnapshot | interface | interface ExecutionHumanTaskEnvironmentSnapshot | Execution Human Task Environment Snapshot interface with 11 public fields or methods. |
ExecutionHumanTaskExpectedEffects | interface | interface ExecutionHumanTaskExpectedEffects | Execution Human Task Expected Effects interface with 4 public fields or methods. |
ExecutionHumanTaskNetworkSnapshot | interface | interface ExecutionHumanTaskNetworkSnapshot | Execution Human Task Network Snapshot interface with 7 public fields or methods. |
ExecutionHumanTaskRiskSnapshot | interface | interface ExecutionHumanTaskRiskSnapshot | Execution Human Task Risk Snapshot interface with 5 public fields or methods. |
ExecutionHumanTaskSubject | interface | interface ExecutionHumanTaskSubject | Versioned, redacted subject approved by a Runtime HumanTask before command dispatch. Environment values, stdin, Secret values, and arbitrary request metadata are intentionally absent. |
ExecutionHumanTaskSubjectEnvelope | interface | interface ExecutionHumanTaskSubjectEnvelope | Execution Human Task Subject Envelope interface with 3 public fields or methods. |
ExecutionHumanTaskToolIdentity | interface | interface ExecutionHumanTaskToolIdentity | Execution Human Task Tool Identity interface with 6 public fields or methods. |
EXECUTION_HUMAN_TASK_SUBJECT_VERSION
EXECUTION HUMAN TASK SUBJECT VERSION constant exported by the contracts/execution-human-task module.
- Kind: constant
- Import:
import { EXECUTION_HUMAN_TASK_SUBJECT_VERSION } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export declare const EXECUTION_HUMAN_TASK_SUBJECT_VERSION: "1.0.0";ExecutionHumanTaskActivityIdentity
Execution Human Task Activity Identity interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskActivityIdentity } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskActivityIdentity {
activityId: string;
operationId: string;
runId: string;
stateAttemptId: string;
workspaceId: string;
fencingToken: number;
deadlineAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activityId | property | activityId: 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. |
fencingToken | property | fencingToken: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: 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. |
stateAttemptId | property | stateAttemptId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskCommandSnapshot
Execution Human Task Command Snapshot interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskCommandSnapshot } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskCommandSnapshot {
executable: string;
args: string[];
cwd?: string;
shell: boolean;
environmentVariableNames: string[];
secretRefs: string[];
networkAuthorizationRef?: string;
expectedWorkspaceSnapshotHash?: string;
timeoutMs?: number;
idleTimeoutMs?: number;
maxStdoutBytes?: number;
maxStderrBytes?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
args | property | args: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
cwd | property | cwd?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
environmentVariableNames | property | environmentVariableNames: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
executable | property | executable: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedWorkspaceSnapshotHash | property | expectedWorkspaceSnapshotHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idleTimeoutMs | property | idleTimeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxStderrBytes | property | maxStderrBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxStdoutBytes | property | maxStdoutBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
networkAuthorizationRef | property | networkAuthorizationRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
secretRefs | property | secretRefs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
shell | property | shell: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskEnvironmentSnapshot
Execution Human Task Environment Snapshot interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskEnvironmentSnapshot } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskEnvironmentSnapshot {
id: string;
version: string;
revision: string;
provider: 'mock' | 'local_process' | 'docker' | 'remote_sandbox' | 'custom';
providerRef?: string;
providerId: string;
providerRevision: string;
imageDigest?: string;
mounts: SandboxMountSpec[];
network: ExecutionHumanTaskNetworkSnapshot;
resources: ResourceLimitSpec;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
imageDigest | property | imageDigest?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
mounts | property | mounts: SandboxMountSpec[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
network | property | network: ExecutionHumanTaskNetworkSnapshot | Public property; its type, readonly modifier and optionality are shown in the signature. |
provider | property | provider: "mock" | "local_process" | "docker" | "remote_sandbox" | "custom" | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerId | property | providerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRef | property | providerRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRevision | property | providerRevision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resources | property | resources: ResourceLimitSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskExpectedEffects
Execution Human Task Expected Effects interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskExpectedEffects } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskExpectedEffects {
workspaceWrite: boolean;
networkAccess: boolean;
secretAccess: boolean;
artifactCapture: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactCapture | property | artifactCapture: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
networkAccess | property | networkAccess: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
secretAccess | property | secretAccess: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceWrite | property | workspaceWrite: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskNetworkSnapshot
Execution Human Task Network Snapshot interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskNetworkSnapshot } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskNetworkSnapshot {
mode: 'disabled' | 'restricted' | 'enabled' | 'task_authorized';
allowedDomains: string[];
allowedCidrs: string[];
allowedPorts: number[];
allowedProtocols: Array<'tcp' | 'udp' | 'http' | 'https' | 'dns'>;
proxyRef?: string;
authorizationRef?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowedCidrs | property | allowedCidrs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
allowedDomains | property | allowedDomains: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
allowedPorts | property | allowedPorts: number[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
allowedProtocols | property | allowedProtocols: ("tcp" | "udp" | "http" | "https" | "dns")[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
authorizationRef | property | authorizationRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "disabled" | "restricted" | "enabled" | "task_authorized" | Public property; its type, readonly modifier and optionality are shown in the signature. |
proxyRef | property | proxyRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskRiskSnapshot
Execution Human Task Risk Snapshot interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskRiskSnapshot } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskRiskSnapshot {
assessmentId: string;
level: RiskLevel;
reasons: string[];
matchedRules: string[];
policyDecisionRef: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
assessmentId | property | assessmentId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
level | property | level: RiskLevel | Public property; its type, readonly modifier and optionality are shown in the signature. |
matchedRules | property | matchedRules: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
policyDecisionRef | property | policyDecisionRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reasons | property | reasons: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskSubject
Versioned, redacted subject approved by a Runtime HumanTask before command dispatch. Environment values, stdin, Secret values, and arbitrary request metadata are intentionally absent.
- Kind: interface
- Import:
import type { ExecutionHumanTaskSubject } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskSubject {
id: string;
version: typeof EXECUTION_HUMAN_TASK_SUBJECT_VERSION;
kind: 'execution';
capturedAt: string;
principalId: string;
inputHash: string;
activity: ExecutionHumanTaskActivityIdentity;
tool: ExecutionHumanTaskToolIdentity;
command: ExecutionHumanTaskCommandSnapshot;
environment: ExecutionHumanTaskEnvironmentSnapshot;
risk: ExecutionHumanTaskRiskSnapshot;
expectedEffects: ExecutionHumanTaskExpectedEffects;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
activity | property | activity: ExecutionHumanTaskActivityIdentity | Public property; its type, readonly modifier and optionality are shown in the signature. |
capturedAt | property | capturedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
command | property | command: ExecutionHumanTaskCommandSnapshot | Public property; its type, readonly modifier and optionality are shown in the signature. |
environment | property | environment: ExecutionHumanTaskEnvironmentSnapshot | Public property; its type, readonly modifier and optionality are shown in the signature. |
expectedEffects | property | expectedEffects: ExecutionHumanTaskExpectedEffects | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
inputHash | property | inputHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
kind | property | kind: "execution" | 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. |
risk | property | risk: ExecutionHumanTaskRiskSnapshot | Public property; its type, readonly modifier and optionality are shown in the signature. |
tool | property | tool: ExecutionHumanTaskToolIdentity | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: "1.0.0" | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskSubjectEnvelope
Execution Human Task Subject Envelope interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskSubjectEnvelope } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskSubjectEnvelope {
subjectRef: string;
subjectHash: string;
subject: ExecutionHumanTaskSubject;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
subject | property | subject: ExecutionHumanTaskSubject | Public property; its type, readonly modifier and optionality are shown in the signature. |
subjectHash | property | subjectHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
subjectRef | property | subjectRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionHumanTaskToolIdentity
Execution Human Task Tool Identity interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionHumanTaskToolIdentity } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-human-task
Declaration
export interface ExecutionHumanTaskToolIdentity {
toolId: string;
toolRevision?: string;
operation: ExecutionToolOperation;
executionProfileRef: string;
sideEffectLevel: ExecutionToolSideEffectLevel;
humanReviewPolicyRef: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
executionProfileRef | property | executionProfileRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
humanReviewPolicyRef | property | humanReviewPolicyRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
operation | property | operation: "artifact" | "command" | "file_read" | "file_write" | "sandbox" | Public property; its type, readonly modifier and optionality are shown in the signature. |
sideEffectLevel | property | sideEffectLevel: ExecutionToolSideEffectLevel | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolId | property | toolId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolRevision | property | toolRevision?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
