@voidwire/lore 0.1.9 → 0.1.11

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/list.ts CHANGED
@@ -25,7 +25,9 @@ export type Domain =
25
25
  | "podcasts"
26
26
  | "interests"
27
27
  | "people"
28
- | "habits";
28
+ | "habits"
29
+ | "teachings"
30
+ | "sessions";
29
31
 
30
32
  export const DOMAINS: Domain[] = [
31
33
  "development",
@@ -43,6 +45,8 @@ export const DOMAINS: Domain[] = [
43
45
  "interests",
44
46
  "people",
45
47
  "habits",
48
+ "teachings",
49
+ "sessions",
46
50
  ];
47
51
 
48
52
  // Domains that query the 'personal' source with type filter
package/lib/semantic.ts CHANGED
@@ -181,6 +181,8 @@ export async function semanticSearch(
181
181
  const params: (Uint8Array | string | number)[] = [queryBlob];
182
182
 
183
183
  if (options.source) {
184
+ // Filter by e.source (partition column) for KNN pre-filtering
185
+ // This filters BEFORE KNN, not after — critical for domain-specific search
184
186
  sql = `
185
187
  SELECT
186
188
  s.source,
@@ -192,7 +194,7 @@ export async function semanticSearch(
192
194
  JOIN search s ON e.doc_id = s.rowid
193
195
  WHERE e.embedding MATCH ?
194
196
  AND k = ?
195
- AND s.source = ?
197
+ AND e.source = ?
196
198
  ORDER BY e.distance
197
199
  LIMIT ?
198
200
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidwire/lore",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Unified knowledge CLI - Search, list, and capture your indexed knowledge",
5
5
  "type": "module",
6
6
  "main": "./index.ts",