nexus-agents 4.11.1 → 4.12.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 (122) hide show
  1. package/dist/{child-mcp-config-TXGCJ52M.js → child-mcp-config-KNFWHR5B.js} +2 -2
  2. package/dist/{chunk-RSNG6RDI.js → chunk-3F7XUEXM.js} +2 -2
  3. package/dist/{chunk-US3LB5AL.js → chunk-3JJ3QSJ6.js} +2 -2
  4. package/dist/{chunk-46EQSU7N.js → chunk-7H6AIQFC.js} +2 -2
  5. package/dist/{chunk-LUL3Q5BT.js → chunk-ADKJSLYH.js} +2 -2
  6. package/dist/{chunk-MN34HTJP.js → chunk-AUFZGVPH.js} +2 -2
  7. package/dist/{chunk-EZYPUUIK.js → chunk-AVKA47WQ.js} +35 -35
  8. package/dist/{chunk-EKEK2YEU.js → chunk-AZ4C5Z32.js} +8 -8
  9. package/dist/{chunk-TSEVXDKU.js → chunk-BDJ5H6BY.js} +2 -2
  10. package/dist/{chunk-SFKJXZMV.js → chunk-D7NQCYON.js} +2 -2
  11. package/dist/{chunk-HSWOBNVW.js → chunk-GK4WP7OU.js} +5 -5
  12. package/dist/{chunk-D62GTDJR.js → chunk-JDX7FSEE.js} +3 -3
  13. package/dist/{chunk-JRRUY4BL.js → chunk-JEOQU5YQ.js} +2 -2
  14. package/dist/{chunk-XOTWDMK3.js → chunk-JYXU7XFQ.js} +5 -5
  15. package/dist/{chunk-DG6P3UC5.js → chunk-K6DDDK5U.js} +7 -7
  16. package/dist/{chunk-4A47PQKV.js → chunk-MWJLA3SK.js} +3 -3
  17. package/dist/{chunk-IW3G6WVW.js → chunk-OS6V6AUS.js} +2 -2
  18. package/dist/{chunk-BQWXGMZP.js → chunk-PIOQ22BI.js} +6 -6
  19. package/dist/{chunk-GRIOFYSO.js → chunk-Q6TVHHJS.js} +4 -4
  20. package/dist/{chunk-NBKJ7L2S.js → chunk-QWKXEUR3.js} +2 -2
  21. package/dist/{chunk-4576IZUB.js → chunk-R5HKFDMX.js} +4 -4
  22. package/dist/{chunk-7ZYXZWAM.js → chunk-RTLSASIG.js} +41 -19
  23. package/dist/chunk-RTLSASIG.js.map +1 -0
  24. package/dist/{chunk-2DOULPPA.js → chunk-SIDH6NYX.js} +4 -4
  25. package/dist/{chunk-YQAHWAVA.js → chunk-U3ULCRR5.js} +2 -2
  26. package/dist/{chunk-TWWWWWSG.js → chunk-UGXR3FGB.js} +2 -2
  27. package/dist/{chunk-HYE3V7VA.js → chunk-UUHVA3EP.js} +3 -3
  28. package/dist/{chunk-5AYHIDVQ.js → chunk-VAKHNSKR.js} +3 -3
  29. package/dist/{chunk-H7C3YEVA.js → chunk-VXSEXHLF.js} +2 -2
  30. package/dist/{chunk-W64J4UNG.js → chunk-WDICVPNC.js} +2 -2
  31. package/dist/{chunk-OIMKKI76.js → chunk-WFZGUWWQ.js} +8 -8
  32. package/dist/{chunk-YSBADPHN.js → chunk-XUHVOLBI.js} +3 -3
  33. package/dist/{chunk-ZLSHDEFS.js → chunk-YBR5G3FR.js} +62 -4
  34. package/dist/chunk-YBR5G3FR.js.map +1 -0
  35. package/dist/{chunk-A2FENIHB.js → chunk-Z3XRX5G6.js} +8 -8
  36. package/dist/{chunk-2A664K4J.js → chunk-Z46NIT6Y.js} +2 -2
  37. package/dist/{cli-circuit-breaker-462DQCFX.js → cli-circuit-breaker-O3SRTC2D.js} +3 -3
  38. package/dist/cli.js +41 -41
  39. package/dist/{composite-router-5PY2BSX6.js → composite-router-FGCCXTW7.js} +2 -2
  40. package/dist/{consensus-vote-4W5A6X7A.js → consensus-vote-6XPXNECR.js} +16 -16
  41. package/dist/{context-retriever-P4WJDXNR.js → context-retriever-5ZTWDBOB.js} +8 -8
  42. package/dist/{doctor-deep-B5KM6DDQ.js → doctor-deep-LMVPV2XK.js} +3 -3
  43. package/dist/{doctor-live-EYAUDVPS.js → doctor-live-I5EMLG2W.js} +9 -9
  44. package/dist/{expert-bridge-UP75M6M7.js → expert-bridge-XCOFEAAH.js} +4 -4
  45. package/dist/{factory-6W6FGGOC.js → factory-RO6WFMAM.js} +9 -9
  46. package/dist/{factory-QD4SDWNF.js → factory-UWBH5S4U.js} +5 -5
  47. package/dist/{improvement-review-GU6I62HS.js → improvement-review-4WOLRVMB.js} +5 -5
  48. package/dist/index.js +30 -30
  49. package/dist/{init-opencode-RYCLBR3L.js → init-opencode-HDVB7A2E.js} +6 -6
  50. package/dist/issue-triage-HJQK7C6D.js +17 -0
  51. package/dist/{pr-reviewer-helpers-D6JW3343.js → pr-reviewer-helpers-7ER77ZQO.js} +4 -4
  52. package/dist/{registry-command-634EYXX6.js → registry-command-DKJVYKGI.js} +2 -2
  53. package/dist/{repo-security-plan-AMRKVESS.js → repo-security-plan-KTLCJNJ4.js} +3 -3
  54. package/dist/{research-helpers-synthesize-HQVI46LI.js → research-helpers-synthesize-D4W5C27B.js} +4 -4
  55. package/dist/{routing-memory-CF6UFICB.js → routing-memory-ZV5EBOKF.js} +2 -2
  56. package/dist/{session-memory-ZEM6EBBA.js → session-memory-VOPXMUVU.js} +3 -3
  57. package/dist/{setup-command-FKQMJ747.js → setup-command-FO5E3RTT.js} +14 -14
  58. package/dist/{setup-config-K5DG3KPR.js → setup-config-JUJWPZW3.js} +3 -3
  59. package/dist/{setup-custom-api-WCQTHVAW.js → setup-custom-api-WCVFLOCN.js} +4 -4
  60. package/dist/{tool-memory-TZE5ND7A.js → tool-memory-FSBMC4MW.js} +5 -5
  61. package/dist/{unified-registry-KXI3EMFF.js → unified-registry-QV2LXC45.js} +10 -10
  62. package/dist/{weather-report-OBNLOQQX.js → weather-report-J6LIGRJ7.js} +2 -2
  63. package/package.json +1 -1
  64. package/dist/chunk-7ZYXZWAM.js.map +0 -1
  65. package/dist/chunk-ZLSHDEFS.js.map +0 -1
  66. package/dist/issue-triage-CMR6TQ6V.js +0 -17
  67. /package/dist/{child-mcp-config-TXGCJ52M.js.map → child-mcp-config-KNFWHR5B.js.map} +0 -0
  68. /package/dist/{chunk-RSNG6RDI.js.map → chunk-3F7XUEXM.js.map} +0 -0
  69. /package/dist/{chunk-US3LB5AL.js.map → chunk-3JJ3QSJ6.js.map} +0 -0
  70. /package/dist/{chunk-46EQSU7N.js.map → chunk-7H6AIQFC.js.map} +0 -0
  71. /package/dist/{chunk-LUL3Q5BT.js.map → chunk-ADKJSLYH.js.map} +0 -0
  72. /package/dist/{chunk-MN34HTJP.js.map → chunk-AUFZGVPH.js.map} +0 -0
  73. /package/dist/{chunk-EZYPUUIK.js.map → chunk-AVKA47WQ.js.map} +0 -0
  74. /package/dist/{chunk-EKEK2YEU.js.map → chunk-AZ4C5Z32.js.map} +0 -0
  75. /package/dist/{chunk-TSEVXDKU.js.map → chunk-BDJ5H6BY.js.map} +0 -0
  76. /package/dist/{chunk-SFKJXZMV.js.map → chunk-D7NQCYON.js.map} +0 -0
  77. /package/dist/{chunk-HSWOBNVW.js.map → chunk-GK4WP7OU.js.map} +0 -0
  78. /package/dist/{chunk-D62GTDJR.js.map → chunk-JDX7FSEE.js.map} +0 -0
  79. /package/dist/{chunk-JRRUY4BL.js.map → chunk-JEOQU5YQ.js.map} +0 -0
  80. /package/dist/{chunk-XOTWDMK3.js.map → chunk-JYXU7XFQ.js.map} +0 -0
  81. /package/dist/{chunk-DG6P3UC5.js.map → chunk-K6DDDK5U.js.map} +0 -0
  82. /package/dist/{chunk-4A47PQKV.js.map → chunk-MWJLA3SK.js.map} +0 -0
  83. /package/dist/{chunk-IW3G6WVW.js.map → chunk-OS6V6AUS.js.map} +0 -0
  84. /package/dist/{chunk-BQWXGMZP.js.map → chunk-PIOQ22BI.js.map} +0 -0
  85. /package/dist/{chunk-GRIOFYSO.js.map → chunk-Q6TVHHJS.js.map} +0 -0
  86. /package/dist/{chunk-NBKJ7L2S.js.map → chunk-QWKXEUR3.js.map} +0 -0
  87. /package/dist/{chunk-4576IZUB.js.map → chunk-R5HKFDMX.js.map} +0 -0
  88. /package/dist/{chunk-2DOULPPA.js.map → chunk-SIDH6NYX.js.map} +0 -0
  89. /package/dist/{chunk-YQAHWAVA.js.map → chunk-U3ULCRR5.js.map} +0 -0
  90. /package/dist/{chunk-TWWWWWSG.js.map → chunk-UGXR3FGB.js.map} +0 -0
  91. /package/dist/{chunk-HYE3V7VA.js.map → chunk-UUHVA3EP.js.map} +0 -0
  92. /package/dist/{chunk-5AYHIDVQ.js.map → chunk-VAKHNSKR.js.map} +0 -0
  93. /package/dist/{chunk-H7C3YEVA.js.map → chunk-VXSEXHLF.js.map} +0 -0
  94. /package/dist/{chunk-W64J4UNG.js.map → chunk-WDICVPNC.js.map} +0 -0
  95. /package/dist/{chunk-OIMKKI76.js.map → chunk-WFZGUWWQ.js.map} +0 -0
  96. /package/dist/{chunk-YSBADPHN.js.map → chunk-XUHVOLBI.js.map} +0 -0
  97. /package/dist/{chunk-A2FENIHB.js.map → chunk-Z3XRX5G6.js.map} +0 -0
  98. /package/dist/{chunk-2A664K4J.js.map → chunk-Z46NIT6Y.js.map} +0 -0
  99. /package/dist/{cli-circuit-breaker-462DQCFX.js.map → cli-circuit-breaker-O3SRTC2D.js.map} +0 -0
  100. /package/dist/{composite-router-5PY2BSX6.js.map → composite-router-FGCCXTW7.js.map} +0 -0
  101. /package/dist/{consensus-vote-4W5A6X7A.js.map → consensus-vote-6XPXNECR.js.map} +0 -0
  102. /package/dist/{context-retriever-P4WJDXNR.js.map → context-retriever-5ZTWDBOB.js.map} +0 -0
  103. /package/dist/{doctor-deep-B5KM6DDQ.js.map → doctor-deep-LMVPV2XK.js.map} +0 -0
  104. /package/dist/{doctor-live-EYAUDVPS.js.map → doctor-live-I5EMLG2W.js.map} +0 -0
  105. /package/dist/{expert-bridge-UP75M6M7.js.map → expert-bridge-XCOFEAAH.js.map} +0 -0
  106. /package/dist/{factory-6W6FGGOC.js.map → factory-RO6WFMAM.js.map} +0 -0
  107. /package/dist/{factory-QD4SDWNF.js.map → factory-UWBH5S4U.js.map} +0 -0
  108. /package/dist/{improvement-review-GU6I62HS.js.map → improvement-review-4WOLRVMB.js.map} +0 -0
  109. /package/dist/{init-opencode-RYCLBR3L.js.map → init-opencode-HDVB7A2E.js.map} +0 -0
  110. /package/dist/{issue-triage-CMR6TQ6V.js.map → issue-triage-HJQK7C6D.js.map} +0 -0
  111. /package/dist/{pr-reviewer-helpers-D6JW3343.js.map → pr-reviewer-helpers-7ER77ZQO.js.map} +0 -0
  112. /package/dist/{registry-command-634EYXX6.js.map → registry-command-DKJVYKGI.js.map} +0 -0
  113. /package/dist/{repo-security-plan-AMRKVESS.js.map → repo-security-plan-KTLCJNJ4.js.map} +0 -0
  114. /package/dist/{research-helpers-synthesize-HQVI46LI.js.map → research-helpers-synthesize-D4W5C27B.js.map} +0 -0
  115. /package/dist/{routing-memory-CF6UFICB.js.map → routing-memory-ZV5EBOKF.js.map} +0 -0
  116. /package/dist/{session-memory-ZEM6EBBA.js.map → session-memory-VOPXMUVU.js.map} +0 -0
  117. /package/dist/{setup-command-FKQMJ747.js.map → setup-command-FO5E3RTT.js.map} +0 -0
  118. /package/dist/{setup-config-K5DG3KPR.js.map → setup-config-JUJWPZW3.js.map} +0 -0
  119. /package/dist/{setup-custom-api-WCQTHVAW.js.map → setup-custom-api-WCVFLOCN.js.map} +0 -0
  120. /package/dist/{tool-memory-TZE5ND7A.js.map → tool-memory-FSBMC4MW.js.map} +0 -0
  121. /package/dist/{unified-registry-KXI3EMFF.js.map → unified-registry-QV2LXC45.js.map} +0 -0
  122. /package/dist/{weather-report-OBNLOQQX.js.map → weather-report-J6LIGRJ7.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-YQAHWAVA.js";
4
+ } from "./chunk-U3ULCRR5.js";
5
5
  import {
6
6
  ROLE_DEFAULT_TRUST,
7
7
  ReputationCache,
@@ -11,20 +11,20 @@ import {
11
11
  gateWithReputation,
12
12
  resolveReputationGatingMode,
13
13
  sanitizeInput
14
- } from "./chunk-US3LB5AL.js";
14
+ } from "./chunk-3JJ3QSJ6.js";
15
15
  import {
16
16
  emitPolicyEvent
17
- } from "./chunk-46EQSU7N.js";
17
+ } from "./chunk-7H6AIQFC.js";
18
18
  import {
19
19
  hasToken
20
- } from "./chunk-RSNG6RDI.js";
20
+ } from "./chunk-3F7XUEXM.js";
21
21
  import {
22
22
  CLI_SUBPROCESS_TIMEOUTS,
23
23
  createLogger,
24
24
  err,
25
25
  getTimeProvider,
26
26
  ok
27
- } from "./chunk-D62GTDJR.js";
27
+ } from "./chunk-JDX7FSEE.js";
28
28
 
29
29
  // src/security/trust-classifier.ts
30
30
  function mapAuthorAssociation(association) {
@@ -1247,4 +1247,4 @@ export {
1247
1247
  IssueTriage,
1248
1248
  createIssueTriage
1249
1249
  };
1250
- //# sourceMappingURL=chunk-BQWXGMZP.js.map
1250
+ //# sourceMappingURL=chunk-PIOQ22BI.js.map
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-6T3EPABN.js";
6
6
  import {
7
7
  SessionMemory
8
- } from "./chunk-W64J4UNG.js";
8
+ } from "./chunk-WDICVPNC.js";
9
9
  import {
10
10
  StatsOnlyAdapter,
11
11
  ensureSharedMemoryRegistry
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-KSQSWEFH.js";
16
16
  import {
17
17
  generateId
18
- } from "./chunk-LUL3Q5BT.js";
18
+ } from "./chunk-ADKJSLYH.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  NexusError,
@@ -28,7 +28,7 @@ import {
28
28
  getTimeProvider,
29
29
  ok,
30
30
  setSharedMobiMemDbPathResolver
31
- } from "./chunk-D62GTDJR.js";
31
+ } from "./chunk-JDX7FSEE.js";
32
32
  import {
33
33
  nexusDataPath
34
34
  } from "./chunk-OQLFRJCW.js";
@@ -5550,4 +5550,4 @@ export {
5550
5550
  reinitializeMemoryBackends,
5551
5551
  ToolMemoryManager
5552
5552
  };
5553
- //# sourceMappingURL=chunk-GRIOFYSO.js.map
5553
+ //# sourceMappingURL=chunk-Q6TVHHJS.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getErrorMessage,
9
9
  ok,
10
10
  parseBoolEnv
11
- } from "./chunk-D62GTDJR.js";
11
+ } from "./chunk-JDX7FSEE.js";
12
12
 
13
13
  // src/cli/research-helpers-io.ts
14
14
  import * as fs2 from "fs/promises";
@@ -146,4 +146,4 @@ export {
146
146
  loadPapersRegistry,
147
147
  savePapersRegistry
148
148
  };
149
- //# sourceMappingURL=chunk-NBKJ7L2S.js.map
149
+ //# sourceMappingURL=chunk-QWKXEUR3.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-YQAHWAVA.js";
4
+ } from "./chunk-U3ULCRR5.js";
5
5
  import {
6
6
  resolveToken
7
- } from "./chunk-RSNG6RDI.js";
7
+ } from "./chunk-3F7XUEXM.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
- } from "./chunk-D62GTDJR.js";
11
+ } from "./chunk-JDX7FSEE.js";
12
12
 
13
13
  // src/scm/factory.ts
14
14
  async function createScmProvider(config) {
@@ -41,4 +41,4 @@ export {
41
41
  createScmProvider,
42
42
  createGitHubProvider
43
43
  };
44
- //# sourceMappingURL=chunk-4576IZUB.js.map
44
+ //# sourceMappingURL=chunk-R5HKFDMX.js.map
@@ -4,16 +4,16 @@ import {
4
4
  loadPapersRegistry,
5
5
  loadTechniquesRegistry,
6
6
  savePapersRegistry
7
- } from "./chunk-NBKJ7L2S.js";
7
+ } from "./chunk-QWKXEUR3.js";
8
8
  import {
9
9
  resolveInsideRoot
10
10
  } from "./chunk-NUBSJGQZ.js";
11
11
  import {
12
12
  resolveToken
13
- } from "./chunk-RSNG6RDI.js";
13
+ } from "./chunk-3F7XUEXM.js";
14
14
  import {
15
15
  getToolMemory
16
- } from "./chunk-GRIOFYSO.js";
16
+ } from "./chunk-Q6TVHHJS.js";
17
17
  import {
18
18
  capitalizeWords,
19
19
  tokenizeFiltered,
@@ -39,7 +39,7 @@ import {
39
39
  getTimeProvider,
40
40
  ok,
41
41
  registerPersistentDistillerFactory
42
- } from "./chunk-D62GTDJR.js";
42
+ } from "./chunk-JDX7FSEE.js";
43
43
  import {
44
44
  ensureLearningDir,
45
45
  getRulesFile
@@ -853,7 +853,15 @@ var GitHubRepoSchema = z2.object({
853
853
  full_name: z2.string().optional(),
854
854
  html_url: z2.string().optional(),
855
855
  description: z2.string().nullable().optional(),
856
- stargazers_count: z2.number().optional()
856
+ stargazers_count: z2.number().optional(),
857
+ /**
858
+ * Last push, used as the recency signal for a repository (#4841).
859
+ *
860
+ * `created_at` would answer "how old is this project", which is the wrong
861
+ * question — an actively maintained 2019 repo is not stale. For a paper the
862
+ * publication date is the age; for a repo it is the last activity.
863
+ */
864
+ pushed_at: z2.string().nullable().optional()
857
865
  });
858
866
  var GitHubSearchResponseSchema = z2.object({
859
867
  items: z2.array(GitHubRepoSchema).optional()
@@ -900,7 +908,8 @@ function parseGitHubRepos(data) {
900
908
  url: repo.html_url ?? "",
901
909
  description: repo.description ?? "",
902
910
  relevance: (repo.stargazers_count ?? 0) > 1e3 ? "high" : (repo.stargazers_count ?? 0) > 100 ? "medium" : "low",
903
- discoveredAt: getToday()
911
+ discoveredAt: getToday(),
912
+ ...repo.pushed_at === null || repo.pushed_at === void 0 ? {} : { publishedAt: repo.pushed_at }
904
913
  }));
905
914
  }
906
915
  async function discoverGitHubRepos(topic, maxResults = 10) {
@@ -1004,7 +1013,10 @@ function parseArxivEntries(xml, source, topic = "") {
1004
1013
  url: arxivId !== "" ? `https://arxiv.org/abs/${arxivId}` : id,
1005
1014
  description: truncate(extractTag(entry, "summary")),
1006
1015
  relevance: topic !== "" ? scoreRelevance(title, topic) : "medium",
1007
- discoveredAt: getToday()
1016
+ discoveredAt: getToday(),
1017
+ // arXiv returns <published> on every entry; extractTag already existed
1018
+ // and was simply never called for it (#4841).
1019
+ ...extractTag(entry, "published") === "" ? {} : { publishedAt: extractTag(entry, "published") }
1008
1020
  });
1009
1021
  }
1010
1022
  return items;
@@ -1141,7 +1153,10 @@ function mapSemanticScholarPaper(paper) {
1141
1153
  url: paperUrl,
1142
1154
  description: truncate2(paper.abstract ?? ""),
1143
1155
  relevance: citationRelevance(paper.citationCount ?? 0),
1144
- discoveredAt: getToday2()
1156
+ discoveredAt: getToday2(),
1157
+ // Year only — the API gives no finer granularity. Jan 1 of that year is
1158
+ // the conservative reading: it never scores a paper fresher than it is.
1159
+ ...paper.year === void 0 ? {} : { publishedAt: `${String(paper.year)}-01-01` }
1145
1160
  };
1146
1161
  }
1147
1162
  async function discoverSemanticScholar(topic, maxResults = 10) {
@@ -1266,7 +1281,9 @@ function mapOpenAlexWork(work) {
1266
1281
  url,
1267
1282
  description: truncate2(reconstructAbstract(work.abstract_inverted_index)),
1268
1283
  relevance: citationRelevance(work.cited_by_count ?? 0),
1269
- discoveredAt: getToday2()
1284
+ discoveredAt: getToday2(),
1285
+ // Already parsed by the schema and previously discarded here (#4841).
1286
+ ...work.publication_date === null || work.publication_date === void 0 ? {} : { publishedAt: work.publication_date }
1270
1287
  };
1271
1288
  }
1272
1289
  function openAlexParseError(message) {
@@ -1327,12 +1344,16 @@ function relevanceLabelToScore(relevance) {
1327
1344
  return 0.5;
1328
1345
  }
1329
1346
  }
1330
- function scoreRecency(discoveredAt) {
1331
- const discoveredDate = new Date(discoveredAt);
1332
- if (isNaN(discoveredDate.getTime())) return 0.5;
1333
- const now = /* @__PURE__ */ new Date();
1334
- const daysSince = (now.getTime() - discoveredDate.getTime()) / (1e3 * 60 * 60 * 24);
1335
- return Math.max(0, 1 - daysSince / 730);
1347
+ var NEUTRAL_RECENCY = 0.5;
1348
+ var RECENCY_DECAY_DAYS = 730;
1349
+ function scoreRecency(publishedAt) {
1350
+ if (publishedAt === void 0 || publishedAt === "") {
1351
+ return { value: NEUTRAL_RECENCY, measured: false };
1352
+ }
1353
+ const published = new Date(publishedAt);
1354
+ if (isNaN(published.getTime())) return { value: NEUTRAL_RECENCY, measured: false };
1355
+ const daysSince = (Date.now() - published.getTime()) / (1e3 * 60 * 60 * 24);
1356
+ return { value: Math.max(0, 1 - daysSince / RECENCY_DECAY_DAYS), measured: true };
1336
1357
  }
1337
1358
  function scoreReproducibility(source) {
1338
1359
  switch (source) {
@@ -1347,13 +1368,14 @@ function scoreReproducibility(source) {
1347
1368
  function scoreDiscoveredItem(item, topic) {
1348
1369
  const relevance = topic !== "" ? scoreRelevance2(item.title, topic) : relevanceLabelToScore(item.relevance);
1349
1370
  const impact = relevanceLabelToScore(item.relevance);
1350
- const recency = scoreRecency(item.discoveredAt);
1371
+ const recency = scoreRecency(item.publishedAt);
1351
1372
  const reproducibility = scoreReproducibility(item.source);
1352
- const composite = WEIGHTS.relevance * relevance + WEIGHTS.impact * impact + WEIGHTS.recency * recency + WEIGHTS.reproducibility * reproducibility;
1373
+ const composite = WEIGHTS.relevance * relevance + WEIGHTS.impact * impact + WEIGHTS.recency * recency.value + WEIGHTS.reproducibility * reproducibility;
1353
1374
  return {
1354
1375
  relevance: Math.round(relevance * 100) / 100,
1355
1376
  impact: Math.round(impact * 100) / 100,
1356
- recency: Math.round(recency * 100) / 100,
1377
+ recency: Math.round(recency.value * 100) / 100,
1378
+ recencyMeasured: recency.measured,
1357
1379
  reproducibility: Math.round(reproducibility * 100) / 100,
1358
1380
  composite: Math.round(composite * 100) / 100
1359
1381
  };
@@ -4107,4 +4129,4 @@ export {
4107
4129
  DEFAULT_CONTEXT_BUDGET_TOKENS,
4108
4130
  getContextPromptPrefix
4109
4131
  };
4110
- //# sourceMappingURL=chunk-7ZYXZWAM.js.map
4132
+ //# sourceMappingURL=chunk-RTLSASIG.js.map