omni-version-manager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

Overview

概述

Install, start, stop, restart, and update embedded services (9Router, CLIProxyAPI). Monitor service status, retrieve logs, and configure auto-start for local-only service endpoints.
安装、启动、停止、重启和更新嵌入式服务(9Router、CLIProxyAPI)。监控服务状态、获取日志,并为仅本地访问的服务端点配置自动启动。

Authentication

身份验证

All requests require a valid Bearer token or session cookie. Obtain a token via
POST /api/auth/login
or configure
REQUIRE_API_KEY=false
for local development.
所有请求都需要有效的Bearer令牌或会话Cookie。可通过
POST /api/auth/login
获取令牌,或在本地开发时配置
REQUIRE_API_KEY=false

Endpoints

端点

POST /api/services/9router/install

POST /api/services/9router/install

Install 9Router from npm
Installs the
9router
npm package under DATA_DIR/services/9router/. Uses execFile (no shell interpolation — hard rule #13). LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
从npm安装9Router
9router
npm包安装到DATA_DIR/services/9router/目录下。使用execFile(不进行shell插值——硬性规则#13)。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/9router/start

POST /api/services/9router/start

Start 9Router
Spawns the 9Router process. Idempotent if already running. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
启动9Router
启动9Router进程。若服务已运行,重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/9router/stop

POST /api/services/9router/stop

Stop 9Router
Gracefully stops 9Router (SIGTERM → 15 s → SIGKILL). Idempotent. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
停止9Router
优雅停止9Router(先发送SIGTERM信号 → 等待15秒 → 发送SIGKILL信号)。重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/9router/restart

POST /api/services/9router/restart

Restart 9Router
Equivalent to stop() then start() under the operation lock. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
重启9Router
等同于在操作锁下先执行stop()再执行start()。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/9router/update

POST /api/services/9router/update

Update 9Router to a newer npm version
Stops the service (if running), installs the newer npm version, then restarts. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
将9Router更新至较新的npm版本
停止服务(若服务正在运行),安装较新的npm版本,然后重启服务。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/9router/rotate-key

POST /api/services/9router/rotate-key

Rotate the 9Router API key
Generates a new API key, encrypts it at-rest, and restarts the service to apply it. The plaintext key is never returned. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/rotate-key \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
轮换9Router的API密钥
生成新的API密钥,加密后存储,并重启服务使新密钥生效。不会返回明文密钥。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/rotate-key \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/9router/status

GET /api/services/9router/status

Get 9Router status
Returns combined live supervisor state and DB metadata. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/9router/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
获取9Router状态
返回实时的监控器状态与数据库元数据。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/9router/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/services/9router/auto-start

POST /api/services/9router/auto-start

Toggle 9Router auto-start
When enabled, 9Router starts automatically on the next OmniRoute boot. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换9Router自动启动状态
启用后,9Router会在下次OmniRoute启动时自动启动。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/9router/auto-restart-adopted

POST /api/services/9router/auto-restart-adopted

Toggle 9Router auto-restart-when-adopted
When enabled, an externally-adopted (not OmniRoute-spawned) 9Router process is restarted under OmniRoute's own supervisor on the next health-check cycle instead of being left as adopted-only. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/9router/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换9Router的外部进程自动重启状态
启用后,由外部启动(非OmniRoute启动)的9Router进程会在下次健康检查周期内被OmniRoute的监控器接管并重启,而非仅标记为已接管状态。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/9router/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/cliproxy/install

POST /api/services/cliproxy/install

Install CLIProxyAPI from npm
Installs the CLIProxyAPI package under DATA_DIR/services/cliproxy/. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
从npm安装CLIProxyAPI
将CLIProxyAPI包安装到DATA_DIR/services/cliproxy/目录下。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/cliproxy/start

POST /api/services/cliproxy/start

Start CLIProxyAPI
Spawns the CLIProxyAPI process. Idempotent if already running. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
启动CLIProxyAPI
启动CLIProxyAPI进程。若服务已运行,重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/cliproxy/stop

POST /api/services/cliproxy/stop

Stop CLIProxyAPI
Gracefully stops CLIProxyAPI. Idempotent. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
停止CLIProxyAPI
优雅停止CLIProxyAPI。重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/cliproxy/restart

POST /api/services/cliproxy/restart

Restart CLIProxyAPI
stop() then start() under the operation lock. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
重启CLIProxyAPI
在操作锁下先执行stop()再执行start()。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/cliproxy/update

POST /api/services/cliproxy/update

Update CLIProxyAPI to a newer npm version
Stops, installs newer version, restarts. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
将CLIProxyAPI更新至较新的npm版本
停止服务,安装较新版本,然后重启服务。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/cliproxy/status

GET /api/services/cliproxy/status

Get CLIProxyAPI status
Returns live supervisor state and DB metadata (no apiKeyMasked — CLIProxyAPI does not use an injected API key). LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/cliproxy/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
获取CLIProxyAPI状态
返回实时的监控器状态与数据库元数据(无apiKeyMasked字段——CLIProxyAPI不使用注入的API密钥)。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/cliproxy/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/services/cliproxy/auto-start

POST /api/services/cliproxy/auto-start

Toggle CLIProxyAPI auto-start
When enabled, CLIProxyAPI starts automatically on the next OmniRoute boot. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换CLIProxyAPI自动启动状态
启用后,CLIProxyAPI会在下次OmniRoute启动时自动启动。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/cliproxy/auto-restart-adopted

POST /api/services/cliproxy/auto-restart-adopted

Toggle CLIProxyAPI auto-restart-when-adopted
When enabled, an externally-adopted (not OmniRoute-spawned) CLIProxyAPI process is restarted under OmniRoute's own supervisor on the next health-check cycle instead of being left as adopted-only. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/cliproxy/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换CLIProxyAPI的外部进程自动重启状态
启用后,由外部启动(非OmniRoute启动)的CLIProxyAPI进程会在下次健康检查周期内被OmniRoute的监控器接管并重启,而非仅标记为已接管状态。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/cliproxy/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/mux/install

POST /api/services/mux/install

Install Mux from npm
Installs the
mux
npm package (coder/mux — local agent-orchestration daemon) under DATA_DIR/services/mux/. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
从npm安装Mux
mux
npm包(coder/mux——本地代理编排守护进程)安装到DATA_DIR/services/mux/目录下。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/mux/start

POST /api/services/mux/start

Start Mux
Spawns
mux server --host 127.0.0.1 --port <port>
. Idempotent if already running. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
启动Mux
启动
mux server --host 127.0.0.1 --port <port>
进程。若服务已运行,重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/mux/stop

POST /api/services/mux/stop

Stop Mux
Gracefully stops Mux. Idempotent. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
停止Mux
优雅停止Mux。重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/mux/restart

POST /api/services/mux/restart

Restart Mux
stop() then start() under the operation lock. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
重启Mux
在操作锁下先执行stop()再执行start()。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/mux/update

POST /api/services/mux/update

Update Mux to a newer npm version
Stops, installs newer version, restarts. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
将Mux更新至较新的npm版本
停止服务,安装较新版本,然后重启服务。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/mux/status

GET /api/services/mux/status

Get Mux status
Returns live supervisor state and DB metadata. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/mux/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
获取Mux状态
返回实时的监控器状态与数据库元数据。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/mux/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/services/mux/auto-start

POST /api/services/mux/auto-start

Toggle Mux auto-start
When enabled, Mux starts automatically on the next OmniRoute boot. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换Mux自动启动状态
启用后,Mux会在下次OmniRoute启动时自动启动。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/mux/auto-restart-adopted

POST /api/services/mux/auto-restart-adopted

Toggle Mux auto-restart-when-adopted
When enabled, an externally-adopted (not OmniRoute-spawned) Mux process is restarted under OmniRoute's own supervisor on the next health-check cycle instead of being left as adopted-only. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/mux/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换Mux的外部进程自动重启状态
启用后,由外部启动(非OmniRoute启动)的Mux进程会在下次健康检查周期内被OmniRoute的监控器接管并重启,而非仅标记为已接管状态。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/mux/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/bifrost/install

POST /api/services/bifrost/install

Install Bifrost
Installs the
@maximhq/bifrost
npm package under DATA_DIR/services/bifrost/. The package downloads the Go binary on first run. Accepts an optional
version
field (semver or
latest
). LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
安装Bifrost
@maximhq/bifrost
npm包安装到DATA_DIR/services/bifrost/目录下。该包会在首次运行时下载Go二进制文件。接受可选的
version
字段(语义化版本或
latest
)。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/bifrost/start

POST /api/services/bifrost/start

Start Bifrost
Starts the supervised Bifrost process. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
启动Bifrost
启动受监控的Bifrost进程。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/bifrost/stop

POST /api/services/bifrost/stop

Stop Bifrost
Stops the supervised Bifrost process. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
停止Bifrost
停止受监控的Bifrost进程。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/bifrost/restart

POST /api/services/bifrost/restart

Restart Bifrost
Restarts the supervised Bifrost process. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
重启Bifrost
重启受监控的Bifrost进程。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/bifrost/update

POST /api/services/bifrost/update

Update Bifrost
Updates Bifrost to the latest npm version. Stops the running process, installs the new version, and restarts if it was previously running. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
更新Bifrost
将Bifrost更新至最新的npm版本。停止运行中的进程,安装新版本,若之前服务处于运行状态则重启服务。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/bifrost/status

GET /api/services/bifrost/status

Get Bifrost status
Returns live and DB status for the supervised Bifrost service. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/bifrost/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
获取Bifrost状态
返回受监控的Bifrost服务的实时状态与数据库状态。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/bifrost/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/services/bifrost/auto-start

POST /api/services/bifrost/auto-start

Toggle Bifrost auto-start
When enabled, Bifrost starts automatically on the next OmniRoute boot. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换Bifrost自动启动状态
启用后,Bifrost会在下次OmniRoute启动时自动启动。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/bifrost/auto-restart-adopted

POST /api/services/bifrost/auto-restart-adopted

Toggle Bifrost auto-restart-when-adopted
When enabled, an externally-adopted (not OmniRoute-spawned) Bifrost process is restarted under OmniRoute's own supervisor on the next health-check cycle instead of being left as adopted-only. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/bifrost/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换Bifrost的外部进程自动重启状态
启用后,由外部启动(非OmniRoute启动)的Bifrost进程会在下次健康检查周期内被OmniRoute的监控器接管并重启,而非仅标记为已接管状态。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/bifrost/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/install

POST /api/services/dario/install

Install Dario from npm
Installs the
@askalf/dario
npm package (Claude-account-pool proxy) under DATA_DIR/services/dario/. Uses execFile (no shell interpolation — hard rule #13). LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
从npm安装Dario
@askalf/dario
npm包(Claude账号池代理)安装到DATA_DIR/services/dario/目录下。使用execFile(不进行shell插值——硬性规则#13)。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/install \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/start

POST /api/services/dario/start

Start Dario
Spawns the Dario process. Idempotent if already running. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
启动Dario
启动Dario进程。若服务已运行,重复调用不会产生影响。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/stop

POST /api/services/dario/stop

Stop Dario
Gracefully stops Dario. Idempotent — returns a stopped status even if no supervisor is currently tracking the process. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
停止Dario
优雅停止Dario。重复调用不会产生影响——即使当前没有监控器跟踪该进程,也会返回已停止状态。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/stop \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/restart

POST /api/services/dario/restart

Restart Dario
Equivalent to stop() then start() under the operation lock. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
重启Dario
等同于在操作锁下先执行stop()再执行start()。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/restart \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/update

POST /api/services/dario/update

Update Dario to a newer npm version
Stops the service (if running), installs the newer npm version, then restarts it if it was running before the update. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
将Dario更新至较新的npm版本
停止服务(若服务正在运行),安装较新的npm版本,若更新前服务处于运行状态则重启服务。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/update \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/dario/status

GET /api/services/dario/status

Get Dario status
Returns combined live supervisor state and DB metadata, including the auto-start / auto-restart-adopted flags and whether an update is available. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/dario/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
获取Dario状态
返回实时的监控器状态与数据库元数据的组合信息,包括自动启动/外部进程自动重启的标志位以及是否有可用更新。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/dario/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/services/dario/auto-start

POST /api/services/dario/auto-start

Toggle Dario auto-start
When enabled, Dario starts automatically on the next OmniRoute boot. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换Dario自动启动状态
启用后,Dario会在下次OmniRoute启动时自动启动。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/auto-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/auto-restart-adopted

POST /api/services/dario/auto-restart-adopted

Toggle Dario auto-restart-when-adopted
When enabled, an externally-adopted (not OmniRoute-spawned) Dario process is restarted under OmniRoute's own supervisor on the next health-check cycle instead of being left as adopted-only. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
切换Dario的外部进程自动重启状态
启用后,由外部启动(非OmniRoute启动)的Dario进程会在下次健康检查周期内被OmniRoute的监控器接管并重启,而非仅标记为已接管状态。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/auto-restart-adopted \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/admin/login-start

POST /api/services/dario/admin/login-start

Start a Dario account-pool login (device-code style)
Forwards to the running Dario instance's
POST /admin/login/start
using the stored admin token. The operator opens the returned
authorize_url
, approves in their own Claude account, then posts the displayed code to
/admin/login-complete
. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/admin/login-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
启动Dario账号池登录(设备码模式)
使用存储的管理员令牌转发至运行中的Dario实例的
POST /admin/login/start
接口。操作人员打开返回的
authorize_url
,在自己的Claude账号中完成授权,然后将显示的代码提交至
/admin/login-complete
接口。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/admin/login-start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/services/dario/admin/login-complete

POST /api/services/dario/admin/login-complete

Complete a Dario account-pool login
Forwards to the running Dario instance's
POST /admin/login/complete
. On success the account becomes routable immediately (Dario hot-reloads its pool). LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/admin/login-complete \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
完成Dario账号池登录
转发至运行中的Dario实例的
POST /admin/login/complete
接口。成功后,该账号会立即可被路由(Dario会热重载账号池)。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/admin/login-complete \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/dario/admin/accounts

GET /api/services/dario/admin/accounts

List Dario account-pool accounts
Forwards to the running Dario instance's
GET /admin/accounts
. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/dario/admin/accounts \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
列出Dario账号池中的账号
转发至运行中的Dario实例的
GET /admin/accounts
接口。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/dario/admin/accounts \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

DELETE /api/services/dario/admin/accounts

DELETE /api/services/dario/admin/accounts

Remove a Dario account-pool account
Forwards to the running Dario instance's
DELETE /admin/accounts/<alias>
. The alias is taken from a
?alias=
query param or a
{ alias }
JSON body. LOCAL_ONLY — loopback only.
bash
curl -X DELETE https://localhost:20128/api/services/dario/admin/accounts \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
移除Dario账号池中的账号
转发至运行中的Dario实例的
DELETE /admin/accounts/<alias>
接口。别名来自
?alias=
查询参数或
{ alias }
JSON请求体。仅本地访问——仅支持回环地址。
bash
curl -X DELETE https://localhost:20128/api/services/dario/admin/accounts \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

GET /api/services/dario/admin/import-from-omniroute

GET /api/services/dario/admin/import-from-omniroute

List OmniRoute claude connections eligible for Dario import
Returns eligible OmniRoute
claude
OAuth provider connections (metadata only — id/name/email/org tier, never tokens) so the UI can offer a picker when more than one exists. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/dario/admin/import-from-omniroute \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
列出可导入至Dario的OmniRoute Claude连接
返回符合条件的OmniRoute
claude
OAuth提供商连接(仅元数据——id/名称/邮箱/组织等级,绝不包含令牌),以便当存在多个连接时,UI可提供选择器。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/dario/admin/import-from-omniroute \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/services/dario/admin/import-from-omniroute

POST /api/services/dario/admin/import-from-omniroute

Import an OmniRoute claude connection's OAuth tokens into Dario
Writes the source connection's access/refresh token pair directly into Dario's own account-file store (
~/.dario/accounts/<alias>.json
), reusing the shared Claude Code OAuth client_id, then restarts the Dario supervisor so it picks up the new account. LOCAL_ONLY — loopback only.
bash
curl -X POST https://localhost:20128/api/services/dario/admin/import-from-omniroute \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'
将OmniRoute Claude连接的OAuth令牌导入至Dario
将源连接的访问令牌/刷新令牌对直接写入Dario的账号文件存储(
~/.dario/accounts/<alias>.json
),复用共享的Claude Code OAuth client_id,然后重启Dario监控器使其加载新账号。仅本地访问——仅支持回环地址。
bash
curl -X POST https://localhost:20128/api/services/dario/admin/import-from-omniroute \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/services/{name}/logs

GET /api/services/{name}/logs

Stream service logs via SSE
Returns a Server-Sent Events stream from the service's in-memory ring buffer (5 MB, circular). Sends a
snapshot
event with historical lines first, then live
log
events, plus a
heartbeat
every 15 s. LOCAL_ONLY — loopback only.
bash
curl https://localhost:20128/api/services/{name}/logs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
通过SSE流式传输服务日志
返回来自服务内存环形缓冲区(5MB,循环存储)的Server-Sent Events流。先发送包含历史日志行的
snapshot
事件,然后发送实时的
log
事件,每15秒发送一次
heartbeat
事件。仅本地访问——仅支持回环地址。
bash
curl https://localhost:20128/api/services/{name}/logs \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

Payloads

请求与响应体

See the full OpenAPI specification at
GET /api/openapi/spec
or
docs/openapi.yaml
for detailed request/response schemas.
详细的请求/响应模式请查看
GET /api/openapi/spec
docs/openapi.yaml
中的完整OpenAPI规范。