feat(agent): implement agent execution engine and turn handling with background processing

This commit is contained in:
asepharyana
2026-07-20 16:29:39 +07:00
parent 2e8a4f2443
commit efcd191f96
15 changed files with 452 additions and 247 deletions
+11 -1
View File
@@ -137,9 +137,19 @@ fn run_api_server(port: u16) -> anyhow::Result<()> {
rt.block_on(async {
let store = zesdex_domain::core::Store::new();
store.ensure_dirs()?;
// Load JWT secret from environment variable with a secure default warning
let jwt_secret = std::env::var("JWT_SECRET").unwrap_or_else(|_| {
tracing::warn!(
"JWT_SECRET environment variable not set; using insecure default. \
Set JWT_SECRET to a secure random value in production."
);
"dev-secret".to_string()
});
let state = zesdex_api::ApiState::new(
store.base_dir.clone(),
"dev-secret",
jwt_secret,
"",
"deepseek-v4-flash-free",
Some("https://opencode.ai/zen/v1".to_string()),