Skip to content

@codesoul-co/hypha-adapters-local / in-memory-active-execution-registry

Using this module

Use the In memory active execution registry module for registering and resolving versioned capabilities or implementations. It exports 1 class, 1 interface.

Import from the package entrypoint

ts
import {
  LocalActiveExecutionRegistry,
} from '@codesoul-co/hypha-adapters-local';

import type {
  ActiveLocalExecutionHandle,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
LocalActiveExecutionRegistryclassnew LocalActiveExecutionRegistry(): InMemoryActiveExecutionRegistryCoordinates active executions without owning Sandbox or provider process semantics.
ActiveLocalExecutionHandleinterfaceinterface ActiveLocalExecutionHandleActive Local Execution Handle interface with 3 public fields or methods.

LocalActiveExecutionRegistry

Coordinates active executions without owning Sandbox or provider process semantics.

Declaration

text
export declare class InMemoryActiveExecutionRegistry {
    begin(executionId: string, sandboxId: string): ActiveExecutionHandle;
    sandboxId(executionId: string): string | undefined;
    cancel(request: ExecutionCancelRequest): Promise<void>;
    abortSandbox(sandboxId: string, reason: string): Promise<void>;
    complete(executionId: string): void;
    close(): Promise<void>;
}

Public members

MemberKindSignatureDescription
abortSandboxmethodabortSandbox(sandboxId: string, reason: string): Promise<void>Public method; parameters and return type are shown in the signature.
beginmethodbegin(executionId: string, sandboxId: string): ActiveExecutionHandlePublic method; parameters and return type are shown in the signature.
cancelmethodcancel(request: ExecutionCancelRequest): Promise<void>Public method; parameters and return type are shown in the signature.
closemethodclose(): Promise<void>Public method; parameters and return type are shown in the signature.
completemethodcomplete(executionId: string): voidPublic method; parameters and return type are shown in the signature.
constructorconstructor(): InMemoryActiveExecutionRegistryCreates an instance of this class.
sandboxIdmethodsandboxId(executionId: string): string | undefinedPublic method; parameters and return type are shown in the signature.

ActiveLocalExecutionHandle

Active Local Execution Handle interface with 3 public fields or methods.

Declaration

text
export interface ActiveExecutionHandle {
    sandboxId: string;
    revision: number;
    signal: AbortSignal;
}

Contract members

MemberKindSignatureDescription
revisionpropertyrevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
sandboxIdpropertysandboxId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
signalpropertysignal: AbortSignalPublic property; its type, readonly modifier and optionality are shown in the signature.