- kei-router — keyword-dispatch meta-tool (CfC ML fallback removed) - kei-sage — Obsidian-style knowledge graph, FTS5 + BFS + PageRank - kei-task — task DAG with deps, milestones, dependency-chain queries - kei-chat-store — Claude conversation session persistence + FTS search - kei-crossdomain — typed-edge store + BFS cross-domain glue - kei-search-core — 3-wave deep research with microcent budget cap - kei-content-store — asset + prompt + campaign registry - kei-social-store — people + interactions CRM (lite) - kei-curator — edge-decay graph hygiene utility - kei-auth — multi-tenant session tokens (replaces single-bearer) Genesis-scan pre-import pass: skipped pkg/mxl1/*, pkg/inference/*, pkg/trainer/*, pkg/nc01/*, internal/ml/* (all Genesis/CfC adjacent, sensitive IP). Security: skipped tools_threat/radio/protocol/med/mlreg (offensive/banned). Domain verticals skipped: hr/legal/infra/ops/api/osint/edu/geo/hw/finance. New 'mcp' profile in MANIFEST.toml bundles all 10 for MCP server deployment. Workspace now 24 crates, cargo check --workspace clean, 94 workspace tests pass.
45 lines
1.2 KiB
Rust
45 lines
1.2 KiB
Rust
use clap::{Parser, Subcommand};
|
|
use kei_curator::{decay_edges, prune_orphans, Config};
|
|
use rusqlite::Connection;
|
|
use std::path::PathBuf;
|
|
use std::process::ExitCode;
|
|
|
|
#[derive(Parser)]
|
|
#[command(name = "kei-curator", version)]
|
|
struct Cli {
|
|
#[arg(long)] db: PathBuf,
|
|
#[command(subcommand)] cmd: Cmd,
|
|
}
|
|
|
|
#[derive(Subcommand)]
|
|
enum Cmd {
|
|
Decay { #[arg(long, default_value_t = 0.05)] default_lambda: f64,
|
|
#[arg(long, default_value_t = 0.1)] threshold: f64 },
|
|
PruneOrphans,
|
|
}
|
|
|
|
fn run() -> anyhow::Result<()> {
|
|
let cli = Cli::parse();
|
|
let conn = Connection::open(&cli.db)?;
|
|
match cli.cmd {
|
|
Cmd::Decay { default_lambda, threshold } => {
|
|
let mut cfg = Config::default();
|
|
cfg.default_lambda = default_lambda;
|
|
cfg.prune_threshold = threshold;
|
|
let r = decay_edges(&conn, &cfg)?;
|
|
println!("updated={} pruned={}", r.updated, r.pruned);
|
|
}
|
|
Cmd::PruneOrphans => {
|
|
let n = prune_orphans(&conn)?;
|
|
println!("removed {} orphan edges", n);
|
|
}
|
|
}
|
|
Ok(())
|
|
}
|
|
|
|
fn main() -> ExitCode {
|
|
match run() {
|
|
Ok(()) => ExitCode::SUCCESS,
|
|
Err(e) => { eprintln!("kei-curator: {e:#}"); ExitCode::from(1) }
|
|
}
|
|
}
|