Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ permissions:
packages: write # push to ghcr.io

jobs:
crate:
name: Publish Rust crate
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Verify package
run: cargo publish --locked --dry-run
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
run: cargo publish --locked

binary:
runs-on: ubuntu-latest
steps:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [0.7.0] — inline wire inspection + stable risk taxonomy

### Added

- **Inline LLM/MCP wire inspection** — `Sentry::inspect_wire` evaluates request and response JSON
before it crosses the provider boundary, blocks dangerous content, and masks detected secrets and
PII in allowed payloads.
- **Stable risk taxonomy** — non-allow and unresolved-escalation decisions can carry a structured
`risk` (`category`, `name`, and `risk_type`) so downstream systems do not need to parse
human-readable reasons.
- **Rust crate distribution** — tagged releases now publish `a3s-sentry` to crates.io for direct
embedding by Rust consumers such as A3S Gateway.

## [0.6.0] — embeddable judge + native in-process SDKs

The SDKs are now **native in-process bindings** (PyO3 / napi-rs), not subprocess wrappers — the Rust
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "a3s-sentry"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
license = "MIT"
description = "Tiered (L1 rules / L2 LLM / L3 agent) runtime security control for AI agents, built on a3s-observer."
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ the kernel the single enforcement point.

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

- **Daemon image** — `ghcr.io/a3s-lab/sentry:0.6.0` (and `:latest`). L1 + L2 out of the box; for L3
- **Rust crate** — `cargo add a3s-sentry@0.7.0` for embedding the policy engine and inline wire
inspection in another Rust process.
- **Daemon image** — `ghcr.io/a3s-lab/sentry:0.7.0` (and `:latest`). L1 + L2 out of the box; for L3
layer Node + `@a3s-lab/code` into a derived image.
`docker run --rm -i ghcr.io/a3s-lab/sentry:latest < events.ndjson`
- **Daemon binary** — `a3s-sentry-x86_64-linux` on the
[`v0.6.0` release](https://github.com/A3S-Lab/Sentry/releases/tag/v0.6.0).
[`v0.7.0` release](https://github.com/A3S-Lab/Sentry/releases/tag/v0.7.0).
- **From source** — `cargo build --release` → `target/release/sentry`.
- **SDKs** — `npm install @a3s-lab/sentry` (TypeScript); Python wheels on the
[`python-v0.1.0` release](https://github.com/A3S-Lab/Sentry/releases/tag/python-v0.1.0) (see [SDKs](#sdks-python--typescript)).
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/typescript/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl InlineDecision {
let mut restores = HashMap::new();
// Right-to-left: replacing a later span never shifts an earlier span's offsets.
let mut spans: Vec<&Redaction> = self.redactions.iter().collect();
spans.sort_by(|a, b| b.start.cmp(&a.start));
spans.sort_by_key(|redaction| std::cmp::Reverse(redaction.start));
for r in spans {
if r.end > out.len() || r.start > r.end {
continue; // defensive: never panic on a stale span
Expand Down
2 changes: 1 addition & 1 deletion src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct Sentry {
}

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