MCPcopy Create free account
hub / github.com/Noumena-Network/code / getFileReadIgnorePatterns

Function getFileReadIgnorePatterns

src/utils/permissions/filesystem.ts:847–861  ·  view source on GitHub ↗
(
  toolPermissionContext: ToolPermissionContext,
)

Source from the content-addressed store, hash-verified

845 * @param toolPermissionContext
846 */
847export function getFileReadIgnorePatterns(
848 toolPermissionContext: ToolPermissionContext,
849): Map<string | null, string[]> {
850 const patternsByRoot = getPatternsByRoot(
851 toolPermissionContext,
852 'read',
853 'deny',
854 )
855 const result = new Map<string | null, string[]>()
856 for (const [patternRoot, patternMap] of patternsByRoot.entries()) {
857 result.set(patternRoot, Array.from(patternMap.keys()))
858 }
859
860 return result
861}
862
863function patternWithRoot(
864 pattern: string,

Callers 3

callFunction · 0.85
logContextMetricsFunction · 0.85
globFunction · 0.85

Calls 4

getPatternsByRootFunction · 0.85
entriesMethod · 0.80
setMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected