draftcat 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<p align="center"><b>Governed AI pipelines where the LLM can't fire actions — one Go binary, self-hosted, human-in-the-loop.</b></p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<a href="https://github.com/renezander030/draftcat
|
|
8
|
+
<a href="https://github.com/renezander030/draftcat"><img src="https://img.shields.io/github/stars/renezander030/draftcat?style=flat-square" alt="Stars"></a>
|
|
9
9
|
<a href="LICENSE"><img src="https://img.shields.io/github/license/renezander030/draftcat?style=flat-square" alt="License"></a>
|
|
10
10
|
<img src="https://img.shields.io/badge/Go-1.25-00ADD8?style=flat-square&logo=go" alt="Go 1.25">
|
|
11
11
|
<a href="docs/voice.md"><img src="https://img.shields.io/badge/voice%20AI-EU%20residency%20%C2%B7%20Dograh-00D4AA?style=flat-square" alt="Voice AI plugin"></a>
|
|
@@ -65,6 +65,8 @@ Sometimes a customer, auditor, or partner needs evidence that a human approved a
|
|
|
65
65
|
|
|
66
66
|
This is an **experimental cryptographic preview**, not a production compliance claim. It uses an embedded BN254/Groth16 circuit and a development single-party setup; the circuit has not received an independent audit. Use it to evaluate the disclosure model, then replace the setup through a ceremony before relying on it in production. See [zero-knowledge approval proofs](docs/zk-approval-proofs.md) for the trust model, exact statement, and limitations.
|
|
67
67
|
|
|
68
|
+
> **New in v0.9.0:** daily model usage persists in SQLite, parallel pipelines keep separate budget totals, and every engine model call passes one admission gate. Approval records commit before work is released. Unconsumed tool actions can be revoked, consumed actions accept durable caller-reported outcomes, and live or recovered permits share expiration and policy checks. Exact scalar output validation and bounded provider reads complete the release. See the [budget and lifecycle guide](docs/governance-lifecycle.md).
|
|
69
|
+
>
|
|
68
70
|
> **New in v0.8.0:** webhook retries can carry a durable `Idempotency-Key`, signed replay identities are claimed atomically, and tool permits recheck their policy before execution. Requests reject oversized or ambiguous data and retain exact numbers. Older state stores upgrade safely; completed and failed runs carry exact approval identities. Audit commands read without modifying the database, and `draftcat receipts verify` checks exported JSONL offline. See the [upgrade and reliability guide](docs/reliability.md).
|
|
69
71
|
>
|
|
70
72
|
> **New in v0.7.0:** execution decisions now carry their proof. Every tool-gate route is authenticated, each request has a stable action identity and exact policy binding, and an allowed decision becomes an atomic consume-once permit before the side effect runs. Webhook acceptance is durable before HTTP 202 and can be polled after handoff. Versioned receipts bind action, payload, policy, and expiry, with `draftcat receipts list|show|export` for verification-ready JSONL. Ordered `model_policy` rules can deny or send matching model input/output to a human, while `/healthz` and `/readyz` give orchestrators a safe listener contract.
|
|
@@ -162,7 +164,7 @@ cp secrets.yaml.example secrets.yaml
|
|
|
162
164
|
docker compose up
|
|
163
165
|
```
|
|
164
166
|
|
|
165
|
-
Pipelines live in `config.yaml`, prompts in `skills/`. A SQLite store opens at `./state.db` on first boot. To add the EU-resident **voice AI** plugin: `go build -tags voice -o draftcat .` — the lean binary is unchanged when the tag is off.
|
|
167
|
+
Pipelines live in `config.yaml`, prompts in `skills/`. Run `draftcat doctor` to check credentials, operators, the state store and schedules before the first start. A SQLite store opens at `./state.db` on first boot. To add the EU-resident **voice AI** plugin: `go build -tags voice -o draftcat .` — the lean binary is unchanged when the tag is off.
|
|
166
168
|
|
|
167
169
|
## Deploy — where it runs
|
|
168
170
|
|
|
@@ -280,6 +282,7 @@ budgets:
|
|
|
280
282
|
per_day_tokens: 100000
|
|
281
283
|
per_day_cost: 5.00 # money cap, same unit as your model rates (0 = off)
|
|
282
284
|
per_pipeline_cost: 0.50
|
|
285
|
+
alert_at: [0.5, 0.8] # tell the operator at 50% and 80% of a daily cap
|
|
283
286
|
|
|
284
287
|
observability: {spans: false} # or DRAFTCAT_TRACE=1
|
|
285
288
|
state: {path: ./state.db}
|
|
@@ -295,7 +298,7 @@ An approval step can narrow who may decide it:
|
|
|
295
298
|
approvers: [111111, 222222] # which ones (subset of allowed_users)
|
|
296
299
|
```
|
|
297
300
|
|
|
298
|
-
Cost caps are checked between calls: a call is refused once spend has reached the cap. Pair them with `per_step_tokens` to bound the size of any single call.
|
|
301
|
+
Cost caps are checked between calls: a call is refused once spend has reached the cap. Pair them with `per_step_tokens` to bound the size of any single call. Explicit rate-limit rejections (HTTP 429 without declared usage) retry with backoff and honour `Retry-After`; `provider.max_retries` sets the attempt limit. Transport errors, timeouts, server errors, and responses with uncertain billing halt the call and require usage reconciliation before another dispatch. See the [budget recovery guide](docs/governance-lifecycle.md).
|
|
299
302
|
|
|
300
303
|
The tool-call gate is configured the same way, per tool:
|
|
301
304
|
|
|
@@ -355,6 +358,7 @@ Skills are YAML prompt templates in `skills/` with an `output_schema` the engine
|
|
|
355
358
|
```bash
|
|
356
359
|
draftcat # run the engine (validates config first; refuses to start on errors)
|
|
357
360
|
draftcat validate [--strict] # lint config + skills
|
|
361
|
+
draftcat doctor [--json] # read-only preflight: credentials, operators, state, ports, schedules
|
|
358
362
|
draftcat test <pipeline> # dry-run against fixtures/<pipeline>/ (never touches real APIs)
|
|
359
363
|
draftcat runs [pipeline] # recent runs + the approval decisions in each (--json to archive)
|
|
360
364
|
draftcat pending # approval gates waiting on a human right now (--json)
|
|
@@ -385,7 +389,9 @@ Approval rows can be made tamper-evident with signed receipts, so a later audit
|
|
|
385
389
|
can verify which operator approved which payload hash. See
|
|
386
390
|
[`docs/action-receipts.md`](docs/action-receipts.md).
|
|
387
391
|
|
|
388
|
-
A pipeline's `schedule` decides when it runs — an interval (`1h`), `manual` (operator `/run` only), or `webhook`.
|
|
392
|
+
A pipeline's `schedule` decides when it runs — an interval (`1h`), a cron expression in the pipeline's time zone (`"0 8 * * 1-5"` with `timezone: Europe/Berlin`), `@daily`-style shortcuts, `manual` (operator `/run` only), or `webhook`. Schedules continue from the recorded run history across restarts, `pause_after_failures` stops a pipeline that keeps failing, and `SIGTERM` lets running pipelines finish within `timeouts.shutdown_grace`. See [running Draftcat unattended](docs/operations.md).
|
|
393
|
+
|
|
394
|
+
The `webhook` server is opt-in and opens no port unless enabled:
|
|
389
395
|
|
|
390
396
|
```yaml
|
|
391
397
|
webhook: {enabled: true, addr: 127.0.0.1:8088, secret_env: DRAFTCAT_WEBHOOK_SECRET}
|
|
@@ -435,7 +441,7 @@ The deterministic-boundary architecture is documented in the **Production AI Aut
|
|
|
435
441
|
- [#12 LLM Skills as YAML](https://gist.github.com/renezander030/a28f118dec07d275ccc825aa833aba92) — prompt + output_schema + role in versioned YAML, validated by a linter
|
|
436
442
|
- [#13 Inbound Agent Webhook Auth](https://gist.github.com/renezander030/26d46d4c7fb9ab1b43fe19bc5bad6d07) — constant-time bearer token, fail-closed on empty secret, async 202 dispatch
|
|
437
443
|
- [#14 Self-Improving Voice Agent](https://gist.github.com/renezander030/262d8b8c44b4cddf51b3b84c40f3f669) — harvest Learning-Items, group, propose a minimal workflow diff, two approval gates, git commit + auto-versioned Dograh publish
|
|
438
|
-
- [#15 AI Action Audit Trail](https://gist.github.com/renezander030/ad81c7a805a09a844983f881e2c487e5) —
|
|
444
|
+
- [#15 AI Action Audit Trail](https://gist.github.com/renezander030/ad81c7a805a09a844983f881e2c487e5) — versioned action-bound `action_approvals` receipts: who approved which payload, when; action-level receipt binding, expiry and fail-closed audit persistence
|
|
439
445
|
|
|
440
446
|
## Related projects
|
|
441
447
|
|