Skip to content

@codesoul-co/hypha-core / contracts/workspace ​

Using this module ​

Use the Workspace module for declaring and runtime-validating contracts. It exports 30 interfaces, 9 types.

Import from the package entrypoint ​

ts
import type {
  FileMutation,
  ResolvedWorkspacePath,
  WorkspaceCleanupPolicySpec,
  WorkspaceDeleteRequest,
  WorkspaceDiffRequest,
  WorkspaceDiffResult,
  WorkspaceDiffSummary,
  WorkspaceDirectorySpec,
} from '@codesoul-co/hypha-core';

// The complete export list is documented below.

Usage patterns ​

  • Use the 39 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.

Public exports ​

SymbolKindSignatureDescription
FileMutationinterfaceinterface FileMutationFile Mutation interface with 9 public fields or methods.
ResolvedWorkspacePathinterfaceinterface ResolvedWorkspacePathResolved Workspace Path interface with 8 public fields or methods.
WorkspaceCleanupPolicySpecinterfaceinterface WorkspaceCleanupPolicySpecWorkspace Cleanup Policy Spec interface with 6 public fields or methods.
WorkspaceDeleteRequestinterfaceinterface WorkspaceDeleteRequestWorkspace Delete Request interface with 7 public fields or methods.
WorkspaceDiffRequestinterfaceinterface WorkspaceDiffRequestWorkspace Diff Request interface with 6 public fields or methods.
WorkspaceDiffResultinterfaceinterface WorkspaceDiffResultWorkspace Diff Result interface with 5 public fields or methods.
WorkspaceDiffSummaryinterfaceinterface WorkspaceDiffSummaryWorkspace Diff Summary interface with 7 public fields or methods.
WorkspaceDirectorySpecinterfaceinterface WorkspaceDirectorySpecWorkspace Directory Spec interface with 9 public fields or methods.
WorkspaceEventPayloadinterfaceinterface WorkspaceEventPayloadWorkspace Event Payload interface with 12 public fields or methods.
WorkspaceFileEntryinterfaceinterface WorkspaceFileEntryWorkspace File Entry interface with 6 public fields or methods.
WorkspaceListRequestinterfaceinterface WorkspaceListRequestWorkspace List Request interface with 7 public fields or methods.
WorkspaceMutationPolicySpecinterfaceinterface WorkspaceMutationPolicySpecWorkspace Mutation Policy Spec interface with 7 public fields or methods.
WorkspacePatchConflictinterfaceinterface WorkspacePatchConflictWorkspace Patch Conflict interface with 4 public fields or methods.
WorkspacePatchRequestinterfaceinterface WorkspacePatchRequestWorkspace Patch Request interface with 8 public fields or methods.
WorkspacePatchResultinterfaceinterface WorkspacePatchResultWorkspace Patch Result interface with 5 public fields or methods.
WorkspacePathPolicySpecinterfaceinterface WorkspacePathPolicySpecWorkspace Path Policy Spec interface with 12 public fields or methods.
WorkspacePathRequestinterfaceinterface WorkspacePathRequestWorkspace Path Request interface with 5 public fields or methods.
WorkspaceQuotaSpecinterfaceinterface WorkspaceQuotaSpecWorkspace Quota Spec interface with 6 public fields or methods.
WorkspaceReadRequestinterfaceinterface WorkspaceReadRequestWorkspace Read Request interface with 7 public fields or methods.
WorkspaceReadResultinterfaceinterface WorkspaceReadResultWorkspace Read Result interface with 7 public fields or methods.
WorkspaceRecordinterfaceinterface WorkspaceRecordWorkspace Record interface with 22 public fields or methods.
WorkspaceRestoreRequestinterfaceinterface WorkspaceRestoreRequestWorkspace Restore Request interface with 6 public fields or methods.
WorkspaceSnapshotEntryinterfaceinterface WorkspaceSnapshotEntryWorkspace Snapshot Entry interface with 7 public fields or methods.
WorkspaceSnapshotManifestinterfaceinterface WorkspaceSnapshotManifestWorkspace Snapshot Manifest interface with 12 public fields or methods.
WorkspaceSnapshotPolicySpecinterfaceinterface WorkspaceSnapshotPolicySpecWorkspace Snapshot Policy Spec interface with 6 public fields or methods.
WorkspaceSnapshotRequestinterfaceinterface WorkspaceSnapshotRequestWorkspace Snapshot Request interface with 10 public fields or methods.
WorkspaceSpecinterfaceinterface WorkspaceSpec extends VersionedSpec, SpecMetadataWorkspace Spec interface with 21 public fields or methods.
WorkspaceUsageinterfaceinterface WorkspaceUsageWorkspace Usage interface with 4 public fields or methods.
WorkspaceWriteRequestinterfaceinterface WorkspaceWriteRequestWorkspace Write Request interface with 10 public fields or methods.
WorkspaceWriteResultinterfaceinterface WorkspaceWriteResultWorkspace Write Result interface with 6 public fields or methods.
WorkspaceEntryKindtypetype WorkspaceEntryKind = 'file' | 'directory' | 'symlink' | 'other'Public type alias for Workspace Entry Kind; the declaration contains its complete type expression.
WorkspaceEventCreateInputtypetype WorkspaceEventCreateInput = Omit<EventCreateInput<WorkspaceEventPayloadMap[TType]>, 'type' | 'workspaceId'> & { type: TType; workspaceId: string; }Public type alias for Workspace Event Create Input; the declaration contains its complete type expression.
WorkspaceEventPayloadMaptypetype WorkspaceEventPayloadMap = { 'workspace.create.requested': WorkspaceEventPayloadWithRequired<'operationId' | 'profileRef'>; 'workspace.created': WorkspaceEventPayloadWithRequired<'operationId' | 'profileRef' | 'status'>; 'workspace.ready': WorkspaceStatusEventPayload<'ready'>; 'workspace.busy': WorkspaceStatusEventPayload<'busy'>; 'workspace.path.resolved': WorkspaceEventPayloadWithRequired<'operationId'>; 'w...Public type alias for Workspace Event Payload Map; the declaration contains its complete type expression.
WorkspaceFrameworkEventtypetype WorkspaceFrameworkEvent = Omit<FrameworkEvent<WorkspaceEventPayloadMap[TType]>, 'type' | 'workspaceId'> & { type: TType; workspaceId: string; }Public type alias for Workspace Framework Event; the declaration contains its complete type expression.
WorkspaceFrameworkEventTypetypetype WorkspaceFrameworkEventType = 'workspace.create.requested' | 'workspace.created' | 'workspace.ready' | 'workspace.busy' | 'workspace.path.resolved' | 'workspace.path.denied' | 'workspace.quota.exceeded' | 'workspace.snapshot.requested' | 'workspace.snapshot.created' | 'workspace.snapshot.failed' | 'workspace.restore.requested' | 'workspace.restored' | 'workspace.restore.failed' | 'workspace.patch.checked' | '...Public type alias for Workspace Framework Event Type; the declaration contains its complete type expression.
WorkspacePathOperationtypetype WorkspacePathOperation = 'read' | 'write' | 'execute' | 'delete' | 'list'Public type alias for Workspace Path Operation; the declaration contains its complete type expression.
WorkspacePermissiontypetype WorkspacePermission = 'read' | 'write' | 'execute' | 'delete'Public type alias for Workspace Permission; the declaration contains its complete type expression.
WorkspaceSnapshotTypetypetype WorkspaceSnapshotType = 'full' | 'incremental' | 'manifest_only' | 'failure_snapshot'Public type alias for Workspace Snapshot Type; the declaration contains its complete type expression.
WorkspaceStatustypetype WorkspaceStatus = 'creating' | 'ready' | 'busy' | 'snapshotting' | 'archiving' | 'archived' | 'cleaning' | 'cleaned' | 'failed'Public type alias for Workspace Status; the declaration contains its complete type expression.

FileMutation ​

File Mutation interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { FileMutation } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface FileMutation {
    path: string;
    operation: 'created' | 'modified' | 'deleted' | 'renamed' | 'permission_changed';
    beforeHash?: string;
    afterHash?: string;
    beforeSizeBytes?: number;
    afterSizeBytes?: number;
    artifactRef?: string;
    oldPath?: string;
    detectedAt: string;
}

Contract members ​

MemberKindSignatureDescription
afterHashpropertyafterHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
afterSizeBytespropertyafterSizeBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
artifactRefpropertyartifactRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
beforeHashpropertybeforeHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
beforeSizeBytespropertybeforeSizeBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
detectedAtpropertydetectedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
oldPathpropertyoldPath?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationpropertyoperation: "created" | "deleted" | "modified" | "renamed" | "permission_changed"Public property; its type, readonly modifier and optionality are shown in the signature.
pathpropertypath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

ResolvedWorkspacePath ​

Resolved Workspace Path interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { ResolvedWorkspacePath } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface ResolvedWorkspacePath {
    workspaceId: string;
    relativePath: string;
    canonicalRelativePath: string;
    pathRef: string;
    exists: boolean;
    kind?: WorkspaceEntryKind;
    permissions: WorkspacePermission[];
    contentHash?: string;
}

Contract members ​

MemberKindSignatureDescription
canonicalRelativePathpropertycanonicalRelativePath: stringPublic 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.
existspropertyexists: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
kindpropertykind?: WorkspaceEntryKindPublic property; its type, readonly modifier and optionality are shown in the signature.
pathRefpropertypathRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
permissionspropertypermissions: WorkspacePermission[]Public property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceCleanupPolicySpec ​

Workspace Cleanup Policy Spec interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceCleanupPolicySpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceCleanupPolicySpec {
    mode: 'on_run_end' | 'on_success' | 'after_ttl' | 'retain' | 'manual';
    ttlSeconds?: number;
    retainOnFailure?: boolean;
    retainSnapshots?: boolean;
    secureDelete?: boolean;
    archiveBeforeDelete?: boolean;
}

Contract members ​

MemberKindSignatureDescription
archiveBeforeDeletepropertyarchiveBeforeDelete?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
modepropertymode: "on_run_end" | "on_success" | "after_ttl" | "retain" | "manual"Public property; its type, readonly modifier and optionality are shown in the signature.
retainOnFailurepropertyretainOnFailure?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
retainSnapshotspropertyretainSnapshots?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
secureDeletepropertysecureDelete?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
ttlSecondspropertyttlSeconds?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceDeleteRequest ​

Workspace Delete Request interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceDeleteRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceDeleteRequest {
    operationId: string;
    workspaceId: string;
    principal: ExecutionPrincipal;
    relativePath: string;
    recursive?: boolean;
    expectedContentHash?: string;
    idempotencyKey?: string;
}

Contract members ​

MemberKindSignatureDescription
expectedContentHashpropertyexpectedContentHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idempotencyKeypropertyidempotencyKey?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
recursivepropertyrecursive?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceDiffRequest ​

Workspace Diff Request interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceDiffRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceDiffRequest {
    operationId: string;
    workspaceId: string;
    principal: ExecutionPrincipal;
    fromSnapshotRef: string;
    toSnapshotRef?: string;
    createPatchArtifact?: boolean;
}

Contract members ​

MemberKindSignatureDescription
createPatchArtifactpropertycreatePatchArtifact?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
fromSnapshotRefpropertyfromSnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
toSnapshotRefpropertytoSnapshotRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceDiffResult ​

Workspace Diff Result interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceDiffResult } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceDiffResult {
    fromSnapshotRef: string;
    toSnapshotRef?: string;
    mutations: FileMutation[];
    patchArtifactRef?: string;
    summary: WorkspaceDiffSummary;
}

Contract members ​

MemberKindSignatureDescription
fromSnapshotRefpropertyfromSnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
mutationspropertymutations: FileMutation[]Public property; its type, readonly modifier and optionality are shown in the signature.
patchArtifactRefpropertypatchArtifactRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
summarypropertysummary: WorkspaceDiffSummaryPublic property; its type, readonly modifier and optionality are shown in the signature.
toSnapshotRefpropertytoSnapshotRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceDiffSummary ​

Workspace Diff Summary interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceDiffSummary } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceDiffSummary {
    created: number;
    modified: number;
    deleted: number;
    renamed: number;
    permissionChanged: number;
    bytesAdded: number;
    bytesRemoved: number;
}

Contract members ​

MemberKindSignatureDescription
bytesAddedpropertybytesAdded: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
bytesRemovedpropertybytesRemoved: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
createdpropertycreated: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
deletedpropertydeleted: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
modifiedpropertymodified: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
permissionChangedpropertypermissionChanged: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
renamedpropertyrenamed: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceDirectorySpec ​

Workspace Directory Spec interface with 9 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceDirectorySpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceDirectorySpec {
    inputs: string;
    source: string;
    working: string;
    outputs: string;
    logs: string;
    temp: string;
    snapshots: string;
    artifacts?: string;
    cache?: string;
}

Contract members ​

MemberKindSignatureDescription
artifactspropertyartifacts?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
cachepropertycache?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
inputspropertyinputs: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
logspropertylogs: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
outputspropertyoutputs: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotspropertysnapshots: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sourcepropertysource: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
temppropertytemp: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workingpropertyworking: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceEventPayload ​

Workspace Event Payload interface with 12 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceEventPayload } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceEventPayload {
    operationId?: string;
    workspaceId: string;
    profileRef?: SpecRef;
    status?: WorkspaceStatus;
    sourceTreeHash?: string;
    workspaceSnapshotHash?: string;
    snapshotManifestHash?: string;
    artifactRefs?: string[];
    bytes?: number;
    files?: number;
    error?: NormalizedExecutionError;
    metadata?: Record<string, unknown>;
}

Contract members ​

MemberKindSignatureDescription
artifactRefspropertyartifactRefs?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
bytespropertybytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
errorpropertyerror?: NormalizedExecutionErrorPublic property; its type, readonly modifier and optionality are shown in the signature.
filespropertyfiles?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId?: stringPublic 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.
snapshotManifestHashpropertysnapshotManifestHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sourceTreeHashpropertysourceTreeHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
statuspropertystatus?: WorkspaceStatusPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceSnapshotHashpropertyworkspaceSnapshotHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceFileEntry ​

Workspace File Entry interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceFileEntry } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceFileEntry {
    relativePath: string;
    kind: WorkspaceEntryKind;
    sizeBytes?: number;
    contentHash?: string;
    modifiedAt?: string;
    permissions?: WorkspacePermission[];
}

Contract members ​

MemberKindSignatureDescription
contentHashpropertycontentHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
kindpropertykind: WorkspaceEntryKindPublic property; its type, readonly modifier and optionality are shown in the signature.
modifiedAtpropertymodifiedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
permissionspropertypermissions?: WorkspacePermission[]Public property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sizeBytespropertysizeBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceListRequest ​

Workspace List Request interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceListRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceListRequest {
    workspaceId: string;
    principal: ExecutionPrincipal;
    relativePath?: string;
    recursive?: boolean;
    includeHidden?: boolean;
    maxEntries?: number;
    cursor?: string;
}

Contract members ​

MemberKindSignatureDescription
cursorpropertycursor?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
includeHiddenpropertyincludeHidden?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
maxEntriespropertymaxEntries?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
recursivepropertyrecursive?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceMutationPolicySpec ​

Workspace Mutation Policy Spec interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceMutationPolicySpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceMutationPolicySpec {
    requireSnapshotBeforeWrite?: boolean;
    trackFileMutations?: boolean;
    maxPatchBytes?: number;
    allowDelete?: boolean;
    requireApprovalForDelete?: boolean;
    preserveInputFiles?: boolean;
    atomicWrite?: boolean;
}

Contract members ​

MemberKindSignatureDescription
allowDeletepropertyallowDelete?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
atomicWritepropertyatomicWrite?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
maxPatchBytespropertymaxPatchBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
preserveInputFilespropertypreserveInputFiles?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
requireApprovalForDeletepropertyrequireApprovalForDelete?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
requireSnapshotBeforeWritepropertyrequireSnapshotBeforeWrite?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
trackFileMutationspropertytrackFileMutations?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspacePatchConflict ​

Workspace Patch Conflict interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspacePatchConflict } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspacePatchConflict {
    path: string;
    reason: string;
    expectedHash?: string;
    actualHash?: string;
}

Contract members ​

MemberKindSignatureDescription
actualHashpropertyactualHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
expectedHashpropertyexpectedHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
pathpropertypath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
reasonpropertyreason: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspacePatchRequest ​

Workspace Patch Request interface with 8 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspacePatchRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspacePatchRequest {
    operationId: string;
    workspaceId: string;
    principal: ExecutionPrincipal;
    patchArtifactRef: string;
    expectedBaseSnapshotHash?: string;
    mode: 'check' | 'apply';
    conflictPolicy: 'fail' | 'three_way' | 'mark_conflicts';
    idempotencyKey?: string;
}

Contract members ​

MemberKindSignatureDescription
conflictPolicypropertyconflictPolicy: "fail" | "three_way" | "mark_conflicts"Public property; its type, readonly modifier and optionality are shown in the signature.
expectedBaseSnapshotHashpropertyexpectedBaseSnapshotHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idempotencyKeypropertyidempotencyKey?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
modepropertymode: "check" | "apply"Public property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
patchArtifactRefpropertypatchArtifactRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspacePatchResult ​

Workspace Patch Result interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspacePatchResult } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspacePatchResult {
    checked: boolean;
    applied: boolean;
    conflicts: WorkspacePatchConflict[];
    mutations: FileMutation[];
    resultingWorkspaceSnapshotHash?: string;
}

Contract members ​

MemberKindSignatureDescription
appliedpropertyapplied: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
checkedpropertychecked: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
conflictspropertyconflicts: WorkspacePatchConflict[]Public property; its type, readonly modifier and optionality are shown in the signature.
mutationspropertymutations: FileMutation[]Public property; its type, readonly modifier and optionality are shown in the signature.
resultingWorkspaceSnapshotHashpropertyresultingWorkspaceSnapshotHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspacePathPolicySpec ​

Workspace Path Policy Spec interface with 12 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspacePathPolicySpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspacePathPolicySpec {
    /** Read permission only. Exact or descendant deny rules always take precedence. */
    readOnlyPaths?: string[];
    /** Write permission only. Exact or descendant deny rules always take precedence. */
    writablePaths?: string[];
    /** Execute permission only. Exact or descendant deny rules always take precedence. */
    executablePaths?: string[];
    /** Final deny boundary; it cannot be widened by any allow list. */
    deniedPaths?: string[];
    allowSymlinks?: boolean;
    allowHardLinks?: boolean;
    followSymlinksForRead?: boolean;
    allowHiddenFiles?: boolean;
    maxPathLength?: number;
    allowedExtensions?: string[];
    deniedExtensions?: string[];
    caseSensitivity?: 'platform' | 'sensitive' | 'insensitive';
}

Contract members ​

MemberKindSignatureDescription
allowedExtensionspropertyallowedExtensions?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
allowHardLinkspropertyallowHardLinks?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
allowHiddenFilespropertyallowHiddenFiles?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
allowSymlinkspropertyallowSymlinks?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
caseSensitivitypropertycaseSensitivity?: "platform" | "sensitive" | "insensitive"Public property; its type, readonly modifier and optionality are shown in the signature.
deniedExtensionspropertydeniedExtensions?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
deniedPathspropertydeniedPaths?: string[]Final deny boundary; it cannot be widened by any allow list.
executablePathspropertyexecutablePaths?: string[]Execute permission only. Exact or descendant deny rules always take precedence.
followSymlinksForReadpropertyfollowSymlinksForRead?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
maxPathLengthpropertymaxPathLength?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
readOnlyPathspropertyreadOnlyPaths?: string[]Read permission only. Exact or descendant deny rules always take precedence.
writablePathspropertywritablePaths?: string[]Write permission only. Exact or descendant deny rules always take precedence.

WorkspacePathRequest ​

Workspace Path Request interface with 5 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspacePathRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspacePathRequest {
    workspaceId: string;
    principal: ExecutionPrincipal;
    relativePath: string;
    operation: WorkspacePathOperation;
    allowMissing?: boolean;
}

Contract members ​

MemberKindSignatureDescription
allowMissingpropertyallowMissing?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
operationpropertyoperation: WorkspacePathOperationPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceQuotaSpec ​

Workspace Quota Spec interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceQuotaSpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceQuotaSpec {
    maxBytes?: number;
    maxFiles?: number;
    maxSingleFileBytes?: number;
    maxDirectoryDepth?: number;
    maxOpenFiles?: number;
    maxMutationCountPerExecution?: number;
}

Contract members ​

MemberKindSignatureDescription
maxBytespropertymaxBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxDirectoryDepthpropertymaxDirectoryDepth?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxFilespropertymaxFiles?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxMutationCountPerExecutionpropertymaxMutationCountPerExecution?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxOpenFilespropertymaxOpenFiles?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxSingleFileBytespropertymaxSingleFileBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceReadRequest ​

Workspace Read Request interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceReadRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceReadRequest {
    workspaceId: string;
    principal: ExecutionPrincipal;
    relativePath: string;
    encoding?: 'utf8' | 'base64';
    offset?: number;
    length?: number;
    maxBytes?: number;
}

Contract members ​

MemberKindSignatureDescription
encodingpropertyencoding?: "utf8" | "base64"Public property; its type, readonly modifier and optionality are shown in the signature.
lengthpropertylength?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
maxBytespropertymaxBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
offsetpropertyoffset?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceReadResult ​

Workspace Read Result interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceReadResult } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceReadResult {
    relativePath: string;
    encoding: 'utf8' | 'base64';
    content: string;
    contentHash: string;
    sizeBytes: number;
    truncated?: boolean;
    nextOffset?: number;
}

Contract members ​

MemberKindSignatureDescription
contentpropertycontent: stringPublic 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.
encodingpropertyencoding: "utf8" | "base64"Public property; its type, readonly modifier and optionality are shown in the signature.
nextOffsetpropertynextOffset?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sizeBytespropertysizeBytes: numberPublic 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.

WorkspaceRecord ​

Workspace Record interface with 22 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceRecord } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceRecord {
    id: string;
    revision: number;
    tenantId?: string;
    userId: string;
    sessionId?: string;
    runId?: string;
    agentId?: string;
    profileRef: SpecRef;
    profileRevision: string;
    rootPathRef: string;
    status: WorkspaceStatus;
    quota: WorkspaceQuotaSpec;
    usage: WorkspaceUsage;
    activeExecutionIds: string[];
    latestSnapshotRef?: string;
    createdAt: string;
    readyAt?: string;
    updatedAt: string;
    expiresAt?: string;
    cleanedAt?: string;
    error?: NormalizedExecutionError;
    metadata?: Record<string, unknown>;
}

Contract members ​

MemberKindSignatureDescription
activeExecutionIdspropertyactiveExecutionIds: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
agentIdpropertyagentId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
cleanedAtpropertycleanedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
createdAtpropertycreatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
errorpropertyerror?: NormalizedExecutionErrorPublic property; its type, readonly modifier and optionality are shown in the signature.
expiresAtpropertyexpiresAt?: stringPublic 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.
latestSnapshotRefpropertylatestSnapshotRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public 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.
profileRevisionpropertyprofileRevision: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
quotapropertyquota: WorkspaceQuotaSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
readyAtpropertyreadyAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
revisionpropertyrevision: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
rootPathRefpropertyrootPathRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
runIdpropertyrunId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sessionIdpropertysessionId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
statuspropertystatus: WorkspaceStatusPublic property; its type, readonly modifier and optionality are shown in the signature.
tenantIdpropertytenantId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
updatedAtpropertyupdatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
usagepropertyusage: WorkspaceUsagePublic property; its type, readonly modifier and optionality are shown in the signature.
userIdpropertyuserId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceRestoreRequest ​

Workspace Restore Request interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceRestoreRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceRestoreRequest {
    operationId: string;
    workspaceId: string;
    principal: ExecutionPrincipal;
    snapshotRef: string;
    expectedWorkspaceSnapshotHash?: string;
    idempotencyKey?: string;
}

Contract members ​

MemberKindSignatureDescription
expectedWorkspaceSnapshotHashpropertyexpectedWorkspaceSnapshotHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idempotencyKeypropertyidempotencyKey?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotRefpropertysnapshotRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceSnapshotEntry ​

Workspace Snapshot Entry interface with 7 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceSnapshotEntry } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceSnapshotEntry {
    path: string;
    kind: 'file' | 'directory' | 'symlink';
    sizeBytes?: number;
    contentHash?: string;
    mode?: number;
    /** Required only for symlink entries; always Workspace-relative. */
    symlinkTarget?: string;
    artifactRef?: string;
}

Contract members ​

MemberKindSignatureDescription
artifactRefpropertyartifactRef?: stringPublic 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.
kindpropertykind: "file" | "directory" | "symlink"Public property; its type, readonly modifier and optionality are shown in the signature.
modepropertymode?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
pathpropertypath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sizeBytespropertysizeBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
symlinkTargetpropertysymlinkTarget?: stringRequired only for symlink entries; always Workspace-relative.

WorkspaceSnapshotManifest ​

Workspace Snapshot Manifest interface with 12 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceSnapshotManifest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceSnapshotManifest {
    id: string;
    workspaceId: string;
    baseSnapshotId?: string;
    entries: WorkspaceSnapshotEntry[];
    ignoredPatterns?: string[];
    sourceTreeHash: string;
    manifestHash: string;
    totalBytes: number;
    fileCount: number;
    createdAt: string;
    createdBy: string;
    metadata?: Record<string, unknown>;
}

Contract members ​

MemberKindSignatureDescription
baseSnapshotIdpropertybaseSnapshotId?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
createdAtpropertycreatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
createdBypropertycreatedBy: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
entriespropertyentries: WorkspaceSnapshotEntry[]Public property; its type, readonly modifier and optionality are shown in the signature.
fileCountpropertyfileCount: 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.
ignoredPatternspropertyignoredPatterns?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
manifestHashpropertymanifestHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
sourceTreeHashpropertysourceTreeHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
totalBytespropertytotalBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceSnapshotPolicySpec ​

Workspace Snapshot Policy Spec interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceSnapshotPolicySpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceSnapshotPolicySpec {
    enabled: boolean;
    mode: 'full' | 'incremental' | 'manifest_only';
    snapshotBeforeWrite?: boolean;
    snapshotAfterExecution?: boolean;
    snapshotOnFailure?: boolean;
    maxSnapshots?: number;
}

Contract members ​

MemberKindSignatureDescription
enabledpropertyenabled: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
maxSnapshotspropertymaxSnapshots?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
modepropertymode: "full" | "incremental" | "manifest_only"Public property; its type, readonly modifier and optionality are shown in the signature.
snapshotAfterExecutionpropertysnapshotAfterExecution?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotBeforeWritepropertysnapshotBeforeWrite?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotOnFailurepropertysnapshotOnFailure?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceSnapshotRequest ​

Workspace Snapshot Request interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceSnapshotRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceSnapshotRequest {
    operationId: string;
    workspaceId: string;
    principal: ExecutionPrincipal;
    type: WorkspaceSnapshotType;
    baseSnapshotRef?: string;
    includePaths?: string[];
    excludePatterns?: string[];
    reason?: string;
    idempotencyKey?: string;
    metadata?: Record<string, unknown>;
}

Contract members ​

MemberKindSignatureDescription
baseSnapshotRefpropertybaseSnapshotRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
excludePatternspropertyexcludePatterns?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
idempotencyKeypropertyidempotencyKey?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
includePathspropertyincludePaths?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
reasonpropertyreason?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
typepropertytype: WorkspaceSnapshotTypePublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceSpec ​

Workspace Spec interface with 21 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceSpec } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceSpec extends VersionedSpec, SpecMetadata {
    revision?: string;
    rootPolicy: 'managed' | 'provided_ref';
    rootRef?: string;
    directories: WorkspaceDirectorySpec;
    pathPolicy: WorkspacePathPolicySpec;
    quota: WorkspaceQuotaSpec;
    cleanup: WorkspaceCleanupPolicySpec;
    snapshot: WorkspaceSnapshotPolicySpec;
    mutation: WorkspaceMutationPolicySpec;
    executionEnvironmentRef?: SpecRef;
    artifactProfileRef?: SpecRef;
    secretPolicyRef?: SpecRef;
    metadata?: Record<string, unknown>;
}

Contract members ​

MemberKindSignatureDescription
artifactProfileRefpropertyartifactProfileRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
cleanuppropertycleanup: WorkspaceCleanupPolicySpecPublic property; its type, readonly modifier and optionality are shown in the signature.
createdAtpropertycreatedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
descriptionpropertydescription?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
directoriespropertydirectories: WorkspaceDirectorySpecPublic property; its type, readonly modifier and optionality are shown in the signature.
executionEnvironmentRefpropertyexecutionEnvironmentRef?: SpecRefPublic 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.
metadatapropertymetadata?: Record<string, unknown>Public property; its type, readonly modifier and optionality are shown in the signature.
mutationpropertymutation: WorkspaceMutationPolicySpecPublic property; its type, readonly modifier and optionality are shown in the signature.
namepropertyname?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
ownerpropertyowner?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
pathPolicypropertypathPolicy: WorkspacePathPolicySpecPublic property; its type, readonly modifier and optionality are shown in the signature.
quotapropertyquota: WorkspaceQuotaSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
revisionpropertyrevision?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
rootPolicypropertyrootPolicy: "managed" | "provided_ref"Public property; its type, readonly modifier and optionality are shown in the signature.
rootRefpropertyrootRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
secretPolicyRefpropertysecretPolicyRef?: SpecRefPublic property; its type, readonly modifier and optionality are shown in the signature.
snapshotpropertysnapshot: WorkspaceSnapshotPolicySpecPublic property; its type, readonly modifier and optionality are shown in the signature.
tagspropertytags?: string[]Public property; its type, readonly modifier and optionality are shown in the signature.
updatedAtpropertyupdatedAt?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
versionpropertyversion: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceUsage ​

Workspace Usage interface with 4 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceUsage } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceUsage {
    bytes: number;
    files: number;
    directories?: number;
    lastCalculatedAt: string;
}

Contract members ​

MemberKindSignatureDescription
bytespropertybytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
directoriespropertydirectories?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
filespropertyfiles: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
lastCalculatedAtpropertylastCalculatedAt: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceWriteRequest ​

Workspace Write Request interface with 10 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceWriteRequest } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceWriteRequest {
    operationId: string;
    workspaceId: string;
    principal: ExecutionPrincipal;
    relativePath: string;
    content?: string | Uint8Array;
    artifactRef?: string;
    mode: 'create' | 'overwrite' | 'append' | 'atomic_replace';
    expectedContentHash?: string;
    createParents?: boolean;
    idempotencyKey?: string;
}

Contract members ​

MemberKindSignatureDescription
artifactRefpropertyartifactRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
contentpropertycontent?: string | Uint8Array<ArrayBufferLike>Public property; its type, readonly modifier and optionality are shown in the signature.
createParentspropertycreateParents?: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
expectedContentHashpropertyexpectedContentHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
idempotencyKeypropertyidempotencyKey?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
modepropertymode: "create" | "overwrite" | "append" | "atomic_replace"Public property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
principalpropertyprincipal: ExecutionPrincipalPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
workspaceIdpropertyworkspaceId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceWriteResult ​

Workspace Write Result interface with 6 public fields or methods.

  • Kind: interface
  • Import: import type { WorkspaceWriteResult } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export interface WorkspaceWriteResult {
    relativePath: string;
    beforeHash?: string;
    afterHash: string;
    sizeBytes: number;
    mutation: FileMutation;
    artifactRef?: string;
}

Contract members ​

MemberKindSignatureDescription
afterHashpropertyafterHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
artifactRefpropertyartifactRef?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
beforeHashpropertybeforeHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
mutationpropertymutation: FileMutationPublic property; its type, readonly modifier and optionality are shown in the signature.
relativePathpropertyrelativePath: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sizeBytespropertysizeBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

WorkspaceEntryKind ​

Public type alias for Workspace Entry Kind; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceEntryKind } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceEntryKind = 'file' | 'directory' | 'symlink' | 'other';

WorkspaceEventCreateInput ​

Public type alias for Workspace Event Create Input; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceEventCreateInput } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceEventCreateInput<TType extends WorkspaceFrameworkEventType = WorkspaceFrameworkEventType> = Omit<EventCreateInput<WorkspaceEventPayloadMap[TType]>, 'type' | 'workspaceId'> & {
    type: TType;
    workspaceId: string;
};

WorkspaceEventPayloadMap ​

Public type alias for Workspace Event Payload Map; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceEventPayloadMap } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceEventPayloadMap = {
    'workspace.create.requested': WorkspaceEventPayloadWithRequired<'operationId' | 'profileRef'>;
    'workspace.created': WorkspaceEventPayloadWithRequired<'operationId' | 'profileRef' | 'status'>;
    'workspace.ready': WorkspaceStatusEventPayload<'ready'>;
    'workspace.busy': WorkspaceStatusEventPayload<'busy'>;
    'workspace.path.resolved': WorkspaceEventPayloadWithRequired<'operationId'>;
    'workspace.path.denied': WorkspaceEventPayloadWithRequired<'operationId' | 'error'>;
    'workspace.quota.exceeded': WorkspaceQuotaExceededEventPayload;
    'workspace.snapshot.requested': WorkspaceEventPayloadWithRequired<'operationId'>;
    'workspace.snapshot.created': WorkspaceEventPayloadWithRequired<'operationId' | 'snapshotManifestHash' | 'artifactRefs'>;
    'workspace.snapshot.failed': WorkspaceEventPayloadWithRequired<'operationId' | 'error'>;
    'workspace.restore.requested': WorkspaceEventPayloadWithRequired<'operationId' | 'artifactRefs'>;
    'workspace.restored': WorkspaceEventPayloadWithRequired<'operationId' | 'workspaceSnapshotHash'>;
    'workspace.restore.failed': WorkspaceEventPayloadWithRequired<'operationId' | 'error'>;
    'workspace.patch.checked': WorkspaceEventPayloadWithRequired<'operationId'>;
    'workspace.patch.applied': WorkspaceEventPayloadWithRequired<'operationId' | 'workspaceSnapshotHash'>;
    'workspace.patch.conflict': WorkspaceEventPayloadWithRequired<'operationId'>;
    'workspace.cleanup.started': WorkspaceEventPayloadWithRequired<'operationId'>;
    'workspace.cleanup.completed': WorkspaceEventPayloadWithRequired<'operationId'>;
    'workspace.cleanup.failed': WorkspaceEventPayloadWithRequired<'operationId' | 'error'>;
};

WorkspaceFrameworkEvent ​

Public type alias for Workspace Framework Event; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceFrameworkEvent } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceFrameworkEvent<TType extends WorkspaceFrameworkEventType = WorkspaceFrameworkEventType> = Omit<FrameworkEvent<WorkspaceEventPayloadMap[TType]>, 'type' | 'workspaceId'> & {
    type: TType;
    workspaceId: string;
};

WorkspaceFrameworkEventType ​

Public type alias for Workspace Framework Event Type; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceFrameworkEventType } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceFrameworkEventType = 'workspace.create.requested' | 'workspace.created' | 'workspace.ready' | 'workspace.busy' | 'workspace.path.resolved' | 'workspace.path.denied' | 'workspace.quota.exceeded' | 'workspace.snapshot.requested' | 'workspace.snapshot.created' | 'workspace.snapshot.failed' | 'workspace.restore.requested' | 'workspace.restored' | 'workspace.restore.failed' | 'workspace.patch.checked' | 'workspace.patch.applied' | 'workspace.patch.conflict' | 'workspace.cleanup.started' | 'workspace.cleanup.completed' | 'workspace.cleanup.failed';

WorkspacePathOperation ​

Public type alias for Workspace Path Operation; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspacePathOperation } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspacePathOperation = 'read' | 'write' | 'execute' | 'delete' | 'list';

WorkspacePermission ​

Public type alias for Workspace Permission; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspacePermission } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspacePermission = 'read' | 'write' | 'execute' | 'delete';

WorkspaceSnapshotType ​

Public type alias for Workspace Snapshot Type; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceSnapshotType } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceSnapshotType = 'full' | 'incremental' | 'manifest_only' | 'failure_snapshot';

WorkspaceStatus ​

Public type alias for Workspace Status; the declaration contains its complete type expression.

  • Kind: type
  • Import: import type { WorkspaceStatus } from '@codesoul-co/hypha-core';
  • Source module: contracts/workspace

Declaration ​

text
export type WorkspaceStatus = 'creating' | 'ready' | 'busy' | 'snapshotting' | 'archiving' | 'archived' | 'cleaning' | 'cleaned' | 'failed';