Skip to content

@codesoul-co/hypha-adapters-local / local-process-execution-provider

Using this module

Use the Local process execution provider module for binding external or local providers to Hypha ports. It exports 1 class, 1 interface.

Import from the package entrypoint

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

import type {
  LocalProcessExecutionProviderOptions,
} 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
LocalProcessExecutionProviderclassnew LocalProcessExecutionProvider(options: LocalProcessExecutionProviderOptions): LocalProcessExecutionProviderTrusted-development provider. Workspace checks are confinement, not OS isolation.
LocalProcessExecutionProviderOptionsinterfaceinterface LocalProcessExecutionProviderOptions extends LocalProcessPolicyResolverOptionsLocal Process Execution Provider Options interface with 26 public fields or methods.

LocalProcessExecutionProvider

Trusted-development provider. Workspace checks are confinement, not OS isolation.

Declaration

text
export declare class LocalProcessExecutionProvider implements SandboxProvider {
    readonly id: string;
    constructor(options: LocalProcessExecutionProviderOptions);
    capabilities(): Promise<SandboxProviderCapabilities>;
    create(input: SandboxCreateRequest): Promise<SandboxRecord>;
    start(input: SandboxStartRequest): Promise<SandboxRecord>;
    execute(input: CommandExecutionRequest): Promise<CommandExecutionResult>;
    streamOutput(input: RemoteOutputStreamRequest): AsyncIterable<CommandOutputChunk>;
    cancel(input: ExecutionCancelRequest): Promise<void>;
    terminate(input: SandboxTerminateRequest): Promise<void>;
    status(input: SandboxStatusRequest): Promise<SandboxRecord | null>;
    cleanup(input: SandboxCleanupRequest): Promise<void>;
    health(): Promise<ProviderHealth>;
    close(): Promise<void>;
}

Public members

MemberKindSignatureDescription
cancelmethodcancel(input: ExecutionCancelRequest): Promise<void>Public method; parameters and return type are shown in the signature.
capabilitiesmethodcapabilities(): Promise<SandboxProviderCapabilities>Public method; parameters and return type are shown in the signature.
cleanupmethodcleanup(input: SandboxCleanupRequest): 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.
constructorconstructor(options: LocalProcessExecutionProviderOptions): LocalProcessExecutionProviderCreates an instance of this class.
createmethodcreate(input: SandboxCreateRequest): Promise<SandboxRecord>Public method; parameters and return type are shown in the signature.
executemethodexecute(input: CommandExecutionRequest): Promise<CommandExecutionResult>Public method; parameters and return type are shown in the signature.
healthmethodhealth(): Promise<ProviderHealth>Public method; parameters and return type are shown in the signature.
idpropertyreadonly id: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
startmethodstart(input: SandboxStartRequest): Promise<SandboxRecord>Public method; parameters and return type are shown in the signature.
statusmethodstatus(input: SandboxStatusRequest): Promise<SandboxRecord | null>Public method; parameters and return type are shown in the signature.
streamOutputmethodstreamOutput(input: RemoteOutputStreamRequest): AsyncIterable<CommandOutputChunk>Public method; parameters and return type are shown in the signature.
terminatemethodterminate(input: SandboxTerminateRequest): Promise<void>Public method; parameters and return type are shown in the signature.

LocalProcessExecutionProviderOptions

Local Process Execution Provider Options interface with 26 public fields or methods.

  • Kind: interface
  • Import: import type { LocalProcessExecutionProviderOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-process-execution-provider

Declaration

text
export interface LocalProcessExecutionProviderOptions extends LocalProcessPolicyResolverOptions {
    gracefulTerminationMs?: number;
    maxTrackedFiles?: number;
    maxTrackedBytes?: number;
    allowBestEffortWindowsProcessTreeKill?: boolean;
    id?: string;
    now?: () => string;
    sandboxId?: (request: SandboxCreateRequest) => string;
    executionId?: (request: CommandExecutionRequest) => string;
    supervisor?: LocalProcessSupervisor;
    outputArtifacts?: LocalProcessOutputArtifactPort;
    maxRetainedOutputChunks?: number;
    maxTrackedOutputStreams?: number;
}

Contract members

MemberKindSignatureDescription
allowBestEffortWindowsProcessTreeKillpropertyallowBestEffortWindowsProcessTreeKill?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
baseEnvironmentpropertybaseEnvironment?: Record<string, string>Public property; its type, readonly modifier and optionality are shown in the signature.
executablespropertyexecutables: Record<string, string>Public property; its type, readonly modifier and optionality are shown in the signature.
executionIdmethodexecutionId?(request: CommandExecutionRequest): stringPublic method; parameters and return type are shown in the signature.
gracefulTerminationMspropertygracefulTerminationMs?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
idpropertyid?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
inheritEnvironmentpropertyinheritEnvironment?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
maxArgumentBytespropertymaxArgumentBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxArgumentCountpropertymaxArgumentCount?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxCombinedOutputBytespropertymaxCombinedOutputBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxEnvironmentValueBytespropertymaxEnvironmentValueBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxEnvironmentVariablespropertymaxEnvironmentVariables?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxExecutionTimeoutMspropertymaxExecutionTimeoutMs?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxRetainedOutputChunkspropertymaxRetainedOutputChunks?: 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.
maxTotalArgumentBytespropertymaxTotalArgumentBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxTotalEnvironmentBytespropertymaxTotalEnvironmentBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxTrackedBytespropertymaxTrackedBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxTrackedFilespropertymaxTrackedFiles?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxTrackedOutputStreamspropertymaxTrackedOutputStreams?: 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.
outputArtifactspropertyoutputArtifacts?: LocalProcessOutputArtifactPortPublic property; its type, readonly modifier and optionality are shown in the signature.
sandboxIdmethodsandboxId?(request: SandboxCreateRequest): stringPublic method; parameters and return type are shown in the signature.
supervisorpropertysupervisor?: LocalProcessSupervisorPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceRootpropertyworkspaceRoot: stringPublic property; its type, readonly modifier and optionality are shown in the signature.