caelum0x e841852b59 feat: product reach — CLI global-dynamics commands, server analysis endpoint, e2e example
Batch 13 of expansion-v2. Makes the global-dynamics/control engine reachable
from the CLI and the hosted API, and adds a verified end-to-end scenario.

crates/lawsynth-cli: new `lyapunov` (spectrum + KY dimension + chaos flag),
`basins` (attractors + basin fractions + escaped/undetermined), `network`
(directed coupling edge list), and `mpc` (regulate to a setpoint) commands —
all with --json and honest caveats (lyapunov time-averaged; basins fixed-point
attractors only; network correlational-not-causal; mpc successive-linearization
LQR). 135 lib + 9 new integration tests.

python/lawsynth-server: POST /v1/worlds/{id}/analysis/stability mirroring the
simulations resource (auth scope, idempotency key, events). Reaches the engine
the same way the SDK does (native build_world -> save -> CLI-backed stability),
not re-implemented. Honest cases: inconclusive kept, empty box is 200, bad
request 422, engine-absent 503, engine-failure 5xx. 36 passed / 5 skipped
(engine absent), 39 passed with the engine.

examples/20-stability-and-forecast: verified scenario — a conservative oscillator
discovered, then stability finds a center (inconclusive) that invariants explains
via H = 0.25·imbalance² + mid², then forecast. Real captured output; matches the
gallery format; pytest examples 21/21. Honest that bifurcation/sensitivity need
declared parameters.
2026-08-18 18:11:36 +03:00

26 lines
472 B
JSON

{
"schema_version": 1,
"name": "Frictionless order book",
"kind": "market_microstructure",
"states": [
"mid",
"imbalance"
],
"initial": [
1.0,
0.0
],
"time": {
"start": 0,
"stop": 20,
"step": 0.02
},
"parameters": {
"impact": 1.0,
"resilience": 0.0,
"liquidity": 4.0
},
"description": "An undamped mid-price / order-flow oscillator (zero resilience): a conservative center.",
"status": "reference-model"
}