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
4 changes: 2 additions & 2 deletions contracts/agents-api/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ Core may start a hosted Environment from the result of an earlier preparation in
A hosted Session's effective `network` narrows the deployment's [network cap](./sandbox-deployment.md#network), and the policy holds for the sandbox's whole life, including package installation and setup commands:

- `enabled`: the sandbox reaches what the cap allows.
- `disabled`: the sandbox reaches only Core and the Session's model provider. Package installation and setup commands that need the network fail as ordinary setup errors.
- `restricted`: the sandbox reaches the listed domains, Core and the model provider. A domain is allowed on public addresses when the cap allows the public internet, and on its resolved addresses when it is one of the cap's extra domains. Any other domain is rejected at Session creation with `sandbox_network_outside_cap`, whose `param` is that `allowed_domains` entry. If the cap shrinks later, the sandbox attempt fails with the same error.
- `disabled`: the sandbox reaches only Core and the Session's model provider. The model provider stays reachable on its `base_url` port at public addresses; a private model provider host is reachable only when the cap lists its exact name in the extra domains. Package installation and setup commands that need the network fail as ordinary setup errors.
- `restricted`: the sandbox reaches the listed domains, Core and the model provider (on the same terms as `disabled`). A domain is allowed on public addresses when the cap allows the public internet, and on its resolved addresses when it is one of the cap's extra domains. Any other domain is rejected at Session creation with `sandbox_network_outside_cap`, whose `param` is that `allowed_domains` entry. If the cap shrinks later, the sandbox attempt fails with the same error.

`disabled` and `restricted` return `sandbox_network_unsupported` when the deployment's sandbox Provider cannot restrict egress. A `self_hosted` Environment accepts only `enabled`, because Core cannot enforce a policy on a machine it does not run.

Expand Down
2 changes: 1 addition & 1 deletion contracts/agents-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Each item is Core's deliberate or native behavior where the official service beh

- Hosted workspace admission is limited by the [tenant capacity policy](../../docs/configuration.md#tenant-capacity) and the [input reservation deadline](./environments.md#reservations).
- MiniMax Code does not declare `retained_native_history`, so it cannot run on microsandbox, which keeps every Environment on workspace storage; Core rejects the Session ([Harness capabilities](./harness-capabilities.md)).
- The model provider stays reachable from the sandbox because the Harness runs there; MCP connections from the Environment follow the deployment's [network cap](./sandbox-deployment.md#network). E2B sandboxes cannot reach private networks, and `169.254.169.254` answers inside an E2B sandbox under every cap.
- The model provider's port stays reachable at public addresses from the sandbox because the Harness runs there, and a private model provider host only when the network cap lists its name; MCP connections from the Environment follow the deployment's [network cap](./sandbox-deployment.md#network). E2B sandboxes cannot reach private networks, and `169.254.169.254` answers inside an E2B sandbox under every cap.
- `disabled` and `restricted` networking run on hosted Environments whose sandbox Provider can restrict egress, within the deployment's network cap; `self_hosted` Environments accept only `enabled` ([network policy](./environments.md#restricted-network)). The official API accepts an `allowed_domains` entry with a leading dot, such as `.example.com`, with unspecified meaning; Core rejects it.
- `packages.system` other than null or an empty list is rejected; system packages must be preinstalled.
- `Environment.files` lists the files recorded at Session creation; files created later through the Environment files API do not appear.
Expand Down
2 changes: 1 addition & 1 deletion contracts/agents-api/sandbox-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Select the filesystem configuration before the microsandbox deployment. Selectin

### Network

`network` caps what every sandbox of the deployment may reach when its Environment's `network.access` is `enabled` or omitted. The connection to Core and the host of the Session's model provider are always reachable, because the Harness runs inside the sandbox. MCP connections from the Environment follow the cap like any other traffic.
`network` caps what every sandbox of the deployment may reach when its Environment's `network.access` is `enabled` or omitted. The connection to Core and the Session's model provider port on public addresses are always reachable, because the Harness runs inside the sandbox. To reach a model provider at a private address, list its exact host name in `domains`. MCP connections from the Environment follow the cap like any other traffic.

| Field | Accepted value |
| --- | --- |
Expand Down
6 changes: 3 additions & 3 deletions contracts/agents-api/zh/environments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Environment 与模板"
source: contracts/agents-api/environments.md
source_hash: b921c3cde636588da6aebd95d902016fbd4e1a4b4bbbcc8c374540181d5d4ceb
source_hash: 41335469992a2f5262e73ea7e61d4fb0fd101cab48b844f458e4313d50c50647
---

Environment 是 Session 的执行资源,包括 Harness 运行所在的机器、工作区以及已完成准备的能力。Session 通过其 `environment` 配置创建 Environment;不存在独立的 create 调用。Environment 模板是 Session 创建时解析的可复用准备配置。本契约涵盖这两类资源、两种放置方式、输入接纳、能力准备、Skills、Plugins 和 MCP 连接来源。
Expand Down Expand Up @@ -308,8 +308,8 @@ Core 可以用同一 Project 中较早一次准备的结果启动托管 Environm
托管 Session 的有效 `network` 在部署的[网络上限](sandbox-deployment.md#network)内收窄,并且该策略在沙箱的整个生命周期内生效,包括包安装和设置命令:

- `enabled`:沙箱可访问上限允许的范围。
- `disabled`:沙箱只能访问 Core 和 Session 的模型提供商。需要网络的包安装和设置命令按普通设置错误失败。
- `restricted`:沙箱可访问所列域名、Core 和模型提供商。上限允许公网时,域名在公开地址上被允许;域名属于上限的额外域名时,在其解析出的地址上被允许。其他域名在创建 Session 时被拒绝,错误码为 `sandbox_network_outside_cap`,`param` 指向该 `allowed_domains` 条目。上限之后缩小时,沙箱尝试以同一错误失败。
- `disabled`:沙箱只能访问 Core 和 Session 的模型提供商。模型提供商仅在公开地址上的 `base_url` 端口可达;私有的模型提供商主机只有在上限的额外域名列出其精确名称时才可达。需要网络的包安装和设置命令按普通设置错误失败。
- `restricted`:沙箱可访问所列域名、Core 和模型提供商(条件同 `disabled`)。上限允许公网时,域名在公开地址上被允许;域名属于上限的额外域名时,在其解析出的地址上被允许。其他域名在创建 Session 时被拒绝,错误码为 `sandbox_network_outside_cap`,`param` 指向该 `allowed_domains` 条目。上限之后缩小时,沙箱尝试以同一错误失败。

部署的沙箱 Provider 无法限制出站时,`disabled` 和 `restricted` 返回 `sandbox_network_unsupported`。`self_hosted` Environment 只接受 `enabled`,因为 Core 无法在不由它运行的机器上强制策略。

Expand Down
4 changes: 2 additions & 2 deletions contracts/agents-api/zh/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "OpenAI 兼容性"
source: contracts/agents-api/index.md
source_hash: 41a9d5d03e05f56929d5112f29f0ed2441658e9c9f269f8692c200d4fcf2b91b
source_hash: cf0ef0f7d2bf076ed3b402b0c8c98f55d53c584c14b2f45714c17cb34cd14877
---

Core 实现下方固定版本的 OpenAI Agents API。本台账列出各项资源的覆盖情况、相对于官方服务的所有差异以及已知缺口。
Expand Down Expand Up @@ -163,7 +163,7 @@ Core 自身字段位于 `x_agents_core` 中([Core extensions](../../../docs/zh

- Hosted 工作区准入受[租户容量策略](../../../docs/zh/configuration.md#tenant-capacity)及既有[输入预留截止时间](environments.md#reservations)限制。
- MiniMax Code 未声明 `retained_native_history`,因此无法在 microsandbox 上运行(其每个 Environment 都使用工作区存储);Core 会拒绝该 Session([Harness 能力](./harness-capabilities.md))。
- 模型提供商从沙箱内始终可达,因为 Harness 运行在那里;Environment 中的 MCP 连接遵循部署的[网络上限](sandbox-deployment.md#network)。E2B 沙箱无法访问私有网络,且在任何上限下 `169.254.169.254` 都会在 E2B 沙箱内应答。
- 模型提供商在公开地址上的端口从沙箱内始终可达,因为 Harness 运行在那里,私有的模型提供商主机只有在网络上限列出其名称时才可达;Environment 中的 MCP 连接遵循部署的[网络上限](sandbox-deployment.md#network)。E2B 沙箱无法访问私有网络,且在任何上限下 `169.254.169.254` 都会在 E2B 沙箱内应答。
- `disabled` 和 `restricted` 网络在沙箱 Provider 能限制出站的托管 Environment 上运行,并受部署网络上限约束;`self_hosted` Environment 只接受 `enabled`。官方 API 接受带前导点的 `allowed_domains` 条目(如 `.example.com`),含义未规定,Core 拒绝它([restricted network policy](environments.md#restricted-network))。
- 除 null 或空列表以外的 `packages.system` 都会被拒绝;系统软件包必须预先安装。
- `Environment.files` 列出 Session 创建时记录的文件;之后通过 Environment files API 创建的文件不会出现。
Expand Down
4 changes: 2 additions & 2 deletions contracts/agents-api/zh/sandbox-deployment.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "沙箱部署"
source: contracts/agents-api/sandbox-deployment.md
source_hash: ad85ff2713327c6b1e171088b84829308a50d6b0bca93cae531252745e3c6b4e
source_hash: 5afb4db75820cfbadd390409074c94730a559ba86594f8bc40de4796cd174b94
---

沙箱部署为 Core 管理的 `openai_hosted` 执行选择沙箱提供商和每个沙箱的资源。PostgreSQL 为每个安装维护一个当前有效选择;Web 和 Core API 写入同一配置。节点文件保存其已安装副本和特定于主机的路径,且不能覆盖其资源。Runtime 不属于该选择:每个节点运行其所属安装验证过的 Runtime。该选择独立于 Harness。部署可以保持未配置状态,没有节点;此时它拒绝托管准入。
Expand Down Expand Up @@ -66,7 +66,7 @@ microsandbox 会配置 CPU、内存和托管根磁盘,并在挂载于 `/enviro

### 网络 {#network}

当 Environment 的 `network.access` 为 `enabled` 或省略时,`network` 限定该部署的每个沙箱最多能访问什么。到 Core 的连接和 Session 的模型提供商主机始终可达,因为 Harness 运行在沙箱内。Environment 中的 MCP 连接与其他流量一样遵循该上限。
当 Environment 的 `network.access` 为 `enabled` 或省略时,`network` 限定该部署的每个沙箱最多能访问什么。到 Core 的连接和 Session 的模型提供商在公开地址上的端口始终可达,因为 Harness 运行在沙箱内。要访问私有地址上的模型提供商,请把其精确主机名列入 `domains`。Environment 中的 MCP 连接与其他流量一样遵循该上限。

| 字段 | 可接受的值 |
| --- | --- |
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ The node service keeps the proxy settings of the latest run, so it reaches Core
| Node state | `/var/lib/oac-node/.oac/nodes/<installation-id>/`: identity, configuration, node files. microsandbox keeps its images and sandboxes under `/var/lib/oac-node/.oac/m/` |
| Records | `/etc/oac-node/`: what the installer created or changed, used by reruns and uninstall, and the service's proxy settings |
| Runtime image | Imported once into the microsandbox store |
| microsandbox network policy | Core applies the deployment's [network cap](../../contracts/agents-api/sandbox-deployment.md#network) to every sandbox: no inbound connections, and private networks only for the hosts the cap names |
| microsandbox network policy | Core applies the deployment's [network cap](../../contracts/agents-api/sandbox-deployment.md#network) to every sandbox: no inbound connections, and private networks only for the names the cap lists |

Root only prepares the account, the group and the unit; everything else runs as `oac-node`, in its own session without a terminal. The installer never installs KVM or packages, never changes device permissions, sudoers, firewall or SELinux settings, and never touches other accounts. The node connects out to Core; Core needs no SSH access to the host.

> [!WARNING]
> microsandbox sandboxes reach a private address only through a name in the network cap's `domains`; see [Sandboxes cannot reach a private endpoint](./troubleshooting.md#sandboxes-cannot-reach-a-private-endpoint).
> microsandbox sandboxes reach a private address only through a name in the network cap's `domains`; see [Sandboxes cannot reach a private endpoint](./troubleshooting.md#sandboxes-cannot-reach-a-private-endpoint). Until the upstream DNS fix ships, a node's Core URL host must be an IP address or a name with public addresses: a name that resolves to a private address is dropped by DNS rebind protection.

**One Core per host.** Nodes share the `oac-node` account, so a host serves one Core; a command from a second Core is refused.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Add node shows no command: see [Before you add a node](./nodes.md#before-you-add

### Sandboxes cannot reach a private endpoint

A microsandbox sandbox reaches a private address only for the model provider's host and for the names in the deployment's [network cap](../../contracts/agents-api/sandbox-deployment.md#network) `domains`. Any other name that resolves to a private address does not resolve in the sandbox, because DNS rebind protection discards the answer, and a Turn that depends on it fails once the Harness stops retrying. This includes an MCP server at a private address.
A microsandbox sandbox reaches a private address only for the names in the deployment's [network cap](../../contracts/agents-api/sandbox-deployment.md#network) `domains`. Any other name that resolves to a private address does not resolve in the sandbox, because DNS rebind protection discards the answer, and a Turn that depends on it fails once the Harness stops retrying. This includes an MCP server at a private address.

Add the server's exact host name to the domains in **Settings** → **Sandbox and scheduling** → **Network**. The node resolves those names with the nameservers in the host's `/etc/resolv.conf` when a sandbox starts and when it resumes. A name that does not resolve there gets no rule, and the node logs `sandbox network names without an address` with the names.

Expand Down
6 changes: 3 additions & 3 deletions docs/sandbox-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ Core sends the same `Egress` in `Bootstrap` and in every `ResumeRequest`, derive
- `Public`: public addresses are allowed.
- `PrivateDomains`: exact host names whose resolved addresses, private ones included, are allowed.
- `Domains`: exact host names allowed on public addresses only; a private answer stays blocked. They carry a `restricted` Environment's `allowed_domains` when the cap allows the public internet.
- `Endpoints`: the host of the model provider's `base_url`, omitted when it is loopback. The Harness runs in the sandbox and calls it directly.
- `Endpoints`: `host:port` entries (`net.JoinHostPort` form) for the model provider's `base_url`, with the port from the URL or 443 for https and 80 for http, omitted when the host is loopback. The Harness runs in the sandbox and calls it directly. An entry allows that TCP port on public addresses only, never a private address. When the cap lists the model host's name in its extra domains, Core also adds that name to `PrivateDomains`, so a private model host keeps working under every policy.

The Provider enforces exactly this on top of the always-allowed connection to Core, and blocks loopback, link-local, cloud-metadata and every private address that `Egress` does not name. It resolves names with its host's DNS when it creates and when it resumes, and cannot follow later changes of an answer. A name that does not resolve gets no rule. MCP traffic has no entry: it follows `Public`, `PrivateDomains` and `Domains`.
The Provider enforces exactly this on top of the always-allowed connection to Core, and blocks loopback, link-local, cloud-metadata and every private address that `Egress` does not name, except that E2B cannot block the metadata address 169.254.169.254. It resolves names with its host's DNS when it creates and when it resumes, and cannot follow later changes of an answer. A name that does not resolve gets no rule. MCP traffic has no entry: it follows `Public`, `PrivateDomains` and `Domains`.

microsandbox applies the rules with first-match order, default deny, and host DNS reachable; it allows the resolved private addresses without a port so that DNS rebind protection passes them. E2B declares `Restrict` only: `Public` adds a deny list for loopback, private and link-local ranges, and not `Public` denies all traffic except the Core host, `Endpoints` and `Domains`.
microsandbox applies the rules with first-match order, default deny, and host DNS reachable; it allows the resolved private addresses without a port so that DNS rebind protection passes them. E2B declares `Restrict` only: `Public` adds a deny list for loopback, private and link-local ranges, and not `Public` denies all traffic except the Core host, `Endpoints` and `Domains`. E2B matches a host name only on ports 80 and 443, so the adapter also allows the public IPv4 addresses of the Core host and of each Endpoint on any other port.

## Checkpoint lifecycle

Expand Down
6 changes: 3 additions & 3 deletions docs/zh/getting-started/nodes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "添加和管理节点"
source: docs/getting-started/nodes.md
source_hash: 247ca9c1eff00c067eed15c09a9bd1baaab8f8d7a47d5446644bafe19865b6e3
source_hash: 1395a1edece41b37e8c10fc11c2e3658c796972fd83d14e2bb20fc7a11edc84d
---

节点是一台 Linux 主机,为 Core 托管 Session 运行沙箱。本指南面向在沙箱提供商(参阅[选择沙箱提供商](./sandbox-backends.md))为 microsandbox 时添加、修改和移除节点的运维人员;E2B 不需要节点。
Expand Down Expand Up @@ -68,13 +68,13 @@ Core 主机与其他主机一样加入:要在它上面运行沙箱,将它添
| 节点状态 | `/var/lib/oac-node/.oac/nodes/<installation-id>/`:身份、配置和节点文件。microsandbox 在 `/var/lib/oac-node/.oac/m/` 保存镜像和沙箱 |
| 记录 | `/etc/oac-node/`:安装程序创建或修改的内容,用于重新运行和卸载,以及服务的代理设置 |
| Runtime 镜像 | 一次性导入 microsandbox 存储 |
| microsandbox 网络策略 | Core 对每个沙箱应用部署的[网络上限](../../../contracts/agents-api/zh/sandbox-deployment.md#network):无入站连接,只有上限列出的主机可访问私有网络 |
| microsandbox 网络策略 | Core 对每个沙箱应用部署的[网络上限](../../../contracts/agents-api/zh/sandbox-deployment.md#network):无入站连接,只有上限列出的名称可访问私有网络 |

root 只准备账号、组和服务单元;其他操作都以 `oac-node` 在没有终端的独立会话中执行。安装程序不安装 KVM 或软件包,不修改设备权限、sudoers、防火墙或 SELinux 设置,也不修改其他账号。节点向外连接 Core;Core 不需要通过 SSH 访问主机。

> [!CAUTION]
> [!WARNING]
> microsandbox 沙箱只能通过网络上限 `domains` 中的名称访问私有地址;参见[沙箱无法访问私有端点](./troubleshooting.md#sandboxes-cannot-reach-a-private-endpoint)。
> microsandbox 沙箱只能通过网络上限 `domains` 中的名称访问私有地址;参见[沙箱无法访问私有端点](./troubleshooting.md#sandboxes-cannot-reach-a-private-endpoint)。在上游 DNS 修复发布之前,节点的 Core URL 主机必须是 IP 地址,或解析为公开地址的名称:解析为私有地址的名称会被 DNS rebind 保护丢弃。

**每台主机只服务一个 Core。** 节点共享 `oac-node` 账号,因此主机只服务一个 Core;第二个 Core 的命令会被拒绝。

Expand Down
Loading
Loading