Skip to content

Commit 0822d0f

Browse files
authored
Merge pull request #8 from devonartis/fix/docs-review-v2
docs: fix F2-F13 findings for public release
2 parents 215f686 + 7951022 commit 0822d0f

14 files changed

Lines changed: 61 additions & 60 deletions

.DS_Store

-6 KB
Binary file not shown.

.claude/scheduled_tasks.lock

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ htmlcov/
3434
# Local AI tooling artifacts
3535
.playwright-mcp/
3636
.claude/settings.local.json
37+
.claude/scheduled_tasks.lock
38+
.DS_Store
3739

3840
# Local archive (historical artifacts, not for repo)
3941
archive/

CHANGELOG.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
# Changelog
22

3-
## v0.1.0 (2026-03-07)
3+
## v0.3.0 — Initial AgentWrit Public Release (2026-04-14)
44

5-
Initial release of the AgentWrit Python SDK.
5+
First public release of the AgentWrit Python SDK. Complete rewrite from the internal v0.1.0/v0.2.0 codebase.
66

7-
### Features
7+
### Core API
88

9-
- **AgentWritApp** -- main entry point with app authentication on init
10-
- **get_token()** -- full 8-step credential flow (app auth, launch token, Ed25519 challenge-response, caching)
11-
- **delegate()** -- scope-attenuated delegation to another registered agent (C7 Delegation Chain)
12-
- **revoke_token()** -- self-revocation for credential cleanup (C4 Expiration & Revocation)
13-
- **validate_token()** -- online token validation against the broker (C3 Zero-Trust)
14-
- **Token caching** -- by (agent_name, scope) key, proactive renewal at 80% TTL, thread-safe
15-
- **Retry with backoff** -- exponential backoff on 5xx/connection errors, Retry-After on 429
16-
- **Error hierarchy** -- AgentWritError, AuthenticationError, ScopeCeilingError, RateLimitError, BrokerUnavailableError, TokenExpiredError
17-
- **Type safety** -- mypy strict mode, no Any in source, TypedDict for all broker responses
18-
- **Security** -- ephemeral Ed25519 keys (never on disk), client_secret never in output, TLS verified by default, thread-safe app token state
9+
- **AgentWritApp** — main entry point; authenticates with the broker on first use (lazy auth)
10+
- **create_agent()** — registers an agent with Ed25519 challenge-response, returns an `Agent` object
11+
- **Agent** — lifecycle management: `renew()`, `release()`, `delegate()`
12+
- **validate()** — module-level online token validation against the broker
13+
- **scope_is_subset()** — module-level scope comparison utility
1914

20-
### Testing
15+
### Models
16+
17+
- `AgentClaims`, `ValidateResult`, `RegisterResult`, `HealthStatus`, `DelegatedToken`, `ProblemDetail` — typed dataclasses for all broker responses
18+
19+
### Error Handling
2120

22-
- 122 unit tests (no broker required)
23-
- 16 integration tests (live broker)
24-
- 7 live acceptance test scripts (SDK-S1 through SDK-S8)
25-
- Security review: all HIGH/MEDIUM findings resolved
21+
- `AgentWritError` base exception with RFC 7807 `ProblemDetail` support
22+
- Typed hierarchy: `AuthenticationError`, `AuthorizationError`, `RateLimitError`, `ProblemResponseError`, `TransportError`
2623

27-
### Demo
24+
### Transport
25+
26+
- `httpx`-based HTTP transport with automatic error dispatch
27+
- User-Agent: `agentwrit-python/0.3.0`
28+
29+
### Testing
2830

29-
- Interactive demo app (FastAPI + HTMX) with pattern/NIST annotations
30-
- 6 scenarios: Read Data, Write, Scope Violation, Delegation, Full Lifecycle, Blast Radius
31+
- 99 unit tests (no broker required)
32+
- 15 acceptance stories against live broker
33+
- Integration test suite with session-scoped fixtures
3134

32-
### Documentation
35+
### Demos
3336

34-
- README with full API, security properties, and pattern component mapping
35-
- API reference (docs/api-reference.md)
36-
- Getting started guide (docs/getting-started.md)
37-
- Pattern component annotations in all module docstrings
37+
- MedAssist AI (FastAPI + HTMX) — multi-agent medical encounter pipeline
38+
- Support Tickets (Flask + HTMX + SSE) — triage/knowledge/response agent pipeline

CLAUDE.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# AgentWrit Python SDK
22

3-
## Rules
4-
5-
**At session start, ALWAYS read these files before doing anything else:**
6-
- `~/proj/devflow/agentwrit-python/MEMORY.md` — current state, standing rules, known issues
7-
- `~/proj/devflow/agentwrit-python/FLOW.md` — decision log + **welcome note on first visit** (delete after reading)
8-
- Use `devflow-client` skill for all development work
9-
103
## Rules — Non-Negotiable
114

125
### Strict Type Safety
@@ -35,8 +28,5 @@ uv run pytest tests/unit/ # unit tests
3528

3629
## Defaults
3730

38-
- **Read `~/proj/devflow/agentwrit-python/MEMORY.md` first** every session — it has current state and lessons.
39-
- **Read `~/proj/devflow/agentwrit-python/FLOW.md`** for decision history and what's next.
40-
- **Use `devflow-client`** skill for all development work.
41-
- **API source of truth:** [https://github.com/devonartis/agentwrit/blob/main/docs/api.md](https://github.com/devonartis/agentwrit/blob/main/docs/api.md) — always verify SDK calls against it.
31+
- **API source of truth:** [AgentWrit broker API docs](https://github.com/devonartis/agentwrit/blob/main/docs/api.md) — always verify SDK calls against it.
4232
- **Live broker for verification:** Stand up broker via `docker compose up -d` (pulls `devonartis/agentwrit` from Docker Hub).

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ Demo work under [`demo/`](demo/) should follow the same rule: run against a real
8282

8383
## Security issues
8484

85-
Please report security-sensitive problems through [GitHub Security Advisories](https://github.com/devonartis/agentauth-python/security/advisories) for this repository (or the maintainer's preferred private channel if one is published elsewhere). Do not file exploitable details in public issues before they are addressed.
85+
Please report security-sensitive problems through [GitHub Security Advisories](https://github.com/devonartis/agentwrit-python/security/advisories) for this repository (or the maintainer's preferred private channel if one is published elsewhere). Do not file exploitable details in public issues before they are addressed.

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,24 @@ This SDK is the Python client for the [AgentWrit broker](https://github.com/devo
3030

3131
## Installation
3232

33+
Install from GitHub (not yet on PyPI):
34+
3335
```bash
34-
uv add agentwrit
36+
uv add git+https://github.com/devonartis/agentwrit-python.git
3537
```
3638

3739
Or with pip:
3840

3941
```bash
40-
pip install agentwrit
42+
pip install git+https://github.com/devonartis/agentwrit-python.git
43+
```
44+
45+
For local development:
46+
47+
```bash
48+
git clone https://github.com/devonartis/agentwrit-python.git
49+
cd agentwrit-python
50+
uv sync --all-extras
4151
```
4252

4353
**Requirements:** Python 3.10+ and a running [AgentWrit broker](https://github.com/devonartis/agentwrit) instance.
@@ -267,8 +277,8 @@ See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full workflow: `uv` setup, **
267277
Quick local checks (no broker required for unit tests):
268278

269279
```bash
270-
git clone https://github.com/devonartis/agentauth-python.git
271-
cd agentauth-python
280+
git clone https://github.com/devonartis/agentwrit-python.git
281+
cd agentwrit-python
272282
uv sync --all-extras
273283

274284
uv run ruff check .
@@ -280,4 +290,4 @@ uv run pytest tests/unit/
280290

281291
This SDK is licensed under the [MIT License](LICENSE).
282292

283-
The [AgentWrit broker](https://github.com/devonartis/agentwrit) is licensed separately under AGPL-3.0. See the broker repo for details.
293+
The [AgentWrit broker](https://github.com/devonartis/agentwrit) is licensed separately under PolyForm Internal Use 1.0.0. See the broker repo for details.

demo/BEGINNERS_GUIDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,5 @@ See also [`.env.example`](.env.example) for variable names.
195195

196196
## 11. Further reading
197197

198-
- **Product / technical spec:** [`.plans/specs/2026-04-08-medassist-demo-spec.md`](../.plans/specs/2026-04-08-medassist-demo-spec.md) (repo root)
199198
- **Presenter script:** [PRESENTERS_GUIDE.md](PRESENTERS_GUIDE.md)
200-
- **Broker API (source of truth for integration):** `broker/docs/api.md`
199+
- **Broker API (source of truth for integration):** [AgentWrit broker docs](https://github.com/devonartis/agentwrit/tree/main/docs)

docs/concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ This identity is:
484484

485485
## Standards Alignment
486486

487-
The SDK implements the [Ephemeral Agent Credentialing](https://github.com/devonartis/AI-Security-Blueprints/blob/main/patterns/ephemeral-agent-credentialing/versions/v1.2.md) pattern (v1.2), which aligns with:
487+
The SDK implements the [Ephemeral Agent Credentialing](https://github.com/devonartis/AI-Security-Blueprints/blob/main/patterns/ephemeral-agent-credentialing/versions/v1.3.md) pattern (v1.3), which aligns with:
488488

489489
| Standard | What it addresses |
490490
|----------|-------------------|

docs/developer-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ For quick tasks, set a short TTL to minimize exposure:
7272
agent = app.create_agent(
7373
orch_id="quick-check",
7474
task_id="verify-customer",
75-
requested_scope=["read:data:customer-artis"],
75+
requested_scope=["read:data:customer-7291"],
7676
max_ttl=30, # Token expires in 30 seconds
7777
)
7878
# If you forget to release, the token dies in 30 seconds anyway
@@ -233,7 +233,7 @@ from agentwrit import scope_is_subset
233233
agent = app.create_agent(
234234
orch_id="customer-service",
235235
task_id="lookup",
236-
requested_scope=["read:data:customer-artis"],
236+
requested_scope=["read:data:customer-7291"],
237237
)
238238

239239
def handle_action(action_scope: list[str]) -> bool:
@@ -243,13 +243,13 @@ def handle_action(action_scope: list[str]) -> bool:
243243
return False # block
244244

245245
# Authorized
246-
handle_action(["read:data:customer-artis"]) # True
246+
handle_action(["read:data:customer-7291"]) # True
247247

248248
# Blocked — different identifier
249249
handle_action(["read:data:all-customers"]) # False
250250

251251
# Blocked — different action
252-
handle_action(["write:data:customer-artis"]) # False
252+
handle_action(["write:data:customer-7291"]) # False
253253
```
254254

255255
### Validating with the Broker

0 commit comments

Comments
 (0)