1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# One crate, one product: `cargo install brazen` builds the `bz` command — the
# balls→bl pattern (a single package with a `[lib]` and a renamed `[[bin]]`). The
# pure pipeline + canonical types + seam traits are the library; the impure native
# wiring (`ureq` HTTP, `libc` SIGPIPE/isatty, the XDG files) is confined to the
# `bz` bin (`src/main.rs`) and `src/native/`.
#
# The "lib is network-free" invariant (arch §9.5, §10) used to be the crate graph's
# — a separate `bz` crate held `ureq`/`libc` so the lib literally could not link
# them (bl-c420). Collapsing to one publishable crate means `ureq`/`libc` are now
# crate-wide deps, so the compiler can no longer forbid them in a pure module; the
# invariant is re-established as an executable one by `tests/purity.rs`, which fails
# if any library module (everything under `src/` except `main.rs` and `native/`)
# imports `ureq`/`libc`/`std::net` (bl-c1e2).
[]
= "brazen"
= "0.0.21"
= "2021"
# Dependency-driven MSRV floor: `ureq` 3 requires Rust 1.85, so the crate cannot
# build on less regardless of our (conservative, edition-2021) code — verified by a
# 1.85-toolchain build. A CI msrv job pins it (bl-a360).
= "1.85"
= "MIT"
= ["mudbungie <mudbungie@gmail.com>"]
= "https://github.com/mudbungie/brazen"
= "https://github.com/mudbungie/brazen"
= "https://docs.rs/brazen"
= ["llm", "ai", "openai", "anthropic", "cli"]
= ["command-line-utilities", "api-bindings"]
= "A stateless, swiss-army-knife adapter for every LLM provider and protocol."
= "README.md"
# What goes to crates.io: an ALLOWLIST, and never an `exclude` (bl-e087). The two
# failure modes are not symmetric. A missing entry HERE costs a build nobody can
# complete — loud, immediate, and fixed by a patch release. A missing `exclude`
# entry costs a PUBLICATION, and `cargo publish` is irreversible: a yanked version
# stays downloadable forever. With a denylist every file class added to the tree
# tomorrow ships by DEFAULT and the author who adds it is the one who has to
# remember; with an allowlist the default is silence and the tree cannot leak a
# class nobody thought about. That matters more here than in most crates: this
# repo tracks `scripts/leak-fixtures/`, a corpus of deliberately fabricated
# secrets whose whole purpose is to look real, and `specs/auth.md` +
# `tests/fixtures/` carry the Claude-Code OAuth recipe.
#
# The list is the crate's own build inputs and the files the registry renders,
# and nothing else. `src/**` is the lib and the bin. `data/defaults.toml` is
# `include_str!`'d at `src/config/load.rs` and `SKILL.md` at
# `src/run/discovery.rs` — both are BUILD inputs, and dropping either breaks the
# published crate for everyone who downloads it. Cargo adds
# `Cargo.toml`/`Cargo.lock` itself.
#
# `!src/tests/**` is the one subtraction inside `src`, and it earns itself three
# times over: that module `include_bytes!`s `tests/fixtures/`, which is
# apparatus and does not ship, so it could not COMPILE from the package; it is
# 1.4 MB, an order of magnitude more than everything else here put together; and
# it carries the operator-owned Claude-session recipe verbatim. No other
# `#[cfg(test)]` module in `src` reads anything outside `src`, so no other one
# needs naming — and `tests/packaged_files.rs` proves that rather than trusting
# it, by requiring every embed of every SHIPPED source file to ship as well.
#
# Deliberately absent, each because it is apparatus or commentary rather than a
# build input: `tests/**` and its fixtures, `specs/**` (a ~500 KB design tree
# addressed to whoever works in this repo), `scripts/**` (the gate, and the
# fabricated-secret corpus under `leak-fixtures/`), `examples/**` (a delegate
# program the OPERATOR runs on their own box, not an input to this crate; the
# README's link to it resolves against the repository), `.github/**`,
# `.githooks/**`, `.claude/**`, `Makefile`, `AGENTS.md`, `release-plz.toml`,
# `deny.toml`. `tests/packaged_files.rs` holds this shape in both directions,
# over the real `cargo package --list`.
#
# The leading `/` on the bare filenames is load-bearing: these are
# gitignore-style patterns, so a pattern with no slash matches that basename at
# ANY depth — a bare `README.md` also ships `scripts/leak-fixtures/README.md`,
# the index of the fabricated-secret corpus, out of a list naming no `scripts`
# entry (measured in yog, bl-8340). The same unanchored rule is what the
# retired `exclude = ["tests", ...]` tripped over in the other direction: it
# matched `src/native/tests/` as well, silently dropping source from the
# package. A pattern containing a slash is already anchored to the package root.
= [
"src/**",
"!src/tests/**",
"data/**",
"/SKILL.md",
"/README.md",
"/LICENSE",
"/CHANGELOG.md",
]
[]
= "brazen"
= "src/lib.rs"
# The CLI command is `bz` (the token-thrifty sugar), built from the same crate —
# exactly how the `balls` crate ships the `bl` command.
[[]]
= "bz"
= "src/main.rs"
# Build-time trust roots (arch §12). DEFAULT OFF, secure-by-default (owner ruling
# bl-770f): the plain build trusts only ureq's bundled Mozilla `webpki-roots` — a
# self-contained binary, no OS/corporate store. `native-certs` flips ureq to its
# platform-verifier (OS-native cert verification via `rustls-platform-verifier`) so
# enterprises building from source trust their own roots — `cargo install brazen
# --features native-certs`. The feature-gated wiring lives entirely in
# `src/native/transport.rs` (the coverage-excluded shim); the pure lib never sees it.
#
# `socks-proxy` (arch §10). DEFAULT OFF, mirroring `native-certs`: the plain build
# already honors HTTP/HTTPS CONNECT proxies from `HTTP_PROXY`/`HTTPS_PROXY`/
# `ALL_PROXY`/`NO_PROXY` (ureq reads them in `Config::default()` — no feature, no
# code), which covers the common corporate proxy. `socks-proxy` forwards to
# `ureq/socks-proxy` so a `socks5://`/`socks4://` `ALL_PROXY` is honored too, rather
# than silently ignored — `cargo install brazen --features socks-proxy`. Pure
# additive: zero brazen code is gated on it (it only flips a ureq dep), so the
# default dependency surface and 100% coverage are untouched.
#
# `native-host` (yog DESIGN §16.7 U-brazen; bl-547d). DEFAULT OFF: an embedding host
# (yog, lernie) that links the `brazen` lib needs the `bz` binary's native capability
# — the impure `Transport`/`CredStore`/`ModelCache` impls behind the lib's seams —
# without a system-installed `bz`. This feature re-exposes `src/native/` (the same
# coverage-excluded, purity-exempt shim the `bz` bin owns) as the `brazen::native`
# module, so a host can wire a `Host` and drive `brazen::run`/`generate`/`serve` in
# process. Pure code-gating: no dep changes (`ureq`/`libc` are already crate-wide),
# so the default surface, dependency graph, and 100% coverage are untouched. NO semver
# stability on the exposed impls (pin an exact version) — the feature IS the purity
# boundary, enforced by `tests/purity.rs`.
[]
= []
= ["ureq/platform-verifier"]
= ["ureq/socks-proxy"]
= []
[]
= { = "1", = ["derive"] }
= "1"
= "0.8"
# PKCE S256 (RFC 7636): challenge = BASE64URL-NOPAD(SHA256(verifier)). Both are
# pure-Rust, no C deps (the musl/cross-compile story, arch §10, holds), and their
# code is not counted toward the lib's 100% line coverage — only our call sites.
# `sha2` is `default-features = false` — PKCE needs only the no_std `Sha256::digest`,
# not its `std` Write impl (audit bl-2936). `base64` uses two engines —
# `URL_SAFE_NO_PAD` (PKCE) and `STANDARD` (`-f` media parts, §5.5) — and is also
# pulled transitively by `ureq`, so it adds no extra crate.
= { = "0.10", = false }
= "0.22"
# --- Impure shim deps: used ONLY by the `bz` bin (`src/main.rs`) + `src/native/`. ---
# The pure library never imports these — enforced now by `tests/purity.rs`, since a
# single crate can no longer let the crate graph enforce it (bl-c1e2, was bl-c420).
# The blocking, rustls-backed HTTP client — the ONLY user of `ureq` (`src/native/
# transport.rs`), behind the lib's `Transport` seam. `rustls` TLS (`ring` crypto +
# bundled `webpki-roots`) — no OpenSSL/system lib/`pkg-config` (`ring`'s C/asm is
# vendored + statically linked), no async runtime (arch §10), so the single-binary
# musl/Windows/macOS story holds.
= { = "3", = false, = ["rustls"] }
# Unix-only: restore the default SIGPIPE disposition + isatty probes (arch §5.8,
# §5.5). `libc` carries no C deps; used only in `src/main.rs`.
[]
= "0.2"
# Test-only: a throwaway tempdir to root the real `XdgCredStore`/`XdgModelCache` so
# their atomic-write / 0600 / 0700 invariants are verified without touching
# `$XDG_DATA_HOME` (bl-5b5a).
[]
= "3"
# Test-only: `tests/interface_parity.rs` parses `src/lib.rs` + the `bz` bin sources
# as syntax trees to derive the public surface and the CLI-reachable set mechanically
# (arch §9.8). Already in the lock graph via `serde_derive`, so it adds no new build
# cost; never shipped (dev-only).
= { = "2", = ["full", "parsing", "visit"] }