feat(mcp): add resource group scopes with permission inheritance

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-07 02:18:28 +08:00
1 parent 2eaf7f9914
commit 691ecd084b
31 files changed
+2398 -1047

No files matched your search

@@ -337,6 +337,24 @@ export function buildConnectionGroupPathMap(layout: SidebarLayout): Map<string,
return paths;
}
/** Build root-to-leaf stable group-id paths for permission inheritance. */
export function buildConnectionGroupIdPathMap(layout: SidebarLayout): Map<string, string[]> {
const paths = new Map<string, string[]>();
const visit = (entries: SidebarOrderEntry[], path: string[]) => {
for (const entry of entries) {
if (entry.type === "connection") {
paths.set(entry.id, path);
continue;
}
visit(entryChildren(entry), [...path, entry.id]);
}
};
visit(layout.order, []);
return paths;
}
export interface ConnectionGroupDestinationRow {
id: string;
name: string;