The federated code forge
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
The federated code forge
For most of the past two decades, the code forge has been where projects live: where code is hosted, where changes are reviewed, and where contributors find each other. Forges offered convenience in exchange for centralisation. But the centralised forge is crumbling. Relying on someone else for uptime, for features, and to be a good steward of your code hasn’t played out well.
在过去二十年的大部分时间里,代码托管平台(code forge)一直是项目生存的地方:代码托管于此,变更在此审查,贡献者也在此相遇。这些平台以中心化为代价提供了便利。但中心化的托管平台正在瓦解。依赖他人来保证正常运行时间、功能更新以及对代码的良好管理,结果并不理想。
What has stood the test of time is email: Git to move the code, and email — an open protocol — to talk about it. At the cost of user experience, however. ’05 Mail + Git’09 GitHub + Git’25 AT Protocol + Git Tangled aims to give you the best of both: the longevity of an open protocol, with the convenience and polish of a proper forge.
经受住时间考验的是电子邮件:用 Git 传输代码,用电子邮件(一种开放协议)进行交流。然而,这牺牲了用户体验。2005 年是邮件 + Git,2009 年是 GitHub + Git,2025 年则是 AT Protocol + Git。Tangled 旨在兼顾两者:既拥有开放协议的持久性,又具备成熟托管平台的便利与精致。
It’s the first truly federated code forge — you can host code on your own servers and still collaborate seamlessly with others. Our approach is pragmatic: self-host just the parts you want, like Git hosting or CI runners, or all of it, including the API server and UI. Whatever you choose, you can still talk to everyone else.
这是第一个真正联邦化的代码托管平台——你可以在自己的服务器上托管代码,同时仍能与他人无缝协作。我们的方法很务实:你可以只自托管你想要的部分,比如 Git 托管或 CI 运行器,也可以托管全部,包括 API 服务器和 UI。无论你选择什么,你仍然可以与其他人进行交流。
Owning your infrastructure also means you can hack on, extend and customise your forge as you see fit. Because Tangled is built on the AT Protocol, you can build your own extensions, subscribe to the firehose, or even write entirely custom knots, like this one that runs on Cloudflare Workers and uses their Artifacts product for git storage. Or an entirely custom spindle such as mitchellh.com/tack. Go even further and host our ultralight API server and build your own custom forge.
拥有自己的基础设施也意味着你可以随心所欲地修改、扩展和定制你的托管平台。由于 Tangled 构建在 AT Protocol 之上,你可以构建自己的扩展,订阅数据流(firehose),甚至编写完全自定义的节点(knots),比如这个运行在 Cloudflare Workers 上并使用其 Artifacts 产品进行 Git 存储的节点。或者像 mitchellh.com/tack 那样构建完全自定义的 spindle。你甚至可以更进一步,托管我们超轻量级的 API 服务器,构建属于你自己的定制化托管平台。
Agents have made building such hyper-personalized software trivial, and especially so when software is designed with hackability in mind from the get-go. Tangled is incredibly agent friendly. The future of software engineering may be a moving target, but our bets on open protocols and developer agency give us the agility to move with it, and to become your code forge for the next decade.
智能体(Agents)使得构建这种高度个性化的软件变得轻而易举,尤其是当软件从一开始就考虑到可黑客化(hackability)时。Tangled 对智能体非常友好。软件工程的未来可能是一个不断变化的目标,但我们对开放协议和开发者自主权的押注,赋予了我们随之演进的灵活性,并使我们有能力成为你未来十年的代码托管平台。
Product updates
产品更新
A fresh look! The obvious big one: with this release, Tangled has a whole new look. We’ve redone the UI on top of our new architecture (described further below), in Svelte. Things should now be quicker, visually consistent and prettier! The keen eyed of you might’ve also spotted that we’ve swapped out Inter for Timeless Sans.
焕然一新!最明显的变化是:随着本次发布,Tangled 拥有了全新的外观。我们在新的架构(下文详述)之上,使用 Svelte 重做了 UI。现在一切应该更快、视觉上更统一且更美观了!眼尖的读者可能已经发现,我们已将字体从 Inter 换成了 Timeless Sans。
A bobbin near you. Until now, Tangled’s web UI and backend were a single Go monolith called the appview. The appview service handled AT Protocol indexing, caching, off-protocol data and UI rendering using html/template + htmx. It ran on a single SQLite database on one medium-sized server in Sweden. This was great as long as you were ~50–100 ms away from Sweden, but most of our users aren’t!
身边的 bobbin。在此之前,Tangled 的 Web UI 和后端是一个名为 appview 的单一 Go 单体应用。appview 服务使用 html/template + htmx 处理 AT Protocol 索引、缓存、协议外数据和 UI 渲染。它运行在瑞典一台中型服务器的单个 SQLite 数据库上。只要你距离瑞典约 50–100 毫秒的延迟,这都很棒,但我们的大多数用户并非如此!
We rearchitected: we built a new standalone frontend app in Svelte, deployed at the edge. It is populated by our new diskless, entirely in-memory indexer service written in Rust: bobbin. Bobbins are deployed globally in over 11+ regions, ensuring users around the world get the best API and UI performance. The astute reader might’ve noticed: bobbin is purely read-only and only deals with AT Protocol data. What of the rest? That functionality (and more) has been delegated to a new set of supporting services.
我们进行了架构重构:我们用 Svelte 构建了一个新的独立前端应用,并部署在边缘节点。它由我们用 Rust 编写的全新的、无磁盘、完全内存化的索引服务 bobbin 提供数据支持。Bobbins 已在全球 11 个以上的区域部署,确保世界各地的用户都能获得最佳的 API 和 UI 性能。敏锐的读者可能已经注意到:bobbin 是纯只读的,仅处理 AT Protocol 数据。那其余部分呢?这些功能(以及更多功能)已被委托给一套新的配套服务。
The new data model and repo-owned data. First, the data model itself: we have a new set of lexicons, and everything now lives under org.tangled., replacing the old sh.tangled. records. Knot2 is our aptly named, second implementation of the knot server, this time rewritten in Rust. Knot2 bakes a fully custom Git server, and also bundles in an SSH server in the same binary.
新的数据模型和仓库所有数据。首先是数据模型本身:我们有一套新的词汇表(lexicons),现在所有内容都位于 org.tangled.* 下,取代了旧的 sh.tangled.* 记录。Knot2 是我们对 knot 服务器的第二次实现,这次用 Rust 重写,名字非常贴切。Knot2 内置了一个完全自定义的 Git 服务器,并在同一个二进制文件中捆绑了一个 SSH 服务器。
With knot2, we’ve also changed where some of that data lives. Issues, pull requests, comments, reactions and labels are now stored on the knot, right next to the code, as collaborative objects (COBs). A COB is just a chain of Git objects in the repo itself. Collaborators, knot members and the blocklist are also stored the same way. In that sense, knots now behave a lot like a PDS: they hold signed records, full history included, for everything that belongs to a repo and much like a PDS, these records are synced via the standard AT Protocol firehose.
在 Knot2 中,我们还改变了部分数据的存储位置。Issue、Pull Request、评论、反应和标签现在都存储在 knot 上,紧邻代码,作为协作对象(COBs)存在。COB 本质上就是仓库内的一串 Git 对象。协作者、knot 成员和黑名单也以同样的方式存储。从这个意义上说,knots 现在表现得非常像一个 PDS:它们保存着属于仓库的所有内容的签名记录(包括完整历史),并且像 PDS 一样,这些记录通过标准的 AT Protocol 数据流进行同步。
But why? A project’s issues and pull requests are as much a part of it as its code, so they should live with it, wherever you choose to host it. This gives your project maximum portability. If the knot writes your issues and comments, what stops it from putting words in your mouth? Attestations. Every time you create or edit a record on a knot, the web app also writes an org.tangled.graph.attestation record to your own PDS, pointing at that exact version of the record and the COB change behind it. Two-way verification! Self-hosters will have to upgrade their knots to the v1.20.0 by following the upgrade guide.
为什么这样做?一个项目的 Issue 和 Pull Request 与代码一样是项目的重要组成部分,因此无论你选择在哪里托管,它们都应该与代码共存。这赋予了你的项目最大的可移植性。如果 knot 写入了你的 Issue 和评论,什么能阻止它冒充你发言呢?证明(Attestations)。每当你在 knot 上创建或编辑记录时,Web 应用也会向你自己的 PDS 写入一条 org.tangled.graph.attestation 记录,指向该记录的确切版本及其背后的 COB 变更。双向验证!自托管用户必须按照升级指南将他们的 knots 升级到 v1.20.0 版本。
Organizations. Organization accounts are here! An Organization on Tangled is a real AT Protocol account, with its own DID and handle, hosted on a Tranquil PDS instance. They’re passwordless, delegated accounts: you create one from the New Organization page, and you get
组织。组织账户上线了!Tangled 上的组织是一个真正的 AT Protocol 账户,拥有自己的 DID 和句柄,托管在 Tranquil PDS 实例上。它们是无密码的委托账户:你可以在“新建组织”页面创建一个,然后获得一个
Stacked PRs for everyone. Our PR flow has been overhauled. The new flow gives everyone, regardless of whether you use Jujutsu or just vanilla Git, the ability to submit and review stacked PRs. If you’re using Git, you now get the ability to interdiff between versions (previously called rounds). JJ users get to interdiff between individual changes as well.
人人可用的堆叠式 PR。我们的 PR 流程已全面重构。新的流程让每个人,无论你使用的是 Jujutsu 还是原生 Git,都能提交和审查堆叠式 PR。如果你使用 Git,现在可以进行版本间的差异对比(以前称为 rounds)。JJ 用户还可以进行单个变更之间的差异对比。
Launch weeks ahead. This isn’t all. We’re staggering this launch across the next few weeks. Up next are private repos, a CLI, SDKs for different languages and skills for your agent. Until then, enjoy every part of this launch equally. Your code, your network. Come build with us on Tangled.
发布周即将到来。这还不是全部。我们将在接下来的几周内分阶段进行发布。接下来是私有仓库、CLI、针对不同语言的 SDK 以及为你智能体准备的技能。在此之前,请尽情享受本次发布的每一个部分。你的代码,你的网络。来 Tangled 与我们一起构建吧。