Operations
Janus is a local research tool. Run it on one machine, keep the database, and gate the HTTP surface if it leaves loopback.
Serve locally
uv run janus serve --port 8801
The console and the API are served by the same process. The browser talks to the same origin, and the page sends a strict default-src 'self' policy.
Auth and the edge
Set JANUS_API_TOKEN to require a bearer token on the API. The console never asks the browser to hold it in a same-origin deployment: the proxy injects Authorization on the way out, and the page keeps no secret.
- If you expose the service beyond loopback, terminate TLS at a proxy and keep the backend on
127.0.0.1. - Do not put the token in a URL, a static file, or a client bundle.
- A local instance without a proxy may ask for the token once and keep it in the tab; “remember on this device” is opt-in.
- The token is a single operator credential today. It is not a multi-user identity and does not carry a tenant.
Data and backups
The store is SQLite in v0.1. Back it up as a file while the service is stopped, or use SQLite's online backup mechanism. The database is the product: snapshots, theses, predictions, and reviews are all in it.
- Keep the database out of git.
- Keep exported snapshots versioned; they are the portable form of the record.
- A restored database should still satisfy the same
as_ofqueries. If it does not, the restore is wrong.
Logging and redaction
core/janus/logging.py emits one structured event path, with --log-format text|json. The CLI routes both through configure_logging(), and ingestion emits ingestion.start, ingestion.dead_letter, and ingestion.complete with the run id.
Redaction is value-level, not key-name-level. redact() scans every string at any depth, so a provider error carrying ?api_key=…, an Authorization: Bearer … header, a PEM private key, a token-shaped string, or https://user:pass@host is masked whether or not the mapping key looks sensitive.
Security posture
The threat model assumes a local operator and a possibly hostile data source:
- the API is read-mostly, and the console is read-only;
- no broker connectivity and no trade execution;
- no real-money decisions in the record;
- the MCP surface is local and scoped;
- the UI is keyboard-navigable, holds at 375 px, and respects
prefers-reduced-motion.
The honest limit: v0.1 has no application-layer multi-tenant identity. One token means one principal. Multi-tenant support is a design item (JAN-145), not a configuration flag.
Deployment checklist
- Pin the version and the database path.
- Set
JANUS_API_TOKENbefore exposing anything. - Keep the backend on loopback; put TLS and auth at the proxy.
- Back up the SQLite file on a schedule you have restored at least once.
- Watch ingestion dead letters; a silent source is a data bug.
- Rotate the token by restarting with the new value; there is no per-user revocation yet.
Read next
- Point-in-time memory: what must survive a backup.
- Forecasts and calibration: what the record is for.