@codesoul-co/hypha-core / contracts/execution-output
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/execution-output.ts - Exports: 11
Using this module
Use the Execution output module for declaring and runtime-validating contracts. It exports 9 interfaces, 2 types.
Import from the package entrypoint
import type {
CollectedExecutionOutput,
ExecutionOutputArtifactManager,
ExecutionOutputCollectionContext,
ExecutionOutputCollectionItem,
ExecutionOutputCollectionPlan,
ExecutionOutputCollectionPolicy,
ExecutionOutputCollectionResult,
ExecutionOutputCollector,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 11 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 |
|---|---|---|---|
CollectedExecutionOutput | interface | interface CollectedExecutionOutput | Collected Execution Output interface with 6 public fields or methods. |
ExecutionOutputArtifactManager | interface | interface ExecutionOutputArtifactManager | Minimal Artifact Manager port required by output collection. |
ExecutionOutputCollectionContext | interface | interface ExecutionOutputCollectionContext | Identity and Artifact policy context supplied by the Execution composition root. |
ExecutionOutputCollectionItem | interface | interface ExecutionOutputCollectionItem | A bounded, content-addressed file that may be handed to Artifact collection. |
ExecutionOutputCollectionPlan | interface | interface ExecutionOutputCollectionPlan | Deterministic output of policy evaluation; creating Artifact records is a later side effect. |
ExecutionOutputCollectionPolicy | interface | interface ExecutionOutputCollectionPolicy | Framework-level rules for collecting files produced by an Execution. |
ExecutionOutputCollectionResult | interface | interface ExecutionOutputCollectionResult | Execution Output Collection Result interface with 5 public fields or methods. |
ExecutionOutputCollector | interface | interface ExecutionOutputCollector | Execution Output Collector interface with 1 public fields or methods. |
ExecutionOutputPlanner | interface | interface ExecutionOutputPlanner | Execution Output Planner interface with 1 public fields or methods. |
ExecutionOutputSkipReason | type | type ExecutionOutputSkipReason = 'not_included' | 'excluded' | 'unsupported_mutation' | 'missing_integrity_evidence' | 'artifact_limit' | 'byte_limit' | Public type alias for Execution Output Skip Reason; the declaration contains its complete type expression. |
ExecutionOutputTerminalStatus | type | type ExecutionOutputTerminalStatus = Exclude<CommandExecutionStatus, 'queued' | 'starting' | 'running' | 'cancelling'> | Public type alias for Execution Output Terminal Status; the declaration contains its complete type expression. |
CollectedExecutionOutput
Collected Execution Output interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { CollectedExecutionOutput } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface CollectedExecutionOutput {
relativePath: string;
artifactRef: string;
versionId: string;
contentHash: string;
sizeBytes: number;
status: ArtifactStatus;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactRef | property | artifactRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
contentHash | property | contentHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
relativePath | property | relativePath: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sizeBytes | property | sizeBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: ArtifactStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionId | property | versionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionOutputArtifactManager
Minimal Artifact Manager port required by output collection.
- Kind: interface
- Import:
import type { ExecutionOutputArtifactManager } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputArtifactManager {
createFromWorkspace(request: ArtifactFromWorkspaceRequest): Promise<ArtifactRecord>;
finalize(request: ArtifactFinalizeRequest): Promise<ArtifactRecord>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
createFromWorkspace | method | createFromWorkspace(request: ArtifactFromWorkspaceRequest): Promise<ArtifactRecord> | Public method; parameters and return type are shown in the signature. |
finalize | method | finalize(request: ArtifactFinalizeRequest): Promise<ArtifactRecord> | Public method; parameters and return type are shown in the signature. |
ExecutionOutputCollectionContext
Identity and Artifact policy context supplied by the Execution composition root.
- Kind: interface
- Import:
import type { ExecutionOutputCollectionContext } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputCollectionContext {
operationId: string;
principal: ExecutionPrincipal;
profileRef: SpecRef;
userId: string;
tenantId?: string;
workspaceId: string;
sessionId?: string;
runId?: string;
agentId?: string;
idempotencyKeyPrefix?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKeyPrefix | property | idempotencyKeyPrefix?: string | 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. |
principal | property | principal: ExecutionPrincipal | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRef | property | profileRef: SpecRef | 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. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: 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. |
ExecutionOutputCollectionItem
A bounded, content-addressed file that may be handed to Artifact collection.
- Kind: interface
- Import:
import type { ExecutionOutputCollectionItem } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputCollectionItem {
relativePath: string;
contentHash: string;
sizeBytes: number;
kind: ArtifactKind;
mimeType?: string;
existingArtifactRef?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
contentHash | property | contentHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
existingArtifactRef | property | existingArtifactRef?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
kind | property | kind: ArtifactKind | Public property; its type, readonly modifier and optionality are shown in the signature. |
mimeType | property | mimeType?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
relativePath | property | relativePath: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sizeBytes | property | sizeBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionOutputCollectionPlan
Deterministic output of policy evaluation; creating Artifact records is a later side effect.
- Kind: interface
- Import:
import type { ExecutionOutputCollectionPlan } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputCollectionPlan {
executionId: string;
status: ExecutionOutputTerminalStatus;
items: ExecutionOutputCollectionItem[];
existingArtifactRefs: string[];
totalBytes: number;
finalize: boolean;
skipped: Record<ExecutionOutputSkipReason, number>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
executionId | property | executionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
existingArtifactRefs | property | existingArtifactRefs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalize | property | finalize: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
items | property | items: ExecutionOutputCollectionItem[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
skipped | property | skipped: Record<ExecutionOutputSkipReason, number> | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: ExecutionOutputTerminalStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
totalBytes | property | totalBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionOutputCollectionPolicy
Framework-level rules for collecting files produced by an Execution.
- Kind: interface
- Import:
import type { ExecutionOutputCollectionPolicy } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputCollectionPolicy {
includePatterns?: string[];
excludePatterns?: string[];
maxArtifacts?: number;
maxTotalBytes?: number;
classifyByExtension?: boolean;
finalizeOnSuccess?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
classifyByExtension | property | classifyByExtension?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
excludePatterns | property | excludePatterns?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalizeOnSuccess | property | finalizeOnSuccess?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
includePatterns | property | includePatterns?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxArtifacts | property | maxArtifacts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxTotalBytes | property | maxTotalBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionOutputCollectionResult
Execution Output Collection Result interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionOutputCollectionResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputCollectionResult {
executionId: string;
collected: CollectedExecutionOutput[];
existingArtifactRefs: string[];
artifactRefs: string[];
finalizedArtifactRefs: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactRefs | property | artifactRefs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
collected | property | collected: CollectedExecutionOutput[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
executionId | property | executionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
existingArtifactRefs | property | existingArtifactRefs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalizedArtifactRefs | property | finalizedArtifactRefs: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ExecutionOutputCollector
Execution Output Collector interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionOutputCollector } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputCollector {
collect(plan: ExecutionOutputCollectionPlan, context: ExecutionOutputCollectionContext): Promise<ExecutionOutputCollectionResult>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
collect | method | collect(plan: ExecutionOutputCollectionPlan, context: ExecutionOutputCollectionContext): Promise<ExecutionOutputCollectionResult> | Public method; parameters and return type are shown in the signature. |
ExecutionOutputPlanner
Execution Output Planner interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { ExecutionOutputPlanner } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export interface ExecutionOutputPlanner {
plan(result: CommandExecutionResult, policy: ExecutionOutputCollectionPolicy): ExecutionOutputCollectionPlan;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
plan | method | plan(result: CommandExecutionResult, policy: ExecutionOutputCollectionPolicy): ExecutionOutputCollectionPlan | Public method; parameters and return type are shown in the signature. |
ExecutionOutputSkipReason
Public type alias for Execution Output Skip Reason; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ExecutionOutputSkipReason } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export type ExecutionOutputSkipReason = 'not_included' | 'excluded' | 'unsupported_mutation' | 'missing_integrity_evidence' | 'artifact_limit' | 'byte_limit';ExecutionOutputTerminalStatus
Public type alias for Execution Output Terminal Status; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ExecutionOutputTerminalStatus } from '@codesoul-co/hypha-core'; - Source module:
contracts/execution-output
Declaration
export type ExecutionOutputTerminalStatus = Exclude<CommandExecutionStatus, 'queued' | 'starting' | 'running' | 'cancelling'>;