# @fungi\.computer/oyster 中文文档

规范地址：https://npmcn.com/package/%40fungi.computer/oyster/

版本：0\.32\.0
npm 元数据更新时间：2026-11-15T21:59:11.137Z
中文译文更新时间：2026-11-15T17:59:43.410Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40fungi.computer/oyster
原文对照：https://npmcn.com/package/%40fungi.computer/oyster/?lang=original
项目主页：https://docs.fungi.computer/oyster
源码仓库：https://github.com/fungi-computer/oyster

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：21 MB，595 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：49 个
- peer 依赖：react ^18\.3\.1 \|\| ^19\.2\.0，react-dom ^18\.3\.1 \|\| ^19\.2\.0
- 首次发布：2026-10-15T08:00:52.372Z
- 最新版本发布：2026-11-15T21:59:10.948Z
- 近 30 天下载量：22184（2026-10-16 至 2026-11-14，npm 官方下载统计）
- 已发布版本数：107（近 12 个月 107 个）

## 中文简介

Fungi所著"牡蛎":面向人和AI代理的开源Apps. 尝试一个命令或运行 在自己的Cloudflare账户.

## 安装

```sh
npm install @fungi.computer/oyster
```

也可以使用：`pnpm add @fungi.computer/oyster`、`yarn add @fungi.computer/oyster`、`bun add @fungi.computer/oyster`

## README

# 由真菌制作的牡蛎(`@fungi.computer/oyster`(中文(简体) )

真菌是AI代理的开源工作空间: 人民和特工们 既使用 保存文件的计算机 也允许系统检查. 用一个命令试试,用你自己的Cloudflare账户运行,或者让我们主持 这个.

Fungi的"牡蛎"是您自己运行的Apps的桌面: git平台,代理,a 终端,一个编辑器,工作流程和图像生成. 人们打开Apps在一个 浏览器,和代理通过MCP调用相同的Apps. 每个应用程序都是从一个 准确的git承诺和运行 在自己的沙盒 有自己的数据库,你 选择哪个版本是实时的.

![The Tourtois desktop on Oyster with three Apps tiled: Trellis editing the Bonsai checks graph, Bonsai drawing a repository's network of agent forks, and Shed's terminal on the Computer](https://raw.githubusercontent.com/fungi-computer/oyster/main/docs/media/desktop-dark.png)

有三个方法,从最少到大多数代码:

1.  **试试看** 在你的电脑上有一个命令.
2.  **部署** 到你的Cloudflare账户。 整个牡蛎是两行的 劳工.
3.  **构建自己的主机** 与 `createOysterWorker` 当你只想要其中的一部分时 这个.

## 快速启动: 在计算机上尝试

没有Cloudflare账户,多克或付款。 你需要节点24或更新和基特.

```sh
npx @fungi.computer/oyster try
```

这创造了 `./my-oyster`,开始牡蛎在 `http://127.0.0.1:8787`,构建 Tourtois 桌面从其公共来源安装一页 Hello App并打开 您的浏览器通过一次性登录链接。 你和Hello一起降落在桌面上 在发射器中;打开的页面读取 **我的第一个牡蛎App**。 。 。 .

一旦桌面打开, `try` 继续从他们的开始程序中构建另一个启动程序 Apps 背景中的公共来源, 一次一个, 并打印每行 : 格罗夫 印刷品 墨卡普 特雷利斯和邦赛 都在你的电脑上运行 扭伤, 与牡蛎一起安装,并附上试验 `computer/` 文件夹, Shed 可以运行 当本地沙盒可用时,命令。 运行 `try` 再次离开 已安装的 Apps 未激活 .

所有者密钥可以通过 `my-oyster/.oyster-owner` 从不印刷. 私人审判档案 `~/.config/fungi/oyster-trials/`; 项目 保持与他们的链接, 新闻 Ctrl- C 停止, 并再次运行同一命令 `my-oyster` 以重新启动. `--port <number>` 选择另一个端口, `--no-open` 保持浏览器的关闭,以及 `--verbose` 流出否则要使用的安装和服务器日志 `my-oyster/.oyster/`。 。 。 .

`try` 制造一个普通的工程,没有隐藏的东西: 牡蛎,它的计算机, 反应和Wrangler作为依赖,软件包的例子 `worker.ts` 财务报告和审定财务报表 `wrangler.jsonc`,而Wrangler的本地工人运行时间与其调试器 已禁用。 审判的证书和当地商店都藏在电脑上. 然后它建造了Tourtois, 包装Hello App与 `packRelease` 并安装它 与 `installRelease`。您好消息源将留在 `my-oyster/hello-app` 作为一丁点 您可以编辑仓库.

当地没有电脑,git存储器或工人AI,所以 `try` 构建 启动Apps在你的机器上,而不是在牡蛎电脑上。 这个 [短快开始](https://docs.fungi.computer/oyster-quickstart/) 走着走着 相同路径 [代理快速启动](https://docs.fungi.computer/oyster/agent-quickstart/) 添加 MCP与部署.

## 你得到的东西

部署牡蛎并运行 `npx @fungi.computer/oyster install-apps` 安装 7个Apps. 每个人住在自己的仓库里 [github.com/fungi-计算机](https://github.com/fungi-computer),每个 已安装的 App 也是您的代理商可以叉并重建的模板 .

-   [旅游](https://github.com/fungi-computer/tourtois) 是桌面: a 发射器、平板或浮动窗口、菜单和设置.
-   [邦赛](https://github.com/fungi-computer/bonsai) 主机 git 仓库 . 每个特工都用普通的叉子推着自己的叉子 `git`网络图 显示折叠回主干线的叉.
-   [树林](https://github.com/fungi-computer/grove) 与 将每个安装的App称为代码的代理商.
-   [谢德](https://github.com/fungi-computer/shed) 打开终端 电脑,有它的端口和流程.
-   [墨水盖](https://github.com/fungi-computer/inkcap) 编辑计算机文件.
-   [翠丽丝](https://github.com/fungi-computer/trellis) 运行 App 键入的图形 在 Cloudflare Workflows 上,由一推,一网钩或时间表开始.
-   [印刷品](https://github.com/fungi-computer/prints) 生成图像和视频 与工人大赦国际.

<table><tbody><tr><td><img alt="Bonsai's koi-pond repository: a network graph with one lane per agent fork, its three open Changes and the live activity feed" src="https://raw.githubusercontent.com/fungi-computer/oyster/main/docs/media/bonsai-koi-pond.png" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><b>邦赛</b>: 一个存储库 三个代理一起建立</td><td><img alt="Grove: the conversation list beside a finished conversation in which the agent ran three scripts against Bonsai and listed the repositories with open changes" src="https://raw.githubusercontent.com/fungi-computer/oyster/main/docs/media/grove-conversation.png" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><b>树林</b>: 特工通过拨打 Bonsai 来回答</td></tr><tr><td><img alt="Trellis editor with the Bonsai checks graph: Workflow input, a Change script node and a Bonsai Checks.report step, between the Palette and the Inspector" src="https://raw.githubusercontent.com/fungi-computer/oyster/main/docs/media/workflows-editor.png" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><b>翠丽丝</b>: App 方法图</td><td><img alt="Prints: a gallery of five generated images, two koi ponds, a knight dunking a basketball, an elf holding a basketball and a sunrise over water, above the prompt bar" src="https://raw.githubusercontent.com/fungi-computer/oyster/main/docs/media/prints-gallery.png" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><b>印刷品</b>: 工人AI的图像</td></tr></tbody></table>

## 部署到云浮

你需要一个Cloudflare账户 关于工人支付 集装箱,艺术品, 工人 AI, Workflows 和浏览器 Rendering 已启用; Docker, Wrangler 使用的多克 用于构建计算机的图像;以及 节点 24 或更新和 Git。 不太合适吗? [牡蛎给你吗?](https://docs.fungi.computer/is-oyster-for-you/) 比较一下 与"云花"工人建设公司.

项目 `try` 准备部署 内容 `worker.ts` 整个牡蛎:

```ts
export * from "@fungi.computer/oyster/standalone";
export { default } from "@fungi.computer/oyster/standalone";
```

内容 `wrangler.jsonc` 宣布每一项约束: `oyster-releases` R2 桶, 装入, 页:1 `oyster` 人工命名空间,计算机的容器来自 `@fungi.computer/computer`,并浏览器编辑 UI 启动检查和 代理浏览器。 从 `my-oyster`数字 :

```sh
npx wrangler login
npx wrangler r2 bucket create oyster-releases
export OYSTER_URL=https://oyster.<your-subdomain>.workers.dev
npx wrangler deploy --var OYSTER_ORIGIN:$OYSTER_URL
printf '%s' "$(cat .oyster-owner)" | npx wrangler secret put OYSTER_OWNER_KEY
openssl rand -base64 32 | tr '+/' '-_' | tr -d '=\n' |
  npx wrangler secret put OYSTER_CREDENTIAL_KEY
export OYSTER_OWNER_KEY=$(cat .oyster-owner)
npx @fungi.computer/oyster install-apps
```

你的工人们 dev subdomain 位于 Cloudflare 中的工人和页面概览 仪表板. `OYSTER_CREDENTIAL_KEY` 封存您在设置中添加的 API 模式密钥; 保存副本,因为失去它 使这些密钥无法读取。 设定 `OYSTER_ORIGIN` 内 `wrangler.jsonc` 如果你稍后再次部署,因为每次部署都取代 工人变量.

第一个 `install-apps` 大约需要15到20分钟, 大部分建造7 电脑上的应用,一次两个 它印出每一步一行和时间 表格,结尾 `Installed 7 Apps`打开 `$OYSTER_URL/login`,并签名 您的 Oyster 在 Tourtois 桌面上打开 。 运行 `install-apps` 以再次更新 Apps; 替换的 Release 保存每个 App 的数据 .

不从开始 `try`,使用 API 符号部署,升级,拆卸和 审判是在 [API 参考](https://npmcn.com/package/%40fungi.computer/oyster/docs/api/README.md) 在“部署和部署”下 操作中” [运行自己的牡蛎的指南](https://docs.fungi.computer/guides/run-your-own-oyster/)。 。 。 .

## 连接您的代理

人员和代理人 `clone`, (中文(简体) ), `fetch` 财务报告和审定财务报表 `push` 普通的 App 仓库 `git` 时间 `/git/<installation>/<repo>.git`,并通过 一个MCP终点 `/mcp`。给每个代理人自己的钥匙;牡蛎一次显示:

```sh
curl -s -X POST -H "Authorization: Bearer $OYSTER_OWNER_KEY" \
  -H 'content-type: application/json' \
  -d '{"name":"morel","grants":[{"capability":"apps.use","targets":{"kind":"all"}}]}' \
  $OYSTER_URL/api/keys
claude mcp add --transport http oyster "$OYSTER_URL/mcp" \
  --header "Authorization: Bearer <the oyk_ key from the answer>"
```

每个 App 的方法都以 `env.<APP>` 在一个 `execute` 工具,例如 `env.BONSAI.repos.list({})`。此密钥可以读取和写入每个 App,包括 以后安装的Apps,没有每次询问. 任何持有它的人都可以充当 在Apps的主人, 并撤销它立刻停止它.

要为您设置一个编码代理, 请粘贴此提示 :

```text
Set up Oyster for me. Install it from npm as @fungi.computer/oyster and follow
https://github.com/fungi-computer/oyster/blob/main/docs/site/agent-quickstart.mdx
step by step. Run each command exactly as written, compare its output with the
expected output, and use the "If it fails" notes before improvising. Stop and
ask me before step 7 (deploy).
```

## 构建自己的主机

`@fungi.computer/oyster/workers` 是整个牡蛎下面的地层 一个主人, 从发行版安装的 Apps, 每个 App 的后端在自己的持久对象中 SQLite,以及MCP的终点. 它没有git,计算机,代理或工作流.

```ts
import { createOysterWorker } from "@fungi.computer/oyster/workers";

export {
  OysterBinding,
  OysterInstallationExecutor,
  OysterInstance,
  OysterMcp,
  OysterRegistry,
} from "@fungi.computer/oyster/workers";

export default createOysterWorker({
  guestLimits: { cpuMs: 250, subRequests: 10 },
});
```

它的Wrangler配置需要一个 `LOADER` 工人加载器, a `RELEASES` R2 桶,那个 `REGISTRY`, (中文(简体) ), `INSTANCES` 财务报告和审定财务报表 `MCP` 持久对象( SQLite 类) `OysterRegistry`, (中文(简体) ), `OysterInstance` 财务报告和审定财务报表 `OysterMcp`页:1 `OYSTER_OWNER_KEY` 财务报告和审定财务报表 `OYSTER_ORIGIN` 变量. `guestLimits` 是可选的;没有它每个 App 电话得到1000毫秒的CPU和50个子请求.

安装 App 发布 `packRelease` 生产 `oyster` 命令 :

```sh
oyster install ./notes-release --installation-id notes
```

需要更多时,一次加一层:

-   `@fungi.computer/oyster/workers-git`数字 : `oysterGitRoot` 盖特门,钥匙, (原始内容存档于2018-10-29). webhoks and Agents.
-   `@fungi.computer/oyster/pack`数字 : `packRelease` 财务报告和审定财务报表 `installRelease` 构建一个 App 从确切的承诺 并安装到HTTP.
-   `@fungi.computer/oyster/host`数字 : `createOyster(host)` 同一服务器结束 您自己的适配器, 对于一个不是工人的宿主.

这个 [API 参考](https://npmcn.com/package/%40fungi.computer/oyster/docs/api/README.md) 解释每一层及其部分 由我们所组成.

## 如何运作

| 块 | 拥有 |
| --- | --- |
| 路由器 | 一个已申报的路由表:登录、App页和方法、所有者路线、, `/mcp`。 。 。 . |
| `OysterRegistry` | 安装列表: 每个安装运行的发布列表 . |
| 资源2 | 将文物放出,由它们的SHA-256文摘储存并进行安装前核实. |
| 应用实例 | 每个安装一个持久对象:生命周期,所有者状态和后端面. |
| 后端侧面 | App自己的代码和SQLite数据库,通过"工人装入器"装入. |
| 盖特门 | 智能 HTTP 软件 `clone`, (中文(简体) ), `fetch` 财务报告和审定财务报表 `push`,每个密钥录入并转录到Artifacts. |
| 旅游 | 信任的 shell: 启动器,窗口,菜单和设置,作为顶级页面提供. |
| 平台约束 | 工作流程,计算机,代理和工人AI,只向申报他们的Apps提供. |

![Oyster architecture: one Worker routes browsers, git clients and MCP agents to a registry, per-App Durable Objects, the git door and the Tourtois home, over R2, Artifacts and platform bindings](https://raw.githubusercontent.com/fungi-computer/oyster/main/docs/media/architecture.png)

App 的 UI 在拒绝默认内容安全下运行于沙盒框架 政策。 它的后端没有环境网络访问, 只接收绑定 它的发布声明, 在每次请求中再次检查。 代理写入需要 批准,每个代理自己的密钥属性 每个推和调用。 牡蛎是 只有所有者 : 浏览器只用所有者密钥签名, 并在其中指定密钥符号 只按标题,为MCP,git和API. 同一个工人在Cloudflare上运行 工人和手机上,一个与工人兼容的运行时间,你可以自己托管.

运行此安装模型的团队的主机允许所有者或管理员批准 app权限; 成员可以安装但不能批准, 拒绝是 `not_approver`独立的牡蛎只有主人,所以它的行为和以前一样.

## 安装

```sh
npm install @fungi.computer/oyster react react-dom
```

牡蛎只是无害环境管理,运行在节点24或更新型的Cloudflare工人和细胞上. React and React DOM 18.3 或 19.2 是同级依赖关系;主机会使其 与他们的页面。 添加Wrangler作为运行或部署工人的 dev依赖,以及 `@fungi.computer/computer` 用于独立主机的计算机.

## 实例

-   `examples/standalone` 包里的船只 整个牡蛎 `try` 财务报告和审定财务报表 用于部署步骤 `wrangler.jsonc` 为云花和 `wrangler.celld.jsonc` 用于单元格.
-   [`examples/notes-app`](https://github.com/fungi-computer/oyster/tree/main/examples/notes-app) 是全App:UI,后端方法和SQLite. 复制到 App 开始 后端 .
-   这个 [API 参考](https://npmcn.com/package/%40fungi.computer/oyster/docs/api/README.md) 显示如何包装笔记 App 和 如何在记忆中驱动一个 App Ectory .

## API 参考

从最高层开始 `standalone`,则 `workers` 或者说 `workers-git`,则 `host`编辑 [API 参考](https://npmcn.com/package/%40fungi.computer/oyster/docs/api/README.md) 涵盖 宿主,它们构成的构件,操作一个部署的牡蛎 低级实例、引用和基特端口。 大部分的包裹的其他 入口是独立主机和真菌枢纽组装的部分; 您 不需要他们来经营牡蛎.

## 限制和错误

除非 主机集 `guestLimits`。一个 git 请求最多带64个 MiB `AppInstanceError` 代码区分了陈旧的权威,不匹配的身份, 非活动或已删除状态和不支持的计划更改; 主机决定其更改 HTTP介绍. 删除 App 清理其数据并留下墓碑.

## 真菌的一部分

[真菌](https://fungi.computer/) 在他们自己的电脑上运行AI特工 共享代理,计算机,Apps和账单的团队. 牡蛎是它的App主机, 独自释放。 它是从其他真菌包 每一个麻省理工学院的许可证, 在自己的存放处 `github.com/fungi-computer/<name>` 且无 其他人,他们之中 [阿加尔](https://github.com/fungi-computer/agar) (应用程序) 合同, [纸球](https://github.com/fungi-computer/puffball) (释放), [Shi](https://github.com/fungi-computer/shiitake) (代理谈话), [菌类](https://github.com/fungi-computer/mycelium) (多边协商程序) `execute` 工具), [布尔](https://github.com/fungi-computer/burrow) (关于艺术作品), [耳朵标记](https://github.com/fungi-computer/ear-tag) (钥匙)和 [盖子](https://github.com/fungi-computer/caps) (界面). 这个 [软件包目录](https://docs.fungi.computer/reference/packages/) 列出他们 都说吧.

## 贡献和许可证

牡蛎是在Fungi的工作空间内被开发出来的,并发布到自己的仓库中 它的历史。 那边, `pnpm --filter @fungi.computer/oyster test` 运行 生命周期检查,以及 `test:standalone` 财务报告和审定财务报表 `test:standalone:celld` 运行真实 在工人和电池下安装了Notes App并驱动其UI 浏览器. 牡蛎是麻省理工学院颁发的许可证;见 [`LICENSE`](https://npmcn.com/package/%40fungi.computer/oyster/LICENSE)。 。 。 .

## 常见问题

### @fungi\.computer/oyster 是什么？

Fungi所著"牡蛎":面向人和AI代理的开源Apps\. 尝试一个命令或运行 在自己的Cloudflare账户\.

### 如何安装 @fungi\.computer/oyster？

在项目目录运行 npm install @fungi\.computer/oyster，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（^18\.3\.1 \|\| ^19\.2\.0）、react-dom（^18\.3\.1 \|\| ^19\.2\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。它还提供命令行工具 oyster，可以用 npx oyster 直接运行。

### @fungi\.computer/oyster 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @fungi\.computer/oyster 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @fungi\.computer/oyster 可以商用吗？

@fungi\.computer/oyster 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @fungi\.computer/oyster 的下载量有多少？

根据 npm 官方下载统计，@fungi\.computer/oyster 在 2026/10/16 – 2026/11/14 这 30 天内被下载 22,184 次，日均约 739 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @fungi\.computer/oyster 还在维护吗？

最新版本 0\.32\.0 发布于 2026/11/16（今天）；至今共发布 107 个版本，其中过去 12 个月发布了 107 个；首次发布于 2026/10/15。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

