Skip to content

Commit f38f1b2

Browse files
committed
Release 0.5.2: sync main to dev tip
2 parents 255d525 + caa2e09 commit f38f1b2

48 files changed

Lines changed: 1362 additions & 275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ jobs:
3535
- name: Install
3636
run: |
3737
if [ "${{ matrix.python-version }}" = "3.13" ]; then
38-
# tokenizers 0.19 (pulled by ml/litellm) has no cp313 wheels yet — skip those extras.
39-
uv sync --extra dev --extra scrape --extra yara --extra haystack --extra presidio --group dev
38+
# Skip ml/litellm on the 3.13 test matrix (heavy); wheel-only resolve
39+
# for [ml] is covered by the packaging-ml-wheels job below.
40+
uv sync --extra scrape --extra yara --extra haystack --extra presidio --dev
4041
else
4142
uv sync --all-extras --dev
4243
fi
@@ -72,3 +73,25 @@ jobs:
7273
xml-skip-covered: true
7374
report-only-changed-files: true
7475
default-branch: dev
76+
77+
# Catch sdist-only transitive breakage that plain lock/compile misses
78+
# (e.g. tokenizers without a cp313 wheel). Dry-run — no torch download.
79+
packaging-ml-wheels:
80+
runs-on: ubuntu-latest
81+
defaults:
82+
run:
83+
working-directory: sdk
84+
steps:
85+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
86+
87+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
88+
with:
89+
enable-cache: true
90+
version: "0.6.14"
91+
92+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
93+
with:
94+
python-version: "3.13"
95+
96+
- name: Resolve unplug-ai[ml] wheels-only
97+
run: uv pip compile --python-version 3.13 --extra ml --no-build -o /tmp/ml-wheels.txt pyproject.toml

‎.github/workflows/integrations-live.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ jobs:
8787
# resolves that one framework freshly. We mirror that here.
8888
run: |
8989
uv venv
90-
uv pip install -e ".[dev,${{ matrix.extra }}]"
90+
# Framework extra freshly resolved; pytest via dependency-group (not a PyPI extra).
91+
uv pip install -e ".[${{ matrix.extra }}]" --group dev
9192
9293
- name: Live integration test
9394
run: |

‎CHANGELOG.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22

33
All notable changes to the `unplug-ai` SDK.
44

5+
## [Unreleased]
6+
7+
## [0.5.2] — 2026-07-20
8+
9+
### Added
10+
11+
- Coverage tests for v1.0 deprecation shim re-exports (`unplug.core.*`, `guard_scan`, `scanner`, `safeguards`)
12+
- Offline synthetic BIOES checkpoint fixture for ML unit tests (no real weights required)
13+
- CI wheel-only resolve for `unplug-ai[ml]` on Python 3.13 (catches sdist-only breakage)
14+
15+
### Removed
16+
17+
- Dead modules: `providers/scrape.py`, `providers/content/server.py`, `optional/haystack.py` (unused; use `guards/scrape`, `providers/content/firecrawl`, `integrations/haystack`)
18+
- Config fields `judge_enabled`, `pipeline.judge_timeout` (no-op; pass `judge=` to `Guard()` instead)
19+
20+
### Changed
21+
22+
- Unknown `active_model` tier names now raise `ConfigError` with valid catalog tiers instead of silently running without ML
23+
- Widen `transformers` extra constraint to `>=4.44,<6` (was `<5.13`) so newer minors stay installable
24+
- Drop published `dev` optional-extra; test/lint tools live in the `dev` dependency-group (`uv sync --dev`)
25+
- Deprecated config: `judge_enabled`, `pipeline.judge_timeout`, `pipeline.fail_closed` warn and are ignored (removed in v1.0); `guard.fail_closed=false` / `fail_mode="open"` unchanged
26+
- Docs: `unplug-ai[scrape]` package name in Firecrawl docstring; Atomic Agents Python ≥3.12 install gate; Semantic Kernel `pybars4` wheel-only note
27+
28+
### Fixed
29+
30+
- Agent usability: `Guard.init()` docstring no longer claims auto-instrumentation; docs standardize on `from unplug import ...` for apps and `unplug.api.*` for server/MCP dependents; routine `REVIEW` pipeline outcomes log at INFO instead of WARNING
31+
- ML inference hardening: BIOES decode no longer crashes on checkpoints without `*-INJ` labels; label maps are validated at load with a clear `ModelError`; forced torch devices are validated (`ConfigError`); `ModelProvider`/`SpanInferenceModel` load is thread-safe; ML modules log device/tokenizer fallbacks and import torch via `unplug.optional.ml` helpers
32+
- Model store hardening: corrupt manifests no longer crash Guard or `unplug-models`; checkpoint validation requires weight files; atomic manifest writes and download swaps preserve existing installs on failure; `list_status` correctly reports stale revisions as upgrade-available; invalid `UNPLUG_MODEL_PATH` logs a warning; CLI download errors distinguish missing ML extras from network/repo failures
33+
534
## [0.5.1] — 2026-07-20
635

736
### Fixed

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ uv sync && uv pip install -e ".[ml]"
3030

3131
## Quickstart
3232

33+
App and agent code imports from the top-level package (`from unplug import Guard`).
34+
Server/MCP integrations use `unplug.api.*` for wire types and facades — see
35+
[`sdk/docs/PUBLIC_API.md`](sdk/docs/PUBLIC_API.md). Do not use `unplug.core.*`.
36+
3337
```python
3438
from unplug import Guard
3539
from unplug.api.enums import Source

‎sdk/MIGRATION.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ in any release).
2626
| Flat `unplug.core.<name>` shims (e.g. `core.canary`, `core.cache`, `core.intent`, `core.encodings`, …) | their subpackage home (e.g. `core.agent.canary`, `core.runtime.cache`, `core.agent.intent`, `core.normalize.encodings`) | ~25 modules re-export from subpackages (note: `core.taint`, `core.policy`, `core.privacy`, `core.normalize` are canonical subpackages, **not** shims) |
2727
| `unplug.guard_scan` | `unplug.api.results` | `refresh_scan_result` now lives in `api.results`; `guard_scan` is a back-compat shim that emits a `DeprecationWarning` |
2828
| `fail_closed=false` / `fail_mode="open"` | (removed) | errors always fail closed; the flag is ignored |
29+
| `judge_enabled` | `judge=` on `Guard()` | config flag was a no-op without a provider; removed in v1.0 |
30+
| `pipeline.judge_timeout` | (removed) | never wired; removed in v1.0 |
31+
| `pipeline.fail_closed` | (removed) | duplicate of deprecated `guard.fail_closed`; removed in v1.0 |
2932

3033
## Notes / known follow-ups
3134

‎sdk/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ pip install unplug-ai # regex-only core, zero ML deps
3030
pip install "unplug-ai[ml]" # add the ML span model
3131
```
3232

33+
**Imports:** App and agent code uses `from unplug import Guard` (and other top-level
34+
exports). Server/MCP dependents that need wire types or facades use `unplug.api.*`
35+
— see [`docs/PUBLIC_API.md`](docs/PUBLIC_API.md). Do not import from `unplug.core.*`.
36+
3337
Or from source:
3438

3539
```bash

‎sdk/docs/AGENT_ACTIONS.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Every Unplug scan returns an **`Action`**. Agent hosts and integration adapters must handle each action differently — especially **`REVIEW`**, which is not the same as **`BLOCK`**.
44

5+
Examples below use `from unplug import Guard` for the host and `from unplug.api.*` only
6+
where wire types or enums are needed. Do not import from `unplug.core.*`.
7+
58
## Decision table
69

710
| `result.action` | `result.safe` | `HookDecision.allowed` | Agent host should |

‎sdk/docs/ARCHITECTURE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Scanner or pipeline errors produce a full-span `Finding` with `stage="error"` an
5151
| `presidio` | `optional/presidio.py` | `scanners/pii.py` |
5252
| `yara` | `optional/yara.py` | `scanners/yara_scanner.py` |
5353
| `ml` | `optional/ml.py` | `ml/store.py`, span models |
54-
| `haystack` | `optional/haystack.py` | `integrations/haystack.py` |
54+
| `haystack` | `integrations/haystack.py` (lazy Haystack import) | RAG document guard |
5555
| `litellm` | `optional/litellm.py` | `judge/litellm_judge.py` |
5656
| `scrape` | `optional/scrape.py` | `providers/content/firecrawl.py` |
5757

‎sdk/docs/GETTING_STARTED.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Package name on PyPI is **`unplug-ai`**. You import it as **`unplug`**:
1414
from unplug import Guard
1515
```
1616

17+
**Import style:** Apps and agents use top-level `unplug` exports. Server/MCP code
18+
that needs policy, cache, or boundary facades uses `unplug.api.*`
19+
([`PUBLIC_API.md`](PUBLIC_API.md)). Avoid `unplug.core.*` — it is internal.
20+
1721
Optional ML model (better recall on indirect injection):
1822

1923
```bash

‎sdk/docs/ML_INTEGRATION.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ When `abstain_enabled` is true (default in `catalog.toml`), the ML scanner uses
102102
- **ALLOW**: scores below `tau_abstain_low` with no span fire
103103
- **ABSTAIN**: uncertain middle band → `Action.ABSTAIN` (safe with span redaction)
104104

105-
Optional `JudgeProvider` runs on ABSTAIN when `judge_enabled=true`.
105+
Optional `JudgeProvider` runs on ABSTAIN when passed as `judge=` to `Guard()`.
106106

107107
## Dual-head behavior
108108

0 commit comments

Comments
 (0)