@codesoul-co/hypha-core / modules/execution-output/contracts
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/modules/execution-output/contracts.ts - Exports: 21
Using this module
Use the Contracts module for declaring and runtime-validating contracts. It exports 17 constants, 4 functions.
Import from the package entrypoint
import {
collectedExecutionOutputJsonSchema,
collectedExecutionOutputSchema,
executionOutputCollectionItemJsonSchema,
executionOutputCollectionItemSchema,
executionOutputCollectionPlanExample,
executionOutputCollectionPlanJsonSchema,
executionOutputCollectionPlanSchema,
executionOutputCollectionPolicyExample,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- The module exposes 4 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 17 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { collectedExecutionOutputSchema } from '@codesoul-co/hypha-core';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = collectedExecutionOutputSchema.parse(input);Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
collectedExecutionOutputJsonSchema | constant | const collectedExecutionOutputJsonSchema: JsonSchema | JSON Schema for Collected Execution Output. |
collectedExecutionOutputSchema | constant | const collectedExecutionOutputSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; artifactRef: z.ZodString; versionId: z.ZodString; contentHash: z.ZodString; sizeBytes: z.ZodNumber; status: z.ZodEnum<["draft", "final"]>; }, "strict", z.ZodTypeAny, { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }, { versio... | Runtime schema for Collected Execution Output. |
executionOutputCollectionItemJsonSchema | constant | const executionOutputCollectionItemJsonSchema: JsonSchema | JSON Schema for Execution Output Collection Item. |
executionOutputCollectionItemSchema | constant | const executionOutputCollectionItemSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; contentHash: z.ZodString; sizeBytes: z.ZodNumber; kind: z.ZodEnum<["document", "code", "dataset", "image", "audio", "video", "table", "report", "archive", "patch", "snapshot", "test_report", "build_output", "log", "tool_output", "execution_receipt", "other"]>; mimeType: z.ZodOptional<z.ZodString>; exis... | Runtime schema for Execution Output Collection Item. |
executionOutputCollectionPlanExample | constant | const executionOutputCollectionPlanExample: ExecutionOutputCollectionPlan | Valid example value for Execution Output Collection Plan. |
executionOutputCollectionPlanJsonSchema | constant | const executionOutputCollectionPlanJsonSchema: JsonSchema | JSON Schema for Execution Output Collection Plan. |
executionOutputCollectionPlanSchema | constant | const executionOutputCollectionPlanSchema: z.ZodEffects<z.ZodObject<{ executionId: z.ZodString; status: z.ZodEnum<["cancelled", "completed", "failed", "timed_out", "oom_killed", "resource_exceeded", "quarantined"]>; items: z.ZodArray<z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; contentHash: z.ZodString; sizeBytes: z.ZodNumber; kind: z.ZodEnum<["document", "code", "dataset", "image", "audi... | Runtime schema for Execution Output Collection Plan. |
executionOutputCollectionPolicyExample | constant | const executionOutputCollectionPolicyExample: ExecutionOutputCollectionPolicy | Valid example value for Execution Output Collection Policy. |
executionOutputCollectionPolicyJsonSchema | constant | const executionOutputCollectionPolicyJsonSchema: JsonSchema | JSON Schema for Execution Output Collection Policy. |
executionOutputCollectionPolicySchema | constant | const executionOutputCollectionPolicySchema: z.ZodEffects<z.ZodObject<{ includePatterns: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>; excludePatterns: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>; maxArtifacts: z.ZodOptional<z.ZodNumber>; maxTotalBytes: z.ZodOptional<z.ZodNumber>; classifyByExtension: z.ZodOptional<z.ZodBoolean>; finalizeOnSuccess: z... | Runtime schema for Execution Output Collection Policy. |
executionOutputCollectionResultJsonSchema | constant | const executionOutputCollectionResultJsonSchema: JsonSchema | JSON Schema for Execution Output Collection Result. |
executionOutputCollectionResultSchema | constant | const executionOutputCollectionResultSchema: z.ZodEffects<z.ZodObject<{ executionId: z.ZodString; collected: z.ZodArray<z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; artifactRef: z.ZodString; versionId: z.ZodString; contentHash: z.ZodString; sizeBytes: z.ZodNumber; status: z.ZodEnum<["draft", "final"]>; }, "strict", z.ZodTypeAny, { versionId: string; status: "draft" | "final"; contentHash:... | Runtime schema for Execution Output Collection Result. |
executionOutputJsonSchemas | constant | const executionOutputJsonSchemas: Record<string, JsonSchema> | Execution Output JSON Schemas constant exported by the modules/execution-output/contracts module. |
executionOutputPatternSchema | constant | const executionOutputPatternSchema: z.ZodEffects<z.ZodString, string, string> | Runtime schema for Execution Output Pattern. |
executionOutputSkippedSchema | constant | const executionOutputSkippedSchema: z.ZodObject<{ not_included: z.ZodNumber; excluded: z.ZodNumber; unsupported_mutation: z.ZodNumber; missing_integrity_evidence: z.ZodNumber; artifact_limit: z.ZodNumber; byte_limit: z.ZodNumber; }, "strict", z.ZodTypeAny, { not_included: number; excluded: number; unsupported_mutation: number; missing_integrity_evidence: number; artifact_limit: number; byte_limit: number; }, { not... | Runtime schema for Execution Output Skipped. |
executionOutputSkipReasonSchema | constant | const executionOutputSkipReasonSchema: z.ZodEnum<["not_included", "excluded", "unsupported_mutation", "missing_integrity_evidence", "artifact_limit", "byte_limit"]> | Runtime schema for Execution Output Skip Reason. |
executionOutputTerminalStatusSchema | constant | const executionOutputTerminalStatusSchema: z.ZodEnum<["cancelled", "completed", "failed", "timed_out", "oom_killed", "resource_exceeded", "quarantined"]> | Runtime schema for Execution Output Terminal Status. |
emptyExecutionOutputSkipCounts | function | emptyExecutionOutputSkipCounts(): Record<ExecutionOutputSkipReason, number> | Empty Execution Output Skip Counts function with 1 public call signature; parameters and return types are listed below. |
validateExecutionOutputCollectionPlan | function | validateExecutionOutputCollectionPlan(input: unknown): ExecutionOutputCollectionPlan | Validate Execution Output Collection Plan function with 1 public call signature; parameters and return types are listed below. |
validateExecutionOutputCollectionPolicy | function | validateExecutionOutputCollectionPolicy(input: unknown): ExecutionOutputCollectionPolicy | Validate Execution Output Collection Policy function with 1 public call signature; parameters and return types are listed below. |
validateExecutionOutputCollectionResult | function | validateExecutionOutputCollectionResult(input: unknown): ExecutionOutputCollectionResult | Validate Execution Output Collection Result function with 1 public call signature; parameters and return types are listed below. |
collectedExecutionOutputJsonSchema
JSON Schema for Collected Execution Output.
- Kind: constant
- Import:
import { collectedExecutionOutputJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const collectedExecutionOutputJsonSchema: JsonSchema;collectedExecutionOutputSchema
Runtime schema for Collected Execution Output.
- Kind: constant
- Import:
import { collectedExecutionOutputSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const collectedExecutionOutputSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; artifactRef: z.ZodString; versionId: z.ZodString; contentHash: z.ZodString; sizeBytes: z.ZodNumber; status: z.ZodEnum<["draft", "final"]>; }, "strict", z.ZodTypeAny, { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }, { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }>;executionOutputCollectionItemJsonSchema
JSON Schema for Execution Output Collection Item.
- Kind: constant
- Import:
import { executionOutputCollectionItemJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionItemJsonSchema: JsonSchema;executionOutputCollectionItemSchema
Runtime schema for Execution Output Collection Item.
- Kind: constant
- Import:
import { executionOutputCollectionItemSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionItemSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; contentHash: z.ZodString; sizeBytes: z.ZodNumber; kind: z.ZodEnum<["document", "code", "dataset", "image", "audio", "video", "table", "report", "archive", "patch", "snapshot", "test_report", "build_output", "log", "tool_output", "execution_receipt", "other"]>; mimeType: z.ZodOptional<z.ZodString>; existingArtifactRef: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { contentHash: string; sizeBytes: number; kind: "code" | "log" | "snapshot" | "other" | "image" | "document" | "dataset" | "audio" | "video" | "table" | "report" | "archive" | "patch" | "test_report" | "build_output" | "tool_output" | "execution_receipt"; relativePath: string; mimeType?: string | undefined; existingArtifactRef?: string | undefined; }, { contentHash: string; sizeBytes: number; kind: "code" | "log" | "snapshot" | "other" | "image" | "document" | "dataset" | "audio" | "video" | "table" | "report" | "archive" | "patch" | "test_report" | "build_output" | "tool_output" | "execution_receipt"; relativePath: string; mimeType?: string | undefined; existingArtifactRef?: string | undefined; }>;executionOutputCollectionPlanExample
Valid example value for Execution Output Collection Plan.
- Kind: constant
- Import:
import { executionOutputCollectionPlanExample } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionPlanExample: ExecutionOutputCollectionPlan;executionOutputCollectionPlanJsonSchema
JSON Schema for Execution Output Collection Plan.
- Kind: constant
- Import:
import { executionOutputCollectionPlanJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionPlanJsonSchema: JsonSchema;executionOutputCollectionPlanSchema
Runtime schema for Execution Output Collection Plan.
- Kind: constant
- Import:
import { executionOutputCollectionPlanSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const executionOutputCollectionPlanSchema: (typeof import('@codesoul-co/hypha-core'))['executionOutputCollectionPlanSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
executionOutputCollectionPolicyExample
Valid example value for Execution Output Collection Policy.
- Kind: constant
- Import:
import { executionOutputCollectionPolicyExample } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionPolicyExample: ExecutionOutputCollectionPolicy;executionOutputCollectionPolicyJsonSchema
JSON Schema for Execution Output Collection Policy.
- Kind: constant
- Import:
import { executionOutputCollectionPolicyJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionPolicyJsonSchema: JsonSchema;executionOutputCollectionPolicySchema
Runtime schema for Execution Output Collection Policy.
- Kind: constant
- Import:
import { executionOutputCollectionPolicySchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionPolicySchema: z.ZodEffects<z.ZodObject<{ includePatterns: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>; excludePatterns: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>; maxArtifacts: z.ZodOptional<z.ZodNumber>; maxTotalBytes: z.ZodOptional<z.ZodNumber>; classifyByExtension: z.ZodOptional<z.ZodBoolean>; finalizeOnSuccess: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { excludePatterns?: string[] | undefined; includePatterns?: string[] | undefined; maxArtifacts?: number | undefined; maxTotalBytes?: number | undefined; classifyByExtension?: boolean | undefined; finalizeOnSuccess?: boolean | undefined; }, { excludePatterns?: string[] | undefined; includePatterns?: string[] | undefined; maxArtifacts?: number | undefined; maxTotalBytes?: number | undefined; classifyByExtension?: boolean | undefined; finalizeOnSuccess?: boolean | undefined; }>, { excludePatterns?: string[] | undefined; includePatterns?: string[] | undefined; maxArtifacts?: number | undefined; maxTotalBytes?: number | undefined; classifyByExtension?: boolean | undefined; finalizeOnSuccess?: boolean | undefined; }, { excludePatterns?: string[] | undefined; includePatterns?: string[] | undefined; maxArtifacts?: number | undefined; maxTotalBytes?: number | undefined; classifyByExtension?: boolean | undefined; finalizeOnSuccess?: boolean | undefined; }>;executionOutputCollectionResultJsonSchema
JSON Schema for Execution Output Collection Result.
- Kind: constant
- Import:
import { executionOutputCollectionResultJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionResultJsonSchema: JsonSchema;executionOutputCollectionResultSchema
Runtime schema for Execution Output Collection Result.
- Kind: constant
- Import:
import { executionOutputCollectionResultSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputCollectionResultSchema: z.ZodEffects<z.ZodObject<{ executionId: z.ZodString; collected: z.ZodArray<z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; artifactRef: z.ZodString; versionId: z.ZodString; contentHash: z.ZodString; sizeBytes: z.ZodNumber; status: z.ZodEnum<["draft", "final"]>; }, "strict", z.ZodTypeAny, { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }, { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }>, "many">; existingArtifactRefs: z.ZodArray<z.ZodString, "many">; artifactRefs: z.ZodArray<z.ZodString, "many">; finalizedArtifactRefs: z.ZodArray<z.ZodString, "many">; }, "strict", z.ZodTypeAny, { executionId: string; artifactRefs: string[]; existingArtifactRefs: string[]; collected: { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }[]; finalizedArtifactRefs: string[]; }, { executionId: string; artifactRefs: string[]; existingArtifactRefs: string[]; collected: { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }[]; finalizedArtifactRefs: string[]; }>, { executionId: string; artifactRefs: string[]; existingArtifactRefs: string[]; collected: { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }[]; finalizedArtifactRefs: string[]; }, { executionId: string; artifactRefs: string[]; existingArtifactRefs: string[]; collected: { versionId: string; status: "draft" | "final"; contentHash: string; sizeBytes: number; relativePath: string; artifactRef: string; }[]; finalizedArtifactRefs: string[]; }>;executionOutputJsonSchemas
Execution Output JSON Schemas constant exported by the modules/execution-output/contracts module.
- Kind: constant
- Import:
import { executionOutputJsonSchemas } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputJsonSchemas: Record<string, JsonSchema>;executionOutputPatternSchema
Runtime schema for Execution Output Pattern.
- Kind: constant
- Import:
import { executionOutputPatternSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputPatternSchema: z.ZodEffects<z.ZodString, string, string>;executionOutputSkippedSchema
Runtime schema for Execution Output Skipped.
- Kind: constant
- Import:
import { executionOutputSkippedSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputSkippedSchema: z.ZodObject<{ not_included: z.ZodNumber; excluded: z.ZodNumber; unsupported_mutation: z.ZodNumber; missing_integrity_evidence: z.ZodNumber; artifact_limit: z.ZodNumber; byte_limit: z.ZodNumber; }, "strict", z.ZodTypeAny, { not_included: number; excluded: number; unsupported_mutation: number; missing_integrity_evidence: number; artifact_limit: number; byte_limit: number; }, { not_included: number; excluded: number; unsupported_mutation: number; missing_integrity_evidence: number; artifact_limit: number; byte_limit: number; }>;executionOutputSkipReasonSchema
Runtime schema for Execution Output Skip Reason.
- Kind: constant
- Import:
import { executionOutputSkipReasonSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputSkipReasonSchema: z.ZodEnum<["not_included", "excluded", "unsupported_mutation", "missing_integrity_evidence", "artifact_limit", "byte_limit"]>;executionOutputTerminalStatusSchema
Runtime schema for Execution Output Terminal Status.
- Kind: constant
- Import:
import { executionOutputTerminalStatusSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare const executionOutputTerminalStatusSchema: z.ZodEnum<["cancelled", "completed", "failed", "timed_out", "oom_killed", "resource_exceeded", "quarantined"]>;emptyExecutionOutputSkipCounts
Empty Execution Output Skip Counts function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { emptyExecutionOutputSkipCounts } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare function emptyExecutionOutputSkipCounts(): Record<ExecutionOutputSkipReason, number>;Call signature
emptyExecutionOutputSkipCounts(): Record<ExecutionOutputSkipReason, number>Parameters
No parameters.
Returns
- Type:
Record<ExecutionOutputSkipReason, number> - Description: The return contract is defined by the type shown above.
validateExecutionOutputCollectionPlan
Validate Execution Output Collection Plan function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateExecutionOutputCollectionPlan } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare function validateExecutionOutputCollectionPlan(input: unknown): ExecutionOutputCollectionPlan;Call signature
validateExecutionOutputCollectionPlan(input: unknown): ExecutionOutputCollectionPlanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
ExecutionOutputCollectionPlan - Description: The return contract is defined by the type shown above.
validateExecutionOutputCollectionPolicy
Validate Execution Output Collection Policy function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateExecutionOutputCollectionPolicy } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare function validateExecutionOutputCollectionPolicy(input: unknown): ExecutionOutputCollectionPolicy;Call signature
validateExecutionOutputCollectionPolicy(input: unknown): ExecutionOutputCollectionPolicyParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
ExecutionOutputCollectionPolicy - Description: The return contract is defined by the type shown above.
validateExecutionOutputCollectionResult
Validate Execution Output Collection Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateExecutionOutputCollectionResult } from '@codesoul-co/hypha-core'; - Source module:
modules/execution-output/contracts
Declaration
export declare function validateExecutionOutputCollectionResult(input: unknown): ExecutionOutputCollectionResult;Call signature
validateExecutionOutputCollectionResult(input: unknown): ExecutionOutputCollectionResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
ExecutionOutputCollectionResult - Description: The return contract is defined by the type shown above.
