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

Function collectGap

src/tools/toolInventoryReport.ts:37–46  ·  view source on GitHub ↗
(
  entries: readonly ToolInventoryEntry[],
  kind: ToolInventoryGapKind,
  predicate: (entry: ToolInventoryEntry) => boolean,
)

Source from the content-addressed store, hash-verified

35}
36
37function collectGap(
38 entries: readonly ToolInventoryEntry[],
39 kind: ToolInventoryGapKind,
40 predicate: (entry: ToolInventoryEntry) => boolean,
41): ToolInventoryGap | null {
42 const tools = sortToolNames(
43 entries.filter(predicate).map(entry => entry.name),
44 )
45 return tools.length > 0 ? { kind, tools } : null
46}
47
48export function collectToolInventoryGaps(
49 entries: readonly ToolInventoryEntry[],

Callers 1

collectToolInventoryGapsFunction · 0.85

Calls 1

sortToolNamesFunction · 0.70

Tested by

no test coverage detected