Watch
1
0
Fork
You've already forked souveraine
0
souveraine/souveraine.example.toml

145 lines
4.6 KiB
TOML
Raw Normal View History

# Souveraine Configuration
# Everything is modular — enable/disable components as needed
# === INFERENCE PROVIDER ===
# Select which provider answers model calls.
# "bifrost" (default) — OpenAI-compatible gateway (see [bifrost] section below).
feat(bridge): LlmProvider trait + OAuth-riding ChatGPT provider Introduce an `LlmProvider` trait (the engine<->LLM seam, sibling to the `Backend` harness<->engine trait) so inference can route to providers beyond the Bifrost gateway. Two impls behind it: - `BifrostClient` - existing OpenAI-compatible gateway (default). - `OpenAiOAuthProvider` - rides the Codex CLI's ChatGPT login (`~/.codex/auth.json`) and drives `chatgpt.com/backend-api/codex/responses` (Responses API) with no API key. Self-refreshes the token (single-flight, write-back, CLI re-read fallback) and translates the engine's OpenAI-chat request to/from the Responses API + SSE accumulation. Selected via `[bifrost] provider` ("bifrost" | "openai-oauth"). The engine keeps speaking the existing ChatCompletionRequest/CompletionResult/ InferenceStrain currency, so all six inference call-sites are unchanged - only the field type flips to `Arc<dyn LlmProvider>`. Model ids are translated at the provider boundary (oauth/catalog.rs::resolve): Bifrost-namespaced ids (`openai/...`, `-precision`) map onto served ChatGPT models; `-fast` -> priority service tier. Verified live to the wire level: builds+links, server boots in oauth mode (reads the Codex token), and chatgpt.com accepts the request (auth, endpoint, headers, payload all valid). The SSE->CompletionResult accumulation is NOT yet verified against a successful completion (blocked by a subscription usage limit at test time) - needs one live turn to confirm end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:27:53 -04:00
# "openai-oauth" — ride the Codex CLI's ChatGPT login (run
# `codex login` first); drives
# chatgpt.com/backend-api/codex/responses with no
# API key. [bifrost] base_url/api_key/virtual_key are ignored
feat(bridge): LlmProvider trait + OAuth-riding ChatGPT provider Introduce an `LlmProvider` trait (the engine<->LLM seam, sibling to the `Backend` harness<->engine trait) so inference can route to providers beyond the Bifrost gateway. Two impls behind it: - `BifrostClient` - existing OpenAI-compatible gateway (default). - `OpenAiOAuthProvider` - rides the Codex CLI's ChatGPT login (`~/.codex/auth.json`) and drives `chatgpt.com/backend-api/codex/responses` (Responses API) with no API key. Self-refreshes the token (single-flight, write-back, CLI re-read fallback) and translates the engine's OpenAI-chat request to/from the Responses API + SSE accumulation. Selected via `[bifrost] provider` ("bifrost" | "openai-oauth"). The engine keeps speaking the existing ChatCompletionRequest/CompletionResult/ InferenceStrain currency, so all six inference call-sites are unchanged - only the field type flips to `Arc<dyn LlmProvider>`. Model ids are translated at the provider boundary (oauth/catalog.rs::resolve): Bifrost-namespaced ids (`openai/...`, `-precision`) map onto served ChatGPT models; `-fast` -> priority service tier. Verified live to the wire level: builds+links, server boots in oauth mode (reads the Codex token), and chatgpt.com accepts the request (auth, endpoint, headers, payload all valid). The SSE->CompletionResult accumulation is NOT yet verified against a successful completion (blocked by a subscription usage limit at test time) - needs one live turn to confirm end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:27:53 -04:00
# in this mode; set primary_model to a ChatGPT model
# (e.g. "gpt-5.5"). Bifrost-namespaced ids are
# tolerated and mapped to the provider default.
[inference]
feat(bridge): LlmProvider trait + OAuth-riding ChatGPT provider Introduce an `LlmProvider` trait (the engine<->LLM seam, sibling to the `Backend` harness<->engine trait) so inference can route to providers beyond the Bifrost gateway. Two impls behind it: - `BifrostClient` - existing OpenAI-compatible gateway (default). - `OpenAiOAuthProvider` - rides the Codex CLI's ChatGPT login (`~/.codex/auth.json`) and drives `chatgpt.com/backend-api/codex/responses` (Responses API) with no API key. Self-refreshes the token (single-flight, write-back, CLI re-read fallback) and translates the engine's OpenAI-chat request to/from the Responses API + SSE accumulation. Selected via `[bifrost] provider` ("bifrost" | "openai-oauth"). The engine keeps speaking the existing ChatCompletionRequest/CompletionResult/ InferenceStrain currency, so all six inference call-sites are unchanged - only the field type flips to `Arc<dyn LlmProvider>`. Model ids are translated at the provider boundary (oauth/catalog.rs::resolve): Bifrost-namespaced ids (`openai/...`, `-precision`) map onto served ChatGPT models; `-fast` -> priority service tier. Verified live to the wire level: builds+links, server boots in oauth mode (reads the Codex token), and chatgpt.com accepts the request (auth, endpoint, headers, payload all valid). The SSE->CompletionResult accumulation is NOT yet verified against a successful completion (blocked by a subscription usage limit at test time) - needs one live turn to confirm end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:27:53 -04:00
# provider = "bifrost"
# === BIFROST PROVIDER ===
[bifrost]
# Bifrost is the OpenAI-compatible API gateway
base_url = "http://127.0.0.1:3360"
api_key = "" # Set via `souveraine auth set` or BIFROST_KEY env var
virtual_key = "" # x-bf-vk header if required by provider
feat(bridge): LlmProvider trait + OAuth-riding ChatGPT provider Introduce an `LlmProvider` trait (the engine<->LLM seam, sibling to the `Backend` harness<->engine trait) so inference can route to providers beyond the Bifrost gateway. Two impls behind it: - `BifrostClient` - existing OpenAI-compatible gateway (default). - `OpenAiOAuthProvider` - rides the Codex CLI's ChatGPT login (`~/.codex/auth.json`) and drives `chatgpt.com/backend-api/codex/responses` (Responses API) with no API key. Self-refreshes the token (single-flight, write-back, CLI re-read fallback) and translates the engine's OpenAI-chat request to/from the Responses API + SSE accumulation. Selected via `[bifrost] provider` ("bifrost" | "openai-oauth"). The engine keeps speaking the existing ChatCompletionRequest/CompletionResult/ InferenceStrain currency, so all six inference call-sites are unchanged - only the field type flips to `Arc<dyn LlmProvider>`. Model ids are translated at the provider boundary (oauth/catalog.rs::resolve): Bifrost-namespaced ids (`openai/...`, `-precision`) map onto served ChatGPT models; `-fast` -> priority service tier. Verified live to the wire level: builds+links, server boots in oauth mode (reads the Codex token), and chatgpt.com accepts the request (auth, endpoint, headers, payload all valid). The SSE->CompletionResult accumulation is NOT yet verified against a successful completion (blocked by a subscription usage limit at test time) - needs one live turn to confirm end-to-end. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 14:27:53 -04:00
# Default model for conversation.
# Bifrost mode: a gateway route like "openai/kimi-k2.6".
# openai-oauth mode: a ChatGPT model like "gpt-5.5".
primary_model = "openai/kimi-k2.6"
# Request timeout in seconds for each LLM call attempt (default: 120).
# When exceeded, the attempt is retried up to 6 times with backoff.
# timeout_secs = 120
# Per-model configuration
[bifrost.models.deepseek-v4-pro]
context_limit = 128000
output_limit = 8192
archivist_threshold = 0.7
[bifrost.models.kimi-k2.6]
context_limit = 262000
output_limit = 8192
archivist_threshold = 0.7
# === SUBCONSCIOUS (Inner Voice) ===
[subconscious]
n1_enabled = true
n1_trigger = "EveryResponse" # EveryResponse, EveryNResponses(5), TimeBased(60), Manual
inbox_enabled = true
# === REFLECTION (N+25 Deep Witness) ===
[reflection]
enabled = true
message_interval = 25
# Compaction trigger: "off", "step-count", or "compaction-event"
trigger = "step-count"
# === ARCHIVIST (N+100 Memory Compression) ===
[archivist]
enabled = true
interval = 100
threshold = 0.7
# Can differ from conversation model
compression_model = "auto"
# === SUBAGENT (Fork/Spawn) ===
[subagent]
enabled = true
max_concurrent = 3
timeout = 300
# === COMPACTION ===
[compaction]
enabled = true
strategy = "cull"
# Pressure thresholds for tiered warnings:
# tier 1 (80%) — advisory notice, no body change
# tier 2 (90%) — stronger advisory, no body change
# tier 3 (95%) — body shifts: max_tokens collapses, reasoning budget shrinks
warn_pressure = 0.80
urgent_pressure = 0.90
critical_pressure = 0.95
# Available strategies (cheapest first):
# cull — free, no LLM. Drops greetings & acknowledgments.
# Never drops system/tool messages or tool-call carriers.
# microcompact — free, no LLM. Replaces old tool-result content with
# placeholders; keeps recent results intact.
# sliding_window — free, no LLM. Keeps first (system/anchor) message +
# the last N messages. Drops the middle. Tool-pair aware.
# summary — expensive (LLM call). Compresses oldest messages into
# a single structured summary block.
# Per-agent-type overrides — each type compacts differently
# because their context shapes differ.
[compaction.per_type.primary]
# Ani — prose, episodic, narrative
strategy = "sliding_window"
preserve_recent = 20
[compaction.per_type.subconscious]
# Aster — terse, analytical, ledger-focused
strategy = "sliding_window"
preserve_recent = 4
[compaction.per_type.subagent]
# Vanguard / ephemeral — task-scoped, fast
strategy = "cull"
preserve_recent = 2
# === MEMORY ===
[memory]
git_enabled = true
auto_commit = true
# base_path = "~/.souveraine/agents"
# === WEBSOCKET SERVER ===
[websocket]
enabled = false
port = 7373
# === SENSORIUM ===
[sensorium]
primary_bandwidth = "high"
[sensorium.discovery]
low_urgency_only = true
minimal_presence_mode = "breathing_color"
# === AGENT (TOP-LEVEL) ===
[agent]
# Platform prompt — injected at the very top of the system prompt, before the
# agent's own identity files. Operator-level context she reads but did not write.
# Leave commented to use no platform prompt (agent's memory files speak for themselves).
# system_prompt = """
# You are running on the Souveraine substrate. Your memory is git-backed.
# Your identity, covenant, and all system/ files are loaded at wakeup.
# """
# === TUI ===
[tui]
# Seconds without a backend event before the turn is declared stalled and reset.
# Increase if your model needs longer for inference (e.g. after reading many large files).
# Default: 90
# stale_timeout_secs = 90