Skip to content

@codesoul-co/hypha-core / modules/execution-events/index

Using this module

Use the Index module for creating, recording, or reading Event contracts. It exports 19 constants, 3 functions.

Import from the package entrypoint

ts
import {
  commandExecutionEventExample,
  commandExecutionEventPayloadJsonSchema,
  commandExecutionEventPayloadSchema,
  commandExecutionFrameworkEventTypes,
  executionEventJsonSchemas,
  executionEventPayloadBaseJsonSchema,
  executionEventPayloadBaseSchema,
  executionFrameworkEventEnvelopeSchema,
} from '@codesoul-co/hypha-core';

// The complete export list is documented below.

Usage patterns

  • The module exposes 3 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 19 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 { commandExecutionEventPayloadSchema } from '@codesoul-co/hypha-core';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = commandExecutionEventPayloadSchema.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
commandExecutionEventExampleconstantconst commandExecutionEventExample: ExecutionFrameworkEvent<"command.execution.completed">Valid example value for Command Execution Event.
commandExecutionEventPayloadJsonSchemaconstantconst commandExecutionEventPayloadJsonSchema: JsonSchemaJSON Schema for Command Execution Event Payload.
commandExecutionEventPayloadSchemaconstantconst commandExecutionEventPayloadSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodOptional<z.ZodString>; sandboxId: z.ZodOptional<z.ZodString>; workspaceId: z.ZodOptional<z.ZodString>; environmentId: z.ZodOptional<z.ZodString>; environmentRevision: z.ZodOptional<z.ZodString>; commandHash: z.ZodOptional<z.ZodString>; sourceTreeHash: z.ZodOptional<z.ZodString>; artifactRefs: z.ZodOptional<z.ZodArray<z.ZodString...Runtime schema for Command Execution Event Payload.
commandExecutionFrameworkEventTypesconstantconst commandExecutionFrameworkEventTypes: readonly ["command.execution.requested", "command.execution.validated", "command.execution.approval.required", "command.execution.queued", "command.execution.started", "command.execution.output.truncated", "command.execution.resource.exceeded", "command.execution.oom_killed", "command.execution.timeout", "command.execution.cancellation.requested", "command.execution.cance...Command Execution Framework Event Types constant exported by the modules/execution-events/index module.
executionEventJsonSchemasconstantconst executionEventJsonSchemas: Record<string, JsonSchema>Execution Event JSON Schemas constant exported by the modules/execution-events/index module.
executionEventPayloadBaseJsonSchemaconstantconst executionEventPayloadBaseJsonSchema: JsonSchemaJSON Schema for Execution Event Payload Base.
executionEventPayloadBaseSchemaconstantconst executionEventPayloadBaseSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodOptional<z.ZodString>; executionId: z.ZodOptional<z.ZodString>; sandboxId: z.ZodOptional<z.ZodString>; workspaceId: z.ZodOptional<z.ZodString>; environmentId: z.ZodOptional<z.ZodString>; environmentRevision: z.ZodOptional<z.ZodString>; commandHash: z.ZodOptional<z.ZodString>; sourceTreeHash: z.ZodOptional<z.ZodString>; artifactRefs...Runtime schema for Execution Event Payload Base.
executionFrameworkEventEnvelopeSchemaconstantconst executionFrameworkEventEnvelopeSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed", "command.execution.requested", "command.execution.validated", "command.execution.approval.required",...Runtime schema for Execution Framework Event Envelope.
executionFrameworkEventJsonSchemaconstantconst executionFrameworkEventJsonSchema: JsonSchemaJSON Schema for Execution Framework Event.
executionFrameworkEventTypesconstantconst executionFrameworkEventTypes: readonly ["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed", "command.execution.requested", "command.execution.validated", "command.execution.approval.required", "command.execution.queued", "command.execution.started", "c...Execution Framework Event Types constant exported by the modules/execution-events/index module.
executionFrameworkEventTypeSchemaconstantconst executionFrameworkEventTypeSchema: z.ZodEnum<["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed", "command.execution.requested", "command.execution.validated", "command.execution.approval.required", "command.execution.queued", "command.execution.starte...Runtime schema for Execution Framework Event Type.
networkAuthorizationEventExampleconstantconst networkAuthorizationEventExample: ExecutionFrameworkEvent<"network.authorization.granted">Valid example value for Network Authorization Event.
networkAuthorizationEventPayloadJsonSchemaconstantconst networkAuthorizationEventPayloadJsonSchema: JsonSchemaJSON Schema for Network Authorization Event Payload.
networkAuthorizationEventPayloadSchemaconstantconst networkAuthorizationEventPayloadSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodOptional<z.ZodString>; executionId: z.ZodOptional<z.ZodString>; sandboxId: z.ZodOptional<z.ZodString>; workspaceId: z.ZodOptional<z.ZodString>; environmentId: z.ZodOptional<z.ZodString>; environmentRevision: z.ZodOptional<z.ZodString>; commandHash: z.ZodOptional<z.ZodString>; sourceTreeHash: z.ZodOptional<z.ZodString>; artif...Runtime schema for Network Authorization Event Payload.
networkAuthorizationFrameworkEventTypesconstantconst networkAuthorizationFrameworkEventTypes: readonly ["network.authorization.requested", "network.authorization.granted", "network.authorization.denied", "network.authorization.revoked"]Network Authorization Framework Event Types constant exported by the modules/execution-events/index module.
sandboxFrameworkEventTypesconstantconst sandboxFrameworkEventTypes: readonly ["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed"]Sandbox Framework Event Types constant exported by the modules/execution-events/index module.
sandboxLifecycleEventExampleconstantconst sandboxLifecycleEventExample: ExecutionFrameworkEvent<"sandbox.ready">Valid example value for Sandbox Lifecycle Event.
sandboxLifecycleEventPayloadJsonSchemaconstantconst sandboxLifecycleEventPayloadJsonSchema: JsonSchemaJSON Schema for Sandbox Lifecycle Event Payload.
sandboxLifecycleEventPayloadSchemaconstantconst sandboxLifecycleEventPayloadSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodOptional<z.ZodString>; executionId: z.ZodOptional<z.ZodString>; workspaceId: z.ZodOptional<z.ZodString>; environmentId: z.ZodOptional<z.ZodString>; environmentRevision: z.ZodOptional<z.ZodString>; commandHash: z.ZodOptional<z.ZodString>; sourceTreeHash: z.ZodOptional<z.ZodString>; artifactRefs: z.ZodOptional<z.ZodArray<z.ZodStri...Runtime schema for Sandbox Lifecycle Event Payload.
createExecutionFrameworkEventfunctioncreateExecutionFrameworkEvent<TType extends ExecutionFrameworkEventType>(input: ExecutionEventCreateInput<TType>): ExecutionFrameworkEvent<TType>Create Execution Framework Event function with 1 public call signature; parameters and return types are listed below.
validateExecutionEventPayloadfunctionvalidateExecutionEventPayload<TType extends ExecutionFrameworkEventType>(type: TType, input: unknown): ExecutionEventPayloadMap[TType]Validate Execution Event Payload function with 1 public call signature; parameters and return types are listed below.
validateExecutionFrameworkEventfunctionvalidateExecutionFrameworkEvent(input: unknown): ExecutionFrameworkEventValidate Execution Framework Event function with 1 public call signature; parameters and return types are listed below.

commandExecutionEventExample

Valid example value for Command Execution Event.

Declaration

text
export declare const commandExecutionEventExample: ExecutionFrameworkEvent<"command.execution.completed">;

commandExecutionEventPayloadJsonSchema

JSON Schema for Command Execution Event Payload.

Declaration

text
export declare const commandExecutionEventPayloadJsonSchema: JsonSchema;

commandExecutionEventPayloadSchema

Runtime schema for Command Execution Event Payload.

Declaration

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

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.

commandExecutionFrameworkEventTypes

Command Execution Framework Event Types constant exported by the modules/execution-events/index module.

Declaration

text
export declare const commandExecutionFrameworkEventTypes: readonly ["command.execution.requested", "command.execution.validated", "command.execution.approval.required", "command.execution.queued", "command.execution.started", "command.execution.output.truncated", "command.execution.resource.exceeded", "command.execution.oom_killed", "command.execution.timeout", "command.execution.cancellation.requested", "command.execution.cancelled", "command.execution.completed", "command.execution.failed", "command.execution.result.unknown", "command.execution.recovered"];

executionEventJsonSchemas

Execution Event JSON Schemas constant exported by the modules/execution-events/index module.

Declaration

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

executionEventPayloadBaseJsonSchema

JSON Schema for Execution Event Payload Base.

Declaration

text
export declare const executionEventPayloadBaseJsonSchema: JsonSchema;

executionEventPayloadBaseSchema

Runtime schema for Execution Event Payload Base.

Declaration

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

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.

executionFrameworkEventEnvelopeSchema

Runtime schema for Execution Framework Event Envelope.

Declaration

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

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.

executionFrameworkEventJsonSchema

JSON Schema for Execution Framework Event.

Declaration

text
export declare const executionFrameworkEventJsonSchema: JsonSchema;

executionFrameworkEventTypes

Execution Framework Event Types constant exported by the modules/execution-events/index module.

Declaration

text
export declare const executionFrameworkEventTypes: readonly ["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed", "command.execution.requested", "command.execution.validated", "command.execution.approval.required", "command.execution.queued", "command.execution.started", "command.execution.output.truncated", "command.execution.resource.exceeded", "command.execution.oom_killed", "command.execution.timeout", "command.execution.cancellation.requested", "command.execution.cancelled", "command.execution.completed", "command.execution.failed", "command.execution.result.unknown", "command.execution.recovered", "network.authorization.requested", "network.authorization.granted", "network.authorization.denied", "network.authorization.revoked"];

executionFrameworkEventTypeSchema

Runtime schema for Execution Framework Event Type.

Declaration

text
export declare const executionFrameworkEventTypeSchema: z.ZodEnum<["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed", "command.execution.requested", "command.execution.validated", "command.execution.approval.required", "command.execution.queued", "command.execution.started", "command.execution.output.truncated", "command.execution.resource.exceeded", "command.execution.oom_killed", "command.execution.timeout", "command.execution.cancellation.requested", "command.execution.cancelled", "command.execution.completed", "command.execution.failed", "command.execution.result.unknown", "command.execution.recovered", "network.authorization.requested", "network.authorization.granted", "network.authorization.denied", "network.authorization.revoked"]>;

networkAuthorizationEventExample

Valid example value for Network Authorization Event.

Declaration

text
export declare const networkAuthorizationEventExample: ExecutionFrameworkEvent<"network.authorization.granted">;

networkAuthorizationEventPayloadJsonSchema

JSON Schema for Network Authorization Event Payload.

  • Kind: constant
  • Import: import { networkAuthorizationEventPayloadJsonSchema } from '@codesoul-co/hypha-core';
  • Source module: modules/execution-events/index

Declaration

text
export declare const networkAuthorizationEventPayloadJsonSchema: JsonSchema;

networkAuthorizationEventPayloadSchema

Runtime schema for Network Authorization Event Payload.

Declaration

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

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.

networkAuthorizationFrameworkEventTypes

Network Authorization Framework Event Types constant exported by the modules/execution-events/index module.

Declaration

text
export declare const networkAuthorizationFrameworkEventTypes: readonly ["network.authorization.requested", "network.authorization.granted", "network.authorization.denied", "network.authorization.revoked"];

sandboxFrameworkEventTypes

Sandbox Framework Event Types constant exported by the modules/execution-events/index module.

Declaration

text
export declare const sandboxFrameworkEventTypes: readonly ["sandbox.create.requested", "sandbox.created", "sandbox.started", "sandbox.ready", "sandbox.degraded", "sandbox.terminate.requested", "sandbox.terminated", "sandbox.cleanup.completed", "sandbox.cleanup.failed"];

sandboxLifecycleEventExample

Valid example value for Sandbox Lifecycle Event.

Declaration

text
export declare const sandboxLifecycleEventExample: ExecutionFrameworkEvent<"sandbox.ready">;

sandboxLifecycleEventPayloadJsonSchema

JSON Schema for Sandbox Lifecycle Event Payload.

Declaration

text
export declare const sandboxLifecycleEventPayloadJsonSchema: JsonSchema;

sandboxLifecycleEventPayloadSchema

Runtime schema for Sandbox Lifecycle Event Payload.

Declaration

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

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.

createExecutionFrameworkEvent

Create Execution Framework Event function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function createExecutionFrameworkEvent<TType extends ExecutionFrameworkEventType>(input: ExecutionEventCreateInput<TType>): ExecutionFrameworkEvent<TType>;

Call signature

text
createExecutionFrameworkEvent<TType extends ExecutionFrameworkEventType>(input: ExecutionEventCreateInput<TType>): ExecutionFrameworkEvent<TType>

Parameters

ParameterTypeRequiredDescription
inputExecutionEventCreateInput<TType>YesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ExecutionFrameworkEvent<TType>
  • Description: The return contract is defined by the type shown above.

validateExecutionEventPayload

Validate Execution Event Payload function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateExecutionEventPayload<TType extends ExecutionFrameworkEventType>(type: TType, input: unknown): ExecutionEventPayloadMap[TType];

Call signature

text
validateExecutionEventPayload<TType extends ExecutionFrameworkEventType>(type: TType, input: unknown): ExecutionEventPayloadMap[TType]

Parameters

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

Returns

  • Type: ExecutionEventPayloadMap[TType]
  • Description: The return contract is defined by the type shown above.

validateExecutionFrameworkEvent

Validate Execution Framework Event function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateExecutionFrameworkEvent(input: unknown): ExecutionFrameworkEvent;

Call signature

text
validateExecutionFrameworkEvent(input: unknown): ExecutionFrameworkEvent

Parameters

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

Returns

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