Skip to content

Commit cf93cc2

Browse files
ZhiXiao-LinRoyLin
andauthored
release: publish the embeddable Rust crate as 0.7.0 (#3)
Co-authored-by: RoyLin <roylin@RoyLindeMacBook-Pro.local>
1 parent f9a2f1d commit cf93cc2

9 files changed

Lines changed: 38 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ permissions:
1111
packages: write # push to ghcr.io
1212

1313
jobs:
14+
crate:
15+
name: Publish Rust crate
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: dtolnay/rust-toolchain@stable
22+
- name: Verify package
23+
run: cargo publish --locked --dry-run
24+
- name: Publish
25+
env:
26+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
27+
run: cargo publish --locked
28+
1429
binary:
1530
runs-on: ubuntu-latest
1631
steps:

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## [0.7.0] — inline wire inspection + stable risk taxonomy
4+
5+
### Added
6+
7+
- **Inline LLM/MCP wire inspection**`Sentry::inspect_wire` evaluates request and response JSON
8+
before it crosses the provider boundary, blocks dangerous content, and masks detected secrets and
9+
PII in allowed payloads.
10+
- **Stable risk taxonomy** — non-allow and unresolved-escalation decisions can carry a structured
11+
`risk` (`category`, `name`, and `risk_type`) so downstream systems do not need to parse
12+
human-readable reasons.
13+
- **Rust crate distribution** — tagged releases now publish `a3s-sentry` to crates.io for direct
14+
embedding by Rust consumers such as A3S Gateway.
15+
316
## [0.6.0] — embeddable judge + native in-process SDKs
417

518
The SDKs are now **native in-process bindings** (PyO3 / napi-rs), not subprocess wrappers — the Rust

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "a3s-sentry"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
edition = "2021"
55
license = "MIT"
66
description = "Tiered (L1 rules / L2 LLM / L3 agent) runtime security control for AI agents, built on a3s-observer."

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ the kernel the single enforcement point.
4747

4848
Published from the repo's own GitHub Actions (a `vX.Y.Z` tag runs [`release.yml`](.github/workflows/release.yml)):
4949

50-
- **Daemon image**`ghcr.io/a3s-lab/sentry:0.6.0` (and `:latest`). L1 + L2 out of the box; for L3
50+
- **Rust crate**`cargo add a3s-sentry@0.7.0` for embedding the policy engine and inline wire
51+
inspection in another Rust process.
52+
- **Daemon image**`ghcr.io/a3s-lab/sentry:0.7.0` (and `:latest`). L1 + L2 out of the box; for L3
5153
layer Node + `@a3s-lab/code` into a derived image.
5254
`docker run --rm -i ghcr.io/a3s-lab/sentry:latest < events.ndjson`
5355
- **Daemon binary**`a3s-sentry-x86_64-linux` on the
54-
[`v0.6.0` release](https://github.com/A3S-Lab/Sentry/releases/tag/v0.6.0).
56+
[`v0.7.0` release](https://github.com/A3S-Lab/Sentry/releases/tag/v0.7.0).
5557
- **From source**`cargo build --release``target/release/sentry`.
5658
- **SDKs**`npm install @a3s-lab/sentry` (TypeScript); Python wheels on the
5759
[`python-v0.1.0` release](https://github.com/A3S-Lab/Sentry/releases/tag/python-v0.1.0) (see [SDKs](#sdks-python--typescript)).

sdk/python/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/typescript/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl InlineDecision {
7070
let mut restores = HashMap::new();
7171
// Right-to-left: replacing a later span never shifts an earlier span's offsets.
7272
let mut spans: Vec<&Redaction> = self.redactions.iter().collect();
73-
spans.sort_by(|a, b| b.start.cmp(&a.start));
73+
spans.sort_by_key(|redaction| std::cmp::Reverse(redaction.start));
7474
for r in spans {
7575
if r.end > out.len() || r.start > r.end {
7676
continue; // defensive: never panic on a stale span

src/sdk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct Sentry {
2020
}
2121

2222
impl Sentry {
23-
/// Build from an ACL config document (see [`SdkConfig`](crate::config::SdkConfig)).
23+
/// Build from an ACL config document (see [`SdkConfig`]).
2424
pub fn from_acl(acl: &str) -> anyhow::Result<Self> {
2525
let (pipeline, enforcer) = SdkConfig::from_acl(acl)?.build()?;
2626
Ok(Self {

0 commit comments

Comments
 (0)