chore: project foundation

Contracts (the shared language):
- percept / state / context / utterance / render / audio / capabilities
- Capability model instead of vendor schemas (see below)

Providers (capability-based abstraction):
- LLM + Embedding: OpenAI-compatible shape IS the standard, adopted directly
- ASR: internal contract is an event stream (partial -> final), because
  /v1/audio/transcriptions has no partial and dialogue needs it for
  endpointing. OpenAI adapter degrades to supports_partial=False.
- TTS: internal contract carries tags/emotion/style, because
  /v1/audio/speech has no paralinguistics and [laughter]/[breath] are
  the core of feeling alive. Unsupported providers are stripped AND
  reported via Degradation -- silent degradation is forbidden.
- Avatar: no de-facto standard, custom RenderCmd protocol driven by State.

Core:
- mood: dynamical system, slow variables, negativity bias (grudge),
  numbing after prolonged negativity
- bazi: four pillars -> numeric vector; 'ming' is data, not prose
- projection: phi, system event -> in-world statement; uncovered events
  are counted as projection gaps

Storage:
- SQLite schema, three memory layers, dyad ledger
- accessibility floor 0.03 (not 0): forgettable but still there

Config split:
- models.yaml is the ONLY place model versions live
- character.yaml holds world rules / emotion params, no version numbers

58 tests pass; ruff clean.
This commit is contained in:
mobai
2026-10-19 20:08:52 +08:00
commit 1012d8bb79
57 changed files with 6452 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""CyberGril —— 一个有自己世界的赛博伴侣。
三层不可混淆的东西:
1. **命**(bazi_core.derived)不变,只能被整合器微调
2. **运**(fortune_period)按周/月变化
3. **状态**(State)按秒/分变化
架构:
contracts/ 数据契约 —— 全项目唯一的共同语言
providers/ 模型接入 —— 按能力建模,OpenAI 兼容只是 adapter
core/ 状态核心 —— 独立时钟,不依赖用户输入
memory/ 三层记忆
dyad/ 关系账本
"""
__version__ = "0.1.0"
from .config import CharacterConfig, ModelsConfig, Settings, load_settings
__all__ = [
"CharacterConfig",
"ModelsConfig",
"Settings",
"__version__",
"load_settings",
]