@skill-map/cli 0.41.0 → 0.43.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/index.js CHANGED
@@ -101,11 +101,11 @@ import cl100k_base from "js-tiktoken/ranks/cl100k_base";
101
101
  // package.json
102
102
  var package_default = {
103
103
  name: "@skill-map/cli",
104
- version: "0.41.0",
104
+ version: "0.43.0",
105
105
  description: "skill-map reference implementation \u2014 kernel + CLI + adapters.",
106
106
  license: "MIT",
107
107
  type: "module",
108
- homepage: "https://skill-map.dev",
108
+ homepage: "https://skill-map.ai",
109
109
  repository: {
110
110
  type: "git",
111
111
  url: "git+https://github.com/crystian/skill-map.git",
@@ -454,10 +454,10 @@ function buildSchemaValidators() {
454
454
  hook: "extension-hook"
455
455
  };
456
456
  const pluginManifestValidator = ajv.compile({
457
- $ref: "https://skill-map.dev/spec/v0/plugins-registry.schema.json#/$defs/PluginManifest"
457
+ $ref: "https://skill-map.ai/spec/v0/plugins-registry.schema.json#/$defs/PluginManifest"
458
458
  });
459
459
  const contributionValidators = /* @__PURE__ */ new Map();
460
- const VIEW_SLOTS_ID = "https://skill-map.dev/spec/v0/view-slots.schema.json";
460
+ const VIEW_SLOTS_ID = "https://skill-map.ai/spec/v0/view-slots.schema.json";
461
461
  function getContributionValidator(slot) {
462
462
  if (!KNOWN_SLOT_NAMES.has(slot)) return null;
463
463
  const existing = contributionValidators.get(slot);
@@ -1050,21 +1050,8 @@ function loadConfigForScope(opts) {
1050
1050
  }
1051
1051
 
1052
1052
  // core/config/active-provider.ts
1053
- var DETECTION_RULES = [
1054
- { providerId: "claude", marker: ".claude" },
1055
- // `gemini` retired 2026-05-22: Google replaced the Gemini CLI with the
1056
- // Antigravity CLI (released 2026-05-19; Gemini CLI sunsets 2026-06-18).
1057
- // Antigravity adopted the open-standard `.agents/` instead of a
1058
- // vendor-specific directory, so detection of a Google CLI project
1059
- // falls through to the universal `agent-skills` lens (`.agents/`
1060
- // already classifies via that neutral provider). The lens can still
1061
- // be set manually via `sm config set activeProvider antigravity`.
1062
- { providerId: "openai", marker: ".codex" },
1063
- { providerId: "openai", marker: "AGENTS.md" },
1064
- { providerId: "cursor", marker: ".cursor" }
1065
- ];
1066
- function resolveActiveProvider(cwd) {
1067
- const detected = detectProvidersFromFilesystem(cwd);
1053
+ function resolveActiveProvider(cwd, providers = []) {
1054
+ const detected = detectProvidersFromFilesystem(cwd, providers);
1068
1055
  const fromConfig = readConfigValue("activeProvider", { cwd });
1069
1056
  if (typeof fromConfig === "string" && fromConfig.length > 0) {
1070
1057
  return { resolved: fromConfig, source: "config", detected };
@@ -1074,14 +1061,16 @@ function resolveActiveProvider(cwd) {
1074
1061
  }
1075
1062
  return { resolved: null, source: "none", detected };
1076
1063
  }
1077
- function detectProvidersFromFilesystem(cwd) {
1064
+ function detectProvidersFromFilesystem(cwd, providers) {
1078
1065
  const seen = /* @__PURE__ */ new Set();
1079
1066
  const out = [];
1080
- for (const rule of DETECTION_RULES) {
1081
- if (seen.has(rule.providerId)) continue;
1082
- if (!existsSync5(join6(cwd, rule.marker))) continue;
1083
- seen.add(rule.providerId);
1084
- out.push(rule.providerId);
1067
+ for (const provider of providers) {
1068
+ if (seen.has(provider.id)) continue;
1069
+ const markers = provider.detect?.markers;
1070
+ if (!markers || markers.length === 0) continue;
1071
+ if (!markers.some((marker) => existsSync5(join6(cwd, marker)))) continue;
1072
+ seen.add(provider.id);
1073
+ out.push(provider.id);
1085
1074
  }
1086
1075
  return out;
1087
1076
  }
@@ -3152,7 +3141,11 @@ async function runScanInternal(_kernel, options) {
3152
3141
  const scanStartedEvent = makeEvent("scan.started", { roots: options.roots });
3153
3142
  emitter.emit(scanStartedEvent);
3154
3143
  await hookDispatcher.dispatch("scan.started", scanStartedEvent);
3155
- const activeProviderId = resolveActiveProviderOption(options.activeProvider, options.roots);
3144
+ const activeProviderId = resolveActiveProviderOption(
3145
+ options.activeProvider,
3146
+ options.roots,
3147
+ exts.providers
3148
+ );
3156
3149
  const walked = await walkAndExtract({
3157
3150
  providers: exts.providers,
3158
3151
  extractors: exts.extractors,
@@ -3361,12 +3354,12 @@ function validateRoots(roots) {
3361
3354
  }
3362
3355
  }
3363
3356
  }
3364
- function resolveActiveProviderOption(optionValue, roots) {
3357
+ function resolveActiveProviderOption(optionValue, roots, providers) {
3365
3358
  if (optionValue !== void 0) return optionValue;
3366
3359
  for (const root of roots) {
3367
3360
  const absRoot = isAbsolute4(root) ? root : resolve11(root);
3368
3361
  if (!existsSync11(absRoot)) continue;
3369
- const detected = resolveActiveProvider(absRoot).resolved;
3362
+ const detected = resolveActiveProvider(absRoot, providers).resolved;
3370
3363
  if (detected !== null) return detected;
3371
3364
  }
3372
3365
  return null;