claudeNativePluginScan.ts ×9

Frontier kind: Code frontier

unlabeled · c_d517420e9c11

11 tests · 20930 LOC · 67 files · introduces 0 tests · 28 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges28 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2611 ranges20930 lines · 67 files · Browse complete extent
All tests (intent)
11 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 28 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/claude/customizations/scan/claudeNativePluginScan.ts 28 introduced LOC · 9 ranges

Open complete file

79
80 /** Splits an `enabledPlugins` id into its `plugin` and `marketplace` parts. */
81 > function splitPluginId(id: string): { readonly plugin: string; readonly marketplace: string } | undefined { claudeNativePluginScan.ts
82 > const at = id.lastIndexOf('@');
83 > if (at <= 0 || at === id.length - 1) {
84 return undefined;
85 }
86 > const plugin = id.slice(0, at); claudeNativePluginScan.ts
87 > const marketplace = id.slice(at + 1);
88 > // The segments are joined into filesystem paths below, so reject anything
89 > // that could escape the plugin roots (path separators or `..`). Plugin and
90 > // marketplace ids are plain identifiers; a settings file (incl. an
91 > // untrusted workspace `.claude/settings.local.json`) must not redirect the
92 > // scan outside `~/.claude/plugins/cache` / `.claude/skills`.
93 > const isUnsafeSegment = (s: string) => s.includes('/') || s.includes('\\') || s.includes('..');
94 > if (isUnsafeSegment(plugin) || isUnsafeSegment(marketplace)) {
95 return undefined;
96 }
97 > return { plugin, marketplace }; claudeNativePluginScan.ts
98 > }
99
100 /**
105 * formats {@link parsePlugin} can parse — rather than only the Claude one.
106 */
107 > async function hasManifest(dir: URI, fileService: IFileService): Promise<boolean> { claudeNativePluginScan.ts
108 > const format = await detectPluginFormat(dir, fileService);
109 > return fileService.exists(URI.joinPath(dir, format.manifestPath));
110 > }
111
112 /**
193 const seenRoots = new ResourceSet();
194 for (const id of ids) {
195 > const parts = splitPluginId(id); claudeNativePluginScan.ts
196 > if (!parts) {
197 logService.warn(`[claudeNativePluginScan] skipping malformed plugin id '${id}'`);
198 continue;
199 }
200 > const root = parts.marketplace === SKILLS_DIR_MARKETPLACE claudeNativePluginScan.ts
201 ? await resolveSkillsDirRoot(parts.plugin, workingDirectory, userHome, fileService)
202 : await resolveMarketplaceCacheRoot(parts.plugin, parts.marketplace, userHome, fileService);
205 continue;
206 }
207 > if (seenRoots.has(root)) { claudeNativePluginScan.ts
208 continue;
209 }
210 > seenRoots.add(root); claudeNativePluginScan.ts
211 > try {
212 > const parsed = await parsePlugin(root, fileService, workingDirectory, userHome, root);
213 > result.push({ id, root, parsed });
214 > } catch (err) {
215 logService.warn(`[claudeNativePluginScan] failed to parse plugin '${id}' at '${root.toString()}': ${err instanceof Error ? err.message : String(err)}`);
216 }
218 result.sort((a, b) => a.id.localeCompare(b.id));
219 return result;