Inject source context headers in MCP tool calls#7830
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7830 +/- ##
==========================================
+ Coverage 75.23% 75.56% +0.33%
==========================================
Files 432 432
Lines 22973 22975 +2
Branches 6090 6090
==========================================
+ Hits 17284 17362 +78
+ Misses 5689 5613 -76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Would it be worth adding some test coverage here? Assuming the
That would close the loop on the audit path end to end. Happy to help write these if it's useful. |
|
Small question on the nonce metadata: was leaving out const nonce = this.app.nonceStore.createSourceNonce({
source: 'mcp:expert',
toolName
})#7563 mentions the token identifier as part of the source context, and the #7562 infra already carries If that's the reason, would it be worth surfacing the id from that helper and setting |
|
Minor one on the SCSS: dropping The only thing is that removing the |
|
Not related to this PR, just spotted it while reading nearby: in the tamper check just above, |
|
Nice work on this, the nonce wiring looks clean. A few things I liked while reviewing:
Nothing blocking from me, just the couple of questions above, but I really think we should add tests. |
|
Logging/exposing the token doesn't make sense for the first-party expert agent (short-lived, nameless, user-invisible tokens). The scaffolding for token name is already in place via the PAT path in resolveSourceContext for when third-party MCP agents arrive. |
…on, request headers, and audit trail
Description
Wires up the MCP platform automation endpoint to use the source context infrastructure from #7562, so expert agent tool calls are recorded as mcp:expert in the audit trail.
Related Issue(s)
closes #7563
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel