Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
| `@pleasedev/core/sandbox` | `defineSandbox`와 백엔드 계약 — 벤더 중립 타입 |
| `@pleasedev/core/sandbox/harness` | 그 계약을 AI SDK `HarnessV1SandboxProvider`로 옮긴 것. 모든 백엔드를 위해 한 번만 작성한다 |
| `@pleasedev/core/sandbox/docker` | 로컬 Docker 백엔드. **호스트 전용** — `docker` CLI를 실행하므로 Worker 번들에 들어가면 안 된다 |
| `@pleasedev/core/sandbox/local` | 호스트 프로세스 백엔드 — 데몬도 이미지도, **격리도 없다**. 같은 이유로 호스트 전용 |
| `@pleasedev/core/sandbox/just-bash` | [`just-bash`](https://www.npmjs.com/package/just-bash) 위의 가상 셸 백엔드 — 데몬도 이미지도 호스트 프로세스도 없고, **실제 바이너리도 없다**. `just-bash` 는 선택적 peer 의존성 |
| `@pleasedev/core/sandbox/microsandbox` | [`microsandbox`](https://www.npmjs.com/package/microsandbox) 위의 microVM 백엔드 — 네임스페이스가 아니라 하이퍼바이저로 격리한다. 선택적 peer 의존성이며, **타입 검사만 되었고 아직 실행되지 않았다** (아래 참조) |

하네스 변환을 백엔드에서 떼어 둔 덕분에 두 번째 백엔드가 그것을 다시 만들 필요가 없고, 서브패스는
호스트 전용 코드가 그것을 실행할 수 없는 타깃으로 새어 들어가지 않게 막는다.
Expand All @@ -91,6 +94,15 @@
`skills`, `settingSources` 를 노출하지 않으므로, 그 기능들이 실행에 닿는 길은 디렉터리 하나뿐이기
때문이다.

네 백엔드 중 셋은 전제 조건이 갖춰진 곳에서 실제로 도는 스위트를 갖고 있다 — `local` 과 `just-bash`
는 어디서나, `docker` 는 데몬에 닿을 수 있는 곳에서. **microsandbox** 는 예외이고, 그 사실을 감추지
않는다: `microsandbox` 는 이 백엔드가 작성된 플랫폼인 `darwin-x64` 용 네이티브 애드온을 제공하지
않고, Linux CI 러너에서는 애드온은 로드되지만 하이퍼바이저가 없어 게스트가 에이전트 릴레이가
올라오기 전에 죽는다. 그래서 동작 스위트가 통과하는 것을 아직 한 번도 관측하지 못했고, 게이트는
import 검사가 아니라 일회용 부팅이다 — 두 호스트 어느 쪽도 돌지 않은 스위트를 초록으로 보고하지
않도록. 어디서나 검사되는 것은 벤더 타입의 구조적 사본이 벤더의 선언과 여전히 일치하는지다 —
`test/sandbox/microsandbox/vendor-shape.test.ts`, `tsc` 가 강제한다.

정해진 것: 위 범위 표, 이름, 라이선스(Apache-2.0), 스택([Bun](https://bun.sh), TypeScript,
[Turborepo](https://turborepo.com)), 샌드박스 분리, 그리고 선언 문법 — 컴파일러가 필요한 디렉티브가
아니라 `defineAgent` / `defineSandbox`. 근거는 [`docs/project-layout.md`](docs/project-layout.md)에 있다.
Expand Down Expand Up @@ -136,6 +148,9 @@ packages/
contract/ # 백엔드 계약
harness/ # 그 계약 위의 HarnessV1SandboxProvider
docker/ # 로컬 Docker 백엔드 (호스트 전용)
local/ # 호스트 프로세스 백엔드 (호스트 전용, 격리 없음)
just-bash/ # 가상 셸 백엔드 (호스트 프로세스 없음, 실제 바이너리 없음)
microsandbox/ # microVM 백엔드 (호스트 전용, 하이퍼바이저 격리)
scripts/ # 런타임을 가정하지 않고 측정하는 프로브
cli/ # @pleasedev/cli — 아직 배포하지 않는다. 명령어가 없다
src/ui/ # 세션이 시작되기 전에 `please dev`가 그리는 부팅 크롬
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ and it runs — [`examples/claude-code-docker`](examples/claude-code-docker) dri
| `@pleasedev/core/sandbox` | `defineSandbox`, plus the backend contract — vendor-neutral types |
| `@pleasedev/core/sandbox/harness` | the contract rendered as AI SDK `HarnessV1SandboxProvider`, written once for every backend |
| `@pleasedev/core/sandbox/docker` | a local Docker backend. **Host-only** — it spawns the `docker` CLI, so it must never reach a Worker bundle |
| `@pleasedev/core/sandbox/local` | a host-process backend — no daemon, no image, **and no isolation**. Host-only for the same reason |
| `@pleasedev/core/sandbox/just-bash` | a virtual-shell backend over [`just-bash`](https://www.npmjs.com/package/just-bash) — no daemon, no image, no host process, and **no real binaries**. `just-bash` is an optional peer dependency |
| `@pleasedev/core/sandbox/microsandbox` | a microVM backend over [`microsandbox`](https://www.npmjs.com/package/microsandbox) — isolation by hypervisor rather than by namespace. Optional peer dependency; **type-checked but not yet run** (see below) |

Splitting the harness translation from the backends is what keeps a second backend from re-deriving
it, and the subpaths are what keep host-only code out of a target that cannot run it.
Expand All @@ -99,6 +102,16 @@ because that boundary is the AI SDK's and a wrapper here would only be an obliga
And **`workspace` is a declared input**, because no adapter exposes `agents`, `skills` or
`settingSources` — a directory is the only route those have into a run.

Three of the four backends are covered by suites that run wherever their prerequisite is present —
`local` and `just-bash` everywhere, `docker` where a daemon is reachable. The **microsandbox**
backend is the exception and says so rather than implying otherwise: `microsandbox` ships no native
addon for `darwin-x64`, which is the platform it was written on, and on the Linux CI runner the
addon loads but the guest dies before its agent relay comes up, for want of a hypervisor. So its
behavioural suite has never been observed to pass, and its gate is a throwaway boot rather than an
import check, so that neither host reports a green suite it never ran. What *is* checked everywhere
is that its structural copies of the vendor's types still match the vendor's own declarations —
`test/sandbox/microsandbox/vendor-shape.test.ts`, enforced by `tsc`.

Decided: the scope table above, the name, the license (Apache-2.0), the stack
([Bun](https://bun.sh), TypeScript, [Turborepo](https://turborepo.com)), the sandbox split, and the
declaration syntax — `defineAgent` / `defineSandbox` rather than a compiler-backed directive,
Expand Down Expand Up @@ -146,6 +159,9 @@ packages/
contract/ # the backend contract
harness/ # HarnessV1SandboxProvider over that contract
docker/ # local Docker backend (host-only)
local/ # host-process backend (host-only, unisolated)
just-bash/ # virtual-shell backend (no host process, no real binaries)
microsandbox/ # microVM backend (host-only, hypervisor-isolated)
scripts/ # probes that measure the runtime rather than assume it
cli/ # @pleasedev/cli — unreleased; has no command yet
src/ui/ # the boot chrome `please dev` draws before the session starts
Expand Down
Loading