Skip to content

@codesoul-co/hypha-core / modules/workspace/operations

Using this module

Use the Operations module for declaring and enforcing workspace scope boundaries. It exports 18 constants, 10 functions.

Import from the package entrypoint

ts
import {
  fileMutationJsonSchema,
  fileMutationSchema,
  principalJsonSchema,
  relativePathJsonSchema,
  resolvedWorkspacePathSchema,
  workspaceDeleteRequestExample,
  workspaceDeleteRequestSchema,
  workspaceFileEntrySchema,
} 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 18 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Runtime validation example

ts
import { fileMutationSchema } from '@codesoul-co/hypha-core';

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = fileMutationSchema.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

SymbolKindSignatureDescription
fileMutationJsonSchemaconstantconst fileMutationJsonSchema: JsonSchemaJSON Schema for File Mutation.
fileMutationSchemaconstantconst fileMutationSchema: 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.Zod...Runtime schema for File Mutation.
principalJsonSchemaconstantconst principalJsonSchema: JsonSchemaJSON Schema for Principal.
relativePathJsonSchemaconstantconst relativePathJsonSchema: JsonSchemaJSON Schema for Relative Path.
resolvedWorkspacePathSchemaconstantconst resolvedWorkspacePathSchema: z.ZodObject<{ workspaceId: z.ZodString; relativePath: z.ZodEffects<z.ZodString, string, string>; canonicalRelativePath: z.ZodEffects<z.ZodString, string, string>; pathRef: z.ZodString; exists: z.ZodBoolean; kind: z.ZodOptional<z.ZodEnum<["file", "directory", "symlink", "other"]>>; permissions: z.ZodArray<z.ZodEnum<["read", "write", "execute", "delete"]>, "many">; contentHash: z.Z...Runtime schema for Resolved Workspace Path.
workspaceDeleteRequestExampleconstantconst workspaceDeleteRequestExample: WorkspaceDeleteRequestValid example value for Workspace Delete Request.
workspaceDeleteRequestSchemaconstantconst workspaceDeleteRequestSchema: 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 Delete Request.
workspaceFileEntrySchemaconstantconst workspaceFileEntrySchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; kind: z.ZodEnum<["file", "directory", "symlink", "other"]>; sizeBytes: z.ZodOptional<z.ZodNumber>; contentHash: z.ZodOptional<z.ZodString>; modifiedAt: z.ZodOptional<z.ZodString>; permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "execute", "delete"]>, "many">>; }, "strict", z.ZodTypeAny, { kind: ...Runtime schema for Workspace File Entry.
workspaceListRequestSchemaconstantconst workspaceListRequestSchema: z.ZodObject<{ 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.ZodOpt...Runtime schema for Workspace List Request.
workspaceOperationJsonSchemasconstantconst workspaceOperationJsonSchemas: Record<string, JsonSchema>Workspace Operation JSON Schemas constant exported by the modules/workspace/operations module.
workspaceOperationPrincipalExampleconstantconst workspaceOperationPrincipalExample: ExecutionPrincipalValid example value for Workspace Operation Principal.
workspacePathRequestSchemaconstantconst workspacePathRequestSchema: z.ZodObject<{ 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.ZodOpt...Runtime schema for Workspace Path Request.
workspaceReadRequestSchemaconstantconst workspaceReadRequestSchema: z.ZodObject<{ 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.ZodOpt...Runtime schema for Workspace Read Request.
workspaceReadResultSchemaconstantconst workspaceReadResultSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; encoding: z.ZodEnum<["utf8", "base64"]>; content: z.ZodString; contentHash: z.ZodString; sizeBytes: z.ZodNumber; truncated: z.ZodOptional<z.ZodBoolean>; nextOffset: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { contentHash: string; sizeBytes: number; content: string; relativePath: string; encoding: "u...Runtime schema for Workspace Read Result.
workspaceWriteRequestExampleconstantconst workspaceWriteRequestExample: WorkspaceWriteRequestValid example value for Workspace Write Request.
workspaceWriteRequestSchemaconstantconst workspaceWriteRequestSchema: 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 Write Request.
workspaceWriteResultExampleconstantconst workspaceWriteResultExample: WorkspaceWriteResultValid example value for Workspace Write Result.
workspaceWriteResultSchemaconstantconst workspaceWriteResultSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; beforeHash: z.ZodOptional<z.ZodString>; afterHash: z.ZodString; sizeBytes: z.ZodNumber; mutation: 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.ZodOpti...Runtime schema for Workspace Write Result.
validateFileMutationfunctionvalidateFileMutation(input: unknown): FileMutationValidate File Mutation function with 1 public call signature; parameters and return types are listed below.
validateResolvedWorkspacePathfunctionvalidateResolvedWorkspacePath(input: unknown): ResolvedWorkspacePathValidate Resolved Workspace Path function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceDeleteRequestfunctionvalidateWorkspaceDeleteRequest(input: unknown): WorkspaceDeleteRequestValidate Workspace Delete Request function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceFileEntryfunctionvalidateWorkspaceFileEntry(input: unknown): WorkspaceFileEntryValidate Workspace File Entry function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceListRequestfunctionvalidateWorkspaceListRequest(input: unknown): WorkspaceListRequestValidate Workspace List Request function with 1 public call signature; parameters and return types are listed below.
validateWorkspacePathRequestfunctionvalidateWorkspacePathRequest(input: unknown): WorkspacePathRequestValidate Workspace Path Request function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceReadRequestfunctionvalidateWorkspaceReadRequest(input: unknown): WorkspaceReadRequestValidate Workspace Read Request function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceReadResultfunctionvalidateWorkspaceReadResult(input: unknown): WorkspaceReadResultValidate Workspace Read Result function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceWriteRequestfunctionvalidateWorkspaceWriteRequest(input: unknown): WorkspaceWriteRequestValidate Workspace Write Request function with 1 public call signature; parameters and return types are listed below.
validateWorkspaceWriteResultfunctionvalidateWorkspaceWriteResult(input: unknown): WorkspaceWriteResultValidate Workspace Write Result function with 1 public call signature; parameters and return types are listed below.

fileMutationJsonSchema

JSON Schema for File Mutation.

Declaration

text
export declare const fileMutationJsonSchema: JsonSchema;

fileMutationSchema

Runtime schema for File Mutation.

Declaration

text
export declare const fileMutationSchema: 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; }>;

principalJsonSchema

JSON Schema for Principal.

Declaration

text
export declare const principalJsonSchema: JsonSchema;

relativePathJsonSchema

JSON Schema for Relative Path.

Declaration

text
export declare const relativePathJsonSchema: JsonSchema;

resolvedWorkspacePathSchema

Runtime schema for Resolved Workspace Path.

Declaration

text
export declare const resolvedWorkspacePathSchema: z.ZodObject<{ workspaceId: z.ZodString; relativePath: z.ZodEffects<z.ZodString, string, string>; canonicalRelativePath: z.ZodEffects<z.ZodString, string, string>; pathRef: z.ZodString; exists: z.ZodBoolean; kind: z.ZodOptional<z.ZodEnum<["file", "directory", "symlink", "other"]>>; permissions: z.ZodArray<z.ZodEnum<["read", "write", "execute", "delete"]>, "many">; contentHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { workspaceId: string; relativePath: string; canonicalRelativePath: string; pathRef: string; exists: boolean; permissions: ("read" | "write" | "execute" | "delete")[]; contentHash?: string | undefined; kind?: "file" | "directory" | "symlink" | "other" | undefined; }, { workspaceId: string; relativePath: string; canonicalRelativePath: string; pathRef: string; exists: boolean; permissions: ("read" | "write" | "execute" | "delete")[]; contentHash?: string | undefined; kind?: "file" | "directory" | "symlink" | "other" | undefined; }>;

workspaceDeleteRequestExample

Valid example value for Workspace Delete Request.

Declaration

text
export declare const workspaceDeleteRequestExample: WorkspaceDeleteRequest;

workspaceDeleteRequestSchema

Runtime schema for Workspace Delete Request.

Declaration

text
export declare const workspaceDeleteRequestSchema: 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; }>; relativePath: z.ZodEffects<z.ZodString, string, string>; recursive: z.ZodOptional<z.ZodBoolean>; expectedContentHash: 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; }; relativePath: string; idempotencyKey?: string | undefined; recursive?: boolean | undefined; expectedContentHash?: 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; }; relativePath: string; idempotencyKey?: string | undefined; recursive?: boolean | undefined; expectedContentHash?: string | undefined; }>;

workspaceFileEntrySchema

Runtime schema for Workspace File Entry.

Declaration

text
export declare const workspaceFileEntrySchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; kind: z.ZodEnum<["file", "directory", "symlink", "other"]>; sizeBytes: z.ZodOptional<z.ZodNumber>; contentHash: z.ZodOptional<z.ZodString>; modifiedAt: z.ZodOptional<z.ZodString>; permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["read", "write", "execute", "delete"]>, "many">>; }, "strict", z.ZodTypeAny, { kind: "file" | "directory" | "symlink" | "other"; relativePath: string; contentHash?: string | undefined; sizeBytes?: number | undefined; permissions?: ("read" | "write" | "execute" | "delete")[] | undefined; modifiedAt?: string | undefined; }, { kind: "file" | "directory" | "symlink" | "other"; relativePath: string; contentHash?: string | undefined; sizeBytes?: number | undefined; permissions?: ("read" | "write" | "execute" | "delete")[] | undefined; modifiedAt?: string | undefined; }>;

workspaceListRequestSchema

Runtime schema for Workspace List Request.

Declaration

text
export declare const workspaceListRequestSchema: z.ZodObject<{ 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; }>; relativePath: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; recursive: z.ZodOptional<z.ZodBoolean>; includeHidden: z.ZodOptional<z.ZodBoolean>; maxEntries: z.ZodOptional<z.ZodNumber>; cursor: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { 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; }; cursor?: string | undefined; relativePath?: string | undefined; recursive?: boolean | undefined; includeHidden?: boolean | undefined; maxEntries?: number | undefined; }, { 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; }; cursor?: string | undefined; relativePath?: string | undefined; recursive?: boolean | undefined; includeHidden?: boolean | undefined; maxEntries?: number | undefined; }>;

workspaceOperationJsonSchemas

Workspace Operation JSON Schemas constant exported by the modules/workspace/operations module.

Declaration

text
export declare const workspaceOperationJsonSchemas: Record<string, JsonSchema>;

workspaceOperationPrincipalExample

Valid example value for Workspace Operation Principal.

  • Kind: constant
  • Import: import { workspaceOperationPrincipalExample } from '@codesoul-co/hypha-core';
  • Source module: modules/workspace/operations

Declaration

text
export declare const workspaceOperationPrincipalExample: ExecutionPrincipal;

workspacePathRequestSchema

Runtime schema for Workspace Path Request.

Declaration

text
export declare const workspacePathRequestSchema: z.ZodObject<{ 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; }>; relativePath: z.ZodEffects<z.ZodString, string, string>; operation: z.ZodEnum<["read", "write", "execute", "delete", "list"]>; allowMissing: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { 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; }; operation: "read" | "list" | "write" | "execute" | "delete"; relativePath: string; allowMissing?: boolean | undefined; }, { 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; }; operation: "read" | "list" | "write" | "execute" | "delete"; relativePath: string; allowMissing?: boolean | undefined; }>;

workspaceReadRequestSchema

Runtime schema for Workspace Read Request.

Declaration

text
export declare const workspaceReadRequestSchema: z.ZodObject<{ 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; }>; relativePath: z.ZodEffects<z.ZodString, string, string>; encoding: z.ZodOptional<z.ZodEnum<["utf8", "base64"]>>; offset: z.ZodOptional<z.ZodNumber>; length: z.ZodOptional<z.ZodNumber>; maxBytes: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { 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; }; relativePath: string; length?: number | undefined; offset?: number | undefined; maxBytes?: number | undefined; encoding?: "utf8" | "base64" | undefined; }, { 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; }; relativePath: string; length?: number | undefined; offset?: number | undefined; maxBytes?: number | undefined; encoding?: "utf8" | "base64" | undefined; }>;

workspaceReadResultSchema

Runtime schema for Workspace Read Result.

Declaration

text
export declare const workspaceReadResultSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; encoding: z.ZodEnum<["utf8", "base64"]>; content: z.ZodString; contentHash: z.ZodString; sizeBytes: z.ZodNumber; truncated: z.ZodOptional<z.ZodBoolean>; nextOffset: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { contentHash: string; sizeBytes: number; content: string; relativePath: string; encoding: "utf8" | "base64"; truncated?: boolean | undefined; nextOffset?: number | undefined; }, { contentHash: string; sizeBytes: number; content: string; relativePath: string; encoding: "utf8" | "base64"; truncated?: boolean | undefined; nextOffset?: number | undefined; }>;

workspaceWriteRequestExample

Valid example value for Workspace Write Request.

Declaration

text
export declare const workspaceWriteRequestExample: WorkspaceWriteRequest;

workspaceWriteRequestSchema

Runtime schema for Workspace Write Request.

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const workspaceWriteRequestSchema: (typeof import('@codesoul-co/hypha-core'))['workspaceWriteRequestSchema'];

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.

workspaceWriteResultExample

Valid example value for Workspace Write Result.

Declaration

text
export declare const workspaceWriteResultExample: WorkspaceWriteResult;

workspaceWriteResultSchema

Runtime schema for Workspace Write Result.

Declaration

text
export declare const workspaceWriteResultSchema: z.ZodObject<{ relativePath: z.ZodEffects<z.ZodString, string, string>; beforeHash: z.ZodOptional<z.ZodString>; afterHash: z.ZodString; sizeBytes: z.ZodNumber; mutation: 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; }>; artifactRef: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { sizeBytes: number; mutation: { 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; }; relativePath: string; afterHash: string; artifactRef?: string | undefined; beforeHash?: string | undefined; }, { sizeBytes: number; mutation: { 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; }; relativePath: string; afterHash: string; artifactRef?: string | undefined; beforeHash?: string | undefined; }>;

validateFileMutation

Validate File Mutation function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateFileMutation(input: unknown): FileMutation;

Call signature

text
validateFileMutation(input: unknown): FileMutation

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: FileMutation
  • Description: The return contract is defined by the type shown above.

validateResolvedWorkspacePath

Validate Resolved Workspace Path function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateResolvedWorkspacePath(input: unknown): ResolvedWorkspacePath;

Call signature

text
validateResolvedWorkspacePath(input: unknown): ResolvedWorkspacePath

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ResolvedWorkspacePath
  • Description: The return contract is defined by the type shown above.

validateWorkspaceDeleteRequest

Validate Workspace Delete Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceDeleteRequest(input: unknown): WorkspaceDeleteRequest;

Call signature

text
validateWorkspaceDeleteRequest(input: unknown): WorkspaceDeleteRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceDeleteRequest
  • Description: The return contract is defined by the type shown above.

validateWorkspaceFileEntry

Validate Workspace File Entry function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceFileEntry(input: unknown): WorkspaceFileEntry;

Call signature

text
validateWorkspaceFileEntry(input: unknown): WorkspaceFileEntry

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceFileEntry
  • Description: The return contract is defined by the type shown above.

validateWorkspaceListRequest

Validate Workspace List Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceListRequest(input: unknown): WorkspaceListRequest;

Call signature

text
validateWorkspaceListRequest(input: unknown): WorkspaceListRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceListRequest
  • Description: The return contract is defined by the type shown above.

validateWorkspacePathRequest

Validate Workspace Path Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspacePathRequest(input: unknown): WorkspacePathRequest;

Call signature

text
validateWorkspacePathRequest(input: unknown): WorkspacePathRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspacePathRequest
  • Description: The return contract is defined by the type shown above.

validateWorkspaceReadRequest

Validate Workspace Read Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceReadRequest(input: unknown): WorkspaceReadRequest;

Call signature

text
validateWorkspaceReadRequest(input: unknown): WorkspaceReadRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceReadRequest
  • Description: The return contract is defined by the type shown above.

validateWorkspaceReadResult

Validate Workspace Read Result function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceReadResult(input: unknown): WorkspaceReadResult;

Call signature

text
validateWorkspaceReadResult(input: unknown): WorkspaceReadResult

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceReadResult
  • Description: The return contract is defined by the type shown above.

validateWorkspaceWriteRequest

Validate Workspace Write Request function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceWriteRequest(input: unknown): WorkspaceWriteRequest;

Call signature

text
validateWorkspaceWriteRequest(input: unknown): WorkspaceWriteRequest

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceWriteRequest
  • Description: The return contract is defined by the type shown above.

validateWorkspaceWriteResult

Validate Workspace Write Result function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function validateWorkspaceWriteResult(input: unknown): WorkspaceWriteResult;

Call signature

text
validateWorkspaceWriteResult(input: unknown): WorkspaceWriteResult

Parameters

ParameterTypeRequiredDescription
inputunknownYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: WorkspaceWriteResult
  • Description: The return contract is defined by the type shown above.