@aeolus-fleet/trierarch-plugin

中文文档
0.36.1发布于 2026/11/03Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 4532

Brings your machines into an Aeolus fleet and places crew requests on them.

原始使用文档

@aeolus-fleet/trierarch-plugin

Brings your machines into the fleet and places each crew request on a machine that fits. It is the trierarchs' plugin on the server side (decision 0030). Optional: a fleet works without it. Aeolus knows nothing about it beyond its ship, which holds fleet:read, fleet:commission, crew:assign, crew:run, labels:define, labels:assign and scopes:declare and reaches the fleet only through its public API. What it does is in docs/trierarch.md.

So far: its own process and small database (each fleet's connection, switch and enabled models), the connection the operator makes as its ship, a machine joining, the machines with their trierarchs' reports, assignment (docs/trierarch.md, "Assignment"), the installation procedures, /api/health and /api/version.

Each pass also sends every trierarch the trusted repositories (TRUSTED_REPOSITORIES) once per process, in a message of type application/vnd.aeolus.trierarch.trusted-repositories+json whose payload is {"repositories":[{"name","url"}]}. A restart sends them again, so a changed list reaches every trierarch. A trierarch that asks, with a message of type application/vnd.aeolus.trierarch.trusted-repositories-request+json, gets them again on the next pass: one does as it starts knowing the trierarch plugin's ship.

Assignment runs as a pass for every fleet it serves and is connected to. Each pass reads the fleet whole: the unassigned requests of ships that await crew, and the trierarchs that report details and are not silent; with them, the fleet's enabled models from its own database (decision 0063). It claims each request it places, by optimistic claim, and writes the reason on each it cannot. A claim the fleet refuses because the request changed (another pass won it, or the ship was crewed or its request removed) is read again on the next pass. Run more than one process if you like: the fleet stores exactly one assignment per request.

Running

  1. Give it its own database and set its environment. No ship and no secret: the operator connects it.
VariableRequiredWhat
DATABASE_URLyesIts own Postgres database (postgres://...); it may share the Postgres server with the fleet and squadrons
FLEET_URLyesThe fleet's public URL; it calls the ship API at <FLEET_URL>/api/v1, checks console sessions there, and names it in each joining machine's setup line. Not a secret; fixed here, so no caller can point it at another fleet
HOST, PORTnoWhere it listens; 127.0.0.1:4200 by default
LOG_LEVELnoinfo by default
INSTALLATION_TOKENnoThe token a hosting service presents to its installation procedures, at least 32 characters (decision 0021). Unset: they do not exist and every fleet is served, as a self-hosted install needs
TRIERARCH_SILENT_AFTER_SECONDSnoA trierarch whose last seen is older than this is silent: it gets no new requests. 300 by default
TRIERARCH_PASS_INTERVAL_SECONDSnoHow often assignment runs a pass for each fleet. 10 by default
TRUSTED_REPOSITORIESnoThe repositories every trierarch may clone on demand, as JSON of names to git URLs, such as {"hemma":"[email protected]:ThomasHendrickx/hemma.git"} (aeolus-fleet#384). A crew request names one by its name as its workspace's repository. A URL is https:// without a user, or ssh (ssh:// or user@host:path) without a password. It is never a path, a file URL or a credential: a machine clones with its own access. The list applies to every fleet it serves. None by default
  1. aeolus-trierarch-plugin start migrates the database, serves, and runs an assignment pass every interval. Every fleet it serves whose kept crew token its fleet still takes is connected again; any other fleet is not connected. aeolus-trierarch-plugin migrate migrates alone.
  2. Each fleet's operator connects it: commission its ship with fleet:read, fleet:commission, crew:assign, crew:run, labels:define and labels:assign, and hand the ship's secret to connection.connect, server to server. It registers as a server and keeps only the crew token; the secret is never stored or logged.

API

One tRPC router at /trpc, called with the console's session cookie, which the fleet checks through console.session. Every procedure but the installation's works on the session's fleet.

ProcedureWhat
connection.statusWhether it serves the fleet and is connected, as which ship, and the ship it was last connected as
connection.connectConnects with its ship's id and secret (fleet:manage session). Refused while connected (CONFLICT), for a ship of another fleet or without the three scopes (BAD_REQUEST)
machines.joinBrings a machine in, by name (trierarch:join, or argo; otherwise FORBIDDEN): commissions a ship of type trierarch with crew:run and answers its starting prompt, crew lines, secret and setup line, npx @aeolus-fleet/trierarch init --fleet-url <url> --ship-id <id> --plugin-ship-id <its own ship> --secret <secret>, each shown once; the trierarch takes the trusted repositories only from the ship --plugin-ship-id names. A name an active ship holds: CONFLICT
machines.listThe fleet's active ships of type trierarch, each with its trierarch's last report and details (null until it reports), and whether it is silent
requests.checkWhether crew settings would be placed now, by assignment's rules, before a crew is requested with them: fits; refused with the settings field at fault and why; or noRoom when they fit but no trierarch has room (a request would wait). Writes nothing
installation.setEnabled, get, deleteWith x-aeolus-installation-token: switches a fleet on or off, reads it, forgets it (decision 0021)

While it is off for the fleet, every procedure but connection.status answers FORBIDDEN; until it is connected, machines.* answer PRECONDITION_FAILED.

版本与发布记录

@aeolus-fleet/trierarch-plugin 共发布 31 个版本,首次发布于 2026/10/07;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.36.1latest2026/11/032 天前
0.36.02026/11/014 天前
0.34.02026/10/306 天前
0.33.02026/10/288 天前
0.32.02026/10/2610 天前
0.31.02026/10/2512 天前

关于 @aeolus-fleet/trierarch-plugin 的常见问题

@aeolus-fleet/trierarch-plugin 是什么?

Brings your machines into an Aeolus fleet and places crew requests on them.

如何安装 @aeolus-fleet/trierarch-plugin?

在项目目录运行 npm install @aeolus-fleet/trierarch-plugin,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 aeolus-trierarch-plugin,可以用 npx aeolus-trierarch-plugin 直接运行。

@aeolus-fleet/trierarch-plugin 支持 TypeScript 吗?

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

@aeolus-fleet/trierarch-plugin 支持 ESM 还是 CommonJS?

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

@aeolus-fleet/trierarch-plugin 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=26。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@aeolus-fleet/trierarch-plugin 可以商用吗?

@aeolus-fleet/trierarch-plugin 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aeolus-fleet/trierarch-plugin 的下载量有多少?

根据 npm 官方下载统计,@aeolus-fleet/trierarch-plugin 在 2026/10/05 – 2026/11/03 这 30 天内被下载 4,532 次,日均约 151 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aeolus-fleet/trierarch-plugin 还在维护吗?

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