@codesoul-co/hypha-tools / workspace
- Package index:
@codesoul-co/hypha-tools - Source:
packages/tools/src/workspace.ts - Exports: 4
Using this module
Use the Workspace module for declaring and enforcing workspace scope boundaries. It exports 3 interfaces, 1 type.
Import from the package entrypoint
ts
import type {
WorkspaceRuntimeConfig,
WorkspaceRuntimePort,
WorkspaceRuntimeRequest,
WorkspaceFileOperation,
} from '@codesoul-co/hypha-tools';Usage patterns
- Use the 4 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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
WorkspaceRuntimeConfig | interface | interface WorkspaceRuntimeConfig | Workspace Runtime Config interface with 5 public fields or methods. |
WorkspaceRuntimePort | interface | interface WorkspaceRuntimePort | Workspace Runtime Port interface with 3 public fields or methods. |
WorkspaceRuntimeRequest | interface | interface WorkspaceRuntimeRequest | Workspace Runtime Request interface with 8 public fields or methods. |
WorkspaceFileOperation | type | type WorkspaceFileOperation = 'read' | 'write' | 'list' | 'execute' | Public type alias for Workspace File Operation; the declaration contains its complete type expression. |
WorkspaceRuntimeConfig
Workspace Runtime Config interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { WorkspaceRuntimeConfig } from '@codesoul-co/hypha-tools'; - Source module:
workspace
Declaration
text
export interface WorkspaceRuntimeConfig {
workingDirectory: string;
readPaths: string[];
writePaths: string[];
executePaths: string[];
execution: {
enabled: boolean;
timeoutMs: number;
maxOutputBytes: number;
};
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
executePaths | property | executePaths: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
execution | property | execution: { enabled: boolean; timeoutMs: number; maxOutputBytes: number; } | Public property; its type, readonly modifier and optionality are shown in the signature. |
readPaths | property | readPaths: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
workingDirectory | property | workingDirectory: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
writePaths | property | writePaths: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
WorkspaceRuntimePort
Workspace Runtime Port interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { WorkspaceRuntimePort } from '@codesoul-co/hypha-tools'; - Source module:
workspace
Declaration
text
export interface WorkspaceRuntimePort {
execute(request: WorkspaceRuntimeRequest): Promise<unknown>;
health(): Promise<ProviderHealth>;
close?(): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
close | method | close?(): Promise<void> | Public method; parameters and return type are shown in the signature. |
execute | method | execute(request: WorkspaceRuntimeRequest): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
health | method | health(): Promise<ProviderHealth> | Public method; parameters and return type are shown in the signature. |
WorkspaceRuntimeRequest
Workspace Runtime Request interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { WorkspaceRuntimeRequest } from '@codesoul-co/hypha-tools'; - Source module:
workspace
Declaration
text
export interface WorkspaceRuntimeRequest {
operation: WorkspaceFileOperation;
path: string;
content?: string;
executable?: boolean;
args?: string[];
cwd?: string;
timeoutMs?: number;
signal?: AbortSignal;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
args | property | args?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
content | property | content?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
cwd | property | cwd?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
executable | property | executable?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
operation | property | operation: WorkspaceFileOperation | Public property; its type, readonly modifier and optionality are shown in the signature. |
path | property | path: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
signal | property | signal?: AbortSignal | Public property; its type, readonly modifier and optionality are shown in the signature. |
timeoutMs | property | timeoutMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
WorkspaceFileOperation
Public type alias for Workspace File Operation; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { WorkspaceFileOperation } from '@codesoul-co/hypha-tools'; - Source module:
workspace
Declaration
text
export type WorkspaceFileOperation = 'read' | 'write' | 'list' | 'execute';