claude-memory-layer 2.4.2 → 2.4.3

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.
@@ -181,7 +181,7 @@ function emptyLatencyAggregate() {
181
181
  return { count: 0, failedCount: 0, totalMs: 0, maxMs: 0 };
182
182
  }
183
183
  function runtimeVersion() {
184
- const value = "2.4.2"?.trim();
184
+ const value = "2.4.3"?.trim();
185
185
  return sanitizeRuntimeVersion(value || "development");
186
186
  }
187
187
  function sanitizeRuntimeVersion(value) {
@@ -193,7 +193,7 @@ function emptyLatencyAggregate() {
193
193
  return { count: 0, failedCount: 0, totalMs: 0, maxMs: 0 };
194
194
  }
195
195
  function runtimeVersion() {
196
- const value = "2.4.2"?.trim();
196
+ const value = "2.4.3"?.trim();
197
197
  return sanitizeRuntimeVersion(value || "development");
198
198
  }
199
199
  function sanitizeRuntimeVersion(value) {
@@ -35,7 +35,7 @@ function emptyLatencyAggregate() {
35
35
  return { count: 0, failedCount: 0, totalMs: 0, maxMs: 0 };
36
36
  }
37
37
  function runtimeVersion() {
38
- const value = "2.4.2"?.trim();
38
+ const value = "2.4.3"?.trim();
39
39
  return sanitizeRuntimeVersion(value || "development");
40
40
  }
41
41
  function sanitizeRuntimeVersion(value) {
@@ -624,6 +624,14 @@ var LOW_SIGNAL_QUERY_TERMS = /* @__PURE__ */ new Set([
624
624
  function isExplicitlyProhibitedLessonQuery(query) {
625
625
  return /\b(?:do[ -]+not|don't|never)\b|(?:^|[.!?;]\s*)(?:please\s+)?(?:skip|omit|ignore)\b|(?:사용|적용|실행|호출|설치|활성화|재시도)(?:\s*금지|하지\s*(?:않|말))|건너뛰|무시(?:해|하|할)|지\s*마(?:라|세요|십시오)?(?:[.!?\s]|$)/iu.test(query);
626
626
  }
627
+ function lessonScoringQuery(query) {
628
+ const korean = /^(?:도구\s*호출|파일\s*(?:수정|변경))(?:(?:\s*[/·,]\s*|\s*(?:및|와|과)\s*)(?:도구\s*호출|파일\s*(?:수정|변경)))*(?:은|는|을|를)?\s*(?:하지\s*마(?:세요|십시오|라)|금지)$/u;
629
+ const english = /^(?:please\s+)?(?:do[ -]+not|don't|never)\s+(?:(?:call|use|invoke)\s+tools|(?:edit|modify|change)\s+files)(?:\s+(?:or|and)\s+(?:(?:call|use|invoke)\s+tools|(?:edit|modify|change)\s+files))*$/iu;
630
+ return query.split(/(?<=[.!?;])(?=\s)|[\r\n]+/u).filter((clause) => {
631
+ const statement = clause.trim().replace(/[.!?;]$/, "").trim();
632
+ return !korean.test(statement) && !english.test(statement);
633
+ }).join(" ");
634
+ }
627
635
  var lessonSymbolTokens = (value) => value.match(/\b[A-Za-z][A-Za-z0-9_$]*(?:[./:-][A-Za-z0-9_$]+)*/g) ?? [];
628
636
  function hasExactLessonSubject(query, lesson) {
629
637
  const anchors = [...new Set(lessonSymbolTokens(query).filter((token) => /[a-z][A-Z]|[_$./:-]|\d/.test(token)))];
@@ -632,7 +640,8 @@ function hasExactLessonSubject(query, lesson) {
632
640
  return lessonSymbolTokens([lesson.name, lesson.trigger ?? ""].join(" ")).includes(anchors[0]);
633
641
  }
634
642
  function scoreLessonEvidence(query, lesson) {
635
- if (isExplicitlyProhibitedLessonQuery(query)) return null;
643
+ query = lessonScoringQuery(query);
644
+ if (!query.trim() || isExplicitlyProhibitedLessonQuery(query)) return null;
636
645
  const content = formatLessonContent(lesson);
637
646
  const queriedSymbols = lessonSymbolTokens(query).filter((token) => /[a-z][A-Z]/.test(token));
638
647
  const contentSymbols = new Set(lessonSymbolTokens(content));