@meridianlabs/inspect-scout-viewer
v0.4.5
Published
Inspect Scout viewer for evaluation logs.
Readme
Inspect Scout Viewer
A React-based web viewer for Inspect AI evaluation logs.
Prerequisites
This project uses pnpm as its package manager, managed through corepack.
Setup
Enable corepack (required once):
corepack enableThat's it! Corepack is built into Node.js 16.9+ and will automatically install the correct pnpm version (specified in package.json) when you run pnpm commands.
Alternative: If you prefer to install pnpm manually, see the official pnpm installation guide.
Install Dependencies
pnpm installDevelopment
Start the development server:
pnpm devBuild for production:
pnpm buildWatch mode for development:
pnpm watchPreview production build:
pnpm previewCode Quality
Run linting:
pnpm lintAuto-fix linting issues:
pnpm lint:fixFormat code:
pnpm formatCheck formatting:
pnpm format:checkType check:
pnpm typecheckRun all checks (lint, format, typecheck):
pnpm checkTypeScript Types from OpenAPI
Types are auto-generated from the FastAPI OpenAPI spec to keep client/server in sync.
How It Works
The type generation pipeline:
Python Pydantic models → openapi.json → generated.ts → built app- Export schema: Python script exports OpenAPI spec from FastAPI to
openapi.json - Generate types:
openapi-typescriptgenerates TypeScript types from schema - Type adapter:
src/types/api-types.tsre-exports types with clean names - Usage: Import types from
src/types/index.tsin your code
Updating Types After API Changes
When Python Pydantic models change:
# 1. Export updated OpenAPI schema
.venv/bin/python scripts/export_openapi_schema.py
# 2. Types regenerate automatically on next build
pnpm buildCommit both openapi.json and src/types/generated.ts.
Manual Type Generation
pnpm types:generateCI Validation
CI automatically validates the type generation pipeline:
openapi-schemajob: Regeneratesopenapi.jsonand fails if it differs from committed versionjs-buildjob: Regeneratesgenerated.tsand fails if it differs from committed version
If CI fails, run the commands shown in the error message and commit the updated files.
Tech Stack
- React 19
- TypeScript
- Vite
- Bootstrap 5
- AG Grid
- React Router
