@berthos /注册中心服务器
一个小的,自托管的注册表,用于在团队或封闭的网络中共享驻留应用程序。 berth publish 上传一个应用程序到它,然后 berth init --registry 从1开始一个新项目。
泊位 在沙盒中运行人工智能代理的工具。每个工具在类中声明它可以接触什么 berth.yml manifest, Linux内核强制执行它。
npm install -g @berthos/registry-server
使用
berth-registry # listens on http://127.0.0.1:4873
berth publish --registry http://localhost:4873 # from an app's directory; prints an owner token
berth init my-app --registry http://localhost:4873 --template notes
名称的第一次发布打印所有者令牌。保存它:它不会再次显示,并且该名称的每个后续版本都需要它(--token 或者 BERTH_REGISTRY_TOKEN)。
| Env var | 默认的 | 它是做什么的 |
|---|---|---|
BERTH_REGISTRY_PORT | 4873 | 监听端口 |
BERTH_REGISTRY_HOST | 127.0.0.1 | 绑定地址; 0.0.0.0 接受远程连接 |
BERTH_REGISTRY_DATA_DIR | ./.berth-registry-data | SQLite索引和上传的包 |
BERTH_REGISTRY_TLS_CERT, _KEY, _CA, _REQUIRE_CLIENT_CERT | 设置 | 为HTTPS |
要嵌入它, createRegistryServer({ dataDir, tls?, logger? }) 返回一个实例;呼叫 .listen() 你自己。
限制
- 单节点,无用户或速率限制。唯一的凭证是每个名称的所有者令牌,它不能被恢复或旋转。
- 当它在另一台机器上时,通过HTTPS提供它,因此所有者令牌不会以明文形式发送。