@skill-map/cli 0.41.0 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -442,6 +442,19 @@ var claudeProvider = {
442
442
  pluginId: CLAUDE_PLUGIN_ID,
443
443
  kind: "provider",
444
444
  description: "Classifies files under `.claude/{agents,commands,skills}` as Claude Code agents, commands, and skills.",
445
+ // Provider identity for the active-lens dropdown, the topbar lens chip,
446
+ // and the per-node provider chip. Anthropic brand terracotta; the dark
447
+ // variant lifts luminosity for dark mode. Verbatim from the previous
448
+ // static UI catalog (`ui/src/services/provider-ui.ts`).
449
+ presentation: {
450
+ label: "Claude",
451
+ color: "#cc785c",
452
+ colorDark: "#e89270"
453
+ },
454
+ // Auto-detect marker: a `.claude/` directory under the scope root marks
455
+ // a Claude Code project. Provider-owned (replaces the old central
456
+ // detection table in `src/core/config/active-provider.ts`).
457
+ detect: { markers: [".claude"] },
445
458
  // Vendor provider: Claude Code only reads its own `.claude/` territory
446
459
  // and ignores `.codex/` / Antigravity layouts at runtime. Gating the
447
460
  // classifier behind the active lens prevents the walker from inventing
@@ -863,6 +876,18 @@ var antigravityProvider = {
863
876
  pluginId: ANTIGRAVITY_PLUGIN_ID,
864
877
  kind: "provider",
865
878
  description: "Declares the Google Antigravity runtime and its reserved built-in names.",
879
+ // Provider identity for the active-lens dropdown, the topbar lens chip,
880
+ // and the per-node provider chip. Antigravity violet, distinct from the
881
+ // other vendor palettes.
882
+ presentation: {
883
+ label: "Antigravity",
884
+ color: "#7c3aed",
885
+ colorDark: "#a78bfa"
886
+ },
887
+ // No `detect` block: Antigravity has no vendor-specific workspace marker
888
+ // (it adopted the open-standard `.agents/`, owned by `agent-skills`), so
889
+ // it is never auto-suggested. The lens is set manually via
890
+ // `sm config set activeProvider antigravity`.
866
891
  // Vendor provider: marked gated for the day Antigravity grows its own
867
892
  // on-disk kind beyond the open standard. Today `kinds: {}` and
868
893
  // `classify` returns `null` for every path, so the flag is inert; the
@@ -1011,6 +1036,18 @@ var openaiProvider = {
1011
1036
  pluginId: OPENAI_PLUGIN_ID,
1012
1037
  kind: "provider",
1013
1038
  description: "Classifies files under `.codex/agents/*.toml` as OpenAI Codex CLI sub-agents.",
1039
+ // Provider identity for the active-lens dropdown, the topbar lens chip,
1040
+ // and the per-node provider chip. Codex green, distinct from the Claude
1041
+ // palette so the chip reads at a glance.
1042
+ presentation: {
1043
+ label: "OpenAI Codex",
1044
+ color: "#22c55e",
1045
+ colorDark: "#4ade80"
1046
+ },
1047
+ // Auto-detect markers: a `.codex/` directory or a root `AGENTS.md` marks
1048
+ // a Codex CLI project. Provider-owned (replaces the old central
1049
+ // detection table in `src/core/config/active-provider.ts`).
1050
+ detect: { markers: [".codex", "AGENTS.md"] },
1014
1051
  // Vendor provider: Codex CLI only reads its own `.codex/` territory.
1015
1052
  // Gating the classifier behind the active lens keeps the walker from
1016
1053
  // claiming Codex agents under a `claude` (or any other) lens, where
@@ -1068,6 +1105,20 @@ var agentSkillsProvider = {
1068
1105
  pluginId: AGENT_SKILLS_PLUGIN_ID,
1069
1106
  kind: "provider",
1070
1107
  description: "Classifies files under `.agents/skills/<name>/SKILL.md` as Agent Skills.",
1108
+ // Provider identity for the active-lens dropdown, the topbar lens chip,
1109
+ // and the per-node provider chip. Neutral slate (this is the
1110
+ // vendor-agnostic open-standard Provider, not a brand). Verbatim from
1111
+ // the previous static UI catalog (`ui/src/services/provider-ui.ts`).
1112
+ presentation: {
1113
+ label: "Open Skills",
1114
+ color: "#64748b",
1115
+ colorDark: "#94a3b8"
1116
+ },
1117
+ // Auto-detect marker: a `.agents/` directory marks an open-standard
1118
+ // project. This is also the marker a Google/Antigravity project carries
1119
+ // (Antigravity adopted the open standard), so such projects auto-detect
1120
+ // as this universal lens. Provider-owned.
1121
+ detect: { markers: [".agents"] },
1071
1122
  read: { extensions: [".md"], parser: "frontmatter-yaml" },
1072
1123
  kinds: {
1073
1124
  skill: {
@@ -1115,6 +1166,20 @@ var coreMarkdownProvider = {
1115
1166
  pluginId: CORE_PLUGIN_ID,
1116
1167
  kind: "provider",
1117
1168
  description: "Universal `.md` fallback. Claims any markdown file that no vendor-specific provider has classified.",
1169
+ // Provider identity. `hideChip: true` suppresses the per-card provider
1170
+ // chip: this fallback carries the majority of nodes in any project, so
1171
+ // badging every generic `.md` would be noise and dilute the chip's
1172
+ // purpose (signalling a NON-default platform). The Provider still shows
1173
+ // in the active-lens dropdown and the topbar lens chip with this label.
1174
+ presentation: {
1175
+ label: "Markdown",
1176
+ color: "#9ca3af",
1177
+ colorDark: "#6b7280",
1178
+ hideChip: true
1179
+ },
1180
+ // No `detect` block: the universal fallback is never auto-suggested as a
1181
+ // lens (selecting it would gate out every vendor Provider). Operators
1182
+ // pick it manually if they want an open-standard-only view.
1118
1183
  read: { extensions: [".md"], parser: "frontmatter-yaml" },
1119
1184
  // Per spec § A.6, defaultRefreshAction values MUST be qualified
1120
1185
  // action ids. The summarize-markdown action is not yet implemented
@@ -3855,7 +3920,7 @@ var UPDATE_CHECK_TEXTS = {
3855
3920
  // package.json
3856
3921
  var package_default = {
3857
3922
  name: "@skill-map/cli",
3858
- version: "0.41.0",
3923
+ version: "0.42.0",
3859
3924
  description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
3860
3925
  license: "MIT",
3861
3926
  type: "module",
@@ -4287,40 +4352,40 @@ var updateCheckHook = {
4287
4352
  };
4288
4353
 
4289
4354
  // plugins/built-ins.ts
4290
- var claudeProvider2 = { ...claudeProvider, pluginId: "claude", version: "0.41.0" };
4291
- var atDirectiveExtractor2 = { ...atDirectiveExtractor, pluginId: "claude", version: "0.41.0" };
4292
- var slashCommandExtractor2 = { ...slashCommandExtractor, pluginId: "claude", version: "0.41.0" };
4293
- var antigravityProvider2 = { ...antigravityProvider, pluginId: "antigravity", version: "0.41.0" };
4294
- var openaiProvider2 = { ...openaiProvider, pluginId: "openai", version: "0.41.0" };
4295
- var agentSkillsProvider2 = { ...agentSkillsProvider, pluginId: "agent-skills", version: "0.41.0" };
4296
- var coreMarkdownProvider2 = { ...coreMarkdownProvider, pluginId: "core", version: "0.41.0" };
4297
- var annotationsExtractor2 = { ...annotationsExtractor, pluginId: "core", version: "0.41.0" };
4298
- var externalUrlCounterExtractor2 = { ...externalUrlCounterExtractor, pluginId: "core", version: "0.41.0" };
4299
- var markdownLinkExtractor2 = { ...markdownLinkExtractor, pluginId: "core", version: "0.41.0" };
4300
- var mcpToolsExtractor2 = { ...mcpToolsExtractor, pluginId: "core", version: "0.41.0" };
4301
- var toolsCounterExtractor2 = { ...toolsCounterExtractor, pluginId: "core", version: "0.41.0" };
4302
- var annotationFieldUnknownAnalyzer2 = { ...annotationFieldUnknownAnalyzer, pluginId: "core", version: "0.41.0" };
4303
- var annotationOrphanAnalyzer2 = { ...annotationOrphanAnalyzer, pluginId: "core", version: "0.41.0" };
4304
- var annotationStaleAnalyzer2 = { ...annotationStaleAnalyzer, pluginId: "core", version: "0.41.0" };
4305
- var contributionOrphanAnalyzer2 = { ...contributionOrphanAnalyzer, pluginId: "core", version: "0.41.0" };
4306
- var issueCounterAnalyzer2 = { ...issueCounterAnalyzer, pluginId: "core", version: "0.41.0" };
4307
- var jobFileOrphanAnalyzer2 = { ...jobFileOrphanAnalyzer, pluginId: "core", version: "0.41.0" };
4308
- var linkConflictAnalyzer2 = { ...linkConflictAnalyzer, pluginId: "core", version: "0.41.0" };
4309
- var linkCounterAnalyzer2 = { ...linkCounterAnalyzer, pluginId: "core", version: "0.41.0" };
4310
- var linkSelfLoopAnalyzer2 = { ...linkSelfLoopAnalyzer, pluginId: "core", version: "0.41.0" };
4311
- var nameReservedAnalyzer2 = { ...nameReservedAnalyzer, pluginId: "core", version: "0.41.0" };
4312
- var nodeStabilityAnalyzer2 = { ...nodeStabilityAnalyzer, pluginId: "core", version: "0.41.0" };
4313
- var nodeSupersededAnalyzer2 = { ...nodeSupersededAnalyzer, pluginId: "core", version: "0.41.0" };
4314
- var referenceBrokenAnalyzer2 = { ...referenceBrokenAnalyzer, pluginId: "core", version: "0.41.0" };
4315
- var referenceRedundantAnalyzer2 = { ...referenceRedundantAnalyzer, pluginId: "core", version: "0.41.0" };
4316
- var schemaViolationAnalyzer2 = { ...schemaViolationAnalyzer, pluginId: "core", version: "0.41.0" };
4317
- var signalCollisionAnalyzer2 = { ...signalCollisionAnalyzer, pluginId: "core", version: "0.41.0" };
4318
- var triggerCollisionAnalyzer2 = { ...triggerCollisionAnalyzer, pluginId: "core", version: "0.41.0" };
4319
- var asciiFormatter2 = { ...asciiFormatter, pluginId: "core", version: "0.41.0" };
4320
- var jsonFormatter2 = { ...jsonFormatter, pluginId: "core", version: "0.41.0" };
4321
- var nodeBumpAction2 = { ...nodeBumpAction, pluginId: "core", version: "0.41.0" };
4322
- var nodeSupersedeAction2 = { ...nodeSupersedeAction, pluginId: "core", version: "0.41.0" };
4323
- var updateCheckHook2 = { ...updateCheckHook, pluginId: "core", version: "0.41.0" };
4355
+ var claudeProvider2 = { ...claudeProvider, pluginId: "claude", version: "0.42.0" };
4356
+ var atDirectiveExtractor2 = { ...atDirectiveExtractor, pluginId: "claude", version: "0.42.0" };
4357
+ var slashCommandExtractor2 = { ...slashCommandExtractor, pluginId: "claude", version: "0.42.0" };
4358
+ var antigravityProvider2 = { ...antigravityProvider, pluginId: "antigravity", version: "0.42.0" };
4359
+ var openaiProvider2 = { ...openaiProvider, pluginId: "openai", version: "0.42.0" };
4360
+ var agentSkillsProvider2 = { ...agentSkillsProvider, pluginId: "agent-skills", version: "0.42.0" };
4361
+ var coreMarkdownProvider2 = { ...coreMarkdownProvider, pluginId: "core", version: "0.42.0" };
4362
+ var annotationsExtractor2 = { ...annotationsExtractor, pluginId: "core", version: "0.42.0" };
4363
+ var externalUrlCounterExtractor2 = { ...externalUrlCounterExtractor, pluginId: "core", version: "0.42.0" };
4364
+ var markdownLinkExtractor2 = { ...markdownLinkExtractor, pluginId: "core", version: "0.42.0" };
4365
+ var mcpToolsExtractor2 = { ...mcpToolsExtractor, pluginId: "core", version: "0.42.0" };
4366
+ var toolsCounterExtractor2 = { ...toolsCounterExtractor, pluginId: "core", version: "0.42.0" };
4367
+ var annotationFieldUnknownAnalyzer2 = { ...annotationFieldUnknownAnalyzer, pluginId: "core", version: "0.42.0" };
4368
+ var annotationOrphanAnalyzer2 = { ...annotationOrphanAnalyzer, pluginId: "core", version: "0.42.0" };
4369
+ var annotationStaleAnalyzer2 = { ...annotationStaleAnalyzer, pluginId: "core", version: "0.42.0" };
4370
+ var contributionOrphanAnalyzer2 = { ...contributionOrphanAnalyzer, pluginId: "core", version: "0.42.0" };
4371
+ var issueCounterAnalyzer2 = { ...issueCounterAnalyzer, pluginId: "core", version: "0.42.0" };
4372
+ var jobFileOrphanAnalyzer2 = { ...jobFileOrphanAnalyzer, pluginId: "core", version: "0.42.0" };
4373
+ var linkConflictAnalyzer2 = { ...linkConflictAnalyzer, pluginId: "core", version: "0.42.0" };
4374
+ var linkCounterAnalyzer2 = { ...linkCounterAnalyzer, pluginId: "core", version: "0.42.0" };
4375
+ var linkSelfLoopAnalyzer2 = { ...linkSelfLoopAnalyzer, pluginId: "core", version: "0.42.0" };
4376
+ var nameReservedAnalyzer2 = { ...nameReservedAnalyzer, pluginId: "core", version: "0.42.0" };
4377
+ var nodeStabilityAnalyzer2 = { ...nodeStabilityAnalyzer, pluginId: "core", version: "0.42.0" };
4378
+ var nodeSupersededAnalyzer2 = { ...nodeSupersededAnalyzer, pluginId: "core", version: "0.42.0" };
4379
+ var referenceBrokenAnalyzer2 = { ...referenceBrokenAnalyzer, pluginId: "core", version: "0.42.0" };
4380
+ var referenceRedundantAnalyzer2 = { ...referenceRedundantAnalyzer, pluginId: "core", version: "0.42.0" };
4381
+ var schemaViolationAnalyzer2 = { ...schemaViolationAnalyzer, pluginId: "core", version: "0.42.0" };
4382
+ var signalCollisionAnalyzer2 = { ...signalCollisionAnalyzer, pluginId: "core", version: "0.42.0" };
4383
+ var triggerCollisionAnalyzer2 = { ...triggerCollisionAnalyzer, pluginId: "core", version: "0.42.0" };
4384
+ var asciiFormatter2 = { ...asciiFormatter, pluginId: "core", version: "0.42.0" };
4385
+ var jsonFormatter2 = { ...jsonFormatter, pluginId: "core", version: "0.42.0" };
4386
+ var nodeBumpAction2 = { ...nodeBumpAction, pluginId: "core", version: "0.42.0" };
4387
+ var nodeSupersedeAction2 = { ...nodeSupersedeAction, pluginId: "core", version: "0.42.0" };
4388
+ var updateCheckHook2 = { ...updateCheckHook, pluginId: "core", version: "0.42.0" };
4324
4389
  var builtInBundles = [
4325
4390
  {
4326
4391
  id: "claude",
@@ -10781,21 +10846,8 @@ import { Command as Command4, Option as Option4 } from "clipanion";
10781
10846
  // core/config/active-provider.ts
10782
10847
  import { existsSync as existsSync14 } from "fs";
10783
10848
  import { join as join10 } from "path";
10784
- var DETECTION_RULES = [
10785
- { providerId: "claude", marker: ".claude" },
10786
- // `gemini` retired 2026-05-22: Google replaced the Gemini CLI with the
10787
- // Antigravity CLI (released 2026-05-19; Gemini CLI sunsets 2026-06-18).
10788
- // Antigravity adopted the open-standard `.agents/` instead of a
10789
- // vendor-specific directory, so detection of a Google CLI project
10790
- // falls through to the universal `agent-skills` lens (`.agents/`
10791
- // already classifies via that neutral provider). The lens can still
10792
- // be set manually via `sm config set activeProvider antigravity`.
10793
- { providerId: "openai", marker: ".codex" },
10794
- { providerId: "openai", marker: "AGENTS.md" },
10795
- { providerId: "cursor", marker: ".cursor" }
10796
- ];
10797
- function resolveActiveProvider(cwd) {
10798
- const detected = detectProvidersFromFilesystem(cwd);
10849
+ function resolveActiveProvider(cwd, providers = []) {
10850
+ const detected = detectProvidersFromFilesystem(cwd, providers);
10799
10851
  const fromConfig = readConfigValue("activeProvider", { cwd });
10800
10852
  if (typeof fromConfig === "string" && fromConfig.length > 0) {
10801
10853
  return { resolved: fromConfig, source: "config", detected };
@@ -10805,14 +10857,16 @@ function resolveActiveProvider(cwd) {
10805
10857
  }
10806
10858
  return { resolved: null, source: "none", detected };
10807
10859
  }
10808
- function detectProvidersFromFilesystem(cwd) {
10860
+ function detectProvidersFromFilesystem(cwd, providers) {
10809
10861
  const seen = /* @__PURE__ */ new Set();
10810
10862
  const out = [];
10811
- for (const rule of DETECTION_RULES) {
10812
- if (seen.has(rule.providerId)) continue;
10813
- if (!existsSync14(join10(cwd, rule.marker))) continue;
10814
- seen.add(rule.providerId);
10815
- out.push(rule.providerId);
10863
+ for (const provider of providers) {
10864
+ if (seen.has(provider.id)) continue;
10865
+ const markers = provider.detect?.markers;
10866
+ if (!markers || markers.length === 0) continue;
10867
+ if (!markers.some((marker) => existsSync14(join10(cwd, marker)))) continue;
10868
+ seen.add(provider.id);
10869
+ out.push(provider.id);
10816
10870
  }
10817
10871
  return out;
10818
10872
  }
@@ -10967,7 +11021,7 @@ function suggestConfigKey(effective, typed, ansi) {
10967
11021
  });
10968
11022
  }
10969
11023
  var KNOWN_DEFAULTLESS_KEY_RESOLVERS = {
10970
- activeProvider: (cwd) => resolveActiveProvider(cwd).resolved
11024
+ activeProvider: (cwd) => resolveActiveProvider(cwd, builtIns().providers).resolved
10971
11025
  };
10972
11026
  function parseCliValue(raw) {
10973
11027
  try {
@@ -11364,7 +11418,7 @@ var ConfigSetCommand = class extends SmCommand {
11364
11418
  cwd: ctx.cwd
11365
11419
  });
11366
11420
  if (this.key === "activeProvider" && typeof value === "string") {
11367
- const detected = resolveActiveProvider(ctx.cwd).detected;
11421
+ const detected = resolveActiveProvider(ctx.cwd, builtIns().providers).detected;
11368
11422
  writeConfigValue("activeProviderMarkers", [...detected], {
11369
11423
  target,
11370
11424
  cwd: ctx.cwd
@@ -15984,7 +16038,11 @@ async function runScanInternal(_kernel, options) {
15984
16038
  const scanStartedEvent = makeEvent("scan.started", { roots: options.roots });
15985
16039
  emitter.emit(scanStartedEvent);
15986
16040
  await hookDispatcher.dispatch("scan.started", scanStartedEvent);
15987
- const activeProviderId = resolveActiveProviderOption(options.activeProvider, options.roots);
16041
+ const activeProviderId = resolveActiveProviderOption(
16042
+ options.activeProvider,
16043
+ options.roots,
16044
+ exts.providers
16045
+ );
15988
16046
  const walked = await walkAndExtract({
15989
16047
  providers: exts.providers,
15990
16048
  extractors: exts.extractors,
@@ -16193,12 +16251,12 @@ function validateRoots(roots) {
16193
16251
  }
16194
16252
  }
16195
16253
  }
16196
- function resolveActiveProviderOption(optionValue, roots) {
16254
+ function resolveActiveProviderOption(optionValue, roots, providers) {
16197
16255
  if (optionValue !== void 0) return optionValue;
16198
16256
  for (const root of roots) {
16199
16257
  const absRoot = isAbsolute7(root) ? root : resolve28(root);
16200
16258
  if (!existsSync21(absRoot)) continue;
16201
- const detected = resolveActiveProvider(absRoot).resolved;
16259
+ const detected = resolveActiveProvider(absRoot, providers).resolved;
16202
16260
  if (detected !== null) return detected;
16203
16261
  }
16204
16262
  return null;
@@ -16667,17 +16725,23 @@ function safeStat(path) {
16667
16725
  import { createInterface as createInterface2 } from "readline";
16668
16726
  import { isAbsolute as isAbsolute9, join as join16 } from "path";
16669
16727
  async function bootstrapActiveProvider(opts) {
16670
- const fromCwd = resolveActiveProvider(opts.cwd);
16728
+ const fromCwd = resolveActiveProvider(opts.cwd, opts.providers);
16671
16729
  if (fromCwd.source === "config") {
16672
16730
  const currentMarkers = aggregateDetected(
16673
16731
  opts.cwd,
16674
16732
  opts.effectiveRoots,
16675
- fromCwd.detected
16733
+ fromCwd.detected,
16734
+ opts.providers
16676
16735
  );
16677
16736
  handleDrift(opts, fromCwd.resolved, currentMarkers);
16678
16737
  return { kind: "ok", activeProvider: fromCwd.resolved, source: "config" };
16679
16738
  }
16680
- const detected = aggregateDetected(opts.cwd, opts.effectiveRoots, fromCwd.detected);
16739
+ const detected = aggregateDetected(
16740
+ opts.cwd,
16741
+ opts.effectiveRoots,
16742
+ fromCwd.detected,
16743
+ opts.providers
16744
+ );
16681
16745
  if (detected.length === 0) {
16682
16746
  const warnGlyph = opts.style?.warnGlyph ?? "\u26A0";
16683
16747
  const dim = opts.style?.dim ?? ((s) => s);
@@ -16709,7 +16773,7 @@ async function bootstrapActiveProvider(opts) {
16709
16773
  persistActiveProvider(opts.cwd, picked, detected, opts.printer);
16710
16774
  return { kind: "ok", activeProvider: picked, source: "autodetect" };
16711
16775
  }
16712
- function aggregateDetected(cwd, effectiveRoots, cwdDetected) {
16776
+ function aggregateDetected(cwd, effectiveRoots, cwdDetected, providers) {
16713
16777
  const out = [];
16714
16778
  const seen = /* @__PURE__ */ new Set();
16715
16779
  for (const id of cwdDetected) {
@@ -16719,7 +16783,7 @@ function aggregateDetected(cwd, effectiveRoots, cwdDetected) {
16719
16783
  }
16720
16784
  for (const root of effectiveRoots) {
16721
16785
  const absRoot = isAbsolute9(root) ? root : join16(cwd, root);
16722
- const r = resolveActiveProvider(absRoot);
16786
+ const r = resolveActiveProvider(absRoot, providers);
16723
16787
  for (const id of r.detected) {
16724
16788
  if (seen.has(id)) continue;
16725
16789
  seen.add(id);
@@ -16849,7 +16913,13 @@ async function runScanForCommand(opts) {
16849
16913
  }
16850
16914
  const loadPrior = makePriorLoader(opts.noBuiltIns, strict);
16851
16915
  const jobsDir = defaultProjectJobsDir(ctx);
16852
- const lens = await resolveActiveLens(opts, ctx, effectiveRoots, pluginRuntime);
16916
+ const lens = await resolveActiveLens(
16917
+ opts,
16918
+ ctx,
16919
+ effectiveRoots,
16920
+ pluginRuntime,
16921
+ detectionProviders(extensions)
16922
+ );
16853
16923
  if (lens.kind === "ambiguous-provider") return lens;
16854
16924
  const activeProvider = lens.activeProvider;
16855
16925
  const runScanWith = makeScanRunner(
@@ -16867,10 +16937,14 @@ async function runScanForCommand(opts) {
16867
16937
  const willPersist = !opts.noBuiltIns && !opts.dryRun;
16868
16938
  return willPersist ? runPersistPath(opts, dbPath, jobsDir, strict, loadPrior, runScanWith, extensions) : runEphemeralPath(opts, dbPath, strict, loadPrior, runScanWith);
16869
16939
  }
16870
- async function resolveActiveLens(opts, ctx, effectiveRoots, pluginRuntime) {
16940
+ function detectionProviders(extensions) {
16941
+ return extensions?.providers ?? [];
16942
+ }
16943
+ async function resolveActiveLens(opts, ctx, effectiveRoots, pluginRuntime, providers) {
16871
16944
  const bootstrap = await bootstrapActiveProvider({
16872
16945
  cwd: ctx.cwd,
16873
16946
  effectiveRoots,
16947
+ providers,
16874
16948
  yes: opts.yes ?? false,
16875
16949
  stdin: opts.stdin ?? process.stdin,
16876
16950
  stderr: opts.stderr,
@@ -22848,15 +22922,17 @@ function buildListEnvelope(opts) {
22848
22922
  filters: opts.filters,
22849
22923
  counts,
22850
22924
  kindRegistry: opts.kindRegistry,
22925
+ providerRegistry: opts.providerRegistry,
22851
22926
  contributionsRegistry: opts.contributionsRegistry
22852
22927
  };
22853
22928
  }
22854
- function buildValueEnvelope(kind, value, kindRegistry, contributionsRegistry) {
22929
+ function buildValueEnvelope(kind, value, kindRegistry, providerRegistry, contributionsRegistry) {
22855
22930
  return {
22856
22931
  schemaVersion: REST_ENVELOPE_SCHEMA_VERSION,
22857
22932
  kind,
22858
22933
  value,
22859
22934
  kindRegistry,
22935
+ providerRegistry,
22860
22936
  contributionsRegistry
22861
22937
  };
22862
22938
  }
@@ -22873,7 +22949,15 @@ function registerConfigRoute(app, deps) {
22873
22949
  for (const warn of loaded.warnings) {
22874
22950
  log.warn(sanitizeForTerminal(warn));
22875
22951
  }
22876
- return c.json(buildValueEnvelope("config", loaded.effective, deps.kindRegistry, deps.contributionsRegistry));
22952
+ return c.json(
22953
+ buildValueEnvelope(
22954
+ "config",
22955
+ loaded.effective,
22956
+ deps.kindRegistry,
22957
+ deps.providerRegistry,
22958
+ deps.contributionsRegistry
22959
+ )
22960
+ );
22877
22961
  });
22878
22962
  }
22879
22963
 
@@ -23071,6 +23155,7 @@ function registerIssuesRoute(app, deps) {
23071
23155
  total: result?.total ?? 0,
23072
23156
  page: { offset: inputs.filter.offset, limit: inputs.filter.limit },
23073
23157
  kindRegistry: deps.kindRegistry,
23158
+ providerRegistry: deps.providerRegistry,
23074
23159
  contributionsRegistry: deps.contributionsRegistry
23075
23160
  })
23076
23161
  );
@@ -23133,6 +23218,7 @@ function registerLinksRoute(app, deps) {
23133
23218
  },
23134
23219
  total: filtered.length,
23135
23220
  kindRegistry: deps.kindRegistry,
23221
+ providerRegistry: deps.providerRegistry,
23136
23222
  contributionsRegistry: deps.contributionsRegistry
23137
23223
  })
23138
23224
  );
@@ -23297,6 +23383,7 @@ function registerNodesRoutes(app, deps) {
23297
23383
  links: { incoming: bundle.linksIn, outgoing: bundle.linksOut },
23298
23384
  issues: bundle.issues,
23299
23385
  kindRegistry: deps.kindRegistry,
23386
+ providerRegistry: deps.providerRegistry,
23300
23387
  contributionsRegistry: deps.contributionsRegistry
23301
23388
  });
23302
23389
  });
@@ -23361,6 +23448,7 @@ function registerNodesRoutes(app, deps) {
23361
23448
  total,
23362
23449
  page: { offset, limit },
23363
23450
  kindRegistry: deps.kindRegistry,
23451
+ providerRegistry: deps.providerRegistry,
23364
23452
  contributionsRegistry: deps.contributionsRegistry
23365
23453
  })
23366
23454
  );
@@ -23515,6 +23603,7 @@ function registerPluginsRoute(app, deps) {
23515
23603
  filters: {},
23516
23604
  total: items.length,
23517
23605
  kindRegistry: deps.kindRegistry,
23606
+ providerRegistry: deps.providerRegistry,
23518
23607
  contributionsRegistry: deps.contributionsRegistry
23519
23608
  })
23520
23609
  );
@@ -23731,6 +23820,7 @@ function projectListResponse(c, deps, overrides) {
23731
23820
  filters: {},
23732
23821
  total: items.length,
23733
23822
  kindRegistry: deps.kindRegistry,
23823
+ providerRegistry: deps.providerRegistry,
23734
23824
  contributionsRegistry: deps.contributionsRegistry
23735
23825
  })
23736
23826
  );
@@ -24271,7 +24361,7 @@ function registerActiveProviderRoute(app, deps) {
24271
24361
  });
24272
24362
  }
24273
24363
  function buildEnvelope4(deps) {
24274
- const r = resolveActiveProvider(deps.runtimeContext.cwd);
24364
+ const r = resolveActiveProvider(deps.runtimeContext.cwd, deps.providers);
24275
24365
  return {
24276
24366
  activeProvider: r.resolved,
24277
24367
  detected: r.detected,
@@ -25019,6 +25109,8 @@ function createApp(deps) {
25019
25109
  options: deps.options,
25020
25110
  runtimeContext: deps.runtimeContext,
25021
25111
  kindRegistry: deps.kindRegistry,
25112
+ providerRegistry: deps.providerRegistry,
25113
+ providers: deps.providers,
25022
25114
  contributionsRegistry: deps.contributionsRegistry,
25023
25115
  pluginRuntime: deps.pluginRuntime,
25024
25116
  configService,
@@ -25314,6 +25406,25 @@ function buildKindRegistry(providers) {
25314
25406
  return registry;
25315
25407
  }
25316
25408
 
25409
+ // server/provider-registry.ts
25410
+ function buildProviderRegistry(providers) {
25411
+ const registry = {};
25412
+ for (const provider of providers) {
25413
+ const ui = provider.presentation;
25414
+ if (!ui) continue;
25415
+ const entry = {
25416
+ label: ui.label,
25417
+ color: ui.color
25418
+ };
25419
+ if (ui.colorDark !== void 0) entry.colorDark = ui.colorDark;
25420
+ if (ui.emoji !== void 0) entry.emoji = ui.emoji;
25421
+ if (ui.icon !== void 0) entry.icon = ui.icon;
25422
+ if (ui.hideChip !== void 0) entry.hideChip = ui.hideChip;
25423
+ registry[provider.id] = entry;
25424
+ }
25425
+ return registry;
25426
+ }
25427
+
25317
25428
  // server/contributions-registry.ts
25318
25429
  function buildContributionsRegistry(kernel) {
25319
25430
  const registry = {};
@@ -25525,7 +25636,7 @@ async function createServer(options, extra = {}) {
25525
25636
  const specVersion = await resolveSpecVersion2();
25526
25637
  const runtimeContext = extra.runtimeContext ?? defaultRuntimeContext();
25527
25638
  const broadcaster = new WsBroadcaster();
25528
- const { pluginRuntime, kindRegistry } = await assemblePluginRuntime(options, runtimeContext);
25639
+ const { pluginRuntime, kindRegistry, providerRegistry, providers } = await assemblePluginRuntime(options, runtimeContext);
25529
25640
  const { kernel, contributionsRegistry } = assembleKernel(pluginRuntime, options.noBuiltIns);
25530
25641
  const watcherHolder = { current: null };
25531
25642
  const app = createApp({
@@ -25534,6 +25645,8 @@ async function createServer(options, extra = {}) {
25534
25645
  broadcaster,
25535
25646
  runtimeContext,
25536
25647
  kindRegistry,
25648
+ providerRegistry,
25649
+ providers,
25537
25650
  contributionsRegistry,
25538
25651
  pluginRuntime,
25539
25652
  watcherHolder,
@@ -25592,11 +25705,10 @@ async function assemblePluginRuntime(options, runtimeContext) {
25592
25705
  log.warn(sanitizeForTerminal(warn));
25593
25706
  }
25594
25707
  const builtInProviders = options.noBuiltIns ? [] : collectBuiltInProviders();
25595
- const kindRegistry = buildKindRegistry([
25596
- ...builtInProviders,
25597
- ...pluginRuntime.extensions.providers
25598
- ]);
25599
- return { pluginRuntime, kindRegistry };
25708
+ const allProviders = [...builtInProviders, ...pluginRuntime.extensions.providers];
25709
+ const kindRegistry = buildKindRegistry(allProviders);
25710
+ const providerRegistry = buildProviderRegistry(allProviders);
25711
+ return { pluginRuntime, kindRegistry, providerRegistry, providers: allProviders };
25600
25712
  }
25601
25713
  function assembleKernel(pluginRuntime, noBuiltIns) {
25602
25714
  const kernel = createKernel();