2026-05-07 02:31:44 -04:00
|
|
|
# Souveraine Configuration
|
|
|
|
|
# Everything is modular — enable/disable components as needed
|
|
|
|
|
|
2026-05-29 19:47:54 -04:00
|
|
|
# === 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
|
2026-05-29 19:47:54 -04:00
|
|
|
# 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.
|
2026-05-29 19:47:54 -04:00
|
|
|
[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"
|
|
|
|
|
|
2026-05-29 19:47:54 -04:00
|
|
|
# === BIFROST PROVIDER ===
|
|
|
|
|
[bifrost]
|
2026-05-07 02:31:44 -04:00
|
|
|
# Bifrost is the OpenAI-compatible API gateway
|
2026-05-20 09:16:11 -04:00
|
|
|
base_url = "http://127.0.0.1:3360"
|
|
|
|
|
api_key = "" # Set via `souveraine auth set` or BIFROST_KEY env var
|
2026-05-07 02:31:44 -04:00
|
|
|
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".
|
feat: default-profile sufficiency — substrate prompt, seeding, n1 gate
Audit found the default profile's subconscious running on a hollow stub
and the n1_enabled toggle wired to nothing. Fixes:
- New src/core/seeds.rs: SUBSTRATE_PROMPT (how the substrate works),
DEFAULT_PERSONA (grown-from template), DEFAULT_COVENANT, DEFAULT_STATE,
SUBCONSCIOUS_MANDATE, subconscious_persona().
- prompt.rs: build_system_prompt_full injects SUBSTRATE_PROMPT whenever
[agent] system_prompt is unset — every agent wakes knowing its world.
- agent_inventory.rs: new agents seeded with the grown-from persona +
covenant + state; subconscious seeded with real persona + four-fold
mandate + the six ledger files, no more placeholder stub.
- local.rs: n1_enabled now actually gates the N+1 pass (global AND
per-agent must be on). It was read nowhere before.
- Drop the unused kimi-k2.5-turbo model everywhere; default is now
openai/kimi-k2.6 (config.rs, main.rs template, both toml files, setup).
- chat.rs: complete the truncated wrap_text for the btw word-wrap fix.
2026-05-17 18:16:20 -04:00
|
|
|
primary_model = "openai/kimi-k2.6"
|
2026-05-07 02:31:44 -04:00
|
|
|
|
tui: atmosphere palette wiring, cockpit pane, schedules config, settings editor, markdown palette, event log bootstrap, voice stubs, RGP 3D, portrait system, reflection bridge, skills wire, schedule feedback, compaction rebuild
2026-05-14 17:58:48 -04:00
|
|
|
# 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
|
|
|
|
|
|
2026-05-07 02:31:44 -04:00
|
|
|
# Per-model configuration
|
|
|
|
|
[bifrost.models.deepseek-v4-pro]
|
|
|
|
|
context_limit = 128000
|
|
|
|
|
output_limit = 8192
|
|
|
|
|
archivist_threshold = 0.7
|
|
|
|
|
|
feat: default-profile sufficiency — substrate prompt, seeding, n1 gate
Audit found the default profile's subconscious running on a hollow stub
and the n1_enabled toggle wired to nothing. Fixes:
- New src/core/seeds.rs: SUBSTRATE_PROMPT (how the substrate works),
DEFAULT_PERSONA (grown-from template), DEFAULT_COVENANT, DEFAULT_STATE,
SUBCONSCIOUS_MANDATE, subconscious_persona().
- prompt.rs: build_system_prompt_full injects SUBSTRATE_PROMPT whenever
[agent] system_prompt is unset — every agent wakes knowing its world.
- agent_inventory.rs: new agents seeded with the grown-from persona +
covenant + state; subconscious seeded with real persona + four-fold
mandate + the six ledger files, no more placeholder stub.
- local.rs: n1_enabled now actually gates the N+1 pass (global AND
per-agent must be on). It was read nowhere before.
- Drop the unused kimi-k2.5-turbo model everywhere; default is now
openai/kimi-k2.6 (config.rs, main.rs template, both toml files, setup).
- chat.rs: complete the truncated wrap_text for the btw word-wrap fix.
2026-05-17 18:16:20 -04:00
|
|
|
[bifrost.models.kimi-k2.6]
|
|
|
|
|
context_limit = 262000
|
2026-05-07 02:31:44 -04:00
|
|
|
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
|
|
|
|
|
|
tui: atmosphere palette wiring, cockpit pane, schedules config, settings editor, markdown palette, event log bootstrap, voice stubs, RGP 3D, portrait system, reflection bridge, skills wire, schedule feedback, compaction rebuild
2026-05-14 17:58:48 -04:00
|
|
|
# === 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
|
|
|
|
|
|
2026-05-07 02:31:44 -04:00
|
|
|
# === MEMORY ===
|
|
|
|
|
[memory]
|
|
|
|
|
git_enabled = true
|
|
|
|
|
auto_commit = true
|
2026-05-20 09:16:11 -04:00
|
|
|
# base_path = "~/.souveraine/agents"
|
2026-05-07 02:31:44 -04:00
|
|
|
|
|
|
|
|
# === WEBSOCKET SERVER ===
|
|
|
|
|
[websocket]
|
|
|
|
|
enabled = false
|
|
|
|
|
port = 7373
|
|
|
|
|
|
|
|
|
|
# === SENSORIUM ===
|
|
|
|
|
[sensorium]
|
|
|
|
|
primary_bandwidth = "high"
|
|
|
|
|
|
|
|
|
|
[sensorium.discovery]
|
|
|
|
|
low_urgency_only = true
|
|
|
|
|
minimal_presence_mode = "breathing_color"
|
tui: atmosphere palette wiring, cockpit pane, schedules config, settings editor, markdown palette, event log bootstrap, voice stubs, RGP 3D, portrait system, reflection bridge, skills wire, schedule feedback, compaction rebuild
2026-05-14 17:58:48 -04:00
|
|
|
|
|
|
|
|
# === 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
|