Skip to content

@codesoul-co/hypha-adapters-local / local-process-output-stream-registry

Using this module

Use the Local process output stream registry module for registering and resolving versioned capabilities or implementations. It exports 1 class, 1 interface.

Import from the package entrypoint

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

import type {
  LocalProcessOutputStreamRegistryOptions,
} 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
LocalProcessOutputStreamRegistryclassnew LocalProcessOutputStreamRegistry(options?: LocalProcessOutputStreamRegistryOptions): LocalProcessOutputStreamRegistryBounded replay and live-follow registry for Local Process output. Raw bytes are represented as base64 so chunk boundaries cannot corrupt UTF-8.
LocalProcessOutputStreamRegistryOptionsinterfaceinterface LocalProcessOutputStreamRegistryOptionsLocal Process Output Stream Registry Options interface with 3 public fields or methods.

LocalProcessOutputStreamRegistry

Bounded replay and live-follow registry for Local Process output. Raw bytes are represented as base64 so chunk boundaries cannot corrupt UTF-8.

Declaration

text
export declare class LocalProcessOutputStreamRegistry {
    constructor(options?: LocalProcessOutputStreamRegistryOptions);
    begin(executionId: string, principal: ExecutionPrincipal): void;
    publish(executionId: string, stream: CommandOutputChunk['stream'], bytes: Uint8Array, truncated?: boolean): CommandOutputChunk;
    complete(executionId: string): void;
    stream(request: RemoteOutputStreamRequest): AsyncIterable<CommandOutputChunk>;
    close(): void;
}

Public members

MemberKindSignatureDescription
beginmethodbegin(executionId: string, principal: ExecutionPrincipal): voidPublic method; parameters and return type are shown in the signature.
closemethodclose(): voidPublic 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(options?: LocalProcessOutputStreamRegistryOptions): LocalProcessOutputStreamRegistryCreates an instance of this class.
publishmethodpublish(executionId: string, stream: CommandOutputChunk["stream"], bytes: Uint8Array, truncated?: boolean): CommandOutputChunkPublic method; parameters and return type are shown in the signature.
streammethodstream(request: RemoteOutputStreamRequest): AsyncIterable<CommandOutputChunk>Public method; parameters and return type are shown in the signature.

LocalProcessOutputStreamRegistryOptions

Local Process Output Stream Registry Options interface with 3 public fields or methods.

Declaration

text
export interface LocalProcessOutputStreamRegistryOptions {
    maxRetainedChunks?: number;
    maxTrackedExecutions?: number;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
maxRetainedChunkspropertymaxRetainedChunks?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxTrackedExecutionspropertymaxTrackedExecutions?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.