bridge-echo 0.2.0

HTTP bridge for Claude Code CLI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use axum::extract::State;
use axum::Json;
use serde_json::json;

use crate::state::AppState;

pub async fn status(State(state): State<AppState>) -> Json<serde_json::Value> {
    let active = state.tracker.active_snapshot().await;
    let completed = state.tracker.completed_snapshot().await;

    Json(json!({
        "active": active,
        "completed": completed,
    }))
}