Skip to content

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

Using this module

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

Import from the package entrypoint

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

import type {
  ArtifactManagerLocalProcessOutputPortOptions,
  LocalProcessOutputArtifactPort,
  LocalProcessOutputArtifactRequest,
  LocalProcessOutputArtifactStream,
  LocalProcessOutputArtifactStreamRequest,
  LocalProcessArtifactStream,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 6 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
ArtifactManagerLocalProcessOutputPortclassnew ArtifactManagerLocalProcessOutputPort(options: ArtifactManagerLocalProcessOutputPortOptions): ArtifactManagerLocalProcessOutputPortPersists Local Process output through the governed ArtifactManager. store retains the bounded compatibility path; openStream forwards raw process bytes with bounded producer backpressure.
ArtifactManagerLocalProcessOutputPortOptionsinterfaceinterface ArtifactManagerLocalProcessOutputPortOptionsArtifact Manager Local Process Output Port Options interface with 3 public fields or methods.
LocalProcessOutputArtifactPortinterfaceinterface LocalProcessOutputArtifactPortLocal Process Output Artifact Port interface with 2 public fields or methods.
LocalProcessOutputArtifactRequestinterfaceinterface LocalProcessOutputArtifactRequestLocal Process Output Artifact Request interface with 7 public fields or methods.
LocalProcessOutputArtifactStreaminterfaceinterface LocalProcessOutputArtifactStreamLocal Process Output Artifact Stream interface with 3 public fields or methods.
LocalProcessOutputArtifactStreamRequestinterfaceinterface LocalProcessOutputArtifactStreamRequestLocal Process Output Artifact Stream Request interface with 3 public fields or methods.
LocalProcessArtifactStreamtypetype LocalProcessArtifactStream = 'stdout' | 'stderr'Public type alias for Local Process Artifact Stream; the declaration contains its complete type expression.

ArtifactManagerLocalProcessOutputPort

Persists Local Process output through the governed ArtifactManager. store retains the bounded compatibility path; openStream forwards raw process bytes with bounded producer backpressure.

  • Kind: class
  • Import: import { ArtifactManagerLocalProcessOutputPort } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-process-output-artifacts

Declaration

text
export declare class ArtifactManagerLocalProcessOutputPort implements LocalProcessOutputArtifactPort {
    constructor(options: ArtifactManagerLocalProcessOutputPortOptions);
    store(request: LocalProcessOutputArtifactRequest): Promise<string>;
    openStream(request: LocalProcessOutputArtifactStreamRequest): LocalProcessOutputArtifactStream;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: ArtifactManagerLocalProcessOutputPortOptions): ArtifactManagerLocalProcessOutputPortCreates an instance of this class.
openStreammethodopenStream(request: LocalProcessOutputArtifactStreamRequest): LocalProcessOutputArtifactStreamPublic method; parameters and return type are shown in the signature.
storemethodstore(request: LocalProcessOutputArtifactRequest): Promise<string>Public method; parameters and return type are shown in the signature.

ArtifactManagerLocalProcessOutputPortOptions

Artifact Manager Local Process Output Port Options interface with 3 public fields or methods.

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

Declaration

text
export interface ArtifactManagerLocalProcessOutputPortOptions {
    manager: Pick<ArtifactManager, 'create'>;
    profileRef: SpecRef;
    maxBufferedStreamBytes?: number;
}

Contract members

MemberKindSignatureDescription
managerpropertymanager: Pick<ArtifactManager, "create">Public property; its type, readonly modifier and optionality are shown in the signature.
maxBufferedStreamBytespropertymaxBufferedStreamBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
profileRefpropertyprofileRef: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalProcessOutputArtifactPort

Local Process Output Artifact Port interface with 2 public fields or methods.

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

Declaration

text
export interface LocalProcessOutputArtifactPort {
    store(request: LocalProcessOutputArtifactRequest): Promise<string>;
    openStream?(request: LocalProcessOutputArtifactStreamRequest): LocalProcessOutputArtifactStream;
}

Contract members

MemberKindSignatureDescription
openStreammethodopenStream?(request: LocalProcessOutputArtifactStreamRequest): LocalProcessOutputArtifactStreamPublic method; parameters and return type are shown in the signature.
storemethodstore(request: LocalProcessOutputArtifactRequest): Promise<string>Public method; parameters and return type are shown in the signature.

LocalProcessOutputArtifactRequest

Local Process Output Artifact Request interface with 7 public fields or methods.

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

Declaration

text
export interface LocalProcessOutputArtifactRequest {
    executionId: string;
    request: CommandExecutionRequest;
    stream: LocalProcessArtifactStream;
    content: Uint8Array;
    contentHash: string;
    observedBytes: number;
    truncated: boolean;
}

Contract members

MemberKindSignatureDescription
contentpropertycontent: Uint8Array<ArrayBufferLike>Public property; its type, readonly modifier and optionality are shown in the signature.
contentHashpropertycontentHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
executionIdpropertyexecutionId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
observedBytespropertyobservedBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
requestpropertyrequest: CommandExecutionRequestPublic property; its type, readonly modifier and optionality are shown in the signature.
streampropertystream: LocalProcessArtifactStreamPublic property; its type, readonly modifier and optionality are shown in the signature.
truncatedpropertytruncated: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalProcessOutputArtifactStream

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

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

Declaration

text
export interface LocalProcessOutputArtifactStream {
    append(chunk: Uint8Array): Promise<void>;
    complete(): Promise<string>;
    abort(error: unknown): Promise<void>;
}

Contract members

MemberKindSignatureDescription
abortmethodabort(error: unknown): Promise<void>Public method; parameters and return type are shown in the signature.
appendmethodappend(chunk: Uint8Array): Promise<void>Public method; parameters and return type are shown in the signature.
completemethodcomplete(): Promise<string>Public method; parameters and return type are shown in the signature.

LocalProcessOutputArtifactStreamRequest

Local Process Output Artifact Stream Request interface with 3 public fields or methods.

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

Declaration

text
export interface LocalProcessOutputArtifactStreamRequest {
    executionId: string;
    request: CommandExecutionRequest;
    stream: LocalProcessArtifactStream;
}

Contract members

MemberKindSignatureDescription
executionIdpropertyexecutionId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
requestpropertyrequest: CommandExecutionRequestPublic property; its type, readonly modifier and optionality are shown in the signature.
streampropertystream: LocalProcessArtifactStreamPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalProcessArtifactStream

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

Declaration

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