Skip to content

@codesoul-co/hypha-adapters-local / local-sandbox-lifecycle

Using this module

Use the Local sandbox lifecycle module for using the public contracts and operations for this capability boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

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

import type {
  LocalSandboxLifecycleOptions,
} 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
LocalSandboxLifecycleclassnew LocalSandboxLifecycle(options: LocalSandboxLifecycleOptions): LocalSandboxLifecycleLocal Process identity wrapper around the provider-neutral lifecycle state.
LocalSandboxLifecycleOptionsinterfaceinterface LocalSandboxLifecycleOptionsLocal Sandbox Lifecycle Options interface with 4 public fields or methods.

LocalSandboxLifecycle

Local Process identity wrapper around the provider-neutral lifecycle state.

  • Kind: class
  • Import: import { LocalSandboxLifecycle } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-sandbox-lifecycle

Declaration

text
export declare class LocalSandboxLifecycle extends InMemorySandboxLifecycle {
    constructor(options: LocalSandboxLifecycleOptions);
}

Public members

MemberKindSignatureDescription
beginTerminationmethodbeginTermination(input: SandboxTerminateRequest): SandboxRecordPublic method; parameters and return type are shown in the signature.
cleanupmethodcleanup(input: SandboxCleanupRequest): voidPublic method; parameters and return type are shown in the signature.
constructorconstructor(options: LocalSandboxLifecycleOptions): LocalSandboxLifecycleCreates an instance of this class.
createmethodcreate(input: SandboxCreateRequest, metadata: Record<string, unknown>): SandboxRecordPublic method; parameters and return type are shown in the signature.
environmentForCommandmethodenvironmentForCommand(request: CommandExecutionRequest): ExecutionEnvironmentSpecPublic method; parameters and return type are shown in the signature.
finishTerminationmethodfinishTermination(sandboxId: string): SandboxRecordPublic method; parameters and return type are shown in the signature.
markBusymethodmarkBusy(sandboxId: string, executionId: string): SandboxRecordPublic method; parameters and return type are shown in the signature.
markExecutionCompletemethodmarkExecutionComplete(sandboxId: string, executionId: string, completedAt: string): SandboxRecordPublic method; parameters and return type are shown in the signature.
startmethodstart(input: SandboxStartRequest): SandboxRecordPublic method; parameters and return type are shown in the signature.
statusmethodstatus(input: SandboxStatusRequest): SandboxRecord | nullPublic method; parameters and return type are shown in the signature.

LocalSandboxLifecycleOptions

Local Sandbox Lifecycle Options interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { LocalSandboxLifecycleOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-sandbox-lifecycle

Declaration

text
export interface LocalSandboxLifecycleOptions {
    providerId: string;
    workspaceRoot: string;
    now?: () => string;
    sandboxId?: (request: SandboxCreateRequest) => string;
}

Contract members

MemberKindSignatureDescription
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
providerIdpropertyproviderId: stringPublic 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.
workspaceRootpropertyworkspaceRoot: stringPublic property; its type, readonly modifier and optionality are shown in the signature.