spreadlab/tygo.yaml
Justin Visser bd890384e5 engine: realistic config bounds, enforced and served
ConfigBounds (students 10-500, edgesPerNode 1-8, forwardProb 0-0.9,
triangleProb 0-1) caps what RunScenario accepts: a student does not
keep 150 close friendships and a guaranteed forward is not a real
base rate. numEducated gains its missing upper limit (numStudents).
Bounds-side validation also protects the public server from absurd
numStudents values. GET /api/config/default now returns
{config, bounds} so the frontend can drive its controls from the
same numbers; the frontend does not call it yet, so this commit
changes no UI behaviour.
2026-06-11 15:54:07 +02:00

19 lines
712 B
YAML

# Generates the frontend's TypeScript types from the Go structs, which are
# the single source of truth for parameters and results (see tool-handoff.md).
# Regenerate with: go generate ./...
packages:
- path: "github.com/JustinZeus/spreadlab/internal/engine"
output_path: "web/src/types/engine.ts"
include_files:
- "scenario.go"
- path: "github.com/JustinZeus/spreadlab/internal/api"
output_path: "web/src/types/api.ts"
include_files:
- "api.go"
frontmatter: |
import type { Bounds, Config, Result, Strategy } from "./engine";
type_mappings:
engine.Bounds: "Bounds"
engine.Config: "Config"
engine.Result: "Result"
engine.Strategy: "Strategy"