fetch_ml/cmd/api-server
Jeremie Fraeys ea15af1833 Fix multi-user authentication and clean up debug code
- Fix YAML tags in auth config struct (json -> yaml)
- Update CLI configs to use pre-hashed API keys
- Remove double hashing in WebSocket client
- Fix port mapping (9102 -> 9103) in CLI commands
- Update permission keys to use jobs:read, jobs:create, etc.
- Clean up all debug logging from CLI and server
- All user roles now authenticate correctly:
  * Admin: Can queue jobs and see all jobs
  * Researcher: Can queue jobs and see own jobs
  * Analyst: Can see status (read-only access)

Multi-user authentication is now fully functional.
2025-12-06 12:35:32 -05:00
..
main.go Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
README.md feat: implement Go backend with comprehensive API and internal packages 2025-12-04 16:53:53 -05:00

API Server

WebSocket API server for the ML CLI tool...

Usage

./bin/api-server --config configs/config-dev.yaml --listen :9100

Endpoints

  • GET /health - Health check
  • WS /ws - WebSocket endpoint for CLI communication

Binary Protocol

See CLI README for protocol details.

Configuration

Uses the same configuration file as the worker. Experiment base path is read from base_path configuration key.

Example

# Start API server
./bin/api-server --listen :9100

# In another terminal, test with CLI
./cli/zig-out/bin/ml status