linesmith 0.1.1

A Rust status line for Claude Code and other AI coding CLIs
Documentation
// @data_deps = ["usage"]
//
// Declares the `usage` source. Today's lazy accessor returns the
// pre-cascade sentinel `Err(UsageError::Jsonl(JsonlError::NoEntries))`;
// the rhai ctx mirror delegates `.code()` through to the inner
// variant, so plugins exercising the dep see the tagged error map:
// `#{ kind: "error", error: "NoEntries" }`. Renders the error code
// so a test can pin both the gating path (ctx.usage is present) and
// the error-shape contract.

const ID = "declares_usage";

fn render(ctx) {
    let label = if ctx.usage.kind == "error" {
        ctx.usage.error
    } else {
        "ok"
    };
    #{ runs: [#{ text: label }] }
}