draftcat 0.15.1 → 0.17.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.
Files changed (2) hide show
  1. package/README.md +11 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -114,7 +114,7 @@ However your agent runs, draftcat sits between it and your customer systems as a
114
114
  - **Agent harness hooks** - `draftcat gate install claude-code|codex|copilot-cli|gemini-cli` puts every shell, file-writing and MCP call of that harness through the gate as a pre-tool hook that fails closed; see [`docs/harness-hooks.md`](docs/harness-hooks.md).
115
115
  - **Approved HTTP requests** - the `http_request` action sends one request after an approval step, bound to exactly the request the operator saw, with a credential draftcat holds and the agent never sees; see [`docs/http-action.md`](docs/http-action.md).
116
116
  - **Trip and shadow** - `tool_gate.trip` freezes an agent the gate keeps refusing, and `tool_gate.shadow` decides every live call a second time under a candidate policy and records where the two differ, without touching the live decision.
117
- - **Repeat guard** — inside `repeat_window` an identical tool call (same agent, tool, arguments) gets the gate's remembered answer instead of a new prompt: a denied call stays denied, an in-flight call joins the open prompt, and `max_repeats` stops a looping agent from paging you.
117
+ - **Repeat guard** — inside `repeat_window` an identical tool call (same agent, tool, arguments) gets the gate's remembered answer instead of a new prompt: a call the operator refused stays refused, one whose approval timed out is asked again, an in-flight call joins the open prompt, and `max_repeats` stops a looping agent from paging you.
118
118
  - **Denial notices** — a refusal the gate makes on its own (unlisted tool, argument outside a rule, repeat guard) is reported to the operator channel, one notice per agent, tool and reason per window, so nothing is refused silently.
119
119
  - **Open gates** — `/pending` on the channel and `draftcat pending` on the host list every approval waiting on a human, pipeline steps and tool calls alike, with how long each has waited and how long it has left.
120
120
  - **Risk tiers** — steps declare `risk: low | normal | high`, and `approval_policy` can pre-approve a declared class. High risk never qualifies, and each exemption is audited as `policy_approve` with the rule that fired.
@@ -123,7 +123,7 @@ However your agent runs, draftcat sits between it and your customer systems as a
123
123
  - **Approver scoping** — `approvers:` on a step narrows who may decide it to a subset of `allowed_users`. Quorum says *how many*; this says *which ones*. It can only narrow, never widen.
124
124
  - **Model I/O policy** - ordered `model_policy` regex rules check exact input before it reaches the provider and output before it leaves Draftcat. A match can deny or enter the existing human approval gate, and the decision is written as a versioned receipt.
125
125
  - **Input sanitization** — operator input is scrubbed for prompt-injection patterns before the LLM.
126
- - **Output validation** — AI output is checked against the skill's `output_schema` (field types, numeric `min`/`max`, `enum` membership) and rejected if it doesn't conform.
126
+ - **Output validation** — AI output is checked against the skill's `output_schema` (field types, numeric `min`/`max`, `enum` membership) and rejected if it doesn't conform. A rejected reply is asked for once more with the validation error, as its own budgeted, policy-checked call; `output_retries` on the step sets the count (0 to 3, `0` fails on the first invalid reply).
127
127
  - **Checked action receipts** - v2 receipts bind immutable action ID, payload hash, policy digest, validity window, run, and decision. List, inspect, or stream JSONL from SQLite with `draftcat receipts`; see [`docs/action-receipts.md`](docs/action-receipts.md).
128
128
  - **Durable webhook admission** - Draftcat writes a body-hash-only admission row before returning HTTP 202. The response includes `admission_id` and an authenticated poll URL; unfinished admissions become `interrupted` after restart.
129
129
  - **Health contract** - `GET /healthz` reports process liveness and `GET /readyz` succeeds only while the SQLite decision store is available.
@@ -292,6 +292,15 @@ observability: {spans: false} # or DRAFTCAT_TRACE=1
292
292
  state: {path: ./state.db}
293
293
  ```
294
294
 
295
+ A step that sends the same long instructions on every run can have them
296
+ cached by an Anthropic model: `prompt_cache: true` on the model marks the
297
+ step's prompt up to its first `{{placeholder}}` for Anthropic prompt caching.
298
+ Runs that start with the same instructions within five minutes read them at a
299
+ tenth of the input price; the run that writes them pays 1.25x, so it is off by
300
+ default. It applies to `anthropic/` models on OpenRouter; every other model is
301
+ sent the plain prompt. Without a provider-reported charge, the cost caps count
302
+ cache writes at the write price.
303
+
295
304
  An approval step can narrow who may decide it:
296
305
 
297
306
  ```yaml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "draftcat",
3
- "version": "0.15.1",
3
+ "version": "0.17.0",
4
4
  "description": "Governed AI pipelines with human approval gates",
5
5
  "license": "MIT",
6
6
  "author": "Rene Zander",