@merittdev/horus 0.15.0 → 0.15.1

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.
Files changed (2) hide show
  1. package/dist/index.cjs +18 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -65880,7 +65880,7 @@ init_cjs_shims();
65880
65880
 
65881
65881
  // ../../packages/core/src/version.ts
65882
65882
  init_cjs_shims();
65883
- var HORUS_VERSION = true ? "0.15.0" : "dev";
65883
+ var HORUS_VERSION = true ? "0.15.1" : "dev";
65884
65884
  var PINNED_SOURCE_VERSION = "2.0.2";
65885
65885
 
65886
65886
  // ../../packages/core/src/evidence.ts
@@ -95200,6 +95200,17 @@ var TYPE_LIKE_NAME = new RegExp(`(?:${TYPE_SUFFIX.source})|(?:${INTERFACE_PREFIX
95200
95200
  function isTypeLikeName(name2) {
95201
95201
  return TYPE_LIKE_NAME.test(name2);
95202
95202
  }
95203
+ var CODEGEN_PATH_RE = /(^|\/)(?:__generated__|generated)\//i;
95204
+ var CODEGEN_FILE_RE = /(?:(?:^|\/)generated|[._-](?:generated|gen))\.[jt]sx?$/i;
95205
+ var GQL_GEN_FILE_RE = /\.(?:graphql|gql)\.[jt]sx?$/i;
95206
+ function isCodegenPath(filePath) {
95207
+ return CODEGEN_PATH_RE.test(filePath) || CODEGEN_FILE_RE.test(filePath) || GQL_GEN_FILE_RE.test(filePath);
95208
+ }
95209
+ var TYPE_DECL_KIND_RE = /^(?:type_alias|typealias|type|interface|enum)$/i;
95210
+ function isTypeDeclarationSymbol(s5) {
95211
+ const kind = s5.id.split(":", 1)[0] ?? "";
95212
+ return TYPE_DECL_KIND_RE.test(kind);
95213
+ }
95203
95214
  function executableBaseName(name2) {
95204
95215
  const stripped = name2.replace(TYPE_SUFFIX, "").replace(INTERFACE_PREFIX, "");
95205
95216
  return stripped !== name2 && stripped.length >= 4 ? stripped : null;
@@ -95331,6 +95342,8 @@ function scoreSeed(s5, index2, hintTokens, changedFiles, hintHasCode, qualifier,
95331
95342
  score += Math.max(0, 5 - index2) * (hintHasCode ? 0.8 : 0.1);
95332
95343
  if (s5.score !== void 0) score += s5.score * (hintHasCode ? 8 : 2);
95333
95344
  if (/\.[jt]sx?$/i.test(s5.name)) score -= 5;
95345
+ if (isCodegenPath(s5.filePath)) score -= 5;
95346
+ if (isTypeDeclarationSymbol(s5)) score -= 6;
95334
95347
  if (hintTokens !== void 0 && hintTokens.length > 0) {
95335
95348
  let hintBoost = 0;
95336
95349
  for (const tok of hintTokens) {
@@ -95350,6 +95363,9 @@ function isDeprioritizedSeedPath(filePath) {
95350
95363
  filePath
95351
95364
  );
95352
95365
  }
95366
+ function isDeprioritizedSeed(s5) {
95367
+ return isDeprioritizedSeedPath(s5.filePath) || isCodegenPath(s5.filePath) || isTypeDeclarationSymbol(s5);
95368
+ }
95353
95369
  function isAnchoredExactSeed(s5, qualifier, hintHasCode, preferNamed) {
95354
95370
  if (qualifier && qualifierBoost(s5, qualifier) >= 40) return true;
95355
95371
  if (preferNamed !== void 0 && s5.name.toLowerCase() === preferNamed.toLowerCase()) return true;
@@ -95362,7 +95378,7 @@ function rankSeeds(seeds, hintTokens, changedFiles, hintHasCode, qualifier, pref
95362
95378
  score: scoreSeed(symbol, i3, hintTokens, changedFiles, hintHasCode, qualifier, preferNamed),
95363
95379
  role: seedRole(symbol),
95364
95380
  i: i3,
95365
- deprio: isDeprioritizedSeedPath(symbol.filePath),
95381
+ deprio: isDeprioritizedSeed(symbol),
95366
95382
  // HOR-430: a deprioritized candidate the request anchors on exactly is exempt from the
95367
95383
  // hard demotion below — it keeps only the soft path penalty so a strong/exact match in an
95368
95384
  // example/test file can still surface.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merittdev/horus",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Local-first, source-aware production-incident investigation engine",
5
5
  "type": "module",
6
6
  "bin": {