softwareobservatory 0.2.0 → 0.2.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.
package/lib/core.mjs CHANGED
@@ -110,7 +110,7 @@ export function suggestSensors(question, { limit = 5 } = {}) {
110
110
  for (const term of terms) {
111
111
  if (title.includes(term)) score += 6;
112
112
  if (familyText.includes(term)) score += 2;
113
- if (sensor.body_text.includes(term)) score += 1;
113
+ if (sensor.body_text.toLowerCase().includes(term)) score += 1;
114
114
  }
115
115
  if (score > 0) scored.push({ sensor, score });
116
116
  }
@@ -119,7 +119,7 @@ export function suggestSensors(question, { limit = 5 } = {}) {
119
119
  const seenFamilies = new Set();
120
120
  return scored.slice(0, limit).map(({ sensor, score }) => {
121
121
  const matched = terms.filter(
122
- (t) => sensor.title.toLowerCase().includes(t) || sensor.body_text.includes(t)
122
+ (t) => sensor.title.toLowerCase().includes(t) || sensor.body_text.toLowerCase().includes(t)
123
123
  );
124
124
  const firstOfFamily = !seenFamilies.has(sensor.family);
125
125
  seenFamilies.add(sensor.family);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softwareobservatory",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Query the Software Observatory catalog of epistemic sensors for software correctness. Built for humans and agents: every command emits JSON with --json.",
5
5
  "keywords": [
6
6
  "observability",
@@ -17,7 +17,7 @@
17
17
  "url": "git+https://github.com/justinabrahms/software-observatory.git",
18
18
  "directory": "cli"
19
19
  },
20
- "license": "CC-BY-NC-SA-4.0",
20
+ "license": "MIT",
21
21
  "type": "module",
22
22
  "scripts": {
23
23
  "test": "node test/smoke.mjs"
@@ -33,7 +33,9 @@
33
33
  "bin/",
34
34
  "lib/",
35
35
  "data/",
36
- "README.md"
36
+ "README.md",
37
+ "LICENSE-CODE",
38
+ "LICENSE-CONTENT"
37
39
  ],
38
40
  "engines": {
39
41
  "node": ">=18"