@codesoul-co/hypha-adapters-local / local-workspace-snapshot-artifacts
- Package index:
@codesoul-co/hypha-adapters-local - Source:
packages/adapters-local/src/local-workspace-snapshot-artifacts.ts - Exports: 3
Using this module
Use the Local workspace snapshot artifacts module for declaring and enforcing workspace scope boundaries. It exports 1 class, 2 interfaces.
Import from the package entrypoint
ts
import {
LocalWorkspaceSnapshotArtifactService,
} from '@codesoul-co/hypha-adapters-local';
import type {
LocalWorkspaceSnapshotArtifactContext,
LocalWorkspaceSnapshotArtifactServiceOptions,
} 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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
LocalWorkspaceSnapshotArtifactService | class | new LocalWorkspaceSnapshotArtifactService(options: LocalWorkspaceSnapshotArtifactServiceOptions): LocalWorkspaceSnapshotArtifactService | Persists a full Workspace tree through ArtifactManager. Host paths never enter Artifact metadata; file bytes are collected through its governed Workspace reader port. |
LocalWorkspaceSnapshotArtifactContext | interface | interface LocalWorkspaceSnapshotArtifactContext | Local Workspace Snapshot Artifact Context interface with 7 public fields or methods. |
LocalWorkspaceSnapshotArtifactServiceOptions | interface | interface LocalWorkspaceSnapshotArtifactServiceOptions | Local Workspace Snapshot Artifact Service Options interface with 11 public fields or methods. |
LocalWorkspaceSnapshotArtifactService
Persists a full Workspace tree through ArtifactManager. Host paths never enter Artifact metadata; file bytes are collected through its governed Workspace reader port.
- Kind: class
- Import:
import { LocalWorkspaceSnapshotArtifactService } from '@codesoul-co/hypha-adapters-local'; - Source module:
local-workspace-snapshot-artifacts
Declaration
text
export declare class LocalWorkspaceSnapshotArtifactService {
constructor(options: LocalWorkspaceSnapshotArtifactServiceOptions);
createFullSnapshot(input: WorkspaceSnapshotRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord>;
restoreFullSnapshot(input: WorkspaceRestoreRequest, options?: ArtifactOperationOptions): Promise<void>;
recoverInterruptedRestore(): Promise<LocalWorkspaceRestoreRecoveryResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: LocalWorkspaceSnapshotArtifactServiceOptions): LocalWorkspaceSnapshotArtifactService | Creates an instance of this class. |
createFullSnapshot | method | createFullSnapshot(input: WorkspaceSnapshotRequest, options?: ArtifactOperationOptions): Promise<ArtifactRecord> | Public method; parameters and return type are shown in the signature. |
recoverInterruptedRestore | method | recoverInterruptedRestore(): Promise<LocalWorkspaceRestoreRecoveryResult> | Public method; parameters and return type are shown in the signature. |
restoreFullSnapshot | method | restoreFullSnapshot(input: WorkspaceRestoreRequest, options?: ArtifactOperationOptions): Promise<void> | Public method; parameters and return type are shown in the signature. |
LocalWorkspaceSnapshotArtifactContext
Local Workspace Snapshot Artifact Context interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { LocalWorkspaceSnapshotArtifactContext } from '@codesoul-co/hypha-adapters-local'; - Source module:
local-workspace-snapshot-artifacts
Declaration
text
export interface LocalWorkspaceSnapshotArtifactContext {
profileRef: SpecRef;
userId: string;
tenantId?: string;
workspaceId: string;
sessionId?: string;
runId?: string;
agentId?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
agentId | property | agentId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRef | property | profileRef: SpecRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
tenantId | property | tenantId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
userId | property | userId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
LocalWorkspaceSnapshotArtifactServiceOptions
Local Workspace Snapshot Artifact Service Options interface with 11 public fields or methods.
- Kind: interface
- Import:
import type { LocalWorkspaceSnapshotArtifactServiceOptions } from '@codesoul-co/hypha-adapters-local'; - Source module:
local-workspace-snapshot-artifacts
Declaration
text
export interface LocalWorkspaceSnapshotArtifactServiceOptions {
workspace: Pick<LocalWorkspaceAdapter, 'capture' | 'workspaceRoot'>;
artifacts: Pick<ArtifactManager, 'create' | 'createFromWorkspace' | 'finalize' | 'read'>;
context: LocalWorkspaceSnapshotArtifactContext;
now?: () => string;
nowMs?: () => number;
maxManifestBytes?: number;
maxSnapshotPersistenceDurationMs?: number;
maxRestoreBytes?: number;
maxRestoreEntries?: number;
maxRestoreLockWaitDurationMs?: number;
maxRestoreStagingDurationMs?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifacts | property | artifacts: Pick<ArtifactManager, "read" | "create" | "createFromWorkspace" | "finalize"> | Public property; its type, readonly modifier and optionality are shown in the signature. |
context | property | context: LocalWorkspaceSnapshotArtifactContext | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxManifestBytes | property | maxManifestBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxRestoreBytes | property | maxRestoreBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxRestoreEntries | property | maxRestoreEntries?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxRestoreLockWaitDurationMs | property | maxRestoreLockWaitDurationMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxRestoreStagingDurationMs | property | maxRestoreStagingDurationMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxSnapshotPersistenceDurationMs | property | maxSnapshotPersistenceDurationMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
nowMs | method | nowMs?(): number | Public method; parameters and return type are shown in the signature. |
workspace | property | workspace: Pick<LocalWorkspaceAdapter, "workspaceRoot" | "capture"> | Public property; its type, readonly modifier and optionality are shown in the signature. |
