feat(grpc): dev mode, agent prefix, system prompt, error UX

- gRPC dev_mode config: disables JWT auth, uses fixed dev identity
- Agent prefix (agents.agent_prefix): dev agents use "dev-sol-orchestrator"
  to avoid colliding with production on shared Mistral accounts
- Coding sessions use instructions (system prompt + coding addendum)
  with mistral-medium-latest for personality adherence
- Conversations API: don't send both model + agent_id (422 fix)
- GrpcState carries system_prompt + orchestrator_agent_id
- Session.end() keeps session active for reuse (not "ended")
- User messages posted as m.notice, assistant as m.text (role detection)
- History loaded from Matrix room on session resume
- Docker Compose local dev stack: OpenSearch 3 + Tuwunel + SearXNG
- Dev config: localhost URLs, dev_mode, opensearch-init.sh for ML setup
This commit is contained in:
2026-03-23 17:07:50 +00:00
parent 71392cef9c
commit b8b76687a5
18 changed files with 1035 additions and 65 deletions

View File

@@ -45,6 +45,9 @@ pub struct AgentsConfig {
/// Model for coding agent sessions (sunbeam code).
#[serde(default = "default_coding_model")]
pub coding_model: String,
/// Agent name prefix — set to "dev" in local dev to avoid colliding with production agents.
#[serde(default)]
pub agent_prefix: String,
}
impl Default for AgentsConfig {
@@ -59,6 +62,7 @@ impl Default for AgentsConfig {
research_max_agents: default_research_max_agents(),
research_max_depth: default_research_max_depth(),
coding_model: default_coding_model(),
agent_prefix: String::new(),
}
}
}
@@ -239,16 +243,19 @@ fn default_research_agent_model() -> String { "ministral-3b-latest".into() }
fn default_research_max_iterations() -> usize { 10 }
fn default_research_max_agents() -> usize { 25 }
fn default_research_max_depth() -> usize { 4 }
fn default_coding_model() -> String { "devstral-small-2506".into() }
fn default_coding_model() -> String { "mistral-medium-latest".into() }
#[derive(Debug, Clone, Deserialize)]
pub struct GrpcConfig {
/// Address to listen on (default: 0.0.0.0:50051).
#[serde(default = "default_grpc_addr")]
pub listen_addr: String,
/// JWKS URL for JWT validation (default: Hydra's .well-known endpoint).
/// JWKS URL for JWT validation. Required unless dev_mode is true.
#[serde(default)]
pub jwks_url: Option<String>,
/// Dev mode: disables JWT auth, uses a fixed dev identity.
#[serde(default)]
pub dev_mode: bool,
}
fn default_grpc_addr() -> String { "0.0.0.0:50051".into() }