@fungi.computer/tourtois

中文文档
0.20.13发布于 2026/11/15MITTypeScriptES Module近 30 天下载 1.2万

Tourtois: the trusted desktop shell for Oyster and Fungi, with host-supplied Settings sections

原始使用文档
文档目录8 节
  1. What you can do
  2. Get it
  3. Change it
  4. How a host mounts it
  5. Agent tools
  6. Build and check
  7. Open windows and new versions
  8. License

Tourtois (@fungi.computer/tourtois)

Tourtois is the desktop for your Apps: a launcher, tiled or floating windows, menus and settings.

The Tourtois desktop with three Apps tiled: Bonsai's network graph and repositories, Grove, and Shed's terminal

Tourtois is the shell of Oyster, the open App host that runs on your own Cloudflare account. When you sign in to an Oyster, Tourtois is what you see, and every other App opens inside it.

What you can do

  • Launch Apps from the Launcher on the desktop or from the top bar.
  • Arrange windows Tiled or Floating from the Layout menu: drag, resize, zoom one window, minimize it and bring it back. A minimized App keeps running, so restoring it never reloads it.
  • Use the focused App's own menus in the top bar.
  • Keep small live views of Apps on the desktop, such as Grove's inbox, and Arrange desktop to add, move, resize and remove them.
  • Open System Settings… from the mushroom menu for App permissions, keys and agent connectors.
  • On a phone, Apps open as a full-screen sheet over the desktop, and Show desktop brings it back without losing unsaved work.
Tourtois on a phone in the light theme: Grove's inbox above the Launcher

Tourtois is a trusted shell. Every other App runs in its own sandboxed, cross-origin frame, but Tourtois runs in the host's own page with your permissions there. Pick a shell you trust: it can do anything you can on that host.

Get it

Tourtois installs with the other starter Apps, first of all. On a deployed Oyster (see the Oyster quick start), run:

export OYSTER_URL=https://oyster.<your-subdomain>.workers.dev
export OYSTER_OWNER_KEY=<your owner key>
npx oyster install-apps

The installer clones this repository and the six others, seeds each on your Oyster with git push, builds them on your Computer and installs them. Sign in at $OYSTER_URL/login with the owner key and your Oyster opens on Tourtois. Run install-apps again to update; each App keeps its data.

Change it

Every installed App is also a template you can fork on your own Oyster, including the desktop. Fork Tourtois into a Bonsai repository and clone it with ordinary git:

curl -X POST -H "Authorization: Bearer $OYSTER_OWNER_KEY" -H 'content-type: application/json' \
  -d '{"appId":"app_tourtois","name":"my-tourtois"}' \
  $OYSTER_URL/apps/bonsai/methods/apps.fork
git -c http.extraHeader="Authorization: Bearer $OYSTER_OWNER_KEY" \
  clone $OYSTER_URL/git/bonsai/my-tourtois.git

The reply names your fork's App id and repository. Push your edits, open the repository in Bonsai and choose Settings, then Build & install with that App id and your commit as git:<sha>. Install the Release at tourtois to replace the desktop. Building alone never changes what you see; only the install does.

To work from GitHub instead, fork this repository and point the installer at your forks with --repositories <base URL> and --ref <branch or tag>. The installer reads all seven starter Apps from that base, so fork them under one account.

How a host mounts it

A Tourtois Release ships shell.js beside its index.html. The host imports that module from its own origin and calls mountShell(root, { workbench, storage, methods }), which renders the desktop into the host's page with the host's workbench, Tourtois's own storage and its methods. Tourtois's code loads as one lazy chunk behind that module, so no host bundles it, and a fork mounts the same way.

Tourtois asks the host to mount each App in that App's own sandboxed frame, under its own installation, Release and permissions. Tourtois imports no host implementation package. Standalone App Permissions frame Oyster's own grants page, also available without a shell; the changed Oyster and Tourtois ship together. Other Settings sections still use their existing host-backed ports: this repair does not frame Keys, MCP servers, Computers or the consent dialog.

Agent tools

Agents can arrange your desktop. Through Oyster's MCP endpoint, or at POST $OYSTER_URL/apps/tourtois/methods/<name> with a key (see Git, keys and MCP), they call:

MethodWhat it does
layout.get / widgets.availableReads the desktop and the live views Apps offer.
layout.place / layout.move / layout.resize / layout.removeChanges one item on the desktop.
layout.launcher / layout.set / layout.resetPins or hides launcher Apps, replaces the layout, or resets it.

Each change names the revision it is based on, and a stale revision is refused rather than overwriting a newer arrangement. In a connected browser, an agent's change shows Your Agent arranged the desktop with Undo for ten seconds.

Build and check

Tourtois is React and TypeScript. Windows and tiling come from Maosaico and the controls from Caps.

pnpm install
pnpm build
pnpm typecheck
pnpm test

src/AppWorkbench.tsx composes the App list, windows and layout. src/shell-module.ts is the mountShell entry, src/platform-controls.tsx the Settings window, and src/settings-sections.ts the Settings pages a host can supply. The agent tools are in backend/methods.ts, and package.json declares what the shell asks of its host.

Open windows and new versions

The directory refreshes every 15 seconds while the desktop is visible, as well as on host change notifications. A changed active Release leaves the existing App mounted and offers New version available — Reload in its existing window footer. The footer already owns host status; the header remains the App's navigation and window controls.

Reload uses Oyster's ordinary window replacement and asks the mounted App's close veto before disposing it. Refusal leaves the old window and the Reload offer intact. Acceptance mounts the active Release; closing and reopening also uses the active Release without a notice. This does not transfer unsaved memory or preserve obsolete backend authority. Permission changes and explicit selection-changed recovery retain their existing reconciliation behavior.

With the Tourtois workbench running, pnpm test:window-new-version exercises the directory change, footer action and reopen at desktop and phone widths. test/window-status-bar.test.tsx proves the Reload close veto.

License

MIT. See LICENSE.

版本与发布记录

@fungi.computer/tourtois 共发布 74 个版本,首次发布于 2026/10/17;过去 12 个月发布了 74 个版本。

版本发布日期距今
0.20.13latest2026/11/15今天
0.20.122026/11/15今天
0.20.112026/11/15今天
0.20.102026/11/15今天
0.20.92026/11/15今天
0.20.82026/11/15今天

其他发布通道:next → 0.12.19。

关于 @fungi.computer/tourtois 的常见问题

@fungi.computer/tourtois 是什么?

Tourtois: the trusted desktop shell for Oyster and Fungi, with host-supplied Settings sections

如何安装 @fungi.computer/tourtois?

在项目目录运行 npm install @fungi.computer/tourtois,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.3.1 || ^19.2.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fungi.computer/tourtois 支持 TypeScript 吗?

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

@fungi.computer/tourtois 支持 ESM 还是 CommonJS?

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

@fungi.computer/tourtois 可以商用吗?

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

@fungi.computer/tourtois 的下载量有多少?

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

@fungi.computer/tourtois 还在维护吗?

最新版本 0.20.13 发布于 2026/11/15(今天);至今共发布 74 个版本,其中过去 12 个月发布了 74 个;首次发布于 2026/10/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。