MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getEnabledVia

Function getEnabledVia

source code/utils/telemetry/pluginTelemetry.ts:112–128  ·  view source on GitHub ↗
(
  plugin: LoadedPlugin,
  managedNames: Set<string> | null,
  seedDirs: string[],
)

Source from the content-addressed store, hash-verified

110 | 'deep-link'
111
112export function getEnabledVia(
113 plugin: LoadedPlugin,
114 managedNames: Set<string> | null,
115 seedDirs: string[],
116): EnabledVia {
117 if (plugin.isBuiltin) return 'default-enable'
118 if (managedNames?.has(plugin.name)) return 'org-policy'
119 // Trailing sep: /opt/plugins must not match /opt/plugins-extra
120 if (
121 seedDirs.some(dir =>
122 plugin.path.startsWith(dir.endsWith(sep) ? dir : dir + sep),
123 )
124 ) {
125 return 'seed-mount'
126 }
127 return 'user-install'
128}
129
130/**
131 * Common plugin telemetry fields keyed off name@marketplace. Returns the

Callers 1

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected