Skip to content

@codesoul-co/hypha-core / contracts/runtime-replay-schemas

Using this module

Use the Runtime replay schemas module for declaring and runtime-validating contracts. It exports 18 constants, 4 functions.

Import from the package entrypoint

ts
import {
  runtimeReplayContractDefinitions,
  runtimeReplayContractJsonSchemas,
  runtimeReplayRequestDefinition,
  runtimeReplayRequestExample,
  runtimeReplayRequestJsonSchema,
  runtimeReplayRequestSchema,
  runtimeReplayResultDefinition,
  runtimeReplayResultExample,
} 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 18 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Runtime validation example

ts
import { runtimeReplayRequestSchema } from '@codesoul-co/hypha-core';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimeReplayRequestSchema.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

SymbolKindSignatureDescription
runtimeReplayContractDefinitionsconstantconst runtimeReplayContractDefinitions: readonly [SpecSchemaDefinition<RuntimeReplayRequest>, SpecSchemaDefinition<RuntimeReplayResult>, SpecSchemaDefinition<RuntimeReplayVerificationRequest>, SpecSchemaDefinition<RuntimeReplayVerificationResult>]Runtime Replay Contract Definitions constant exported by the contracts/runtime-replay-schemas module.
runtimeReplayContractJsonSchemasconstantconst runtimeReplayContractJsonSchemas: Record<string, JsonSchema>Runtime Replay Contract JSON Schemas constant exported by the contracts/runtime-replay-schemas module.
runtimeReplayRequestDefinitionconstantconst runtimeReplayRequestDefinition: SpecSchemaDefinition<RuntimeReplayRequest>Runtime Replay Request Definition constant exported by the contracts/runtime-replay-schemas module.
runtimeReplayRequestExampleconstantconst runtimeReplayRequestExample: RuntimeReplayRequestValid example value for Runtime Replay Request.
runtimeReplayRequestJsonSchemaconstantconst runtimeReplayRequestJsonSchema: JsonSchemaJSON Schema for Runtime Replay Request.
runtimeReplayRequestSchemaconstantconst runtimeReplayRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; workspaceId: z.ZodOptional<z.ZodString>; sessionId: z.ZodString; runId: z.ZodString; agentId: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | unde...Runtime schema for Runtime Replay Request.
runtimeReplayResultDefinitionconstantconst runtimeReplayResultDefinition: SpecSchemaDefinition<RuntimeReplayResult>Runtime Replay Result Definition constant exported by the contracts/runtime-replay-schemas module.
runtimeReplayResultExampleconstantconst runtimeReplayResultExample: RuntimeReplayResultValid example value for Runtime Replay Result.
runtimeReplayResultJsonSchemaconstantconst runtimeReplayResultJsonSchema: JsonSchemaJSON Schema for Runtime Replay Result.
runtimeReplayResultSchemaconstantconst runtimeReplayResultSchema: z.ZodEffects<z.ZodObject<{ sourceRunId: z.ZodString; mode: z.ZodLiteral<"deterministic">; checkpointId: z.ZodString; baseEventSequence: z.ZodNumber; targetEventSequence: z.ZodNumber; replayedEventCount: z.ZodNumber; appliedEventCount: z.ZodNumber; eventIds: z.ZodArray<z.ZodString, "many">; workflowRevision: z.ZodString; processHash: z.ZodString; dependencySnapshotRef: z.ZodString; ...Runtime schema for Runtime Replay Result.
runtimeReplayVerificationRequestDefinitionconstantconst runtimeReplayVerificationRequestDefinition: SpecSchemaDefinition<RuntimeReplayVerificationRequest>Runtime Replay Verification Request Definition constant exported by the contracts/runtime-replay-schemas module.
runtimeReplayVerificationRequestExampleconstantconst runtimeReplayVerificationRequestExample: RuntimeReplayVerificationRequestValid example value for Runtime Replay Verification Request.
runtimeReplayVerificationRequestJsonSchemaconstantconst runtimeReplayVerificationRequestJsonSchema: JsonSchemaJSON Schema for Runtime Replay Verification Request.
runtimeReplayVerificationRequestSchemaconstantconst runtimeReplayVerificationRequestSchema: z.ZodObject<{ replay: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; workspaceId: z.ZodOptional<z.ZodString>; sessionId: z.ZodString; runId: z.ZodString; agentId: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | u...Runtime schema for Runtime Replay Verification Request.
runtimeReplayVerificationResultDefinitionconstantconst runtimeReplayVerificationResultDefinition: SpecSchemaDefinition<RuntimeReplayVerificationResult>Runtime Replay Verification Result Definition constant exported by the contracts/runtime-replay-schemas module.
runtimeReplayVerificationResultExampleconstantconst runtimeReplayVerificationResultExample: RuntimeReplayVerificationResultValid example value for Runtime Replay Verification Result.
runtimeReplayVerificationResultJsonSchemaconstantconst runtimeReplayVerificationResultJsonSchema: JsonSchemaJSON Schema for Runtime Replay Verification Result.
runtimeReplayVerificationResultSchemaconstantconst runtimeReplayVerificationResultSchema: z.ZodEffects<z.ZodObject<{ replay: z.ZodEffects<z.ZodObject<{ sourceRunId: z.ZodString; mode: z.ZodLiteral<"deterministic">; checkpointId: z.ZodString; baseEventSequence: z.ZodNumber; targetEventSequence: z.ZodNumber; replayedEventCount: z.ZodNumber; appliedEventCount: z.ZodNumber; eventIds: z.ZodArray<z.ZodString, "many">; workflowRevision: z.ZodString; processHash: z....Runtime schema for Runtime Replay Verification Result.
validateRuntimeReplayRequestfunctionvalidateRuntimeReplayRequest(input: unknown): RuntimeReplayRequestValidate Runtime Replay Request function with 1 public call signature; parameters and return types are listed below.
validateRuntimeReplayResultfunctionvalidateRuntimeReplayResult(input: unknown): RuntimeReplayResultValidate Runtime Replay Result function with 1 public call signature; parameters and return types are listed below.
validateRuntimeReplayVerificationRequestfunctionvalidateRuntimeReplayVerificationRequest(input: unknown): RuntimeReplayVerificationRequestValidate Runtime Replay Verification Request function with 1 public call signature; parameters and return types are listed below.
validateRuntimeReplayVerificationResultfunctionvalidateRuntimeReplayVerificationResult(input: unknown): RuntimeReplayVerificationResultValidate Runtime Replay Verification Result function with 1 public call signature; parameters and return types are listed below.

runtimeReplayContractDefinitions

Runtime Replay Contract Definitions constant exported by the contracts/runtime-replay-schemas module.

Declaration

text
export declare const runtimeReplayContractDefinitions: readonly [SpecSchemaDefinition<RuntimeReplayRequest>, SpecSchemaDefinition<RuntimeReplayResult>, SpecSchemaDefinition<RuntimeReplayVerificationRequest>, SpecSchemaDefinition<RuntimeReplayVerificationResult>];

runtimeReplayContractJsonSchemas

Runtime Replay Contract JSON Schemas constant exported by the contracts/runtime-replay-schemas module.

Declaration

text
export declare const runtimeReplayContractJsonSchemas: Record<string, JsonSchema>;

runtimeReplayRequestDefinition

Runtime Replay Request Definition constant exported by the contracts/runtime-replay-schemas module.

Declaration

text
export declare const runtimeReplayRequestDefinition: SpecSchemaDefinition<RuntimeReplayRequest>;

runtimeReplayRequestExample

Valid example value for Runtime Replay Request.

Declaration

text
export declare const runtimeReplayRequestExample: RuntimeReplayRequest;

runtimeReplayRequestJsonSchema

JSON Schema for Runtime Replay Request.

Declaration

text
export declare const runtimeReplayRequestJsonSchema: JsonSchema;

runtimeReplayRequestSchema

Runtime schema for Runtime Replay Request.

Declaration

text
export declare const runtimeReplayRequestSchema: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; workspaceId: z.ZodOptional<z.ZodString>; sessionId: z.ZodString; runId: z.ZodString; agentId: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }>; checkpointId: z.ZodOptional<z.ZodString>; expectedWorkflowRevision: z.ZodString; expectedProcessHash: z.ZodString; expectedDependencySnapshotRef: z.ZodString; toSequence: z.ZodOptional<z.ZodNumber>; requestedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; requestedAt: string; expectedWorkflowRevision: string; expectedProcessHash: string; expectedDependencySnapshotRef: string; toSequence?: number | undefined; checkpointId?: string | undefined; }, { scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; requestedAt: string; expectedWorkflowRevision: string; expectedProcessHash: string; expectedDependencySnapshotRef: string; toSequence?: number | undefined; checkpointId?: string | undefined; }>;

runtimeReplayResultDefinition

Runtime Replay Result Definition constant exported by the contracts/runtime-replay-schemas module.

Declaration

text
export declare const runtimeReplayResultDefinition: SpecSchemaDefinition<RuntimeReplayResult>;

runtimeReplayResultExample

Valid example value for Runtime Replay Result.

Declaration

text
export declare const runtimeReplayResultExample: RuntimeReplayResult;

runtimeReplayResultJsonSchema

JSON Schema for Runtime Replay Result.

Declaration

text
export declare const runtimeReplayResultJsonSchema: JsonSchema;

runtimeReplayResultSchema

Runtime schema for Runtime Replay Result.

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeReplayResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeReplayResultSchema'];

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.

runtimeReplayVerificationRequestDefinition

Runtime Replay Verification Request Definition constant exported by the contracts/runtime-replay-schemas module.

Declaration

text
export declare const runtimeReplayVerificationRequestDefinition: SpecSchemaDefinition<RuntimeReplayVerificationRequest>;

runtimeReplayVerificationRequestExample

Valid example value for Runtime Replay Verification Request.

Declaration

text
export declare const runtimeReplayVerificationRequestExample: RuntimeReplayVerificationRequest;

runtimeReplayVerificationRequestJsonSchema

JSON Schema for Runtime Replay Verification Request.

Declaration

text
export declare const runtimeReplayVerificationRequestJsonSchema: JsonSchema;

runtimeReplayVerificationRequestSchema

Runtime schema for Runtime Replay Verification Request.

Declaration

text
export declare const runtimeReplayVerificationRequestSchema: z.ZodObject<{ replay: z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; workspaceId: z.ZodOptional<z.ZodString>; sessionId: z.ZodString; runId: z.ZodString; agentId: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }, { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }>; checkpointId: z.ZodOptional<z.ZodString>; expectedWorkflowRevision: z.ZodString; expectedProcessHash: z.ZodString; expectedDependencySnapshotRef: z.ZodString; toSequence: z.ZodOptional<z.ZodNumber>; requestedAt: z.ZodString; }, "strict", z.ZodTypeAny, { scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; requestedAt: string; expectedWorkflowRevision: string; expectedProcessHash: string; expectedDependencySnapshotRef: string; toSequence?: number | undefined; checkpointId?: string | undefined; }, { scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; requestedAt: string; expectedWorkflowRevision: string; expectedProcessHash: string; expectedDependencySnapshotRef: string; toSequence?: number | undefined; checkpointId?: string | undefined; }>; expectedSnapshotChecksum: z.ZodString; }, "strict", z.ZodTypeAny, { replay: { scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; requestedAt: string; expectedWorkflowRevision: string; expectedProcessHash: string; expectedDependencySnapshotRef: string; toSequence?: number | undefined; checkpointId?: string | undefined; }; expectedSnapshotChecksum: string; }, { replay: { scope: { sessionId: string; runId: string; userId: string; workspaceId?: string | undefined; agentId?: string | undefined; tenantId?: string | undefined; }; requestedAt: string; expectedWorkflowRevision: string; expectedProcessHash: string; expectedDependencySnapshotRef: string; toSequence?: number | undefined; checkpointId?: string | undefined; }; expectedSnapshotChecksum: string; }>;

runtimeReplayVerificationResultDefinition

Runtime Replay Verification Result Definition constant exported by the contracts/runtime-replay-schemas module.

Declaration

text
export declare const runtimeReplayVerificationResultDefinition: SpecSchemaDefinition<RuntimeReplayVerificationResult>;

runtimeReplayVerificationResultExample

Valid example value for Runtime Replay Verification Result.

Declaration

text
export declare const runtimeReplayVerificationResultExample: RuntimeReplayVerificationResult;

runtimeReplayVerificationResultJsonSchema

JSON Schema for Runtime Replay Verification Result.

Declaration

text
export declare const runtimeReplayVerificationResultJsonSchema: JsonSchema;

runtimeReplayVerificationResultSchema

Runtime schema for Runtime Replay Verification Result.

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeReplayVerificationResultSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeReplayVerificationResultSchema'];

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.

validateRuntimeReplayRequest

Validate Runtime Replay Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeReplayRequest(input: unknown): RuntimeReplayRequest;

Call signature

text
validateRuntimeReplayRequest(input: unknown): RuntimeReplayRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeReplayRequest
  • Description: The return contract is defined by the type shown above.

validateRuntimeReplayResult

Validate Runtime Replay Result function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeReplayResult(input: unknown): RuntimeReplayResult;

Call signature

text
validateRuntimeReplayResult(input: unknown): RuntimeReplayResult

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeReplayResult
  • Description: The return contract is defined by the type shown above.

validateRuntimeReplayVerificationRequest

Validate Runtime Replay Verification Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeReplayVerificationRequest(input: unknown): RuntimeReplayVerificationRequest;

Call signature

text
validateRuntimeReplayVerificationRequest(input: unknown): RuntimeReplayVerificationRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeReplayVerificationRequest
  • Description: The return contract is defined by the type shown above.

validateRuntimeReplayVerificationResult

Validate Runtime Replay Verification Result function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateRuntimeReplayVerificationResult(input: unknown): RuntimeReplayVerificationResult;

Call signature

text
validateRuntimeReplayVerificationResult(input: unknown): RuntimeReplayVerificationResult

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeReplayVerificationResult
  • Description: The return contract is defined by the type shown above.