caelum0x 7087e7925e feat(product): symbolic simplify (egraph), model compose/edit, hosted-deploy
Wave 11 — the three candidates:
CLI — lawsynth simplify (egraph equality saturation extracts the lowest-cost
EQUIVALENT law; proves equivalence by simulating both worlds, deviation ~0;
honest 'already minimal' on sparse discovered worlds); lawsynth compose (union
two worlds into a coupled system, namespacing collisions) and lawsynth edit
(immutable rename/set-param/drop-law/scale-law, re-validated).

SDK — lawsynth.simplify / World.simplify (stdlib expand/fold/combine +
equivalence verify), lawsynth.compose, World.rename/set_parameter/drop_law/
scale_law. Two runnable examples.

Deploy — a verifiable hosted-deploy story: deploy/quickstart (config-validated
minimal api+gateway) + docs/self-hosting/quickstart.md (real curl/Client run
loop), after fixing genuine drift in the compose files (SQLite URL the API
actually accepts, correct token env, object root, health endpoints, native
build step) — verified end-to-end from source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 01:08:14 +03:00

38 lines
1.8 KiB
Plaintext

# LawSynth quickstart — environment template.
#
# cp .env.example .env # then set LAWSYNTH_API_TOKEN to a long random value
#
# These are LOCAL defaults for a trusted developer machine. The stack ships no
# TLS. Do not expose it to an untrusted network. For a hardened deployment see
# ../compose/production.
# ---------------------------------------------------------------------------
# API environment: development | test | staging | production.
# `production` requires durable (non :memory:) SQLite and an absolute object
# root — the quickstart compose already satisfies both.
# ---------------------------------------------------------------------------
LAWSYNTH_API_ENV=production
# ---------------------------------------------------------------------------
# Bearer token the API accepts. MUST be at least 16 characters. Regenerate this
# before any shared use, e.g.: openssl rand -hex 24
# The compose file expands it into LAWSYNTH_API_TOKENS_JSON as:
# {"<token>": {"organization_id": "local", "scopes": ["read","write"]}}
# ---------------------------------------------------------------------------
LAWSYNTH_API_TOKEN=quickstart-local-token-change-me
# ---------------------------------------------------------------------------
# Host port mappings.
# ---------------------------------------------------------------------------
LAWSYNTH_API_HOST_PORT=8080
LAWSYNTH_GATEWAY_HOST_PORT=8081
# ---------------------------------------------------------------------------
# Gateway admission policy.
# ---------------------------------------------------------------------------
LAWSYNTH_GATEWAY_MAX_BODY_BYTES=67108864
LAWSYNTH_GATEWAY_REQUESTS_PER_WINDOW=120
LAWSYNTH_GATEWAY_RATE_WINDOW_SECONDS=60
# Comma-separated bare http(s) origins allowed through CORS (no path/query).
LAWSYNTH_GATEWAY_ALLOWED_ORIGINS=http://localhost:5173