Skip to content

@codesoul-co/hypha-core / modules/sandbox/index

模块用法

用于使用该功能边界的公共契约与操作。Index 模块公开 15 常量、8 函数。

从包入口导入

ts
import {
  sandboxCleanupRequestSchema,
  sandboxCreateRequestExample,
  sandboxCreateRequestSchema,
  sandboxLifecycleJsonSchemas,
  sandboxProviderCapabilitiesExample,
  sandboxProviderCapabilitiesJsonSchema,
  sandboxProviderCapabilitiesSchema,
  sandboxRecordExample,
} from '@codesoul-co/hypha-core';

// 完整导出列表见下方。

使用要点

  • 8 个函数是该模块的直接操作入口;每个 overload 的必需/可选参数与返回类型均在下方列出。
  • 15 个常量/枚举提供稳定值、Schema、Definition 或默认配置;应复用这些导出,避免在应用中复制内部值。

运行时校验示例

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

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = sandboxCleanupRequestSchema.parse(input);

配置、网络请求或持久化数据等不可信输入应先通过 Runtime Schema,再传给只接受已校验契约的函数或类。

公共导出

Symbol种类签名说明
sandboxCleanupRequestSchema常量const sandboxCleanupRequestSchema: z.ZodObject<{ operationId: z.ZodString; sandboxId: 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, "m...Sandbox Cleanup Request 的运行时 Schema。
sandboxCreateRequestExample常量const sandboxCreateRequestExample: SandboxCreateRequestSandbox Create Request 的有效示例值。
sandboxCreateRequestSchema常量const sandboxCreateRequestSchema: z.ZodEffects<z.ZodObject<{ operationId: 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">; metad...Sandbox Create Request 的运行时 Schema。
sandboxLifecycleJsonSchemas常量const sandboxLifecycleJsonSchemas: Record<string, JsonSchema>modules/sandbox/index 模块导出的 Sandbox Lifecycle JSON Schemas 常量。
sandboxProviderCapabilitiesExample常量const sandboxProviderCapabilitiesExample: SandboxProviderCapabilitiesSandbox Provider Capabilities 的有效示例值。
sandboxProviderCapabilitiesJsonSchema常量const sandboxProviderCapabilitiesJsonSchema: JsonSchemaSandbox Provider Capabilities 的 JSON Schema。
sandboxProviderCapabilitiesSchema常量const sandboxProviderCapabilitiesSchema: z.ZodObject<{ processIsolation: z.ZodBoolean; filesystemIsolation: z.ZodBoolean; networkIsolation: z.ZodBoolean; cpuLimits: z.ZodBoolean; memoryLimits: z.ZodBoolean; diskLimits: z.ZodBoolean; pidsLimit: z.ZodBoolean; cancellation: z.ZodBoolean; processTreeKill: z.ZodBoolean; snapshots: z.ZodBoolean; imageDigestPinning: z.ZodBoolean; remoteExecution: z.ZodBoolean; }, "strict...Sandbox Provider Capabilities 的运行时 Schema。
sandboxRecordExample常量const sandboxRecordExample: SandboxRecordSandbox Record 的有效示例值。
sandboxRecordJsonSchema常量const sandboxRecordJsonSchema: JsonSchemaSandbox Record 的 JSON Schema。
sandboxRecordSchema常量const sandboxRecordSchema: z.ZodEffects<z.ZodObject<{ id: z.ZodString; revision: z.ZodNumber; providerId: z.ZodString; environmentRef: z.ZodObject<{ id: z.ZodString; version: z.ZodOptional<z.ZodString>; revision: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; version?: string | undefined; revision?: string | undefined; }, { id: string; version?: string | undefined; revision?: string | undefine...Sandbox Record 的运行时 Schema。
sandboxStartRequestSchema常量const sandboxStartRequestSchema: z.ZodObject<{ operationId: z.ZodString; sandboxId: 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, "man...Sandbox Start Request 的运行时 Schema。
sandboxStatusRequestSchema常量const sandboxStatusRequestSchema: z.ZodObject<{ sandboxId: 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.ZodOptio...Sandbox Status Request 的运行时 Schema。
sandboxStatusSchema常量const sandboxStatusSchema: z.ZodEnum<["creating", "created", "starting", "ready", "busy", "stopping", "stopped", "terminating", "terminated", "cleaning", "cleaned", "failed"]>Sandbox Status 的运行时 Schema。
sandboxStatusTransitions常量const sandboxStatusTransitions: Readonly<Record<SandboxStatus, readonly SandboxStatus[]>>modules/sandbox/index 模块导出的 Sandbox Status Transitions 常量。
sandboxTerminateRequestSchema常量const sandboxTerminateRequestSchema: z.ZodObject<{ operationId: z.ZodString; sandboxId: 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, ...Sandbox Terminate Request 的运行时 Schema。
canTransitionSandboxStatus函数canTransitionSandboxStatus(from: SandboxStatus, to: SandboxStatus): booleanCan Transition Sandbox Status 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxCleanupRequest函数validateSandboxCleanupRequest(input: unknown): SandboxCleanupRequestValidate Sandbox Cleanup Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxCreateRequest函数validateSandboxCreateRequest(input: unknown): SandboxCreateRequestValidate Sandbox Create Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxProviderCapabilities函数validateSandboxProviderCapabilities(input: unknown): SandboxProviderCapabilitiesValidate Sandbox Provider Capabilities 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxRecord函数validateSandboxRecord(input: unknown): SandboxRecordValidate Sandbox Record 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxStartRequest函数validateSandboxStartRequest(input: unknown): SandboxStartRequestValidate Sandbox Start Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxStatusRequest函数validateSandboxStatusRequest(input: unknown): SandboxStatusRequestValidate Sandbox Status Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateSandboxTerminateRequest函数validateSandboxTerminateRequest(input: unknown): SandboxTerminateRequestValidate Sandbox Terminate Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

sandboxCleanupRequestSchema

Sandbox Cleanup Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxCleanupRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxCleanupRequestSchema: z.ZodObject<{ operationId: z.ZodString; sandboxId: 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; }>; expectedRevision: z.ZodNumber; idempotencyKey: z.ZodOptional<z.ZodString>; } & { reason: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { operationId: string; sandboxId: 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; }; expectedRevision: number; reason?: string | undefined; idempotencyKey?: string | undefined; }, { operationId: string; sandboxId: 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; }; expectedRevision: number; reason?: string | undefined; idempotencyKey?: string | undefined; }>;

sandboxCreateRequestExample

Sandbox Create Request 的有效示例值。

  • 种类: 常量
  • 导入: import { sandboxCreateRequestExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxCreateRequestExample: SandboxCreateRequest;

sandboxCreateRequestSchema

Sandbox Create Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxCreateRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const sandboxCreateRequestSchema: (typeof import('@codesoul-co/hypha-core'))['sandboxCreateRequestSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

sandboxLifecycleJsonSchemas

modules/sandbox/index 模块导出的 Sandbox Lifecycle JSON Schemas 常量。

  • 种类: 常量
  • 导入: import { sandboxLifecycleJsonSchemas } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

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

sandboxProviderCapabilitiesExample

Sandbox Provider Capabilities 的有效示例值。

  • 种类: 常量
  • 导入: import { sandboxProviderCapabilitiesExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxProviderCapabilitiesExample: SandboxProviderCapabilities;

sandboxProviderCapabilitiesJsonSchema

Sandbox Provider Capabilities 的 JSON Schema。

  • 种类: 常量
  • 导入: import { sandboxProviderCapabilitiesJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxProviderCapabilitiesJsonSchema: JsonSchema;

sandboxProviderCapabilitiesSchema

Sandbox Provider Capabilities 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxProviderCapabilitiesSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxProviderCapabilitiesSchema: z.ZodObject<{ processIsolation: z.ZodBoolean; filesystemIsolation: z.ZodBoolean; networkIsolation: z.ZodBoolean; cpuLimits: z.ZodBoolean; memoryLimits: z.ZodBoolean; diskLimits: z.ZodBoolean; pidsLimit: z.ZodBoolean; cancellation: z.ZodBoolean; processTreeKill: z.ZodBoolean; snapshots: z.ZodBoolean; imageDigestPinning: z.ZodBoolean; remoteExecution: z.ZodBoolean; }, "strict", z.ZodTypeAny, { processIsolation: boolean; filesystemIsolation: boolean; networkIsolation: boolean; cpuLimits: boolean; memoryLimits: boolean; diskLimits: boolean; pidsLimit: boolean; cancellation: boolean; processTreeKill: boolean; snapshots: boolean; imageDigestPinning: boolean; remoteExecution: boolean; }, { processIsolation: boolean; filesystemIsolation: boolean; networkIsolation: boolean; cpuLimits: boolean; memoryLimits: boolean; diskLimits: boolean; pidsLimit: boolean; cancellation: boolean; processTreeKill: boolean; snapshots: boolean; imageDigestPinning: boolean; remoteExecution: boolean; }>;

sandboxRecordExample

Sandbox Record 的有效示例值。

  • 种类: 常量
  • 导入: import { sandboxRecordExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxRecordExample: SandboxRecord;

sandboxRecordJsonSchema

Sandbox Record 的 JSON Schema。

  • 种类: 常量
  • 导入: import { sandboxRecordJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxRecordJsonSchema: JsonSchema;

sandboxRecordSchema

Sandbox Record 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxRecordSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
// 精确类型由包入口解析;完整编译器展开定义见源码链接。
export declare const sandboxRecordSchema: (typeof import('@codesoul-co/hypha-core'))['sandboxRecordSchema'];

该常量的编译器展开类型已压缩;它的公共名称、顶层类型与源码位置仍保留在本条目中。相关输入/输出字段请使用同模块导出的接口、类型或 Runtime Schema。

sandboxStartRequestSchema

Sandbox Start Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxStartRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxStartRequestSchema: z.ZodObject<{ operationId: z.ZodString; sandboxId: 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; }>; expectedRevision: z.ZodNumber; idempotencyKey: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { operationId: string; sandboxId: 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; }; expectedRevision: number; idempotencyKey?: string | undefined; }, { operationId: string; sandboxId: 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; }; expectedRevision: number; idempotencyKey?: string | undefined; }>;

sandboxStatusRequestSchema

Sandbox Status Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxStatusRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxStatusRequestSchema: z.ZodObject<{ sandboxId: 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; }>; }, "strict", z.ZodTypeAny, { sandboxId: 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; }; }, { sandboxId: 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; }; }>;

sandboxStatusSchema

Sandbox Status 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxStatusSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxStatusSchema: z.ZodEnum<["creating", "created", "starting", "ready", "busy", "stopping", "stopped", "terminating", "terminated", "cleaning", "cleaned", "failed"]>;

sandboxStatusTransitions

modules/sandbox/index 模块导出的 Sandbox Status Transitions 常量。

  • 种类: 常量
  • 导入: import { sandboxStatusTransitions } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxStatusTransitions: Readonly<Record<SandboxStatus, readonly SandboxStatus[]>>;

sandboxTerminateRequestSchema

Sandbox Terminate Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { sandboxTerminateRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare const sandboxTerminateRequestSchema: z.ZodObject<{ operationId: z.ZodString; sandboxId: 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; }>; expectedRevision: z.ZodNumber; idempotencyKey: z.ZodOptional<z.ZodString>; } & { reason: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { operationId: string; sandboxId: 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; }; expectedRevision: number; reason?: string | undefined; idempotencyKey?: string | undefined; }, { operationId: string; sandboxId: 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; }; expectedRevision: number; reason?: string | undefined; idempotencyKey?: string | undefined; }>;

canTransitionSandboxStatus

Can Transition Sandbox Status 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { canTransitionSandboxStatus } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function canTransitionSandboxStatus(from: SandboxStatus, to: SandboxStatus): boolean;

调用签名

text
canTransitionSandboxStatus(from: SandboxStatus, to: SandboxStatus): boolean

参数

参数类型必需说明
fromSandboxStatus必需参数;接受的值由类型列定义。
toSandboxStatus必需参数;接受的值由类型列定义。

返回值

  • 类型: boolean
  • 说明: 返回值契约由上述类型定义。

validateSandboxCleanupRequest

Validate Sandbox Cleanup Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxCleanupRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxCleanupRequest(input: unknown): SandboxCleanupRequest;

调用签名

text
validateSandboxCleanupRequest(input: unknown): SandboxCleanupRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxCleanupRequest
  • 说明: 返回值契约由上述类型定义。

validateSandboxCreateRequest

Validate Sandbox Create Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxCreateRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxCreateRequest(input: unknown): SandboxCreateRequest;

调用签名

text
validateSandboxCreateRequest(input: unknown): SandboxCreateRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxCreateRequest
  • 说明: 返回值契约由上述类型定义。

validateSandboxProviderCapabilities

Validate Sandbox Provider Capabilities 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxProviderCapabilities } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxProviderCapabilities(input: unknown): SandboxProviderCapabilities;

调用签名

text
validateSandboxProviderCapabilities(input: unknown): SandboxProviderCapabilities

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxProviderCapabilities
  • 说明: 返回值契约由上述类型定义。

validateSandboxRecord

Validate Sandbox Record 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxRecord } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxRecord(input: unknown): SandboxRecord;

调用签名

text
validateSandboxRecord(input: unknown): SandboxRecord

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxRecord
  • 说明: 返回值契约由上述类型定义。

validateSandboxStartRequest

Validate Sandbox Start Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxStartRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxStartRequest(input: unknown): SandboxStartRequest;

调用签名

text
validateSandboxStartRequest(input: unknown): SandboxStartRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxStartRequest
  • 说明: 返回值契约由上述类型定义。

validateSandboxStatusRequest

Validate Sandbox Status Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxStatusRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxStatusRequest(input: unknown): SandboxStatusRequest;

调用签名

text
validateSandboxStatusRequest(input: unknown): SandboxStatusRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxStatusRequest
  • 说明: 返回值契约由上述类型定义。

validateSandboxTerminateRequest

Validate Sandbox Terminate Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateSandboxTerminateRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/sandbox/index

声明

text
export declare function validateSandboxTerminateRequest(input: unknown): SandboxTerminateRequest;

调用签名

text
validateSandboxTerminateRequest(input: unknown): SandboxTerminateRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: SandboxTerminateRequest
  • 说明: 返回值契约由上述类型定义。