> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 샌드박스 제공자 `SandboxProvider`샌드박스를 등록하기 위해 패키지가 구현하는 인터페이스입니다.[`MastraEditor`](https://mastra.zisheng.pro/ko/reference/editor/mastra-editor). 편집자가 전화함`createSandbox(config)`작업 공간 수분 공급 시간에`provider`저장된 이드에서[`StorageWorkspaceRef`](https://mastra.zisheng.pro/ko/reference/editor/storage-workspace-ref)sandbox 구성을 조회 키로 사용합니다. 내장 `local` Sandbox Provider는 자동으로 등록됩니다. 외부 Provider(예: E2B)는 `MastraEditorConfig.sandboxes`를 통해 제공합니다. ## 사용예 ```typescript import { MastraEditor } from '@mastra/editor' import { e2bSandboxProvider } from '@mastra/e2b' new MastraEditor({ sandboxes: { [e2bSandboxProvider.id]: e2bSandboxProvider, }, }) ``` ## 속성 **id** (`string`): 고유한 Provider 식별자입니다(예: "local", "e2b"). 이 Provider를 사용하는 모든 저장된 Workspace의 StorageSandboxConfig.provider와 일치해야 합니다. **name** (`string`): UI에 표시되는 사람이 읽기 쉬운 이름입니다. **description** (`string`): Workspace Sandbox 선택기에 표시되는 간단한 설명입니다. **configSchema** (`Record`): Provider별 구성을 설명하는 JSON Schema입니다. UI에서 구성 양식을 렌더링하는 데 사용됩니다. **createSandbox** (`(config: TConfig) => WorkspaceSandbox | Promise`): 저장된 구성으로 런타임 WorkspaceSandbox 인스턴스를 생성합니다. Workspace 하이드레이션 시점에 호출됩니다. ## 공급자 구현 ```typescript import type { SandboxProvider, WorkspaceSandbox } from '@mastra/core/editor' export const mySandboxProvider: SandboxProvider<{ apiKey: string }> = { id: 'my-sandbox', name: 'My Sandbox', description: 'Cloud sandbox for command execution.', configSchema: { type: 'object', required: ['apiKey'], properties: { apiKey: { type: 'string' }, }, }, async createSandbox(config): Promise { return createMySandbox({ apiKey: config.apiKey }) }, } ``` 등록되면 관리자는 인라인 작업 공간 구성 또는 저장된 공급자를 참조할 수 있습니다.[`StorageWorkspaceRef`](https://mastra.zisheng.pro/ko/reference/editor/storage-workspace-ref). ## 관련된 - [작업공간](https://agent-builder.mastra.ai/workspace): 개념 및 작업 사례. - [스토리지작업공간참조](https://mastra.zisheng.pro/ko/reference/editor/storage-workspace-ref): 저장된 구성은 다음에서 사용됩니다.`createSandbox`. - [파일 시스템 공급자](https://mastra.zisheng.pro/ko/reference/editor/filesystem-provider): 파일 액세스를 위한 형제 공급자입니다. - [MastraEditor 클래스](https://mastra.zisheng.pro/ko/reference/editor/mastra-editor): 공급자 레지스트리.