( ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult, isPrivate bool, labelFn func(isPrivate bool) ifc.SecurityLabel, )
| 121 | } |
| 122 | |
| 123 | func attachProjectVisibilityIFCLabel( |
| 124 | ctx context.Context, |
| 125 | deps ToolDependencies, |
| 126 | r *mcp.CallToolResult, |
| 127 | isPrivate bool, |
| 128 | labelFn func(isPrivate bool) ifc.SecurityLabel, |
| 129 | ) *mcp.CallToolResult { |
| 130 | if !shouldAttachIFCLabel(ctx, deps, r) { |
| 131 | return r |
| 132 | } |
| 133 | setIFCLabel(r, labelFn(isPrivate)) |
| 134 | return r |
| 135 | } |
| 136 | |
| 137 | // newRepoVisibilityIFCLabeler returns a closure that attaches a repo-visibility |
| 138 | // IFC label to a tool result, for handlers that have several return paths and |
no test coverage detected