@aeolus-fleet/networking-plugin

中文文档
0.27.1发布于 2026/10/19Apache-2.0TypeScriptES Module构建来源已验证近 30 天下载 1866

Rules for which Aeolus ships may message which.

此软件包已被标记为弃用

Network rules are part of core since 0.28.0

原始使用文档

@aeolus-fleet/networking-plugin

Holds the rules for which ships may message which, and gives them to the fleet. It is the first networking plugin (decision 0036); the fleet enforces its rules on every send (decisions 0034, 0035). Optional: a fleet without a networking plugin has no rules, all-to-all. Aeolus knows nothing about it beyond its ship, which holds fleet:read and fleet:network and reaches the fleet only through its public API.

It keeps per fleet the rules, the whole list or none for all-to-all, and what it declares for while it is unavailable: block-all, open-all or keep-latest, and after how many seconds without a call it is not responding (keep-latest after 300 until argo sets them). It supplies a fleet whole on every change and on reconnect: it registers as the fleet's networking plugin with that declaration, then sets the whole list. Switched off for a fleet, it unregisters, and the fleet is all-to-all; switched on again, it supplies the rules it kept. A supply the fleet refuses is tried again every SUPPLY_RETRY_SECONDS. Its ship receives while the process runs, which keeps its last seen fresh, and acknowledges every delivery on receipt, acting on none; a ping from argo gets pong.

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 and checks console sessions there. Not a secret; fixed here, so no caller can point it at another fleet
HOST, PORTnoWhere it listens; 127.0.0.1:4300 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
SUPPLY_RETRY_SECONDSnoHow often a supply the fleet refused is tried again. 10 by default
  1. aeolus-networking-plugin start migrates the database, supplies every fleet whose kept crew token its fleet still takes, serves, receives as its ship and retries refused supplies. Any other fleet is not connected. aeolus-networking-plugin migrate migrates alone.
  2. Each fleet's operator connects it: commission its ship with fleet:read and fleet:network, 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. It registers as the fleet's networking plugin at once, with no rules. The console does this from Settings, and argo then edits the rules and the declaration on Network.

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 two scopes (BAD_REQUEST)
network.getThe rules (null for none) and the declaration, as argo edits them
network.setRulesSaves the whole list, or null for all-to-all, and supplies it at once; answers the rules and the supply: supplied, or waiting while the fleet does not answer. Over decision 0034's limits: BAD_REQUEST, nothing kept
network.setDeclarationSaves whileUnavailable and notRespondingAfterSeconds (60 to 86400) and registers again with them at once; answers them and the supply
installation.setEnabled, get, deleteWith x-aeolus-installation-token: switches a fleet on or off, reads it, forgets it (decision 0021). Delete unregisters from the fleet first; while the fleet does not answer it is refused (BAD_GATEWAY) and forgets nothing, so retry it with the same request id

network.* are argo's only: a session without fleet:network, a viewer's, is refused (FORBIDDEN) before anything else. While it is off for the fleet, every procedure but connection.status answers FORBIDDEN; until it is connected, network.* answer PRECONDITION_FAILED.

版本与发布记录

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

版本发布日期距今
0.27.1latest2026/10/1920 天前
0.27.02026/10/1820 天前
0.26.12026/10/1722 天前
0.26.02026/10/1622 天前
0.25.32026/10/1623 天前
0.25.22026/10/1623 天前

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

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

Rules for which Aeolus ships may message which.注意:该包已被作者标记为弃用——Network rules are part of core since 0.28.0

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

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

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

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

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

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

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

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

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

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

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

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

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

最新版本 0.27.1 发布于 2026/10/19(20 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/10/10。作者已将其标记为弃用,新项目建议寻找替代方案。