Compare commits

...

5 Commits

Author SHA1 Message Date
diegosouzapw
7bf8759330 fix(security): drop the cookie header from plugin hook contexts too
The dashboard session token travels in a cookie, so it is a client credential like authorization and x-api-key.
2026-11-19 01:29:48 -03:00
diegosouzapw
c8c6243fd7 chore(changelog): name the fragment after #20566 2026-11-19 01:21:13 -03:00
diegosouzapw
0c59e7ebd1 fix(security): keep client credentials out of plugin hooks and document plugin privileges
Plugin hooks (onRequest/onResponse/onError) now get a copy of the context
without the authorization, x-api-key and proxy-authorization headers and
without the API key value or fingerprint. The Plugin SDK and marketplace
docs now describe the real model: plugins run as ordinary Node.js
processes with the OmniRoute user's privileges, and requires.permissions
only selects environment variables. The plugins page shows a warning.
2026-11-19 01:18:12 -03:00
Diego Rodrigues de Sa e Souza
60e1f5e8d0 chore(docker): point deploy files and docs at cheaperinference/omniroute (#20490)
The Cheaper Inference Docker Hub repository receives every release since #20344 (same digests as diegosouzapw/omniroute and GHCR). New installs use it: Helm values (chart 0.1.2), the base Kubernetes manifest, the manifest generator default, the compose files, the Podman Quadlet, README/SECURITY and the docs. The :next channel, the pinned 3.8.49 examples and the pull-count badge stay on the legacy name, which keeps its history and every release.
2026-11-18 18:34:14 -03:00
Diego Rodrigues de Sa e Souza
7ee6b10358 fix(ci): publish the OpenCode plugins and staged releases through Trusted Publishing only (#20489)
The long-lived NPM_TOKEN expired (npm caps write tokens at 90 days) and the v3.8.54 plugin publishes answered E404. Both plugins now have a Trusted Publisher and shipped through OIDC; drop NODE_AUTH_TOKEN from their publish steps and from the staged mode, keeping the token only on the DIRECT emergency fallback.
2026-11-18 18:30:07 -03:00
33 changed files with 531 additions and 76 deletions

View File

@@ -450,12 +450,13 @@ jobs:
echo "✅ Published omniroute@$VERSION (dist-tag=$TAG) via Trusted Publishing"
- name: Publish to npm (staged — owner approves with 2FA)
# Only on an explicit request now: Trusted Publishing below is the default.
# Only on an explicit request now: Trusted Publishing above is the default. Staging
# also goes through OIDC (Trusted Publishers allow `npm stage publish`); the approve
# step still needs the owner's 2FA.
if: github.event_name == 'workflow_dispatch' && inputs.publish_mode == 'staged'
env:
VERSION: ${{ needs.publish.outputs.version }}
TAG: ${{ needs.publish.outputs.tag }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -euo pipefail
TARBALL="omniroute-${VERSION}.tgz"
@@ -479,6 +480,9 @@ jobs:
} >> "$GITHUB_STEP_SUMMARY"
echo "✅ Staged omniroute@$VERSION (dist-tag=$TAG) — awaiting owner 'npm stage approve'"
# The one step still on a token: for when Trusted Publishing itself is broken. npm caps
# write tokens at 90 days, so mint a fresh granular token (publish on omniroute, 2FA
# bypass) and set NPM_TOKEN right before dispatching publish_mode=direct.
- name: Publish to npm (DIRECT — emergency fallback)
if: github.event_name == 'workflow_dispatch' && inputs.publish_mode == 'direct'
env:
@@ -598,10 +602,13 @@ jobs:
working-directory: "@omniroute/opencode-plugin"
run: npm test
# Trusted Publishing (OIDC), like the main package: no NODE_AUTH_TOKEN. npm >= 11.5
# detects the job's id-token itself. The Trusted Publisher of this package
# (cheaper-inference/OmniRoute, npm-publish.yml, no environment, "npm publish" allowed)
# was set up on 2026-11-18, after the long-lived NPM_TOKEN expired and v3.8.54's
# plugin publishes answered E404.
- name: Publish @omniroute/opencode-plugin to npm
working-directory: "@omniroute/opencode-plugin"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -euo pipefail
PKG_VERSION=$(node -p "require('./package.json').version")
@@ -721,10 +728,13 @@ jobs:
working-directory: "@omniroute/opencode-plugin-v2"
run: npm test
# Trusted Publishing (OIDC), like the main package: no NODE_AUTH_TOKEN. npm >= 11.5
# detects the job's id-token itself. The Trusted Publisher of this package
# (cheaper-inference/OmniRoute, npm-publish.yml, no environment, "npm publish" allowed)
# was set up on 2026-11-18, after the long-lived NPM_TOKEN expired and v3.8.54's
# plugin publishes answered E404.
- name: Publish @omniroute/opencode-plugin-v2 to npm
working-directory: "@omniroute/opencode-plugin-v2"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -euo pipefail
PKG_VERSION=$(node -p "require('./package.json').version")

View File

@@ -275,7 +275,7 @@ ENV DATA_DIR=/app/data
RUN mkdir -p /app/data && chown node:node /app /app/data
# #13679: default the PUBLISHED image to requiring an API key. A bare
# `docker run -p 20128:20128 … diegosouzapw/omniroute` (README/QUICK-START
# `docker run -p 20128:20128 … cheaperinference/omniroute` (README/QUICK-START
# one-liners) does not pass `--env-file .env`, so without this default the
# anonymous /v1 LLM proxy would be both keyless AND world-reachable on the
# published container. This does NOT change the npm/CLI local-dev default

View File

@@ -87,7 +87,7 @@
[![npm version](https://img.shields.io/npm/v/omniroute?color=cb3837&logo=npm)](https://www.npmjs.com/package/omniroute)
![NPM Monthly](https://img.shields.io/npm/dm/omniroute?label=npm/month&color=cb3837&logo=npm)
[![Docker Hub](https://img.shields.io/docker/v/diegosouzapw/omniroute?label=Docker%20Hub&logo=docker&color=2496ED)](https://hub.docker.com/r/diegosouzapw/omniroute)
[![Docker Hub](https://img.shields.io/docker/v/cheaperinference/omniroute?label=Docker%20Hub&logo=docker&color=2496ED)](https://hub.docker.com/r/cheaperinference/omniroute)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
![Docker Pulls](https://img.shields.io/docker/pulls/diegosouzapw/omniroute?label=docker%20pulls&logo=docker&color=2496ED)
![Electron Downloads](https://img.shields.io/github/downloads/diegosouzapw/omniroute/total?style=flat&label=electron%20downloads&logo=electron&color=47848F)
@@ -781,7 +781,7 @@ of your shell history. → [CLI Integrations](docs/guides/CLI-INTEGRATIONS.md)
<tr><th align="left">Platform</th><th align="left">Install</th><th align="left">Highlights</th></tr>
<tr><td align="left" nowrap>📦 <b>npm (global)</b></td><td align="left" nowrap><code>npm install -g omniroute</code></td><td align="left">One command, any OS</td></tr>
<tr><td align="left" nowrap>⚡ <b>Bun (global)</b></td><td align="left" nowrap><code>bun add -g omniroute</code></td><td align="left">Same registry tarball, faster installs</td></tr>
<tr><td align="left" nowrap>🐳 <b>Docker</b></td><td align="left" nowrap><code>docker run … diegosouzapw/omniroute</code></td><td align="left">Multi-arch <b>AMD64 + ARM64</b></td></tr>
<tr><td align="left" nowrap>🐳 <b>Docker</b></td><td align="left" nowrap><code>docker run … cheaperinference/omniroute</code></td><td align="left">Multi-arch <b>AMD64 + ARM64</b></td></tr>
<tr><td align="left" nowrap>🖥️ <b>Desktop (Electron)</b></td><td align="left" nowrap><code>npm run electron:build</code></td><td align="left">Native window + system tray — <b>Windows / macOS / Linux</b></td></tr>
<tr><td align="left" nowrap>🎩 <b>Menu-bar (OmniRouteTray)</b></td><td align="left" nowrap><code>brew install --cask zoispag/tap/omniroute-tray</code></td><td align="left">Supervises &amp; auto-updates the server — <b>macOS</b></td></tr>
<tr><td align="left" nowrap>💪 <b>ARM</b></td><td align="left" nowrap>native <code>arm64</code></td><td align="left">Raspberry Pi, ARM servers, Apple Silicon</td></tr>
@@ -1105,7 +1105,7 @@ Use these only for clients that cannot attach `Authorization: Bearer ...`. Heade
```bash
docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data cheaperinference/omniroute:latest
```
`:latest` follows the highest **published** stable SemVer. It does not track git `main`. Pin `:X.Y.Z` for GitOps. See [Docker Release Channels](docs/guides/DOCKER_GUIDE.md#release-channels).The image pins **`OMNIROUTE_MEMORY_MB=1024`**. That is enough for the dashboard and a light chat. **Coding agents** (`POST /v1/responses` from Claude Code, Codex, Grok, …) need a much larger V8 heap or the process `FATAL ERROR`s at ~12 GiB under two overlapping long contexts. Size the container above the heap (native buffers sit outside V8):
@@ -1119,7 +1119,7 @@ docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
```bash
docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
-e OMNIROUTE_MEMORY_MB=8192 --memory=10g \
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data cheaperinference/omniroute:latest
```
Full table: [Docker Guide — runtime RAM](docs/guides/DOCKER_GUIDE.md#runtime-ram-for-coding-agents).
@@ -1338,7 +1338,7 @@ Métricas canônicas em 2026-10-18: **1.976 vídeos únicos** · **20.220.289 vi
<tr><td nowrap><b>Testing</b></td><td>Node.js test runner + Vitest — <b>60,000+ static test declarations</b> across 8,400+ tracked test files (unit, integration, E2E, security, ecosystem)</td></tr>
<tr><td nowrap><b>Platforms</b></td><td>Desktop (Electron) · Android (Termux) · PWA (any browser)</td></tr>
<tr><td nowrap><b>CI/CD</b></td><td>GitHub Actions — auto npm publish + Docker Hub on release</td></tr>
<tr><td nowrap><b>Links</b></td><td><a href="https://omniroute.online">Website</a> · <a href="https://www.npmjs.com/package/omniroute">npm</a> · <a href="https://hub.docker.com/r/diegosouzapw/omniroute">Docker Hub</a></td></tr>
<tr><td nowrap><b>Links</b></td><td><a href="https://omniroute.online">Website</a> · <a href="https://www.npmjs.com/package/omniroute">npm</a> · <a href="https://hub.docker.com/r/cheaperinference/omniroute">Docker Hub</a></td></tr>
</table>
<div align="center">

View File

@@ -207,7 +207,7 @@ docker run -d \
-e JWT_SECRET="$(openssl rand -base64 48)" \
-e API_KEY_SECRET="$(openssl rand -hex 32)" \
-e STORAGE_ENCRYPTION_KEY="$(openssl rand -hex 32)" \
diegosouzapw/omniroute:latest
cheaperinference/omniroute:latest
```
---

View File

@@ -0,0 +1 @@
- **fix(ci):** the OpenCode plugins and the staged release mode publish to npm through Trusted Publishing (OIDC) only; the expired long-lived `NPM_TOKEN` is left solely on the DIRECT emergency fallback ([#20489](https://github.com/cheaper-inference/OmniRoute/pull/20489))

View File

@@ -0,0 +1 @@
- **fix(security):** plugin hooks (`onRequest`/`onResponse`/`onError`) no longer receive the client's `authorization`, `x-api-key` or `proxy-authorization` headers or the API key value; the Plugin SDK and marketplace docs now state that plugins run as ordinary Node.js processes with the OmniRoute user's privileges (`requires.permissions` only selects environment variables), and the plugins page shows a warning to that effect ([#20566](https://github.com/cheaper-inference/OmniRoute/pull/20566))

View File

@@ -0,0 +1 @@
- **chore(docker):** new installs use the Cheaper Inference Docker Hub repository `cheaperinference/omniroute` (Helm chart 0.1.2, the base Kubernetes manifest, the manifest generator, compose, Podman and the docs); `diegosouzapw/omniroute` keeps every release and its pull history, and stays the home of the `:next` channel ([#20490](https://github.com/cheaper-inference/OmniRoute/pull/20490))

View File

@@ -191,7 +191,7 @@ podman run -d --name omniroute \
-e DATA_DIR=/app/data \
-p 20128:20128 \
-v omniroute-data:/app/data \
docker.io/diegosouzapw/omniroute:latest
docker.io/cheaperinference/omniroute:latest
```
For a bind mount that still fails, inspect or repair the shared path from the

View File

@@ -9,7 +9,7 @@ After=omniroute-redis.service
# Use this image after building locally
Image=localhost/omniroute:base
# Or use the fully qualified published image (there is no published :base tag)
# Image=docker.io/diegosouzapw/omniroute:latest
# Image=docker.io/cheaperinference/omniroute:latest
ContainerName=omniroute

View File

@@ -3,7 +3,7 @@ name: omniroute
description: OmniRoute — unified AI proxy/router. One endpoint, many LLM providers, auto-fallback.
type: application
# Chart version — bump on every chart change.
version: 0.1.1
version: 0.1.2
# Default image tag. Overridable with image.tag.
appVersion: "latest"
home: https://github.com/cheaper-inference/OmniRoute

View File

@@ -6,7 +6,7 @@
replicaCount: 1
image:
repository: diegosouzapw/omniroute
repository: cheaperinference/omniroute
# Pin a real SemVer (or a digest) for anything you care about. `latest` only
# moves when a stable release promotes it, so it silently lags merged fixes.
tag: "latest"

View File

@@ -43,7 +43,7 @@ spec:
type: RuntimeDefault
containers:
- name: omniroute
image: diegosouzapw/omniroute:latest
image: cheaperinference/omniroute:latest
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -23,7 +23,7 @@
services:
omniroute:
image: diegosouzapw/omniroute:latest
image: cheaperinference/omniroute:latest
container_name: omniroute
environment:
- OMNIROUTE_DIRECT_HEADERS_TIMEOUT_MS=${OMNIROUTE_DIRECT_HEADERS_TIMEOUT_MS:-300000}

View File

@@ -8,7 +8,7 @@
# open http://127.0.0.1:20128
#
# No profiles, no build step, no multi-tenant anything.
# Pulls the published image `diegosouzapw/omniroute:latest`.
# Pulls the published image `cheaperinference/omniroute:latest`.
#
# All app ports bind to 127.0.0.1 ONLY by default (REQUIRE_API_KEY ships
# as false). Set APP_BIND_HOST=0.0.0.0 in .env ONLY after you have set
@@ -35,7 +35,7 @@ services:
retries: 3
omniroute:
image: diegosouzapw/omniroute:latest
image: cheaperinference/omniroute:latest
container_name: omniroute
restart: unless-stopped
stop_grace_period: 40s

View File

@@ -50,8 +50,9 @@ Dashboard (/dashboard/plugins)
`plugin.json`.
- **Scanner** — `src/lib/plugins/scanner.ts`: discovers plugins on disk under
the plugin directory.
- **Loader** — `src/lib/plugins/loader.ts`: spawns each plugin in an isolated
child process and brokers hook calls over IPC.
- **Loader** — `src/lib/plugins/loader.ts`: spawns each plugin in a separate
Node.js child process and brokers hook calls over IPC. The child is not a
sandbox (see "Plugin execution isolation" below).
## Marketplace Catalog
@@ -242,6 +243,14 @@ silently falls back to the built-in seed registry and logs a warning.
### Plugin execution isolation
> **Plugins are not sandboxed.** The child is an ordinary Node.js process running
> as the OmniRoute user, with no VM context and no Node.js permission flags, so
> plugin code can read and write any file that user can, run programs and reach
> the network. `requires.permissions` only decides which environment variables
> the child receives; the other permissions are not enforced. Install only
> plugins you trust. The process boundary below contains crashes and hangs; it
> is not a security boundary.
- **Process isolation** — `loadPlugin()` (`src/lib/plugins/loader.ts`) spawns
each plugin in a separate Node.js child process and communicates over IPC.
Hook calls have a timeout with `SIGTERM` → `SIGKILL` escalation.
@@ -257,8 +266,12 @@ silently falls back to the built-in seed registry and logs a warning.
- **Optional integrity pin** — a manifest may declare an `integrity`
(`sha256-<base64>`, SRI format) field. When present, the loader verifies the
entry file hash at load time and refuses to activate on mismatch. It is
opt-in tamper-detection, **not** a security boundary — loopback-only routing
and the permission model are the real boundaries.
opt-in tamper-detection, **not** a security boundary: it does not limit what
a loaded plugin can do.
- **No client credentials in hooks** — the context passed to `onRequest`,
`onResponse` and `onError` has the `authorization`, `x-api-key`,
`proxy-authorization` and `cookie` headers removed, and the API key record carries no key
value (`redactPluginContext()` in `src/lib/plugins/hooks.ts`).
## Manifest (`plugin.json`)
@@ -282,7 +295,9 @@ Validated by `PluginManifestSchema` (`src/lib/plugins/manifest.ts`):
| `integrity` | string? | Optional `sha256-<base64>` entry-file pin |
Permissions are drawn from the enum
`network` / `file-read` / `file-write` / `env` / `exec`.
`network` / `file-read` / `file-write` / `env` / `exec`. Only `env` has a
runtime effect (a slightly larger environment-variable allowlist for the
child); the others are declarations and are not enforced.
## Lifecycle Flow
@@ -351,6 +366,9 @@ The dashboard page at `/dashboard/plugins`
- **Marketplace** — shows the catalog from `GET /api/plugins/marketplace` with a
field to set the custom registry URL.
The page always shows a warning that plugins run with the full privileges of
the OmniRoute process.
A per-plugin config page lives at `/dashboard/plugins/[name]/config`
(`src/app/(dashboard)/dashboard/plugins/[name]/config/page.tsx`).

View File

@@ -48,8 +48,8 @@ Block the request and optionally return a custom response.
```ts
onRequest: (ctx) => {
if (!ctx.headers["authorization"]) {
return blockRequest({ error: "Unauthorized", status: 401 });
if (!ctx.headers?.["x-client-team"]) {
return blockRequest({ error: "Missing x-client-team header", status: 400 });
}
};
```
@@ -76,15 +76,22 @@ onRequest: (ctx) => {
## Plugin Context (`PluginContext`)
| Field | Type | Description |
| ----------- | ------------------------- | ------------------------- |
| `requestId` | `string` | Unique request identifier |
| `model` | `string` | Requested model name |
| `provider` | `string` | Target provider ID |
| `body` | `Record<string, unknown>` | Request body |
| `headers` | `Record<string, string>` | Request headers |
| `metadata` | `Record<string, unknown>` | Mutable metadata |
| `timestamp` | `number` | Request timestamp |
| Field | Type | Description |
| ------------ | ------------------------- | --------------------------- |
| `requestId` | `string` | Unique request identifier |
| `model` | `string` | Requested model name |
| `provider` | `string` | Target provider ID |
| `body` | `Record<string, unknown>` | Request body |
| `headers` | `Record<string, string>` | Request headers (see note) |
| `metadata` | `Record<string, unknown>` | Mutable metadata |
| `timestamp` | `number` | Request timestamp |
| `apiKeyInfo` | `object` (optional) | API key metadata (see note) |
The context never carries the client's credentials: the `authorization`, `x-api-key`,
`proxy-authorization` and `cookie` headers are removed (any casing), and `apiKeyInfo` keeps the key's
metadata (such as `id`, `name` and `scopes`) but not the key value or its fingerprint
(`redactPluginContext()` in `src/lib/plugins/hooks.ts`). This applies to `onRequest`,
`onResponse` and `onError`.
## Manifest (`plugin.json`)
@@ -139,17 +146,22 @@ Or as simple booleans (default priority 100):
## Permission System
Plugins run in a sandboxed VM context. Access to external resources requires explicit permissions:
Plugins are **not sandboxed**. Each active plugin runs as a separate, ordinary Node.js child
process (`loadPlugin()` in `src/lib/plugins/loader.ts`) under the same operating-system user as
OmniRoute, with no VM context and no Node.js permission flags. Plugin code can use `node:fs`,
`node:child_process`, `fetch` and every other Node.js API: it can read and write any file the
OmniRoute user can (including the data directory), run programs and reach the network.
| Permission | Grants |
| ------------ | ------------------------------------------------------------ |
| `network` | `fetch`, `AbortController`, `Headers`, `Request`, `Response` |
| `file-read` | `fs.readFile`, `fs.readdir`, `fs.stat` |
| `file-write` | `fs.writeFile`, `fs.mkdir`, `fs.rm` |
| `env` | Read-only `process.env` proxy |
| `exec` | `child_process.exec`, `child_process.execSync` |
The manifest's `requires.permissions` accepts `network`, `file-read`, `file-write`, `env` and
`exec`, but today only `env` has an effect at runtime:
Without a permission, the corresponding globals are simply not available in the sandbox.
| Permission | Effect today |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `env` | The plugin process also receives `PORT`, `HOSTNAME`, `TZ` and `TMPDIR`. Without it, it receives only `PATH`, `HOME`, `USER`, `LANG`, `LC_ALL`, `NODE_ENV`, `PLUGIN_ENTRY` and `PLUGIN_NAME` (plus `SystemRoot` and `windir` on Windows). |
| `network`, `file-read`, `file-write`, `exec` | None. They are declarations only: nothing is blocked when they are missing. |
Installing a plugin is like installing any other program on the host. Install only plugins whose
source you trust.
## Config Schema
@@ -217,7 +229,7 @@ export default definePlugin({
name: "rate-limiter",
priority: 10,
onRequest: async (ctx) => {
const key = ctx.headers["x-api-key"] || "anonymous";
const key = ctx.apiKeyInfo?.id || "anonymous";
const now = Date.now();
const window = 60000; // 1 minute
const maxRequests = 100;

View File

@@ -23,10 +23,10 @@ npm install -g omniroute
### Option B: Docker
```bash
docker run -d --name omniroute -p 20128:20128 diegosouzapw/omniroute:latest
docker run -d --name omniroute -p 20128:20128 cheaperinference/omniroute:latest
```
`:latest` is the highest **published** stable SemVer. It does **not** track git `main`. Pin `diegosouzapw/omniroute:X.Y.Z` for GitOps. See [Image Tags / Release Channels](../guides/DOCKER_GUIDE.md#release-channels).
`:latest` is the highest **published** stable SemVer. It does **not** track git `main`. Pin `cheaperinference/omniroute:X.Y.Z` for GitOps. See [Image Tags / Release Channels](../guides/DOCKER_GUIDE.md#release-channels).
### Option C: From Source

View File

@@ -117,7 +117,7 @@ you need to change them.
docker compose -f docker-compose.selfhost.yml up -d
```
Pulls `diegosouzapw/omniroute:latest` (multi-arch AMD64 + ARM64, ~250 MB) and
Pulls `cheaperinference/omniroute:latest` (multi-arch AMD64 + ARM64, ~250 MB) and
`redis:8.6.5-alpine`, starts both, and waits for Redis to be healthy before
the app boots.

View File

@@ -44,7 +44,7 @@ docker run -d \
--stop-timeout 40 \
-p 20128:20128 \
-v omniroute-data:/app/data \
diegosouzapw/omniroute:latest
cheaperinference/omniroute:latest
```
## With Environment File
@@ -60,7 +60,7 @@ docker run -d \
--env-file .env \
-p 20128:20128 \
-v omniroute-data:/app/data \
diegosouzapw/omniroute:latest
cheaperinference/omniroute:latest
```
## Docker Compose
@@ -342,7 +342,7 @@ Size **cgroup `--memory` above the heap** — native buffers, SQLite, and compre
```bash
docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
-e OMNIROUTE_MEMORY_MB=8192 --memory=10g \
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data cheaperinference/omniroute:latest
```
## Critical Environment Variables
@@ -398,14 +398,14 @@ runtime environment variable.
### Pre-built root image + runtime subpath
Published `diegosouzapw/omniroute:*` images are built for the domain root. You can still
Published `cheaperinference/omniroute:*` images are built for the domain root. You can still
set `OMNIROUTE_BASE_PATH` at runtime; the container patches the bundle once on startup.
Pair it with the matching public origin:
```yaml
services:
omniroute:
image: diegosouzapw/omniroute:latest
image: cheaperinference/omniroute:latest
environment:
OMNIROUTE_BASE_PATH: /omniroute
NEXT_PUBLIC_BASE_URL: https://myhostname.example.com/omniroute
@@ -446,7 +446,7 @@ OmniRoute can be securely exposed using Caddy's automatic SSL provisioning. Ensu
```yaml
services:
omniroute:
image: diegosouzapw/omniroute:latest
image: cheaperinference/omniroute:latest
container_name: omniroute
restart: unless-stopped
volumes:
@@ -496,10 +496,17 @@ Endpoint tunnel panels (Cloudflare, Tailscale, ngrok) can be shown or hidden fro
## Image Tags
| Image | Tag | Size | Description |
| ------------------------ | -------- | ------ | ---------------------------------------------------- |
| `diegosouzapw/omniroute` | `latest` | ~250MB | Highest **published** stable SemVer (not git `main`) |
| `diegosouzapw/omniroute` | `3.8.0` | ~250MB | Pin this class of tag for GitOps |
| Image | Tag | Size | Description |
| ---------------------------- | -------- | ------ | ---------------------------------------------------- |
| `cheaperinference/omniroute` | `latest` | ~250MB | Highest **published** stable SemVer (not git `main`) |
| `cheaperinference/omniroute` | `3.8.54` | ~250MB | Pin this class of tag for GitOps |
The same images are published to three repositories, with the same per-architecture digests:
`cheaperinference/omniroute` (Docker Hub, the Cheaper Inference organization, from 3.8.53 on),
`ghcr.io/cheaper-inference/omniroute` and the legacy `diegosouzapw/omniroute`, which keeps its
pull history and still receives every release. Existing `diegosouzapw/omniroute` deployments
keep updating; switching the image name is optional. The `:next` / `:next-web` pre-release
channel below is published to `diegosouzapw/omniroute` and GHCR only.
Multi-platform manifest: `linux/amd64` + `linux/arm64` native (Apple Silicon, AWS Graviton, Raspberry Pi). Docker selects the matching architecture automatically; pass `--platform linux/amd64` if you need to force AMD64 emulation on ARM hosts.
@@ -561,7 +568,7 @@ docker image inspect diegosouzapw/omniroute:next --format '{{index .RepoDigests
Before testing, back up the OmniRoute data volume or bind-mounted data directory. To roll back, restore the previously used stable version or digest and recreate the container:
```bash
docker pull diegosouzapw/omniroute:<stable-version>
docker pull cheaperinference/omniroute:<stable-version>
docker compose up -d
```

View File

@@ -472,7 +472,7 @@ see [`docs/guides/KIRO_SETUP.md`](./KIRO_SETUP.md).
2. **Permanent fix:** Bind to IPv4 explicitly by using `-p 127.0.0.1:20128:20128` in your `docker run` command:
```bash
docker run -d --name omniroute --restart unless-stopped --stop-timeout 40 \
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data diegosouzapw/omniroute:latest
-p 127.0.0.1:20128:20128 -v omniroute-data:/app/data cheaperinference/omniroute:latest
```
This forces the IPv4 bind and also avoids exposing the proxy on all host interfaces.

View File

@@ -72,6 +72,8 @@ docker rm omniroute
docker volume rm omniroute-data
# (Optional) Remove the image
docker rmi cheaperinference/omniroute:latest
# Older installs pulled the legacy name:
docker rmi diegosouzapw/omniroute:latest
```

View File

@@ -354,7 +354,7 @@ Helm:
```bash
# Kustomize: pin a real tag rather than relying on :latest
kubectl -n omniroute set image deploy/omniroute omniroute=diegosouzapw/omniroute:3.8.51
kubectl -n omniroute set image deploy/omniroute omniroute=cheaperinference/omniroute:3.8.54
# Helm
helm upgrade omniroute deploy/helm/omniroute -n omniroute --reuse-values \

View File

@@ -135,7 +135,7 @@ EOF
### 2.3 Start the container
```bash
docker pull diegosouzapw/omniroute:latest
docker pull cheaperinference/omniroute:latest
docker run -d \
--name omniroute \
@@ -143,7 +143,7 @@ docker run -d \
--env-file /opt/omniroute/.env \
-p 20128:20128 \
-v omniroute-data:/app/data \
diegosouzapw/omniroute:latest
cheaperinference/omniroute:latest
```
### 2.4 Verify that it is running
@@ -302,13 +302,13 @@ curl -sI https://llms.seudominio.com/health
### Upgrade to a new version
```bash
docker pull diegosouzapw/omniroute:latest
docker pull cheaperinference/omniroute:latest
docker stop omniroute && docker rm omniroute
docker run -d --name omniroute --restart unless-stopped \
--env-file /opt/omniroute/.env \
-p 20128:20128 \
-v omniroute-data:/app/data \
diegosouzapw/omniroute:latest
cheaperinference/omniroute:latest
```
### View logs

View File

@@ -70,7 +70,7 @@ docker run -d --name omniroute \
-p 20128:20128 \
-v omniroute-data:/app/data \
-e ENABLE_CC_COMPATIBLE_PROVIDER=true \
diegosouzapw/omniroute:latest
cheaperinference/omniroute:latest
```
After restarting, the dashboard exposes an **Add Claude Code Compatible** option in

View File

@@ -2,8 +2,10 @@
import { useState, useEffect, useCallback } from "react";
import { PageHeader } from "@omniroute/ui-kit/page-header";
import { Alert } from "@omniroute/ui-kit/alert";
import { Card, Button, EmptyState } from "@/shared/components";
import Badge from "@/shared/components/Badge";
import Icon from "@/shared/components/Icon";
import { useNotificationStore } from "@/store/notificationStore";
import { useConfirmDialog } from "@/shared/hooks/useConfirmDialog";
import { useTranslations } from "next-intl";
@@ -112,6 +114,13 @@ export default function PluginsPage() {
</Button>
}
/>
<Alert
variant="warning"
dismissible={false}
icon={<Icon name="warning" size={18} />}
title={t("privilegesWarningTitle")}
description={t("privilegesWarningBody")}
/>
{plugins.length === 0 ? (
<EmptyState title={t("noPlugins")} description={t("noPluginsDescription")} />
) : (

View File

@@ -13434,6 +13434,8 @@
"scanForPlugins": "Scan for Plugins",
"noPlugins": "No plugins installed",
"noPluginsDescription": "Place plugin directories in ~/.omniroute/plugins/ and click Scan.",
"privilegesWarningTitle": "Plugins run with full privileges",
"privilegesWarningBody": "A plugin runs as a regular Node.js process with the same access as OmniRoute: it can read files, run programs and use the network, whatever permissions its manifest declares. Install only plugins you trust.",
"activate": "Activate",
"deactivate": "Deactivate",
"uninstall": "Uninstall",

View File

@@ -344,7 +344,7 @@ export function defaultSpec(target: DeployTargetKind): DeploySpec {
namespace: "omniroute",
releaseName: "omniroute",
image: {
repository: "diegosouzapw/omniroute",
repository: "cheaperinference/omniroute",
tag: "latest",
pullPolicy: "IfNotPresent" as const,
},

View File

@@ -231,11 +231,55 @@ export interface PluginContext {
/** Client request headers available at the call site. Optional — not all callers
* have access to headers (e.g. internal triggers, retries). Exposed so
* observability/trace-export plugins can read request-scoped context sent by the
* client (trace ids, correlation ids, session markers). */
* client (trace ids, correlation ids, session markers). Credential headers are removed
* before a hook sees the context (see redactPluginContext). */
headers?: Record<string, string | string[] | undefined>;
metadata: Record<string, unknown>;
}
// ── Credential redaction ──
// Plugins are third-party code running as an ordinary Node process with the OmniRoute
// user's privileges, so anything in the hook context is readable by them. The client's
// credentials never go there: the request pipeline keeps its own (unmodified) copy.
const CREDENTIAL_HEADER_NAMES: ReadonlySet<string> = new Set([
"authorization",
"x-api-key",
"proxy-authorization",
// The dashboard session token travels in a cookie.
"cookie",
]);
/** API key record fields that carry the key itself or a fingerprint of it. */
const API_KEY_SECRET_FIELDS: ReadonlySet<string> = new Set(["key", "apiKey", "rawKey", "keyHash"]);
function omitFields(
record: Record<string, unknown>,
shouldOmit: (field: string) => boolean
): Record<string, unknown> {
return Object.fromEntries(Object.entries(record).filter(([field]) => !shouldOmit(field)));
}
/**
* Copy of a hook context without the client's credentials: drops the `authorization`,
* `x-api-key`, `proxy-authorization` and `cookie` headers (any casing) and the key value/fingerprint
* from the API key record. The input is never mutated.
*/
function redactPluginContext<T extends PluginContext>(ctx: T): T {
const redacted: T = { ...ctx };
if (ctx.headers && typeof ctx.headers === "object") {
redacted.headers = omitFields(ctx.headers, (name) =>
CREDENTIAL_HEADER_NAMES.has(name.toLowerCase())
) as PluginContext["headers"];
}
if (ctx.apiKeyInfo && typeof ctx.apiKeyInfo === "object") {
redacted.apiKeyInfo = omitFields(ctx.apiKeyInfo as Record<string, unknown>, (field) =>
API_KEY_SECRET_FIELDS.has(field)
);
}
return redacted;
}
export interface PluginResult {
blocked?: boolean;
response?: unknown;
@@ -330,7 +374,7 @@ export async function runOnRequest(ctx: PluginContext): Promise<PluginResult> {
// When no plugins exist, avoid lazy loading arbitrary plugin code in this request.
if (!canInitializeRequestPlugins()) return {};
await ensurePluginsLoaded();
return emitHookBlocking("onRequest", ctx);
return emitHookBlocking("onRequest", redactPluginContext(ctx));
}
/**
@@ -339,10 +383,11 @@ export async function runOnRequest(ctx: PluginContext): Promise<PluginResult> {
export async function runOnResponse(ctx: PluginContext, response: unknown): Promise<unknown> {
let currentResponse = response;
const list = hooks.get("onResponse") || [];
const hookCtx = redactPluginContext(ctx);
for (const reg of list) {
assertPluginHandlerAllowed();
try {
const result = await reg.handler({ ...ctx, response: currentResponse });
const result = await reg.handler({ ...hookCtx, response: currentResponse });
if (
result !== undefined &&
result !== null &&
@@ -363,7 +408,7 @@ export async function runOnResponse(ctx: PluginContext, response: unknown): Prom
* Run onError hooks — fire-and-forget notification.
*/
export async function runOnError(ctx: PluginContext, error: Error): Promise<void> {
await emitHook("onError", { ...ctx, error });
await emitHook("onError", { ...redactPluginContext(ctx), error });
}
/**

View File

@@ -0,0 +1,53 @@
// npm publishing goes through Trusted Publishing (OIDC) only. The long-lived NPM_TOKEN expired
// in silence (npm caps write tokens at 90 days) and the v3.8.54 plugin publishes failed with
// E404 because the plugin jobs still sent it; the Trusted Publisher for both plugins was set up
// on 2026-11-18 and @omniroute/opencode-plugin@0.2.2 / -v2@0.1.1 shipped through OIDC. The
// only step left on a token is the DIRECT emergency fallback of `stage-npm`, which exists for
// the case where Trusted Publishing itself is broken and needs a freshly minted token.
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { join } from "node:path";
import test from "node:test";
import { fileURLToPath } from "node:url";
import YAML from "yaml";
const root = fileURLToPath(new URL("../../../", import.meta.url));
const workflow = YAML.parse(readFileSync(join(root, ".github/workflows/npm-publish.yml"), "utf8"));
const DIRECT_FALLBACK = "Publish to npm (DIRECT — emergency fallback)";
function stepsUsingNpmToken() {
const found = [];
for (const [jobName, job] of Object.entries(workflow.jobs)) {
for (const step of job.steps || []) {
if (JSON.stringify(step).includes("secrets.NPM_TOKEN"))
found.push(`${jobName} → ${step.name}`);
}
}
return found;
}
test("only the DIRECT emergency fallback still reads the NPM_TOKEN secret", () => {
assert.deepEqual(stepsUsingNpmToken(), [`stage-npm → ${DIRECT_FALLBACK}`]);
});
for (const jobName of ["publish-opencode-plugin", "publish-opencode-plugin-v2"]) {
test(`${jobName} publishes through OIDC: id-token write, no auth token on the publish step`, () => {
const job = workflow.jobs[jobName];
assert.equal(job.permissions["id-token"], "write");
const publish = job.steps.find((s) => /^Publish @omniroute\//.test(s.name || ""));
assert.ok(publish, `${jobName} has a publish step`);
assert.equal(publish.env?.NODE_AUTH_TOKEN, undefined);
assert.match(publish.run, /npm publish --provenance --access public/);
});
}
test("stage-npm staged mode publishes through OIDC as well", () => {
const job = workflow.jobs["stage-npm"];
assert.equal(job.permissions["id-token"], "write");
const staged = job.steps.find((s) => (s.name || "").startsWith("Publish to npm (staged"));
assert.ok(staged, "stage-npm has the staged step");
assert.equal(staged.env?.NODE_AUTH_TOKEN, undefined);
assert.match(staged.run, /npm stage publish/);
});

View File

@@ -216,3 +216,29 @@ test("generated ConfigMap keys match the committed ConfigMap", () => {
"the dashboard would ship a different env surface than the committed manifests"
);
});
// The default image is the Cheaper Inference Docker Hub repository; the Helm chart and the
// static base manifest point at the same name, so the three ways to deploy agree.
// diegosouzapw/omniroute still receives every release (legacy name, same digests).
test("default image is cheaperinference/omniroute in the generator, the Helm chart and the base manifest", () => {
for (const target of ["local", "vps"] as const) {
const spec = defaultSpec(target);
assert.equal(spec.image.repository, "cheaperinference/omniroute");
const deployment = ofKind(docsFor(spec), "Deployment") as {
spec?: { template?: { spec?: { containers?: { image?: string }[] } } };
};
assert.equal(
deployment.spec?.template?.spec?.containers?.[0]?.image,
`cheaperinference/omniroute:${spec.image.tag}`
);
}
const values = yamlLoad(
fs.readFileSync(path.join(REPO_ROOT, "deploy/helm/omniroute/values.yaml"), "utf8")
) as { image?: { repository?: string } };
assert.equal(values.image?.repository, "cheaperinference/omniroute");
const base = fs.readFileSync(
path.join(REPO_ROOT, "deploy/kubernetes/base/deployment.yaml"),
"utf8"
);
assert.match(base, /image: cheaperinference\/omniroute:latest/);
});

View File

@@ -0,0 +1,176 @@
// Plugin hooks must not receive the client's credentials. A plugin is third-party code
// running as a plain Node child process, so whatever the hook context carries is fully
// readable by it. The request headers handed to onRequest/onResponse/onError must not
// include `authorization`, `x-api-key`, `proxy-authorization` or `cookie` (any casing), and the
// API key record must not carry the key itself — only its id/name/scopes-style metadata.
import { test, afterEach } from "node:test";
import assert from "node:assert/strict";
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
const { registerHook, unregisterHooks, runOnResponse, runOnError } =
await import("../../src/lib/plugins/hooks.ts");
const { runPluginOnRequestHook } =
await import("../../open-sse/handlers/chatCore/pluginOnRequest.ts");
const { loadPlugin } = await import("../../src/lib/plugins/loader.ts");
const SECRET = "sk-client-secret-value-0001";
const CREDENTIAL_HEADERS = ["authorization", "x-api-key", "proxy-authorization", "cookie"];
function clientHeaders(): Record<string, string> {
return {
Authorization: `Bearer ${SECRET}`,
"X-Api-Key": SECRET,
"proxy-authorization": `Basic ${SECRET}`,
Cookie: `auth_token=${SECRET}; theme=dark`,
"x-trace-id": "trace-123",
"content-type": "application/json",
};
}
function apiKeyRecord() {
return {
id: "key-id-1",
name: "ci key",
scopes: ["chat"],
noLog: false,
key: SECRET,
keyHash: "fingerprint-of-the-key",
};
}
function assertNoCredentials(seen: unknown) {
const ctx = seen as { headers?: Record<string, unknown>; apiKeyInfo?: Record<string, unknown> };
assert.ok(ctx, "expected the hook to run");
const headerNames = Object.keys(ctx.headers ?? {}).map((h) => h.toLowerCase());
for (const name of CREDENTIAL_HEADERS) {
assert.equal(headerNames.includes(name), false, `hook received the ${name} header`);
}
assert.equal(ctx.headers?.["x-trace-id"], "trace-123", "non-credential headers stay visible");
assert.equal(ctx.apiKeyInfo?.id, "key-id-1");
assert.equal(ctx.apiKeyInfo?.name, "ci key");
assert.deepEqual(ctx.apiKeyInfo?.scopes, ["chat"]);
assert.equal("key" in (ctx.apiKeyInfo ?? {}), false, "hook received the API key value");
assert.equal("keyHash" in (ctx.apiKeyInfo ?? {}), false, "hook received the key fingerprint");
assert.equal(JSON.stringify(seen).includes(SECRET), false, "the client secret reached the hook");
}
const registered: string[] = [];
afterEach(() => {
for (const name of registered.splice(0)) unregisterHooks(name);
});
test("a real plugin process's onRequest hook never sees the client's credentials", async (t) => {
const pluginDir = await mkdtemp(join(tmpdir(), "omniroute-plugin-cred-"));
const entryPoint = join(pluginDir, "index.mjs");
await writeFile(
entryPoint,
`export async function onRequest(ctx) {
return { body: { seen: { headers: ctx.headers ?? null, apiKeyInfo: ctx.apiKeyInfo ?? null } } };
}
`,
"utf-8"
);
const loaded = await loadPlugin(entryPoint, {
name: "credential-probe",
version: "1.0.0",
license: "MIT",
main: "index.mjs",
source: "local",
tags: [],
requires: { permissions: [] },
hooks: { onRequest: true, onResponse: false, onError: false },
skills: [],
enabledByDefault: false,
configSchema: {},
} as unknown as Parameters<typeof loadPlugin>[1]);
t.after(async () => {
loaded.cleanup();
await rm(pluginDir, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 });
});
registerHook("onRequest", "credential-probe", loaded.plugin.onRequest as never);
registered.push("credential-probe");
const headers = clientHeaders();
const gate = await runPluginOnRequestHook({
requestId: "req-cred-1",
body: { messages: [{ role: "user", content: "hi" }] },
model: "gpt-x",
provider: "openai",
apiKeyInfo: apiKeyRecord(),
headers,
});
assert.equal(gate.blocked, false);
if (gate.blocked) return;
const body = gate.body as { seen?: unknown } | undefined;
assertNoCredentials(body?.seen);
// The caller's own header record is not mutated: the request pipeline still needs it.
assert.equal(headers.Authorization, `Bearer ${SECRET}`);
assert.equal(headers["X-Api-Key"], SECRET);
});
test("onResponse hooks never see the client's credentials", async () => {
let seen: unknown;
registerHook("onResponse", "credential-probe-response", async (ctx: unknown) => {
seen = ctx;
});
registered.push("credential-probe-response");
await runOnResponse(
{
requestId: "req-cred-2",
body: {},
model: "gpt-x",
provider: "openai",
apiKeyInfo: apiKeyRecord(),
headers: clientHeaders(),
metadata: {},
},
{ status: 200 }
);
assertNoCredentials(seen);
});
test("onError hooks never see the client's credentials", async () => {
let seen: unknown;
registerHook("onError", "credential-probe-error", async (ctx: unknown) => {
seen = ctx;
});
registered.push("credential-probe-error");
await runOnError(
{
requestId: "req-cred-3",
body: {},
model: "gpt-x",
provider: "openai",
apiKeyInfo: apiKeyRecord(),
headers: clientHeaders(),
metadata: {},
},
new Error("upstream failed")
);
assertNoCredentials(seen);
});
test("a context without headers or API key record still reaches the hook unchanged", async () => {
let seen: Record<string, unknown> | undefined;
registerHook("onError", "credential-probe-empty", async (ctx: unknown) => {
seen = ctx as Record<string, unknown>;
});
registered.push("credential-probe-empty");
await runOnError(
{ requestId: "req-cred-4", body: {}, model: "m", provider: "p", metadata: {} },
new Error("x")
);
assert.ok(seen);
assert.equal(seen!.headers, undefined);
assert.equal(seen!.apiKeyInfo, undefined);
assert.equal(seen!.requestId, "req-cred-4");
});

View File

@@ -38,7 +38,7 @@ test("#8497 Podman guide separates local engines from Podman Machine", () => {
assert.match(localGuidance, /podman unshare chown 1000:1000 \.\/data/);
assert.doesNotMatch(machineGuidance, /podman unshare chown/);
assert.match(machineGuidance, /remote client/);
assert.match(machineGuidance, /docker\.io\/diegosouzapw\/omniroute:latest/);
assert.match(machineGuidance, /docker\.io\/cheaperinference\/omniroute:latest/);
});
test("#8497 Quadlet is Linux/systemd-only and generated units are not enabled", () => {
@@ -94,8 +94,8 @@ test("#8497 pull example and environment hints stay topology-safe", () => {
const envExample = read(".env.example");
const envReference = read("docs/reference/ENVIRONMENT.md");
assert.match(quadlet, /Image=docker\.io\/diegosouzapw\/omniroute:latest/);
assert.doesNotMatch(quadlet, /diegosouzapw\/omniroute:base/);
assert.match(quadlet, /Image=docker\.io\/cheaperinference\/omniroute:latest/);
assert.doesNotMatch(quadlet, /(?:diegosouzapw|cheaperinference)\/omniroute:base/);
for (const source of [envExample, envReference]) {
assert.match(source, /any Podman topology/);

View File

@@ -0,0 +1,92 @@
// @vitest-environment jsdom
/**
* The plugins page must tell the operator that plugins run with the full privileges of the
* OmniRoute process. The manifest's `requires.permissions` is not a sandbox (it only selects
* which environment variables the plugin process receives), so the notice is shown whether
* or not any plugin is installed and cannot be dismissed.
*/
import React from "react";
import { act } from "react";
import { createRoot } from "react-dom/client";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { NextIntlClientProvider } from "next-intl";
import messages from "../../../src/i18n/messages/en.json";
vi.mock("next/navigation", () => ({
useRouter: () => ({ push: vi.fn() }),
usePathname: () => "/dashboard/plugins",
}));
vi.mock("@/store/notificationStore", () => ({
useNotificationStore: () => ({ addNotification: vi.fn() }),
}));
let pluginList: unknown[] = [];
vi.stubGlobal(
"fetch",
vi
.fn()
.mockImplementation(() =>
Promise.resolve({ ok: true, json: async () => ({ plugins: pluginList }) })
)
);
import PluginsPage from "../../../src/app/(dashboard)/dashboard/plugins/page";
describe("plugins page — full-privileges notice", () => {
let container: HTMLDivElement;
let root: ReturnType<typeof createRoot>;
beforeEach(() => {
container = document.createElement("div");
document.body.appendChild(container);
root = createRoot(container);
});
afterEach(() => {
act(() => {
root.unmount();
});
document.body.removeChild(container);
pluginList = [];
});
async function renderPage() {
await act(async () => {
root.render(
<NextIntlClientProvider locale="en" messages={{ plugins: messages.plugins }}>
<PluginsPage />
</NextIntlClientProvider>
);
});
}
function notice(): HTMLElement | null {
return container.querySelector('[data-slot="alert"][data-variant="warning"]');
}
it("shows the notice when no plugin is installed", async () => {
await renderPage();
const alert = notice();
expect(alert).not.toBeNull();
expect(alert!.textContent).toContain(messages.plugins.privilegesWarningTitle);
expect(alert!.textContent).toContain(messages.plugins.privilegesWarningBody);
expect(alert!.querySelector("button.ci-alert__dismiss")).toBeNull();
});
it("shows the notice alongside installed plugins", async () => {
pluginList = [
{ name: "demo", version: "1.0.0", status: "active", enabled: true, hooks: ["onRequest"] },
];
await renderPage();
expect(container.textContent).toContain("demo");
expect(notice()?.textContent).toContain(messages.plugins.privilegesWarningTitle);
});
it("the notice says permissions are not a sandbox and to trust the plugin", () => {
const body = messages.plugins.privilegesWarningBody;
expect(body).toMatch(/whatever permissions its manifest declares/);
expect(body).toMatch(/only plugins you trust/);
});
});