Skip to content

Flowlight 0.13.0 - #24

Merged
blessdyb merged 2 commits into
mainfrom
release/0.13.0
Oct 1, 2026
Merged

blessdyb merged 2 commits into
mainfrom
release/0.13.0

Conversation

@blessdyb

@blessdyb blessdyb commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Rewrite outgoing requests with rules — the mock feature's sibling: where a mock answers a request, this edits it and forwards it.

What's in it

  • RewriteRule — matches like a mock (host / path glob / method) and edits the request: header ops (set/add/remove) and JSON-body ops (set/remove by dotted key path; value parsed as JSON or taken as text). Pure, tested logic with header sanitization and correct Content-Length reframing.
  • No proxy change — rides the existing .replace intervention path guardrails use. Composed into InspectionController.interventions after the guardrail branch (guardrails strip tools first, then the user's edits apply); shouldInspect decrypts a host a rule names, like mocks. Rules persist in UserDefaults, untouched by "remove recorded data".
  • UI — a "Modify requests" disclosure group on the Inspect screen beside Mock responses.

Extension stays pinned at 0.10.1 — no reboot to upgrade.

Tests

613 pass, incl. 12 new RewriteRuleTests (header set/add/remove, JSON set/remove/nested, scalar-vs-string value parsing, Content-Length agrees with the rewritten body, header-injection sanitization, non-match, no-op, forward-compatible decode).

🤖 Generated with Claude Code

blessdyb and others added 2 commits October 1, 2026 00:19
… answer

A new RewriteRule edits a matching request on its way out — set/add/remove a
header, or set/remove a field in the JSON body by dotted key path (a value that
is valid JSON is used as-is, otherwise taken as text) — and lets it continue to
the server. Matched like a mock (host, path glob, method).

It needs no proxy change: the .replace intervention path that guardrails use to
forward a modified request already carries it. The rewrite is composed into the
interventions closure after the guardrail branch — guardrails strip refused
tools first, then the user's edits apply — and shouldInspect decrypts a host a
rule names, like it does for mocks. Headers are sanitised and Content-Length is
reframed so the request stays well-formed. Rules live in UserDefaults and a
"Modify requests" section on the Inspect screen edits them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Version bump, release notes for request rewriting, and the rebuilt site.
Extension stays pinned at 0.10.1 — no reboot to upgrade.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@blessdyb
blessdyb merged commit 8a54361 into main Oct 1, 2026
10 of 11 checks passed
@blessdyb
blessdyb deleted the release/0.13.0 branch October 1, 2026 07:57

This branch was successfully deployed

1 active deployment
release — 885ce573 Deployed Oct 1, 2026 by blessdyb via release #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant