feat(02-02): capture named sessions through a loopback proxy

Record Nuxt/MCP traffic as ordered flows via parity:proxy, pin
loopback upstream, and refuse oversized or credential-shaped fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jakub Zych
2026-09-17 12:27:57 +02:00
parent 603270da08
commit bb6a5a91c9
9 changed files with 1209 additions and 6 deletions

View File

@@ -154,8 +154,22 @@ func writeCapture(b *strings.Builder, indent int, rules []CaptureRule) {
fmt.Fprintf(b, "%scapture:\n", pad)
inner := strings.Repeat(" ", indent+2)
for _, rule := range rules {
fmt.Fprintf(b, "%s- path: %s\n", inner, encodeScalar(rule.Path))
fmt.Fprintf(b, "%s as: %s\n", inner, encodeScalar(rule.As))
fmt.Fprintf(b, "%s- as: %s\n", inner, encodeScalar(rule.As))
if rule.From != "" {
fmt.Fprintf(b, "%s from: %s\n", inner, encodeScalar(rule.From))
}
if rule.Path != "" {
fmt.Fprintf(b, "%s path: %s\n", inner, encodeScalar(rule.Path))
}
if rule.Name != "" {
fmt.Fprintf(b, "%s name: %s\n", inner, encodeScalar(rule.Name))
}
if rule.Identity != "" {
fmt.Fprintf(b, "%s identity: %s\n", inner, encodeScalar(rule.Identity))
}
if rule.Category != "" {
fmt.Fprintf(b, "%s category: %s\n", inner, encodeScalar(rule.Category))
}
}
}