@voidwire/lore 1.1.2 → 1.3.0

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.
@@ -136,7 +136,7 @@ export async function indexBlogs(ctx: IndexerContext): Promise<void> {
136
136
 
137
137
  ctx.insert({
138
138
  source: "blogs",
139
- title: `[blog] ${title}`,
139
+ title,
140
140
  content,
141
141
  topic,
142
142
  timestamp,
@@ -68,7 +68,7 @@ export async function indexCaptures(ctx: IndexerContext): Promise<void> {
68
68
  }
69
69
  if (techTags.length > 0) content += `\n${techTags.join("\n")}`;
70
70
 
71
- title = `[completion] ${topic}: ${name}`;
71
+ title = `${topic}: ${name}`;
72
72
  type = "completion";
73
73
 
74
74
  if (event.data?.tags) metadata.tags = event.data.tags;
@@ -79,7 +79,7 @@ export async function indexCaptures(ctx: IndexerContext): Promise<void> {
79
79
  const tags = event.data?.tags || [];
80
80
  const tagsStr = tags.join(", ");
81
81
 
82
- title = tagsStr ? `[note] ${tagsStr}` : "[note] untagged";
82
+ title = tagsStr ? tagsStr : "untagged";
83
83
  type = "note";
84
84
 
85
85
  if (tags.length > 0) metadata.tags = tags;
@@ -88,7 +88,7 @@ export async function indexCaptures(ctx: IndexerContext): Promise<void> {
88
88
  content = event.data?.content || "";
89
89
  const subtype = event.data?.subtype || "insight";
90
90
 
91
- title = `[${subtype}] ${topic}`;
91
+ title = topic;
92
92
  type = subtype;
93
93
  }
94
94
 
@@ -68,7 +68,7 @@ export async function indexCommits(ctx: IndexerContext): Promise<void> {
68
68
 
69
69
  ctx.insert({
70
70
  source: "commits",
71
- title: `[commit] ${subject}`,
71
+ title: subject,
72
72
  content,
73
73
  topic: project,
74
74
  timestamp,
@@ -72,7 +72,7 @@ export async function indexExplorations(ctx: IndexerContext): Promise<void> {
72
72
 
73
73
  ctx.insert({
74
74
  source: "explorations",
75
- title: `[exploration] ${title}`,
75
+ title,
76
76
  content,
77
77
  topic: project,
78
78
  timestamp,
@@ -125,10 +125,7 @@ function parseFluxFile(
125
125
  const description = rest.trim();
126
126
  if (!description) continue;
127
127
 
128
- const title =
129
- topic !== "general"
130
- ? `[${topic}] [${type}] ${description.slice(0, 80)}`
131
- : `[${type}] ${description.slice(0, 80)}`;
128
+ const title = description.slice(0, 80);
132
129
 
133
130
  ctx.insert({
134
131
  source: "flux",
@@ -44,7 +44,7 @@ export async function indexInsights(ctx: IndexerContext): Promise<void> {
44
44
 
45
45
  ctx.insert({
46
46
  source: "insights",
47
- title: `[summary] ${topic}`,
47
+ title: topic,
48
48
  content,
49
49
  topic,
50
50
  type: "summary",
@@ -43,7 +43,7 @@ export async function indexLearnings(ctx: IndexerContext): Promise<void> {
43
43
 
44
44
  ctx.insert({
45
45
  source: "learnings",
46
- title: `[learning] ${topic}`,
46
+ title: topic,
47
47
  content,
48
48
  topic,
49
49
  timestamp: event.timestamp || "",
@@ -44,7 +44,7 @@ export async function indexObservations(ctx: IndexerContext): Promise<void> {
44
44
 
45
45
  ctx.insert({
46
46
  source: "observations",
47
- title: `[${subtype}] ${topic}`,
47
+ title: topic,
48
48
  content,
49
49
  topic,
50
50
  type: subtype,
@@ -116,7 +116,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
116
116
 
117
117
  ctx.insert({
118
118
  source: "personal",
119
- title: `[book] ${book.title}`,
119
+ title: book.title,
120
120
  content,
121
121
  topic: "",
122
122
  type: "book",
@@ -149,7 +149,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
149
149
 
150
150
  ctx.insert({
151
151
  source: "personal",
152
- title: `[person] ${person.name}`,
152
+ title: person.name,
153
153
  content,
154
154
  topic: "",
155
155
  type: "person",
@@ -185,7 +185,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
185
185
 
186
186
  ctx.insert({
187
187
  source: "personal",
188
- title: `[movie] ${movie.title}`,
188
+ title: movie.title,
189
189
  content,
190
190
  topic: "",
191
191
  type: "movie",
@@ -211,7 +211,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
211
211
 
212
212
  ctx.insert({
213
213
  source: "personal",
214
- title: `[podcast] ${name}`,
214
+ title: name,
215
215
  content,
216
216
  topic: "",
217
217
  type: "podcast",
@@ -241,7 +241,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
241
241
 
242
242
  ctx.insert({
243
243
  source: "personal",
244
- title: `[interest] ${interest}`,
244
+ title: interest,
245
245
  content,
246
246
  topic: "",
247
247
  type: "interest",
@@ -273,7 +273,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
273
273
 
274
274
  ctx.insert({
275
275
  source: "personal",
276
- title: `[habit] ${habitName}`,
276
+ title: habitName,
277
277
  content,
278
278
  topic: "",
279
279
  type: "habit",
@@ -298,7 +298,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
298
298
 
299
299
  ctx.insert({
300
300
  source: "personal",
301
- title: `[profile] ${key}`,
301
+ title: key,
302
302
  content,
303
303
  topic: "",
304
304
  type: "profile",
@@ -326,7 +326,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
326
326
 
327
327
  ctx.insert({
328
328
  source: "personal",
329
- title: `[preference] ${category}/${key}`,
329
+ title: `${category}/${key}`,
330
330
  content,
331
331
  topic: "",
332
332
  type: "preference",
@@ -339,7 +339,7 @@ export async function indexPersonal(ctx: IndexerContext): Promise<void> {
339
339
 
340
340
  ctx.insert({
341
341
  source: "personal",
342
- title: `[preference] ${category}`,
342
+ title: category,
343
343
  content,
344
344
  topic: "",
345
345
  type: "preference",
@@ -122,7 +122,7 @@ export async function indexSessions(ctx: IndexerContext): Promise<void> {
122
122
 
123
123
  ctx.insert({
124
124
  source: "sessions",
125
- title: `[session] ${session.project} (${date})`,
125
+ title: `${session.project} (${date})`,
126
126
  content,
127
127
  topic: session.project,
128
128
  timestamp: session.firstTs,
@@ -43,7 +43,7 @@ export async function indexTeachings(ctx: IndexerContext): Promise<void> {
43
43
 
44
44
  ctx.insert({
45
45
  source: "teachings",
46
- title: `[teaching] ${topic}`,
46
+ title: topic,
47
47
  content,
48
48
  topic,
49
49
  type: "teaching",
package/lib/realtime.ts CHANGED
@@ -129,26 +129,26 @@ function getSourceForEvent(event: CaptureEvent): string {
129
129
  }
130
130
 
131
131
  /**
132
- * Build title for FTS5 entry, matching existing indexer format
132
+ * Build title for FTS5 entry (type is a first-class column, not a title prefix)
133
133
  */
134
134
  function buildTitle(event: CaptureEvent): string {
135
135
  const data = event.data as Record<string, unknown>;
136
136
 
137
137
  switch (event.type) {
138
138
  case "knowledge":
139
- return `[${data.subtype || "knowledge"}] ${data.topic || "general"}`;
139
+ return `${data.topic || "general"}`;
140
140
  case "teaching":
141
- return `[${data.topic || "general"}] (${data.confidence || "medium"})`;
141
+ return `${data.topic || "general"} (${data.confidence || "medium"})`;
142
142
  case "observation":
143
- return `[${data.subtype || "pattern"}] ${data.topic || "general"}`;
143
+ return `${data.topic || "general"}`;
144
144
  case "insight":
145
- return `[${data.subtype || "insight"}] ${data.topic || "general"}`;
145
+ return `${data.topic || "general"}`;
146
146
  case "learning":
147
- return `[learning] ${data.topic || "general"}`;
147
+ return `${data.topic || "general"}`;
148
148
  case "task":
149
- return `[task] ${data.topic || "general"}: ${data.name || "untitled"}`;
149
+ return `${data.topic || "general"}: ${data.name || "untitled"}`;
150
150
  case "note":
151
- return `[note] ${data.topic || "general"}`;
151
+ return `${data.topic || "general"}`;
152
152
  }
153
153
  }
154
154
 
package/lib/search.ts CHANGED
@@ -16,6 +16,7 @@ export interface SearchResult {
16
16
  content: string;
17
17
  metadata: string;
18
18
  topic: string;
19
+ type: string;
19
20
  rank: number;
20
21
  }
21
22
 
@@ -99,7 +100,7 @@ export function search(
99
100
  params.push(limit);
100
101
 
101
102
  const sql = `
102
- SELECT rowid, source, title, snippet(search, 2, '→', '←', '...', 32) as content, metadata, topic, rank
103
+ SELECT rowid, source, title, snippet(search, 2, '→', '←', '...', 32) as content, metadata, topic, type, rank
103
104
  FROM search
104
105
  WHERE ${conditions.join(" AND ")}
105
106
  ORDER BY rank
package/lib/semantic.ts CHANGED
@@ -20,6 +20,7 @@ export interface SemanticResult {
20
20
  content: string;
21
21
  metadata: string;
22
22
  topic: string;
23
+ type: string;
23
24
  distance: number;
24
25
  }
25
26
 
@@ -248,6 +249,7 @@ export async function semanticSearch(
248
249
  s.content,
249
250
  s.metadata,
250
251
  s.topic,
252
+ s.type,
251
253
  e.distance
252
254
  FROM embeddings e
253
255
  JOIN search s ON e.doc_id = s.rowid
@@ -276,6 +278,7 @@ export interface HybridResult {
276
278
  content: string;
277
279
  metadata: string;
278
280
  topic: string;
281
+ type: string;
279
282
  score: number;
280
283
  vectorScore: number;
281
284
  textScore: number;
@@ -364,6 +367,7 @@ export async function hybridSearch(
364
367
  content: r.content,
365
368
  metadata: r.metadata,
366
369
  topic: r.topic,
370
+ type: r.type,
367
371
  vectorScore,
368
372
  textScore: 0,
369
373
  score: vectorWeight * vectorScore,
@@ -391,6 +395,7 @@ export async function hybridSearch(
391
395
  content: r.content,
392
396
  metadata: r.metadata,
393
397
  topic: r.topic,
398
+ type: r.type,
394
399
  vectorScore: 0,
395
400
  textScore,
396
401
  score: textWeight * textScore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidwire/lore",
3
- "version": "1.1.2",
3
+ "version": "1.3.0",
4
4
  "description": "Unified knowledge CLI - Search, list, and capture your indexed knowledge",
5
5
  "type": "module",
6
6
  "main": "./index.ts",