Metadata-Version: 2.4
Name: paladin-ai
Version: 0.1.0
Summary: Python CLI frontend and SDK helpers for Paladin
Author: Paladin contributors
License: Proprietary
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Paladin Python frontend

This subtree packages the `paladin` CLI and `paladin.guard()` SDK helper.
It never downloads or replaces an interceptor executable at runtime.

## Commands

```console
paladin setup
paladin up --listen 127.0.0.1:8080
paladin dashboard
```

`setup` creates `PALADIN_HOME` (default `~/.paladin`) and seeds `config.json`
only when absent. `up` uses `PALADIN_BINARY` when set, otherwise it requires
a payload bundled at `paladin/bin/paladin-interceptor[.exe]`. Signals and the
child's exit status are forwarded. `dashboard` opens the configured local admin
URL (default `http://127.0.0.1:9090`).

`guard(client)` supports OpenAI and Anthropic SDK client types. It returns a new
client pointed at `PALADIN_BASE_URL` (default `http://127.0.0.1:8080`) while
preserving publicly reconstructible constructor settings, including the API
credential. Unsupported or unsafe-to-copy clients fail explicitly and the
original is never mutated.

## Developer versus release wheels

A normal checkout deliberately has **no executable payload**. Building it with
`python -m build --wheel` produces a pure developer wheel; `paladin up` then
reports how to install a release wheel or set `PALADIN_BINARY`.

Release automation must first stage an already-built native executable (no
network access is performed):

```console
python tools/stage_payload.py path/to/paladin-interceptor.exe --platform windows
python -m build --wheel
```

Use `--platform linux` with `paladin-interceptor` on Linux. Staging validates the
source name, copies bytes deterministically, removes the opposite-platform
payload, and normalizes executable permissions. With a staged payload,
`setup.py` tags the wheel as platform-specific and package-data includes the
native file. Build one release wheel on each target platform; never publish a
developer wheel as a runnable platform distribution.
