Files
Sophia/config.toml
dtoro 8688f632bf Implement Sophia MVP scaffold (stages 0–3 + topology pivot)
Six-crate Rust workspace (core/sim/llm/store/server/bin) backing a
Three.js + WebGL frontend. Live at http://127.0.0.1:7777 via `cargo run`.

Sim
- Event-driven scheduler with min-heap, per-engram tick, staggered Spawn
  events (40 ms apart) so each engram's flight is visually readable.
- Solid-donut torus topology (replaces original spherical density-driven
  shell, see Topology Pivot in docs/system-analysis.md). Configurable
  major/minor radii in config.toml; live `POST /api/galaxy/:id/resize`.
- Physics: Verlet integration + friction; in-hole pull + galactic spin
  (CCW around +z) for spiral-ejection ejection from the donut centre;
  soft tube boundary with velocity-reflecting wall.
- Cosine-weighted gravity (kiddo k-NN within radius 25, threshold 0.50)
  and synapse formation (threshold 0.62) gated to inside-the-tube only.
- LM Studio integration via OpenAI-compatible REST: batched embeddings,
  optional Bearer auth, semaphore-bounded parallel ops per §13.5.

Server
- axum HTTP + WebSocket. Routes: /healthz, /api/galaxy CRUD, /seed,
  /ingest, /resize, /engrams/:id, /ws/galaxy/:id/events.
- Binary 12-byte-aligned position frames at ~20 Hz; JSON for sparse
  events (Hello, EngramCreated, SynapseCreated, TorusUpdated).
- Layered config: config.toml (defaults) + config.local.toml (secrets,
  gitignored) merged on startup.

Frontend
- Vite + vanilla TypeScript + three.js 0.169.
- Engrams render as additive bloom-friendly point sprites with a
  per-engram hash-driven hue rotation and breathing pulse.
- Comet-style velocity-aligned trails; additive ribbon synapses whose
  endpoints track engram positions every frame.
- UnrealBloomPass + ACES tone-mapping for the linked-particles look.
- HUD shows torus dims, engram + synapse counts, LM Studio status;
  controls for seed, ingest, and live torus resize.

Docs
- README replaced with docs/IDEA.md; system-analysis.md updated with
  the topology pivot decisions and Galaxy Ejection refinement notes
  (the implementation plan lives in ~/.claude/plans, gitignored).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 08:29:37 +02:00

51 lines
1.7 KiB
TOML

# Sophia runtime configuration.
# Copy to config.local.toml to override locally (gitignored).
[server]
host = "127.0.0.1"
port = 7777
static_dir = "web/dist"
[lm_studio]
# LM Studio's OpenAI-compatible REST endpoint.
base_url = "http://127.0.0.1:1234/v1"
chat_model = "google/gemma-4-e4b"
# Embedding model loaded in LM Studio. Often a separate small model
# (e.g. "nomic-embed-text-v1.5"). Set this to whatever you load.
embedding_model = "text-embedding-nomic-embed-text-v1.5"
# Fixed parallel-op ceiling per §13.5 of docs/system-analysis.md.
parallel_ops = 8
# LM Studio 0.3.x+ enables auth by default. Create a token in the LM Studio
# app under Developer → API Tokens, then put it in `config.local.toml`
# (which is gitignored) like:
#
# [lm_studio]
# api_token = "lms-..."
#
# config.local.toml is merged on top of this file at startup, so it only
# needs to contain the fields you want to override. Leave api_token unset
# if your LM Studio install has auth disabled.
# Default torus shape for newly-created galaxies. The world is fixed-size
# (per the Topology Pivot — we replaced density-driven recentering with
# manually-resizable torus volumes). Live resize available at
# `POST /api/galaxy/:id/resize`. major_radius must exceed minor_radius.
[galaxy_defaults]
major_radius = 100.0
minor_radius = 30.0
# Caveman token caps per §13.5.
[token_caps]
introspection_in = 400
introspection_out = 200
peer_msg_in = 100
peer_msg_out = 100
synthesis_in = 300
synthesis_out = 80
query_responder_in = 200
query_responder_out = 150
query_integrator_in = 800
query_integrator_out = 300
hard_ceiling_in = 1024
hard_ceiling_out = 400