diff --git a/docs/configuration.mdx b/docs/configuration.mdx index b2ada9c..4ad2061 100644 --- a/docs/configuration.mdx +++ b/docs/configuration.mdx @@ -152,7 +152,7 @@ Supported actions: 1. block 2. log -Unlike PII Redactor, `entities` defaults to only the high-risk set: `credit_card`, `api_key` and `bearer_token`. Contact data and locators are supported but opt-in. In a proposed tool argument, they are usually the tool's own parameters rather than an exfiltration signal. `scan_injection` is off by default for the same reason. See the [Tool Approval Guard guide](/middleware/tool-approval-guard#secret-like-data). +Unlike PII Redactor, `entities` defaults to only the high-risk set: `credit_card`, `api_key`, and `bearer_token`. Contact data and locators are supported but opt-in. In a proposed tool argument, they are usually the tool's own parameters rather than an exfiltration signal. `scan_injection` is off by default for the same reason. See the [Tool Approval Guard guide](/middleware/tool-approval-guard#secret-like-data). `block_entities` stops the run regardless of the `action` setting. For an observe-only `action: 'log'` setup, also set `block_entities` to `[]`. diff --git a/docs/middleware/budget-guard.mdx b/docs/middleware/budget-guard.mdx index 5a096f9..22c34e6 100644 --- a/docs/middleware/budget-guard.mdx +++ b/docs/middleware/budget-guard.mdx @@ -133,7 +133,7 @@ Once the provider replies, the middleware prices the spend recorded against the ### Pricing -A built-in table prices common models from Anthropic, OpenAI, Google, xAI, DeepSeek, and Mistral, in US dollars per million tokens. The middleware matches a model ID exactly first, then by the longest pricing key it starts with or contains. A dated or gateway-prefixed id such as `us.anthropic.claude-3-5-haiku-20241022-v1:0` or `bedrock/gpt-4o-mini-2024-07-18` still resolves to its family. +A built-in table prices common models from Anthropic, OpenAI, Google, xAI, DeepSeek, and Mistral, in US dollars per million tokens. The middleware matches a model ID exactly first, then by the longest pricing key it starts with or contains. A dated or gateway-prefixed ID such as `us.anthropic.claude-3-5-haiku-20241022-v1:0` or `bedrock/gpt-4o-mini-2024-07-18` still resolves to its family. Published pricing changes faster than this package releases. Override or extend it: @@ -148,8 +148,8 @@ new BudgetGuard( When no pricing is known for a step's model, `unknownModelAction` decides what happens: - `allow` (the default) logs the gap and lets the request through unmetered, while `block` - stops the run so an unpriced model can never spend against a budget unchecked. + `allow` (the default) logs the gap and lets the request through unmetered. `block` stops + the run so an unpriced model can never spend against a budget unchecked. ```php new BudgetGuard(unknownModelAction: 'block') @@ -170,8 +170,8 @@ new BudgetGuard(action: 'log') // observe before enforcing `truncate` only applies to the per-request budget. Shrinking the current prompt cannot undo - spend already recorded against a session or a user's day, so a session or daily breach - degrades to `block` regardless of the configured action. + spend already recorded against a session or a user's day. A session or daily breach + therefore degrades to `block` regardless of the configured action. ## Blocked runs diff --git a/docs/middleware/tool-approval-guard.mdx b/docs/middleware/tool-approval-guard.mdx index 79d408b..ae61e7e 100644 --- a/docs/middleware/tool-approval-guard.mdx +++ b/docs/middleware/tool-approval-guard.mdx @@ -90,7 +90,7 @@ new ToolApprovalGuard( ### Secret-like data -The middleware runs the same detectors as [PII Redactor](/middleware/pii-redactor), including the Luhn check on card numbers. By default it scans for **only three entities**: `credit_card`, `api_key` and `bearer_token`. +The middleware runs the same detectors as [PII Redactor](/middleware/pii-redactor), including the Luhn check on card numbers. By default it scans for **only three entities**: `credit_card`, `api_key`, and `bearer_token`. Entities listed in `block_entities` stop the run regardless of the configured action, matching PII Redactor's behaviour. @@ -102,8 +102,8 @@ Entities listed in `block_entities` stop the run regardless of the configured ac Exfiltration is about **destination**, not presence, and the destination cannot be judged from the value alone. Adding `email`, `phone`, `url`, - `ip_address` or `mac_address` will flag legitimate calls made by any agent - that owns a mail, SMS or HTTP tool. + `ip_address`, or `mac_address` will flag legitimate calls made by any agent + that owns a mail, SMS, or HTTP tool. To control *where* a tool may send data, use `allowed_tools` / `denied_tools` and domain allowlisting inside the tool itself.