Skip to content

@codesoul-co/hypha-adapters-local / local-process-output-collector

Using this module

Use the Local process output collector module for using the public contracts and operations for this capability boundary. It exports 1 class, 3 interfaces, 1 type.

Import from the package entrypoint

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

import type {
  LocalProcessOutputAppendResult,
  LocalProcessOutputLimits,
  LocalProcessOutputSnapshot,
  LocalProcessOutputStream,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 4 type/interface exports 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
LocalProcessOutputCollectorclassnew LocalProcessOutputCollector(limits: LocalProcessOutputLimits): LocalProcessOutputCollectorCollects bounded process output while accounting against raw bytes, not string length.
LocalProcessOutputAppendResultinterfaceinterface LocalProcessOutputAppendResultLocal Process Output Append Result interface with 1 public fields or methods.
LocalProcessOutputLimitsinterfaceinterface LocalProcessOutputLimitsLocal Process Output Limits interface with 3 public fields or methods.
LocalProcessOutputSnapshotinterfaceinterface LocalProcessOutputSnapshotLocal Process Output Snapshot interface with 6 public fields or methods.
LocalProcessOutputStreamtypetype LocalProcessOutputStream = 'stdout' | 'stderr'Public type alias for Local Process Output Stream; the declaration contains its complete type expression.

LocalProcessOutputCollector

Collects bounded process output while accounting against raw bytes, not string length.

Declaration

text
export declare class LocalProcessOutputCollector {
    constructor(limits: LocalProcessOutputLimits);
    append(stream: LocalProcessOutputStream, chunk: Buffer): LocalProcessOutputAppendResult;
    snapshot(): LocalProcessOutputSnapshot;
}

Public members

MemberKindSignatureDescription
appendmethodappend(stream: LocalProcessOutputStream, chunk: Buffer): LocalProcessOutputAppendResultPublic method; parameters and return type are shown in the signature.
constructorconstructor(limits: LocalProcessOutputLimits): LocalProcessOutputCollectorCreates an instance of this class.
snapshotmethodsnapshot(): LocalProcessOutputSnapshotPublic method; parameters and return type are shown in the signature.

LocalProcessOutputAppendResult

Local Process Output Append Result interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { LocalProcessOutputAppendResult } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-process-output-collector

Declaration

text
export interface LocalProcessOutputAppendResult {
    limitExceeded?: LocalProcessOutputStream | 'combined';
}

Contract members

MemberKindSignatureDescription
limitExceededpropertylimitExceeded?: LocalProcessOutputStream | "combined"Public property; its type, readonly modifier and optionality are shown in the signature.

LocalProcessOutputLimits

Local Process Output Limits interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { LocalProcessOutputLimits } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-process-output-collector

Declaration

text
export interface LocalProcessOutputLimits {
    maxStdoutBytes: number;
    maxStderrBytes: number;
    maxCombinedOutputBytes: number;
}

Contract members

MemberKindSignatureDescription
maxCombinedOutputBytespropertymaxCombinedOutputBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxStderrBytespropertymaxStderrBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxStdoutBytespropertymaxStdoutBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalProcessOutputSnapshot

Local Process Output Snapshot interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { LocalProcessOutputSnapshot } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-process-output-collector

Declaration

text
export interface LocalProcessOutputSnapshot {
    stdout: string;
    stderr: string;
    capturedStdoutBytes: number;
    capturedStderrBytes: number;
    observedStdoutBytes: number;
    observedStderrBytes: number;
}

Contract members

MemberKindSignatureDescription
capturedStderrBytespropertycapturedStderrBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
capturedStdoutBytespropertycapturedStdoutBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
observedStderrBytespropertyobservedStderrBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
observedStdoutBytespropertyobservedStdoutBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
stderrpropertystderr: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
stdoutpropertystdout: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalProcessOutputStream

Public type alias for Local Process Output Stream; the declaration contains its complete type expression.

Declaration

text
export type LocalProcessOutputStream = 'stdout' | 'stderr';