mirror of
https://github.com/kerberos-io/agent.git
synced 2026-11-21 22:50:39 +00:00
- JWT signing key: without AGENT_JWT_SECRET, generate a random secret on first start and keep it in data/config/jwt_secret (0600) instead of falling back to a publicly known constant. AGENT_JWT_SECRET still takes precedence, so deployments that share a key with Kerberos Factory are unchanged. - Only tokens for the configured account are authorised, and malformed token claims are rejected instead of panicking. - /ws (live view) and /file (recordings) now require a valid token. The UI passes it as ?token=, since browsers cannot set headers on WebSocket connections or <video src>; it no longer opens the socket before sign-in. /file no longer sends its own wildcard CORS header. - pprof is off by default; AGENT_ENABLE_PPROF=true registers it behind auth. - Release workflows pass tags to shell steps through quoted environment variables and validate them; the shared release-bump workflow is pinned to a commit and no longer receives inherited secrets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kerberos Agent UI
The web interface of the Kerberos Agent: a React app built with Vite and tested with Vitest. Requires Node.js 20.19 or newer.
Scripts
yarn start: starts the dev server on http://localhost:3000 with hot reload.yarn build: builds for production and moves the output to../machinery/www, where the Agent serves it.yarn preview: serves the production build from../machinery/wwwon port 3000. Runyarn buildfirst.yarn test: runs the test suite once.yarn test:watchkeeps it running.yarn lint: lintssrc/with ESLint.yarn format: formats the code with Prettier.
Configuration
In development the UI talks to the Agent API on port 8082 of the same host.
Override it with VITE_AGENT_API_PORT:
VITE_AGENT_API_PORT=9090 yarn start
In production builds the UI uses the host and port it was served from.
Runtime settings that differ per deployment (such as demo mode) live in
public/env.js, which the Agent can replace without rebuilding the UI.
Layout
index.html: the HTML entry point; Vite injects the bundle here.src/: application code.src/index.jsxis the entry module.public/: copied unchanged to the build root (favicons, fonts, locales,env.js).- Bundled JS, CSS and assets go to
static/in the build, so they don't mix with theassets/folder frompublic/.