Conversation
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
Backend for the AI session network summary. Exposes total/blocked
network calls and top destination domains on the session threads
endpoint (`GET /api/v2/ai-gateway/sessions/{id}`).
Total and blocked reuse the existing Agent Firewall aggregation from the
sessions list query, so the numbers match the sessions table. Top
domains are a new server-side aggregation
(`GetAIBridgeSessionTopDomains`) over boundary logs, using the same
interception-window correlation. There is no network-error state,
matching the current data model.
Frontend consuming these fields is in a separate stacked PR.
### PR map (merge strictly bottom-up)
This change is a 4-PR stack. Each PR depends on all the ones below it,
so merge in this exact order:
1. #27417 — backend network summary (base `main`)
2. #27418 — frontend summary rows (base #27417)
3. #27425 — backend per-call list `network_call_logs` (base #27418)
4. #27426 — frontend network-calls panel (base #27425)
Refs AIGOV-463
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: Cian Johnston <[email protected]>
|
@mtojek It's ready. The conflicts are because I need to rebase onto main after merging the bottom of the stack. It does need an engineer's eyes. Cian has been reviewing lower down in the stack. I'll request his review here as well. |
Frontend for the AI session network summary. Adds Network calls, Blocked network requests, and Top domains rows to the Session summary card on the individual AI session detail page, driven by the network fields on the session threads response. Renders "Disabled" when network monitoring was not active and "No activity" when there were no calls. Covered by Storybook stories for each state. ### PR map (merge strictly bottom-up) This change is a 4-PR stack. Each PR depends on all the ones below it, so merge in this exact order: 1. #27417 — backend network summary 2. #27418 — frontend summary rows 3. #27425 — backend per-call list `network_call_logs` 4. #27426 — frontend network-calls panel Refs AIGOV-463 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Cian Johnston <[email protected]>
The threads API returned only a network call summary. Add a per-call list so the session detail can render individual Agent Firewall network calls. ListAIBridgeSessionNetworkCalls reuses the same sequence-number windowing as the summary and includes all protocols, so the list length and blocked count match the summary counts. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…sdk params Extend the windowing tests to assert the per-call list agrees with the summary: len(NetworkCallLogs) == Total, blocked count == summary Blocked, correct sequence ordering, and no cross-session bleed when two AI sessions share a firewall session. Add a truncation test seeding 105 calls that asserts the list caps at 100 while the summary Total stays authoritative. Refactor db2sdk.AIBridgeSessionThreads to take a named-field params struct, removing the transposable adjacent TopDomains/NetworkCalls positional args. Refs AIGOV-464 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…IBridgeSessionThreads
|
@mtojek would you mind having a look? Cian is out today. This API needs pagination to be effective, but Cian and I agreed to patch that in post release alongside a few other refinements. |
mtojek
left a comment
There was a problem hiding this comment.
I needed some time to process the database query, but LGTM 👍
| // list than NetworkCalls.Total means the list was truncated. Empty when the | ||
| // session did not pass through Agent Firewall. | ||
| NetworkCallLogs []AgentFirewallLog `json:"network_call_logs,omitempty"` | ||
| Threads []AIBridgeThread `json:"threads"` |
There was a problem hiding this comment.
Threads will be always present, right? no need for omitempty ?
There was a problem hiding this comment.
There is no omitempty on threads? Only on NetworkCallLogs, which is absent in the case where agent firewall wasn't used.
The AI session threads API returned only a network call summary (total/blocked counts + top domains). This adds the per-call list so the session detail can render individual Agent Firewall network calls.
ListAIBridgeSessionNetworkCallsreuses the same sequence-number windowing as the existing summary and includes all protocols. The list is exposed asnetwork_call_logson the threads response and is capped server-side at 100 rows. The summary (network_calls.total/blocked) remains authoritative for whole-session totals: the list length and its blocked count equal the summary only when a session has at most 100 calls, and are truncated beyond that.PR map (merge strictly bottom-up)
This change is a 4-PR stack. Each PR depends on all the ones below it, so merge in this exact order:
network_call_logsRefs AIGOV-464
🤖 Generated with Claude Code