MCPcopy Index your code
hub / github.com/Noumena-Network/code / buildCommandSurfaceInventory

Function buildCommandSurfaceInventory

src/surfaceInventory.ts:191–213  ·  view source on GitHub ↗
(
  commands: readonly CommandLike[],
  internalOnlyCommands: readonly CommandLike[],
)

Source from the content-addressed store, hash-verified

189}
190
191export function buildCommandSurfaceInventory(
192 commands: readonly CommandLike[],
193 internalOnlyCommands: readonly CommandLike[],
194): CommandSurfaceEntry[] {
195 const internalOnlyNames = new Set(
196 internalOnlyCommands.flatMap(command => [
197 command.name,
198 ...(command.aliases ?? []),
199 ]),
200 )
201
202 return sortByName(
203 commands.map(command => ({
204 name: command.name,
205 aliases: [...(command.aliases ?? [])],
206 internalOnly: internalOnlyNames.has(command.name),
207 modelCallable: command.disableModelInvocation !== true,
208 userCallable: command.userInvocable !== false,
209 source: command.loadedFrom ?? 'commands_DEPRECATED',
210 kind: command.kind ?? null,
211 })),
212 )
213}
214
215export function collectSurfaceCapabilityCrosswalk(): CapabilityCrosswalkEntry[] {
216 return [...CAPABILITY_CROSSWALK]

Callers 2

Calls 2

sortByNameFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected