Metadata-Version: 2.5
Name: sasy-guard
Version: 0.4.0
Summary: SASY policy enforcement runtime for Claude Code (engine + daemon + native hook)
Project-URL: Homepage, https://guard.sasy.ai
Project-URL: Documentation, https://guard.sasy.ai
Author: SASY Labs
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: claude-code,datalog,enforcement,policy,security
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# sasy-guard

The **SASY policy-enforcement runtime for Claude Code**, distributed as a
platform-specific wheel. `uv tool install sasy-guard` puts the prebuilt binaries
on your machine — no need to clone the SASY repo or install a build toolchain.

This is the *runtime* (the binaries you run), distinct from the
[`sasy`](https://pypi.org/project/sasy/) package, which is the pure-Python
*SDK* (a client library you import).

## What's inside

The wheel for your OS/arch vendors three binaries:

- `sasy` — the (restricted) policy engine
- `sasy-watch` — the enforcement daemon: reconstructs the message-dependency
  graph from Claude Code's transcript and runs the policy check
- `sasy-hook` — the native, fail-closed `PreToolUse` hook (~2 ms)

plus the policy profiles and the SessionStart/PostToolUse/SessionEnd scripts.

## Install & enable

```bash
uv tool install sasy-guard          # Install a published platform wheel.
sasy-guard install                 # Binaries and policy config → ~/.sasy.
sasy-guard enable /path/to/project # Add project enforcement hooks.
```

Then run `claude` — every tool call is checked against the `security` policy;
denials surface a `[SASY] …` reason the agent relays.

- Select rule groups: `sasy-guard install --rule-off a,b` (drop) / `--rule-on a,b` (opt-in).
- Inspect the install: `sasy-guard doctor`.
- `sasy-guard enable [project]` adds hooks to `<project>/.claude/settings.json`,
  preserving unrelated commands. Re-running is idempotent.
- Install and enable preserve an existing remote endpoint and mode; a fresh
  installation uses the local engine. Configure a remote engine explicitly with
  `~/.sasy/bin/sasy-watch setup --mode remote --endpoint host:port`.

Before registry publication, install a tested platform wheel by its local path
instead of the package name. Public documentation: [guard.sasy.ai](https://guard.sasy.ai).

## Building (maintainers)

Wheels are built per platform by CI and assembled with `build-wheel.sh`, which
injects the binaries, syncs the profiles/scripts from `plugins/sasy-guard`, and
retags the wheel for the current platform. See `make sasy-guard-wheel` and
`make sasy-guard-publish`.


Native wheels require macOS 13 or newer (the wheel tag records a higher minimum
if required by its binaries), or Linux with the glibc version named in its wheel
tag and compatible system libstdc++/libgcc runtimes. The pinned Bun 1.3.11
x64 daemon builds require an AVX2-capable CPU. No runtime compiler or
Soufflé installation is needed. Release CI audits the launcher binaries and the
embedded policy evaluators for non-system library dependencies.
