docs: update test counts and document the local server security model
This commit is contained in:
1 parent
ceca5bf301
commit
1314c5ab3e
2 files changed
+6
-4
No files matched your search
@@ -173,13 +173,13 @@ Everything below was executed on a clean clone in this repository state:
|
||||
| `npm run typecheck:extensions` | exit 0 |
|
||||
| `npm run lint` | exit 0 (0 errors, 109 warnings) |
|
||||
| `npm run build` | exit 0, `dist/` about 14 MB |
|
||||
| `npm run test:run` | 89 files, 319 tests, all passing |
|
||||
| `npm run test:run` | 95 files, 426 tests, all passing (on Node 22 in CI; see the Node 25+ note below) |
|
||||
| `npm run validate` | exit 0 (the same gate CI runs in `build.yml`) |
|
||||
| `cargo check` in `src-router/` | exit 0 |
|
||||
| `cargo check --manifest-path src-tauri/Cargo.toml` | exit 0 (1 warning) |
|
||||
| extension server over HTTP | `/global/health` 200, `/` 200 with `PI_BOOT_DATA`, `/api/models` 200 with token and 401 without, `/api/sessions`, `/api/sessions/:id/messages`, `/api/sessions/:id/context`, `/api/skills`, `/api/mcp/status`, `/api/commands/list`, `/api/network/access` all 200, `/global/event` 200 `text/event-stream` |
|
||||
|
||||
Two things to know when running the suite: `npm run test:run` needs `dist/` to exist, because the extension server test fetches the served `index.html`, so `npm run build` must run first (that is the order in `npm run validate`); and `npm run format:check` currently reports 67 files that are not Prettier-formatted, so `npm run check` fails on that step even though the CI gate passes.
|
||||
Two things to know when running the suite: `npm run test:run` needs `dist/` to exist, because the extension server test fetches the served `index.html`, so `npm run build` must run first (that is the order in `npm run validate`); and `npm run format:check` currently reports 66 files that are not Prettier-formatted, so `npm run check` fails on that step even though the CI gate passes. On Node 25 and newer, Node's built-in `localStorage` shadows the jsdom one and two `settingsBackup` tests fail; running them with `NODE_OPTIONS=--no-experimental-webstorage` makes them pass.
|
||||
|
||||
## Current state and limitations
|
||||
|
||||
@@ -190,6 +190,7 @@ Two things to know when running the suite: `npm run test:run` needs `dist/` to e
|
||||
- `@mariozechner/pi-coding-agent` is a devDependency for types only (the runtime provides the real extension API), and npm marks that package line as deprecated in favour of `@earendil-works/pi-coding-agent`.
|
||||
- The front end talks to one runtime per window: the discovery file or a manually configured server. There is no multi-runtime aggregation.
|
||||
- Voice input exists in the UI (`src/hooks/useVoiceTranscription.ts`) and requires an OpenAI-compatible STT endpoint configured in settings; it is not covered by an automated browser test.
|
||||
- Security model of the local server: it binds `0.0.0.0` but answers only loopback `Host`/`Origin` values until LAN access is enabled, and `/api/*` needs the bearer token from the discovery file (generated with `crypto.randomBytes` and stored with mode `0600`). Once LAN access is enabled in settings, requests from private-network hosts are accepted without a token, so turn it on only on networks you trust: the API can read project files and manage Git and extensions. There is no per-user authentication.
|
||||
- No published npm package and no hosted web demo; both README and code assume a local runtime.
|
||||
- `docker-frontend.yml` last ran on 2026-06-01 and failed at the build step, so `ghcr.io/evandrodevbr/opencodeui-frontend` was never published (verified against GHCR with the owner credentials); the compose files pull that one image from upstream until the workflow is fixed.
|
||||
|
||||
|
||||
+3
-2
@@ -177,13 +177,13 @@ Tudo abaixo foi executado em um clone limpo neste estado do repositório:
|
||||
| `npm run typecheck:extensions` | exit 0 |
|
||||
| `npm run lint` | exit 0 (0 erros, 109 avisos) |
|
||||
| `npm run build` | exit 0, `dist/` com cerca de 14 MB |
|
||||
| `npm run test:run` | 89 arquivos, 319 testes, todos passando |
|
||||
| `npm run test:run` | 95 arquivos, 426 testes, todos passando (no Node 22 do CI; veja a nota sobre Node 25+ abaixo) |
|
||||
| `npm run validate` | exit 0 (o mesmo gate que o CI roda em `build.yml`) |
|
||||
| `cargo check` em `src-router/` | exit 0 |
|
||||
| `cargo check --manifest-path src-tauri/Cargo.toml` | exit 0 (1 aviso) |
|
||||
| servidor da extensão via HTTP | `/global/health` 200, `/` 200 com `PI_BOOT_DATA`, `/api/models` 200 com token e 401 sem, `/api/sessions`, `/api/sessions/:id/messages`, `/api/sessions/:id/context`, `/api/skills`, `/api/mcp/status`, `/api/commands/list`, `/api/network/access` todos 200, `/global/event` 200 `text/event-stream` |
|
||||
|
||||
Dois detalhes ao rodar a suíte: `npm run test:run` precisa do `dist/` existir, porque o teste do servidor da extensão busca o `index.html` servido, então `npm run build` deve rodar antes (é a ordem em `npm run validate`); e `npm run format:check` hoje acusa 67 arquivos fora do padrão do Prettier, então `npm run check` falha nesse passo mesmo com o gate do CI passando.
|
||||
Dois detalhes ao rodar a suíte: `npm run test:run` precisa do `dist/` existir, porque o teste do servidor da extensão busca o `index.html` servido, então `npm run build` deve rodar antes (é a ordem em `npm run validate`); e `npm run format:check` hoje acusa 66 arquivos fora do padrão do Prettier, então `npm run check` falha nesse passo mesmo com o gate do CI passando. No Node 25 e superior, o `localStorage` nativo do Node sobrepõe o do jsdom e dois testes de `settingsBackup` falham; rodá-los com `NODE_OPTIONS=--no-experimental-webstorage` faz passarem.
|
||||
|
||||
## Estado atual e limitações
|
||||
|
||||
@@ -194,6 +194,7 @@ Dois detalhes ao rodar a suíte: `npm run test:run` precisa do `dist/` existir,
|
||||
- `@mariozechner/pi-coding-agent` é devDependency só para tipos (o runtime fornece a API real da extensão) e o npm marca essa linha como depreciada em favor de `@earendil-works/pi-coding-agent`.
|
||||
- O front end conversa com um runtime por janela: o arquivo de descoberta ou um servidor configurado à mão. Não há agregação de múltiplos runtimes.
|
||||
- A entrada de voz existe na UI (`src/hooks/useVoiceTranscription.ts`) e exige um endpoint STT compatível com OpenAI configurado nos settings; não há teste automatizado de navegador para ela.
|
||||
- Modelo de segurança do servidor local: ele escuta em `0.0.0.0`, mas só responde a valores de `Host`/`Origin` de loopback até o acesso pela LAN ser ativado, e `/api/*` exige o token bearer do arquivo de descoberta (gerado com `crypto.randomBytes` e gravado com modo `0600`). Com o acesso pela LAN ativado nas configurações, requisições de hosts de rede privada são aceitas sem token; ative só em redes confiáveis, pois a API lê arquivos do projeto e gerencia Git e extensões. Não há autenticação por usuário.
|
||||
- Sem pacote publicado no npm e sem demo web hospedada; o README e o código assumem um runtime local.
|
||||
|
||||
## Documentação
|
||||
|
||||
Reference in new issue
Block a user