@codesoul-co/hypha-core / modules/workspace/snapshots
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/modules/workspace/snapshots.ts - Exports: 26
Using this module
Use the Snapshots module for declaring and enforcing workspace scope boundaries. It exports 16 constants, 10 functions.
Import from the package entrypoint
import {
workspaceDiffRequestSchema,
workspaceDiffResultExample,
workspaceDiffResultSchema,
workspaceDiffSummarySchema,
workspacePatchConflictSchema,
workspacePatchRequestExample,
workspacePatchRequestSchema,
workspacePatchResultExample,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- The module exposes 10 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 16 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { workspaceDiffRequestSchema } from '@codesoul-co/hypha-core';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = workspaceDiffRequestSchema.parse(input);Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
workspaceDiffRequestSchema | constant | const workspaceDiffRequestSchema: z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArray<z.ZodString, "... | Runtime schema for Workspace Diff Request. |
workspaceDiffResultExample | constant | const workspaceDiffResultExample: WorkspaceDiffResult | Valid example value for Workspace Diff Result. |
workspaceDiffResultSchema | constant | const workspaceDiffResultSchema: z.ZodObject<{ fromSnapshotRef: z.ZodString; toSnapshotRef: z.ZodOptional<z.ZodString>; mutations: z.ZodArray<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; operation: z.ZodEnum<["created", "modified", "deleted", "renamed", "permission_changed"]>; beforeHash: z.ZodOptional<z.ZodString>; afterHash: z.ZodOptional<z.ZodString>; beforeSizeBytes: z.ZodOptional<z.ZodNumber... | Runtime schema for Workspace Diff Result. |
workspaceDiffSummarySchema | constant | const workspaceDiffSummarySchema: z.ZodObject<{ created: z.ZodNumber; modified: z.ZodNumber; deleted: z.ZodNumber; renamed: z.ZodNumber; permissionChanged: z.ZodNumber; bytesAdded: z.ZodNumber; bytesRemoved: z.ZodNumber; }, "strict", z.ZodTypeAny, { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }, { deleted: number; created... | Runtime schema for Workspace Diff Summary. |
workspacePatchConflictSchema | constant | const workspacePatchConflictSchema: z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; reason: z.ZodString; expectedHash: z.ZodOptional<z.ZodString>; actualHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: strin... | Runtime schema for Workspace Patch Conflict. |
workspacePatchRequestExample | constant | const workspacePatchRequestExample: WorkspacePatchRequest | Valid example value for Workspace Patch Request. |
workspacePatchRequestSchema | constant | const workspacePatchRequestSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArray<... | Runtime schema for Workspace Patch Request. |
workspacePatchResultExample | constant | const workspacePatchResultExample: WorkspacePatchResult | Valid example value for Workspace Patch Result. |
workspacePatchResultSchema | constant | const workspacePatchResultSchema: z.ZodEffects<z.ZodObject<{ checked: z.ZodBoolean; applied: z.ZodBoolean; conflicts: z.ZodArray<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; reason: z.ZodString; expectedHash: z.ZodOptional<z.ZodString>; actualHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefi... | Runtime schema for Workspace Patch Result. |
workspaceRestoreRequestSchema | constant | const workspaceRestoreRequestSchema: z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArray<z.ZodString... | Runtime schema for Workspace Restore Request. |
workspaceSnapshotEntrySchema | constant | const workspaceSnapshotEntrySchema: z.ZodEffects<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; kind: z.ZodEnum<["file", "directory", "symlink"]>; sizeBytes: z.ZodOptional<z.ZodNumber>; contentHash: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodNumber>; symlinkTarget: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; artifactRef: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny,... | Runtime schema for Workspace Snapshot Entry. |
workspaceSnapshotJsonSchemas | constant | const workspaceSnapshotJsonSchemas: Record<string, JsonSchema> | Workspace Snapshot JSON Schemas constant exported by the modules/workspace/snapshots module. |
workspaceSnapshotManifestExample | constant | const workspaceSnapshotManifestExample: WorkspaceSnapshotManifest | Valid example value for Workspace Snapshot Manifest. |
workspaceSnapshotManifestSchema | constant | const workspaceSnapshotManifestSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; workspaceId: z.ZodString; baseSnapshotId: z.ZodOptional<z.ZodString>; entries: z.ZodArray<z.ZodEffects<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; kind: z.ZodEnum<["file", "directory", "symlink"]>; sizeBytes: z.ZodOptional<z.ZodNumber>; contentHash: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodNumber>; sym... | Runtime schema for Workspace Snapshot Manifest. |
workspaceSnapshotRequestExample | constant | const workspaceSnapshotRequestExample: WorkspaceSnapshotRequest | Valid example value for Workspace Snapshot Request. |
workspaceSnapshotRequestSchema | constant | const workspaceSnapshotRequestSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArr... | Runtime schema for Workspace Snapshot Request. |
validateWorkspaceDiffRequest | function | validateWorkspaceDiffRequest(input: unknown): WorkspaceDiffRequest | Validate Workspace Diff Request function with 1 public call signature; parameters and return types are listed below. |
validateWorkspaceDiffResult | function | validateWorkspaceDiffResult(input: unknown): WorkspaceDiffResult | Validate Workspace Diff Result function with 1 public call signature; parameters and return types are listed below. |
validateWorkspaceDiffSummary | function | validateWorkspaceDiffSummary(input: unknown): WorkspaceDiffSummary | Validate Workspace Diff Summary function with 1 public call signature; parameters and return types are listed below. |
validateWorkspacePatchConflict | function | validateWorkspacePatchConflict(input: unknown): WorkspacePatchConflict | Validate Workspace Patch Conflict function with 1 public call signature; parameters and return types are listed below. |
validateWorkspacePatchRequest | function | validateWorkspacePatchRequest(input: unknown): WorkspacePatchRequest | Validate Workspace Patch Request function with 1 public call signature; parameters and return types are listed below. |
validateWorkspacePatchResult | function | validateWorkspacePatchResult(input: unknown): WorkspacePatchResult | Validate Workspace Patch Result function with 1 public call signature; parameters and return types are listed below. |
validateWorkspaceRestoreRequest | function | validateWorkspaceRestoreRequest(input: unknown): WorkspaceRestoreRequest | Validate Workspace Restore Request function with 1 public call signature; parameters and return types are listed below. |
validateWorkspaceSnapshotEntry | function | validateWorkspaceSnapshotEntry(input: unknown): WorkspaceSnapshotEntry | Validate Workspace Snapshot Entry function with 1 public call signature; parameters and return types are listed below. |
validateWorkspaceSnapshotManifest | function | validateWorkspaceSnapshotManifest(input: unknown): WorkspaceSnapshotManifest | Validate Workspace Snapshot Manifest function with 1 public call signature; parameters and return types are listed below. |
validateWorkspaceSnapshotRequest | function | validateWorkspaceSnapshotRequest(input: unknown): WorkspaceSnapshotRequest | Validate Workspace Snapshot Request function with 1 public call signature; parameters and return types are listed below. |
workspaceDiffRequestSchema
Runtime schema for Workspace Diff Request.
- Kind: constant
- Import:
import { workspaceDiffRequestSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceDiffRequestSchema: z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArray<z.ZodString, "many">; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }, { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }>; fromSnapshotRef: z.ZodString; toSnapshotRef: z.ZodOptional<z.ZodString>; createPatchArtifact: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; fromSnapshotRef: string; toSnapshotRef?: string | undefined; createPatchArtifact?: boolean | undefined; }, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; fromSnapshotRef: string; toSnapshotRef?: string | undefined; createPatchArtifact?: boolean | undefined; }>;workspaceDiffResultExample
Valid example value for Workspace Diff Result.
- Kind: constant
- Import:
import { workspaceDiffResultExample } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceDiffResultExample: WorkspaceDiffResult;workspaceDiffResultSchema
Runtime schema for Workspace Diff Result.
- Kind: constant
- Import:
import { workspaceDiffResultSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceDiffResultSchema: z.ZodObject<{ fromSnapshotRef: z.ZodString; toSnapshotRef: z.ZodOptional<z.ZodString>; mutations: z.ZodArray<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; operation: z.ZodEnum<["created", "modified", "deleted", "renamed", "permission_changed"]>; beforeHash: z.ZodOptional<z.ZodString>; afterHash: z.ZodOptional<z.ZodString>; beforeSizeBytes: z.ZodOptional<z.ZodNumber>; afterSizeBytes: z.ZodOptional<z.ZodNumber>; artifactRef: z.ZodOptional<z.ZodString>; oldPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; detectedAt: z.ZodString; }, "strict", z.ZodTypeAny, { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }, { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }>, "many">; patchArtifactRef: z.ZodOptional<z.ZodString>; summary: z.ZodObject<{ created: z.ZodNumber; modified: z.ZodNumber; deleted: z.ZodNumber; renamed: z.ZodNumber; permissionChanged: z.ZodNumber; bytesAdded: z.ZodNumber; bytesRemoved: z.ZodNumber; }, "strict", z.ZodTypeAny, { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }, { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }>; }, "strict", z.ZodTypeAny, { fromSnapshotRef: string; mutations: { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }[]; summary: { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }; toSnapshotRef?: string | undefined; patchArtifactRef?: string | undefined; }, { fromSnapshotRef: string; mutations: { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }[]; summary: { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }; toSnapshotRef?: string | undefined; patchArtifactRef?: string | undefined; }>;workspaceDiffSummarySchema
Runtime schema for Workspace Diff Summary.
- Kind: constant
- Import:
import { workspaceDiffSummarySchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceDiffSummarySchema: z.ZodObject<{ created: z.ZodNumber; modified: z.ZodNumber; deleted: z.ZodNumber; renamed: z.ZodNumber; permissionChanged: z.ZodNumber; bytesAdded: z.ZodNumber; bytesRemoved: z.ZodNumber; }, "strict", z.ZodTypeAny, { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }, { deleted: number; created: number; modified: number; renamed: number; permissionChanged: number; bytesAdded: number; bytesRemoved: number; }>;workspacePatchConflictSchema
Runtime schema for Workspace Patch Conflict.
- Kind: constant
- Import:
import { workspacePatchConflictSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspacePatchConflictSchema: z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; reason: z.ZodString; expectedHash: z.ZodOptional<z.ZodString>; actualHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }>;workspacePatchRequestExample
Valid example value for Workspace Patch Request.
- Kind: constant
- Import:
import { workspacePatchRequestExample } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspacePatchRequestExample: WorkspacePatchRequest;workspacePatchRequestSchema
Runtime schema for Workspace Patch Request.
- Kind: constant
- Import:
import { workspacePatchRequestSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspacePatchRequestSchema: z.ZodEffects<z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArray<z.ZodString, "many">; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }, { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }>; patchArtifactRef: z.ZodString; expectedBaseSnapshotHash: z.ZodOptional<z.ZodString>; mode: z.ZodEnum<["check", "apply"]>; conflictPolicy: z.ZodEnum<["fail", "three_way", "mark_conflicts"]>; idempotencyKey: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; mode: "check" | "apply"; patchArtifactRef: string; conflictPolicy: "fail" | "three_way" | "mark_conflicts"; idempotencyKey?: string | undefined; expectedBaseSnapshotHash?: string | undefined; }, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; mode: "check" | "apply"; patchArtifactRef: string; conflictPolicy: "fail" | "three_way" | "mark_conflicts"; idempotencyKey?: string | undefined; expectedBaseSnapshotHash?: string | undefined; }>, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; mode: "check" | "apply"; patchArtifactRef: string; conflictPolicy: "fail" | "three_way" | "mark_conflicts"; idempotencyKey?: string | undefined; expectedBaseSnapshotHash?: string | undefined; }, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; mode: "check" | "apply"; patchArtifactRef: string; conflictPolicy: "fail" | "three_way" | "mark_conflicts"; idempotencyKey?: string | undefined; expectedBaseSnapshotHash?: string | undefined; }>;workspacePatchResultExample
Valid example value for Workspace Patch Result.
- Kind: constant
- Import:
import { workspacePatchResultExample } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspacePatchResultExample: WorkspacePatchResult;workspacePatchResultSchema
Runtime schema for Workspace Patch Result.
- Kind: constant
- Import:
import { workspacePatchResultSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspacePatchResultSchema: z.ZodEffects<z.ZodObject<{ checked: z.ZodBoolean; applied: z.ZodBoolean; conflicts: z.ZodArray<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; reason: z.ZodString; expectedHash: z.ZodOptional<z.ZodString>; actualHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }, { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }>, "many">; mutations: z.ZodArray<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; operation: z.ZodEnum<["created", "modified", "deleted", "renamed", "permission_changed"]>; beforeHash: z.ZodOptional<z.ZodString>; afterHash: z.ZodOptional<z.ZodString>; beforeSizeBytes: z.ZodOptional<z.ZodNumber>; afterSizeBytes: z.ZodOptional<z.ZodNumber>; artifactRef: z.ZodOptional<z.ZodString>; oldPath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; detectedAt: z.ZodString; }, "strict", z.ZodTypeAny, { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }, { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }>, "many">; resultingWorkspaceSnapshotHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { applied: boolean; mutations: { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }[]; checked: boolean; conflicts: { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }[]; resultingWorkspaceSnapshotHash?: string | undefined; }, { applied: boolean; mutations: { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }[]; checked: boolean; conflicts: { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }[]; resultingWorkspaceSnapshotHash?: string | undefined; }>, { applied: boolean; mutations: { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }[]; checked: boolean; conflicts: { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }[]; resultingWorkspaceSnapshotHash?: string | undefined; }, { applied: boolean; mutations: { path: string; detectedAt: string; operation: "deleted" | "created" | "modified" | "renamed" | "permission_changed"; artifactRef?: string | undefined; beforeHash?: string | undefined; afterHash?: string | undefined; beforeSizeBytes?: number | undefined; afterSizeBytes?: number | undefined; oldPath?: string | undefined; }[]; checked: boolean; conflicts: { path: string; reason: string; expectedHash?: string | undefined; actualHash?: string | undefined; }[]; resultingWorkspaceSnapshotHash?: string | undefined; }>;workspaceRestoreRequestSchema
Runtime schema for Workspace Restore Request.
- Kind: constant
- Import:
import { workspaceRestoreRequestSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceRestoreRequestSchema: z.ZodObject<{ operationId: z.ZodString; workspaceId: z.ZodString; principal: z.ZodObject<{ principalId: z.ZodString; type: z.ZodEnum<["user", "agent", "service", "system"]>; tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodOptional<z.ZodString>; agentId: z.ZodOptional<z.ZodString>; roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; permissionScopes: z.ZodArray<z.ZodString, "many">; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }, { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }>; snapshotRef: z.ZodString; expectedWorkspaceSnapshotHash: z.ZodOptional<z.ZodString>; idempotencyKey: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; snapshotRef: string; idempotencyKey?: string | undefined; expectedWorkspaceSnapshotHash?: string | undefined; }, { operationId: string; workspaceId: string; principal: { type: "user" | "agent" | "service" | "system"; principalId: string; permissionScopes: string[]; metadata?: Record<string, unknown> | undefined; agentId?: string | undefined; tenantId?: string | undefined; userId?: string | undefined; roles?: string[] | undefined; }; snapshotRef: string; idempotencyKey?: string | undefined; expectedWorkspaceSnapshotHash?: string | undefined; }>;workspaceSnapshotEntrySchema
Runtime schema for Workspace Snapshot Entry.
- Kind: constant
- Import:
import { workspaceSnapshotEntrySchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceSnapshotEntrySchema: z.ZodEffects<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; kind: z.ZodEnum<["file", "directory", "symlink"]>; sizeBytes: z.ZodOptional<z.ZodNumber>; contentHash: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodNumber>; symlinkTarget: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; artifactRef: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }>, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }>;workspaceSnapshotJsonSchemas
Workspace Snapshot JSON Schemas constant exported by the modules/workspace/snapshots module.
- Kind: constant
- Import:
import { workspaceSnapshotJsonSchemas } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceSnapshotJsonSchemas: Record<string, JsonSchema>;workspaceSnapshotManifestExample
Valid example value for Workspace Snapshot Manifest.
- Kind: constant
- Import:
import { workspaceSnapshotManifestExample } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceSnapshotManifestExample: WorkspaceSnapshotManifest;workspaceSnapshotManifestSchema
Runtime schema for Workspace Snapshot Manifest.
- Kind: constant
- Import:
import { workspaceSnapshotManifestSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceSnapshotManifestSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; workspaceId: z.ZodString; baseSnapshotId: z.ZodOptional<z.ZodString>; entries: z.ZodArray<z.ZodEffects<z.ZodObject<{ path: z.ZodEffects<z.ZodString, string, string>; kind: z.ZodEnum<["file", "directory", "symlink"]>; sizeBytes: z.ZodOptional<z.ZodNumber>; contentHash: z.ZodOptional<z.ZodString>; mode: z.ZodOptional<z.ZodNumber>; symlinkTarget: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; artifactRef: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }>, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }, { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }>, "many">; ignoredPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; sourceTreeHash: z.ZodString; manifestHash: z.ZodString; totalBytes: z.ZodNumber; fileCount: z.ZodNumber; createdAt: z.ZodString; createdBy: z.ZodString; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strict", z.ZodTypeAny, { entries: { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }[]; id: string; workspaceId: string; sourceTreeHash: string; createdAt: string; manifestHash: string; totalBytes: number; fileCount: number; createdBy: string; metadata?: Record<string, unknown> | undefined; baseSnapshotId?: string | undefined; ignoredPatterns?: string[] | undefined; }, { entries: { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }[]; id: string; workspaceId: string; sourceTreeHash: string; createdAt: string; manifestHash: string; totalBytes: number; fileCount: number; createdBy: string; metadata?: Record<string, unknown> | undefined; baseSnapshotId?: string | undefined; ignoredPatterns?: string[] | undefined; }>, { entries: { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }[]; id: string; workspaceId: string; sourceTreeHash: string; createdAt: string; manifestHash: string; totalBytes: number; fileCount: number; createdBy: string; metadata?: Record<string, unknown> | undefined; baseSnapshotId?: string | undefined; ignoredPatterns?: string[] | undefined; }, { entries: { path: string; kind: "file" | "directory" | "symlink"; contentHash?: string | undefined; sizeBytes?: number | undefined; mode?: number | undefined; artifactRef?: string | undefined; symlinkTarget?: string | undefined; }[]; id: string; workspaceId: string; sourceTreeHash: string; createdAt: string; manifestHash: string; totalBytes: number; fileCount: number; createdBy: string; metadata?: Record<string, unknown> | undefined; baseSnapshotId?: string | undefined; ignoredPatterns?: string[] | undefined; }>;workspaceSnapshotRequestExample
Valid example value for Workspace Snapshot Request.
- Kind: constant
- Import:
import { workspaceSnapshotRequestExample } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare const workspaceSnapshotRequestExample: WorkspaceSnapshotRequest;workspaceSnapshotRequestSchema
Runtime schema for Workspace Snapshot Request.
- Kind: constant
- Import:
import { workspaceSnapshotRequestSchema } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const workspaceSnapshotRequestSchema: (typeof import('@codesoul-co/hypha-core'))['workspaceSnapshotRequestSchema'];This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.
validateWorkspaceDiffRequest
Validate Workspace Diff Request function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceDiffRequest } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceDiffRequest(input: unknown): WorkspaceDiffRequest;Call signature
validateWorkspaceDiffRequest(input: unknown): WorkspaceDiffRequestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceDiffRequest - Description: The return contract is defined by the type shown above.
validateWorkspaceDiffResult
Validate Workspace Diff Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceDiffResult } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceDiffResult(input: unknown): WorkspaceDiffResult;Call signature
validateWorkspaceDiffResult(input: unknown): WorkspaceDiffResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceDiffResult - Description: The return contract is defined by the type shown above.
validateWorkspaceDiffSummary
Validate Workspace Diff Summary function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceDiffSummary } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceDiffSummary(input: unknown): WorkspaceDiffSummary;Call signature
validateWorkspaceDiffSummary(input: unknown): WorkspaceDiffSummaryParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceDiffSummary - Description: The return contract is defined by the type shown above.
validateWorkspacePatchConflict
Validate Workspace Patch Conflict function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspacePatchConflict } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspacePatchConflict(input: unknown): WorkspacePatchConflict;Call signature
validateWorkspacePatchConflict(input: unknown): WorkspacePatchConflictParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspacePatchConflict - Description: The return contract is defined by the type shown above.
validateWorkspacePatchRequest
Validate Workspace Patch Request function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspacePatchRequest } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspacePatchRequest(input: unknown): WorkspacePatchRequest;Call signature
validateWorkspacePatchRequest(input: unknown): WorkspacePatchRequestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspacePatchRequest - Description: The return contract is defined by the type shown above.
validateWorkspacePatchResult
Validate Workspace Patch Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspacePatchResult } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspacePatchResult(input: unknown): WorkspacePatchResult;Call signature
validateWorkspacePatchResult(input: unknown): WorkspacePatchResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspacePatchResult - Description: The return contract is defined by the type shown above.
validateWorkspaceRestoreRequest
Validate Workspace Restore Request function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceRestoreRequest } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceRestoreRequest(input: unknown): WorkspaceRestoreRequest;Call signature
validateWorkspaceRestoreRequest(input: unknown): WorkspaceRestoreRequestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceRestoreRequest - Description: The return contract is defined by the type shown above.
validateWorkspaceSnapshotEntry
Validate Workspace Snapshot Entry function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceSnapshotEntry } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceSnapshotEntry(input: unknown): WorkspaceSnapshotEntry;Call signature
validateWorkspaceSnapshotEntry(input: unknown): WorkspaceSnapshotEntryParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceSnapshotEntry - Description: The return contract is defined by the type shown above.
validateWorkspaceSnapshotManifest
Validate Workspace Snapshot Manifest function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceSnapshotManifest } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceSnapshotManifest(input: unknown): WorkspaceSnapshotManifest;Call signature
validateWorkspaceSnapshotManifest(input: unknown): WorkspaceSnapshotManifestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceSnapshotManifest - Description: The return contract is defined by the type shown above.
validateWorkspaceSnapshotRequest
Validate Workspace Snapshot Request function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateWorkspaceSnapshotRequest } from '@codesoul-co/hypha-core'; - Source module:
modules/workspace/snapshots
Declaration
export declare function validateWorkspaceSnapshotRequest(input: unknown): WorkspaceSnapshotRequest;Call signature
validateWorkspaceSnapshotRequest(input: unknown): WorkspaceSnapshotRequestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
WorkspaceSnapshotRequest - Description: The return contract is defined by the type shown above.
