Skip to content

@codesoul-co/hypha-adapters-local / local-workspace-adapter

Using this module

Use the Local workspace adapter module for declaring and enforcing workspace scope boundaries. It exports 1 class, 2 interfaces.

Import from the package entrypoint

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

import type {
  LocalWorkspaceAdapterOptions,
  LocalWorkspaceCaptureOptions,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 2 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
LocalWorkspaceAdapterclassnew LocalWorkspaceAdapter(options: LocalWorkspaceAdapterOptions): LocalWorkspaceAdapterAdapts a governed Workspace root to Local Process mutation evidence.
LocalWorkspaceAdapterOptionsinterfaceinterface LocalWorkspaceAdapterOptionsLocal Workspace Adapter Options interface with 4 public fields or methods.
LocalWorkspaceCaptureOptionsinterfaceinterface LocalWorkspaceCaptureOptionsLocal Workspace Capture Options interface with 1 public fields or methods.

LocalWorkspaceAdapter

Adapts a governed Workspace root to Local Process mutation evidence.

  • Kind: class
  • Import: import { LocalWorkspaceAdapter } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-workspace-adapter

Declaration

text
export declare class LocalWorkspaceAdapter {
    readonly workspaceRoot: string;
    constructor(options: LocalWorkspaceAdapterOptions);
    assertAvailable(): Promise<void>;
    capture(options?: LocalWorkspaceCaptureOptions): Promise<LocalWorkspaceSnapshot>;
    diff(before: LocalWorkspaceSnapshot, after: LocalWorkspaceSnapshot, detectedAt: string): FileMutation[];
}

Public members

MemberKindSignatureDescription
assertAvailablemethodassertAvailable(): Promise<void>Public method; parameters and return type are shown in the signature.
capturemethodcapture(options?: LocalWorkspaceCaptureOptions): Promise<LocalWorkspaceSnapshot>Public method; parameters and return type are shown in the signature.
constructorconstructor(options: LocalWorkspaceAdapterOptions): LocalWorkspaceAdapterCreates an instance of this class.
diffmethoddiff(before: LocalWorkspaceSnapshot, after: LocalWorkspaceSnapshot, detectedAt: string): FileMutation[]Public method; parameters and return type are shown in the signature.
workspaceRootpropertyreadonly workspaceRoot: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalWorkspaceAdapterOptions

Local Workspace Adapter Options interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { LocalWorkspaceAdapterOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-workspace-adapter

Declaration

text
export interface LocalWorkspaceAdapterOptions {
    workspaceRoot: string;
    maxTrackedFiles?: number;
    maxTrackedBytes?: number;
    maxCaptureDurationMs?: number;
}

Contract members

MemberKindSignatureDescription
maxCaptureDurationMspropertymaxCaptureDurationMs?: 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.
workspaceRootpropertyworkspaceRoot: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

LocalWorkspaceCaptureOptions

Local Workspace Capture Options interface with 1 public fields or methods.

  • Kind: interface
  • Import: import type { LocalWorkspaceCaptureOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-workspace-adapter

Declaration

text
export interface LocalWorkspaceCaptureOptions {
    abortSignal?: AbortSignal;
}

Contract members

MemberKindSignatureDescription
abortSignalpropertyabortSignal?: AbortSignalPublic property; its type, readonly modifier and optionality are shown in the signature.