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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @kevinten10
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug report
description: Report reproducible portable-runtime behavior that differs from the specification.
title: "bug: "
labels: [bug]
body:
- type: markdown
attributes:
value: Do not include credentials, private infrastructure, user data, or proprietary code.
- type: input
id: version
attributes:
label: Version or commit
placeholder: v0.1.0 or full commit SHA
validations:
required: true
- type: dropdown
id: surface
attributes:
label: Surface
options:
- Protocol or specification
- Reference runtime
- HTTP or SSE server
- TypeScript SDK
- Local Provider
- Mock Provider
- Conformance runner
- Documentation
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Minimal public reproduction
description: Use synthetic identifiers and public inputs only.
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
validations:
required: true
- type: checkboxes
id: safety
attributes:
label: Public-safety confirmation
options:
- label: This report contains no private code, endpoints, credentials, or user data.
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Private security report
url: https://github.com/capa-cloud/sandbox-runtime-api/security/advisories/new
about: Report vulnerabilities privately; do not publish exploit details.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/provider-rfc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Provider or protocol RFC
description: Propose a public-source Provider adapter or a change to the portable contract.
title: "rfc: "
labels: [rfc]
body:
- type: markdown
attributes:
value: Read ORIGIN_AND_PROVENANCE.md and docs/clean-room-policy.md before proposing a change.
- type: textarea
id: problem
attributes:
label: Portable problem
description: Explain why this is shared semantics rather than one deployment detail.
validations:
required: true
- type: textarea
id: sources
attributes:
label: Public sources
description: Link public specifications, SDKs, or documentation. Do not cite private material.
validations:
required: true
- type: textarea
id: capabilities
attributes:
label: Capability and conformance impact
description: Name capability changes, negative behavior, and tests required.
validations:
required: true
- type: textarea
id: security
attributes:
label: Security boundary
description: State what is and is not guaranteed.
validations:
required: true
- type: checkboxes
id: cleanroom
attributes:
label: Clean-room confirmation
options:
- label: This proposal is independently explainable from public sources or first principles.
required: true
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ updates:
- '@types/*'
- typescript
- vitest
ignore:
- dependency-name: '@types/node'
update-types:
- version-update:semver-major
6 changes: 5 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ provider SPI, mock adapter, SDK-facing types, and conformance checks.

## Read First

- `DOCS-INDEX.md`
- `README.md`
- `docs/clean-room-policy.md`
- `ORIGIN_AND_PROVENANCE.md`
Expand All @@ -16,9 +17,12 @@ provider SPI, mock adapter, SDK-facing types, and conformance checks.
## Commands

- Install: `pnpm install`
- Full check: `pnpm check`
- Full check (including build, coverage, docs, and package dry-run): `pnpm check`
- Build: `pnpm build`
- Tests: `pnpm test`
- Coverage: `pnpm test:coverage`
- Documentation: `pnpm docs:check`
- Package contents: `pnpm pack:check`
- Public-content scan: `pnpm sanitize`

## Contract Rules
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

## 0.1.0 - 2026-09-02

Initial public MVP:

- lifecycle, generation fencing, reconciliation, and recreation;
- capability manifests and provider SPI;
- command, file, event replay, and SSE contracts;
- TypeScript SDK and CLI reference server;
- Local and Mock Providers;
- conformance, security-negative, HTTP/SDK, and concurrency tests;
- clean-room provenance, public-content scanning, OpenAPI, and bilingual documentation.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
pnpm install
pnpm check
pnpm sanitize
pnpm test:coverage
pnpm pack:check
```

Use Node.js 22 or later. Keep each change scoped to one protocol or provider concern and add tests
Expand Down
44 changes: 44 additions & 0 deletions DOCS-INDEX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
id: docs-index
authority: canonical
status: canonical
title: Sandbox Runtime API documentation index
genre: spec
last_verified: 2026-09-02
---

# Documentation Index

## Active context

The `v0.1` MVP is the current public baseline. It owns portable lifecycle, capability negotiation,
command and file operations, event replay, the TypeScript SDK, the loopback-only reference server,
the unsafe Local Provider, and provider conformance.

Real cloud providers, production multi-tenancy, strong isolation, durable storage, authentication,
network policy enforcement, snapshots, PTY, and port forwarding remain outside the completed MVP.

## Canonical contract

- [Runtime model](spec/runtime-model.md)
- [Protocol](spec/protocol.md)
- [Capabilities](spec/capabilities.md)
- [OpenAPI](spec/openapi.yaml)
- [Provider-neutral decision](spec/decisions/0001-provider-neutral-sandbox-runtime.md)
- [Non-goals](NON_GOALS.md)
- [Origin and provenance](ORIGIN_AND_PROVENANCE.md)
- [Security policy](SECURITY.md)

## Reference guides

- [Quickstart](docs/quickstart.md)
- [API and SDK guide](docs/api-and-sdk.md)
- [Local Provider](docs/providers/local.md)
- [Testing and conformance](docs/testing.md)
- [Clean-room policy](docs/clean-room-policy.md)

## Process and release evidence

- [v0.1 completion summary](docs/00-v0.1-summary.md)
- [Changelog](CHANGELOG.md)
- [Roadmap](ROADMAP.md)
9 changes: 9 additions & 0 deletions NON_GOALS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
id: non-goals
authority: canonical
status: canonical
title: Project non-goals
genre: spec
last_verified: 2026-09-02
---

# Non-goals

The project intentionally does not provide:
Expand Down
9 changes: 9 additions & 0 deletions ORIGIN_AND_PROVENANCE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
id: origin-and-provenance
authority: canonical
status: canonical
title: Origin and provenance
genre: spec
last_verified: 2026-09-02
---

# Origin and Provenance

Sandbox Runtime API is an independently designed public project.
Expand Down
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Sandbox Runtime API

[![CI](https://github.com/capa-cloud/sandbox-runtime-api/actions/workflows/ci.yml/badge.svg)](https://github.com/capa-cloud/sandbox-runtime-api/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

<p align="center">
<strong>English</strong> | <a href="README.zh-CN.md">简体中文</a>
</p>

Sandbox Runtime API is an independently designed, provider-neutral contract for creating,
Sandbox Runtime API `v0.1` is an independently designed, provider-neutral contract for creating,
observing, controlling, and deleting isolated execution environments for AI agents and developer
tools.

Expand All @@ -31,7 +34,7 @@ Application or Harness Runtime
|
+--------+---------+----------+
| | |
Local Docker Kubernetes / Cloud
Local Mock Future custom
Provider Provider Provider
|
sandbox agent
Expand All @@ -53,19 +56,22 @@ Application
Neither API requires the other. An integration may use both when it needs portable harness and
portable sandbox semantics.

## Current Status
## v0.1 Features

Version `0.1.0-dev` is a clean-room, pre-release development baseline. It currently contains:
Version `0.1.0` contains:

- a transport-neutral TypeScript protocol model;
- a normative runtime model, protocol, capability vocabulary, and OpenAPI document;
- capability preflight;
- generation-fenced mutation semantics;
- an in-memory runtime;
- a mock provider;
- idempotent lifecycle, reconciliation, generation fencing, and recreation;
- bounded command execution and sandbox-relative file operations;
- append-only event listing and resumable SSE projection;
- an in-memory runtime, TypeScript SDK, CLI, and loopback reference server;
- Mock and unsafe Local Providers;
- a provider conformance runner;
- public-source provenance and clean-room contribution rules.

The protocol is expected to change before `1.0.0`.
The API remains pre-1.0 and may change incompatibly. The Local Provider is not a security sandbox and
must never execute untrusted code.

## Quick Start

Expand All @@ -74,17 +80,23 @@ Requirements: Node.js 22 or later and pnpm 10.
```bash
pnpm install
pnpm check
pnpm build
```

Continue with the [Quickstart](docs/quickstart.md) or open the
[documentation index](DOCS-INDEX.md).

## Repository Map

| Path | Purpose |
| --- | --- |
| `src/protocol.ts` | Portable states, resources, capabilities, and errors |
| `src/provider.ts` | Provider SPI |
| `src/runtime.ts` | In-memory reference runtime |
| `src/providers/local.ts` | Unsafe local-process development Provider |
| `src/providers/mock.ts` | Deterministic development provider |
| `src/conformance.ts` | Reusable provider checks |
| `src/server.ts` / `src/sdk.ts` | HTTP/SSE reference server and TypeScript client |
| `spec/` | Normative model and design decisions |
| `docs/clean-room-policy.md` | Public-source and contribution boundary |

Expand Down
26 changes: 17 additions & 9 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Sandbox Runtime API

[![CI](https://github.com/capa-cloud/sandbox-runtime-api/actions/workflows/ci.yml/badge.svg)](https://github.com/capa-cloud/sandbox-runtime-api/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

<p align="center">
<a href="README.md">English</a> | <strong>简体中文</strong>
</p>

Sandbox Runtime API 是一个独立设计、Provider 中立的公共契约,用于创建、观察、控制和删除
Sandbox Runtime API `v0.1` 是一个独立设计、Provider 中立的公共契约,用于创建、观察、控制和删除
面向 AI Agent 与开发工具的隔离执行环境。

项目只标准化可移植的生命周期和能力语义。它不是托管 Sandbox 平台,不是 Agent 框架,也不是
Expand All @@ -29,7 +32,7 @@ Agent 应用通常需要相似的执行能力,但不同 Provider 对生命周
|
+-------+--------+----------+
| | |
Local Docker Kubernetes / Cloud
Local Mock Future custom
Provider Provider Provider
|
sandbox agent
Expand All @@ -42,19 +45,21 @@ Harness 执行;Sandbox Runtime API 规范 Harness 或工具运行所需的隔

二者没有强制依赖。需要同时获得 Harness 与 Sandbox 可移植性时,可以组合使用。

## 当前状态
## v0.1 能力

`0.1.0-dev` 是 clean-room 的开发基线,目前包含
`0.1.0` 包含

- 与传输无关的 TypeScript 协议模型
- 规范化 Runtime 模型、协议、能力词表与 OpenAPI
- capability preflight;
- generation fencing;
- 内存参考 Runtime;
- Mock Provider;
- 幂等生命周期、reconcile、generation fencing 与重建;
- 有界命令执行和 Sandbox 相对路径文件操作;
- 追加事件列表与 SSE 投影;
- 内存 Runtime、TypeScript SDK、CLI 和 loopback 参考服务;
- Mock Provider 与不提供安全隔离的 Local Provider;
- Provider conformance runner;
- 公开来源与 clean-room 贡献规则。

协议在 `1.0.0` 前可能发生不兼容变化。
协议在 `1.0.0` 前可能发生不兼容变化。Local Provider 不是安全 Sandbox,禁止执行不可信代码。

## 快速开始

Expand All @@ -63,8 +68,11 @@ Harness 执行;Sandbox Runtime API 规范 Harness 或工具运行所需的隔
```bash
pnpm install
pnpm check
pnpm build
```

继续阅读 [快速开始](docs/quickstart.md) 或 [文档索引](DOCS-INDEX.md)。

## Clean-room 边界

本仓库只基于公开规范、公开仓库和通用分布式系统原则独立设计。禁止提交私有代码、私有 API、
Expand Down
Loading
Loading