lgwks_deps

v8.0.0
lgwks_deps Checked 13 hours ago

Dependency admission, supply-chain policy, and debugger-doctor CLI for a Rust workspace: every external edge and default trace install is verified.

Should I use logicalworks-crates? It says where each crate fits, where it does not, and what to use instead. The estate is not part of Braid: Braid pins three of these crates and depends on them, never the reverse. lgwks_std's default features are not dependency-free; that caveat and the exact dependency graph are in Choosing a crate. Versions move independently from one repository and one tag; the table lists this tree's manifests, not what is published (docs/releasing.md keeps the two apart).

Summary extracted from the README.

logicalworks-crates

logicalworks-crates is the Rust crate estate behind Logical Works. It holds six independently versioned crates: primitives with no async runtime required, automation that runs unattended, one AST across many languages, the script! proc macro, an audited dependency storefront, and the Drishti frontend.

CI status: unstable license: Apache-2.0 and MPL-2.0 lgwks_std lgwks_bot lgwks_ast lgwks_macros lgwks_deps drishti

Unstable. Every interface here can change without notice. A breaking change still bumps the major version, but no stable surface is promised outside Logical Works yet. This note comes off when that is true.

Should I use logicalworks-crates? It says where each crate fits, where it does not, and what to use instead. The estate is not part of Braid: Braid pins three of these crates and depends on them, never the reverse.

lgwks_std's default features are not dependency-free; that caveat and the exact dependency graph are in Choosing a crate.

Crates

Crate Version Docs What it gives you
lgwks_std 5.0.0 docs.rs Primitives with no async runtime required: JSON/RON/wire codecs, a blocking HTTP client, retry policies, structured logging with default debugger install, time and calendars, hashing, ids, globs, process control
lgwks_bot 10.0.2 docs.rs Orchestration: script! flows with bounded fan-out, deadlines, retries under a shared budget, dependency graphs, sagas, bounded live feeds, justification rules, durable steps, admission of untrusted plans, readiness waits, tenant-keyed steps and a map of what a run declared
lgwks_ast 6.1.1 docs.rs Parse many languages into one AST type. tree-sitter grammars behind cargo features, bounded traversal, and typed diagnostics for tools that report on code
lgwks_macros 2.1.4 docs.rs The syntax of lgwks_bot::script!, orchestration written as indented flows. Not a surface of its own: Rust requires a proc macro to live in its own crate, so use it through lgwks_bot
lgwks_deps 8.0.0 docs.rs One audited place to opt into third-party stacks, plus lgwks-deps check and lgwks-deps debug to prove dependency and debugger wiring
drishti 0.3.0 docs.rs The Drishti frontend's design publication and reference core: Logical Works brand tokens, the eleven seeded ink effects, the GPU residency model, the Logic OS Canvas protocol, scene, motion and native host broker, a GPUI host (feature ui), and the drishti command over all of them. Its proof gates G01 to G15 stay blocked

Versions move independently from one repository and one tag; the table lists this tree's manifests, not what is published (docs/releasing.md keeps the two apart).

Names. lgwks_std (underscore) lives in crates/lgwks-std (hyphen) and is imported use lgwks_std::...; cargo install lgwks_deps builds lgwks-deps.

What each crate does

  1. Declarative flows (lgwks_bot): script! indented flows with compiler-bounded fan-out, shared deadlines, retry budgets, sagas and agent plan admission.
  2. No async runtime (lgwks_std): HTTP, JSON, codecs, retry and structured logging need none.
  3. In-process durability: state journals on the ECS with no external cluster. See the comparison.

Quickstart

cargo new demo && cd demo
cargo add lgwks_std --features json,http
cargo add lgwks_bot
use lgwks_bot::script::{FlowError, Scope, Tenant};
use std::error::Error;
use std::io::Write;
use std::sync::atomic::{AtomicU8, Ordering};

/// A stand-in for a backend having a bad minute: the first two calls answer
/// "busy", the third succeeds. The count is shared state the flow reaches
/// through a reference, the way a real client handle rides in.
struct Flaky(AtomicU8);

impl Flaky {
    /// Square `number`, or refuse transiently twice before succeeding.
    fn call(&self, number: u64) -> std::future::Ready<Result<u64, FlowError>> {
        if self.0.fetch_add(1, Ordering::Relaxed) < 2 {
            lgwks_std::trace::debug!("the backend was busy; the flow will retry");
            return std::future::ready(Err(FlowError::transient("the backend was busy")));
        }
        std::future::ready(Ok(number.saturating_mul(number)))
    }
}

lgwks_bot::script! {
    /// Square every number; a failure worth retrying is retried under the
    /// same key, every attempt holding a one-second budget.
    flow squares(flaky: &Flaky, numbers: Vec<u64>) -> u64:
        let squared = each number in numbers:
            retry up to 3 times, waiting 10ms:
                within 1s:
                    flaky.call(number).await?
        give back squared.iter().sum()
}

fn main() -> Result<(), Box<dyn Error>> {
    // Output goes through an explicit locked handle, which turns a broken pipe
    // (`demo | head`) into an ordinary `Err` instead of a panic.
    let mut out = std::io::stdout().lock();

    let flaky = Flaky(AtomicU8::new(0));
    let scope = Scope::root(Tenant::new("demo")?);
    let total = lgwks_bot::script::block_on(squares(&scope, &flaky, vec![3]))?;
    writeln!(out, "sum of squares: {total}")?;
    assert_eq!(total, 9, "3 squared after two transient refusals");
    assert_eq!(flaky.0.load(Ordering::Relaxed), 3, "three attempts");

    Ok(())
}

The snippet is compiled by the workspace gate, from crates/lgwks-bot/examples/quickstart.rs; the other guarantees fire in examples/guarantees.rs with --features ephemeral.

The dependency gate reads a project's lockfile and its committed register, so it runs as a command against a project rather than from a library call:

cargo generate-lockfile   # the gate reads Cargo.lock
cargo install lgwks_deps
lgwks-deps init .         # write a fail-closed register
lgwks-deps check .        # audit, and refuse any unowned external edge

Where to go next

Contributing

An agent starts at SKILLS.md. See CONTRIBUTING.md; the checks a change must pass are in AGENTS.md. Report vulnerabilities through the process in SECURITY.md, not as a public issue.

License

Copyright 2026 Logical Works Incorporated. lgwks_std, lgwks_ast, lgwks_deps, lgwks_macros and drishti are Apache-2.0; lgwks_bot is MPL-2.0, file-level copyleft. Each crate ships its own LICENSE; LICENSING.md states the rule, why the bot differs, and the commercial licence.