kaizen-cli 0.1.6

Distributable agent observability: real-time-tailable sessions, agile-style retros, and repo-level improvement (Cursor, Claude Code, Codex). SQLite, redact before any sync you enable.
Documentation
// SPDX-License-Identifier: AGPL-3.0-or-later
//! Workspace scope helpers for repo-local vs machine-wide reads.

use anyhow::Result;
use std::path::{Path, PathBuf};

pub fn resolve(workspace: Option<&Path>, all_workspaces: bool) -> Result<Vec<PathBuf>> {
    let primary = crate::core::workspace::resolve(workspace)?;
    if all_workspaces {
        return crate::core::workspace::machine_workspaces(Some(&primary));
    }
    Ok(vec![primary])
}

pub fn label(roots: &[PathBuf]) -> String {
    if roots.len() == 1 {
        return roots[0].to_string_lossy().to_string();
    }
    format!("machine:{} workspaces", roots.len())
}

pub fn decorate_path(workspace: &Path, path: &str) -> String {
    format!("{}:{}", workspace.to_string_lossy(), path)
}