@fungi.computer/trellis

中文文档
0.15.3发布于 2026/11/16MITTypeScriptES Module近 30 天下载 1.1万

Trellis: build and run workflows of App methods, an App for Oyster

原始使用文档
文档目录8 节
  1. What you can do
  2. Build on merge
  3. Get it
  4. Change it
  5. How workflows are stored
  6. Agent tools
  7. Build and check
  8. License

Trellis (@fungi.computer/trellis)

Trellis builds and runs workflows: typed graphs of your Apps' methods, started by hand, on a schedule or by an event.

The Trellis editor with the Bonsai checks workflow: Workflow input, a Change script node and a Bonsai Checks.report step on the canvas, between the method Palette and the Inspector

Trellis is one of the starter Apps of Oyster, the open App host that runs on your own Cloudflare account. On Oyster, each run executes on Cloudflare Workflows, and its steps call the same App methods your agents use.

What you can do

  • Drag methods from the Palette onto the Canvas, wire their typed ports, and set inputs in the Inspector. Trellis checks the graph as you edit and marks it Valid when it can run.
  • Add review steps, waits, conditions, repeats and maps, or a Code node that runs your own JavaScript in a sandbox with a time limit.
  • Publish an immutable version, then Run it with inputs. Drafts never run.
  • Follow a run in Runs: each step's state, outputs, duration and cost, with image and video previews. Approve or reject review steps there; only a person can answer a review.
  • Arm a published version in Triggers to start on a schedule, on an App event such as a Bonsai push or merge, or from a webhook, and have it report its ending to one of your chats.
  • Open Schedules from the scope picker without selecting a workflow or granting Git access. It shows this installation's Workflow registrations and the Almanac reminders and Session Loops of Agents visible to Trellis. Pause and Delete call the original owners and retain accepted work and history. Agent read and management approval are independent. Missing or refused owners, incomplete pages and unavailable private Local coverage are labelled, not counted as empty schedules. Publication-context arming stays in Triggers.
  • Start from Templates: Bonsai checks (run npm test on each Change and report the result), Build on merge, Review a result, Storyboard (panels from Prints with a review per beat) and Storyboard + Save to git.
  • Export, Import and Fork workflows as JSON.

Build on merge

Bonsai's accepted-main Git lifecycle requests this retained template through WORKFLOWS.runGraph for an already registered repository. The input is the registered App ID, the exact accepted Git revision and the target installation name; the Bonsai binding is the live calling installation. The template's published identity is pinned to that caller's Release source revision.

The three steps are build → verify → install, with result cards. Verification waits for the build's boot gate, decodes the recorded Release and checks its source revision before exposing it to installation. Failed builds and mismatched Releases stop there. Installation requires Workflow-owned authority; ordinary App-origin calls do not receive an exemption. This template contains no review step or review configuration. New permissions still require owner consent and must preserve the running Release.

The Trellis editor in the light theme, with a Bonsai Repos.list step and a Workflow input on the canvas

Get it

Trellis installs with the other starter Apps. 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 open Trellis from the Tourtois desktop. 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. Fork Trellis 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_trellis","name":"my-trellis"}' \
  $OYSTER_URL/apps/bonsai/methods/apps.fork
git -c http.extraHeader="Authorization: Bearer $OYSTER_OWNER_KEY" \
  clone $OYSTER_URL/git/bonsai/my-trellis.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 trellis to replace the running Trellis, or at a new id to keep both.

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 workflows are stored

Drafts live in Trellis's own SQLite database and save as you edit. Publishing writes workflows/<id>.json to the installation's trellis git repository and tags it <id>@v<n>, so every version that ever ran stays readable. Pick an old version in the version menu and choose Restore as draft to edit it again. A run records the exact version it started from, and Oyster checks the caller's permissions again before each step.

Agent tools

Agents call Trellis through Oyster's MCP endpoint, or at POST $OYSTER_URL/apps/trellis/methods/<name> with a key; see Git, keys and MCP.

MethodWhat it does
catalogLists your installed Apps' methods, or one App's full port types.
listWorkflows / loadWorkflowLists the library, or reads one workflow.
saveDraftSaves a draft, with a revision check so concurrent edits never clobber each other.
publishWorkflow / listVersions / revertDraftPublishes a version, lists versions, or restores one as a draft.
runWorkflowRuns a published version, optionally reporting the ending to a chat.
listRuns / runStatus / cancelLists runs, reads one run's steps and reviews, or cancels it.
arm / armEventTrigger and their disarm pairsArms or disarms a schedule or an App-event trigger.
exportWorkflow / importWorkflow / forkWorkflowMoves workflows in and out as JSON, or copies one.

answerReview exists too, but only a person can answer a review.

Build and check

Trellis is a React App built with Vite. The canvas uses React Flow, the panes Maosaico and the controls Caps.

pnpm install
pnpm build
pnpm typecheck
pnpm test

src/editor/ is the graph editor, src/runs/ the run view and reviews, and src/triggers/ the trigger page. backend/library.ts owns drafts and publication, and templates/ holds the bundled templates as JSON. The agent tools are in backend/methods.ts and backend/library-methods.ts, and package.json declares the permissions the App asks for.

License

MIT. See LICENSE.

版本与发布记录

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

版本发布日期距今
0.15.3latest2026/11/16今天
0.15.22026/11/15今天
0.15.12026/11/15今天
0.15.02026/11/15今天
0.14.32026/11/151 天前
0.14.22026/11/141 天前

其他发布通道:next → 0.10.8。

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

@fungi.computer/trellis 是什么?

Trellis: build and run workflows of App methods, an App for Oyster

如何安装 @fungi.computer/trellis?

在项目目录运行 npm install @fungi.computer/trellis,或使用 pnpm add / yarn add / bun add。

@fungi.computer/trellis 支持 TypeScript 吗?

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

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

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

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

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

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

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

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

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