@steno-ai/engine 0.1.16 → 0.1.17
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/dist/config.d.ts +3 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -0
- package/dist/config.js.map +1 -1
- package/dist/extraction/index.d.ts +2 -0
- package/dist/extraction/index.d.ts.map +1 -1
- package/dist/extraction/index.js +2 -0
- package/dist/extraction/index.js.map +1 -1
- package/dist/extraction/pipeline.d.ts.map +1 -1
- package/dist/extraction/pipeline.js +25 -1
- package/dist/extraction/pipeline.js.map +1 -1
- package/dist/extraction/structured-cross-linker.d.ts +55 -0
- package/dist/extraction/structured-cross-linker.d.ts.map +1 -0
- package/dist/extraction/structured-cross-linker.js +195 -0
- package/dist/extraction/structured-cross-linker.js.map +1 -0
- package/dist/extraction/structured-extractor.d.ts +59 -0
- package/dist/extraction/structured-extractor.d.ts.map +1 -0
- package/dist/extraction/structured-extractor.js +389 -0
- package/dist/extraction/structured-extractor.js.map +1 -0
- package/dist/extraction/types.d.ts +1 -1
- package/dist/extraction/types.d.ts.map +1 -1
- package/dist/models/edge.d.ts +6 -6
- package/dist/models/extraction.d.ts +6 -6
- package/dist/models/fact.d.ts +6 -6
- package/package.json +1 -1
- package/src/config.ts +9 -0
- package/src/extraction/index.ts +2 -0
- package/src/extraction/pipeline.ts +29 -1
- package/src/extraction/structured-cross-linker.ts +259 -0
- package/src/extraction/structured-extractor.ts +463 -0
- package/src/extraction/types.ts +1 -1
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured data extractor — bypasses LLM entirely.
|
|
3
|
+
*
|
|
4
|
+
* Handles structured_event, structured_task, structured_email, structured_vault
|
|
5
|
+
* input types by directly creating entities, edges, and facts from known fields.
|
|
6
|
+
* Zero LLM cost, deterministic, high confidence.
|
|
7
|
+
*/
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// Helpers
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
function canonicalize(name) {
|
|
12
|
+
return name.toLowerCase().replace(/[^a-z0-9\s.-]/g, '').replace(/\s+/g, ' ').trim();
|
|
13
|
+
}
|
|
14
|
+
function formatDate(iso) {
|
|
15
|
+
try {
|
|
16
|
+
return new Date(iso).toLocaleDateString('en-US', {
|
|
17
|
+
weekday: 'long', year: 'numeric', month: 'long', day: 'numeric',
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return iso;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function formatTime(iso) {
|
|
25
|
+
try {
|
|
26
|
+
return new Date(iso).toLocaleTimeString('en-US', {
|
|
27
|
+
hour: 'numeric', minute: '2-digit', hour12: true,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Extractors
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
export function extractStructuredEvent(data) {
|
|
38
|
+
const entities = [];
|
|
39
|
+
const edges = [];
|
|
40
|
+
// Main event entity
|
|
41
|
+
const eventCanonical = canonicalize(data.title);
|
|
42
|
+
entities.push({
|
|
43
|
+
name: data.title,
|
|
44
|
+
entityType: 'event',
|
|
45
|
+
canonicalName: eventCanonical,
|
|
46
|
+
properties: {
|
|
47
|
+
startTime: data.startTime,
|
|
48
|
+
endTime: data.endTime,
|
|
49
|
+
location: data.location,
|
|
50
|
+
url: data.url,
|
|
51
|
+
provider: data.provider,
|
|
52
|
+
externalId: data.externalId,
|
|
53
|
+
sourceType: data.sourceType,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
// Location entity
|
|
57
|
+
if (data.location) {
|
|
58
|
+
const locCanonical = canonicalize(data.location);
|
|
59
|
+
entities.push({
|
|
60
|
+
name: data.location,
|
|
61
|
+
entityType: 'location',
|
|
62
|
+
canonicalName: locCanonical,
|
|
63
|
+
properties: {},
|
|
64
|
+
});
|
|
65
|
+
edges.push({
|
|
66
|
+
sourceName: eventCanonical,
|
|
67
|
+
targetName: locCanonical,
|
|
68
|
+
relation: 'located_at',
|
|
69
|
+
edgeType: 'associative',
|
|
70
|
+
confidence: 1.0,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
// Organizer entities
|
|
74
|
+
for (const org of data.organizers ?? []) {
|
|
75
|
+
const orgCanonical = canonicalize(org);
|
|
76
|
+
entities.push({
|
|
77
|
+
name: org,
|
|
78
|
+
entityType: 'organization',
|
|
79
|
+
canonicalName: orgCanonical,
|
|
80
|
+
properties: {},
|
|
81
|
+
});
|
|
82
|
+
edges.push({
|
|
83
|
+
sourceName: eventCanonical,
|
|
84
|
+
targetName: orgCanonical,
|
|
85
|
+
relation: 'hosted_by',
|
|
86
|
+
edgeType: 'associative',
|
|
87
|
+
confidence: 1.0,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
// Attendee entities
|
|
91
|
+
for (const attendee of data.attendees ?? []) {
|
|
92
|
+
const attCanonical = canonicalize(attendee);
|
|
93
|
+
entities.push({
|
|
94
|
+
name: attendee,
|
|
95
|
+
entityType: 'person',
|
|
96
|
+
canonicalName: attCanonical,
|
|
97
|
+
properties: {},
|
|
98
|
+
});
|
|
99
|
+
edges.push({
|
|
100
|
+
sourceName: attCanonical,
|
|
101
|
+
targetName: eventCanonical,
|
|
102
|
+
relation: 'attends',
|
|
103
|
+
edgeType: 'associative',
|
|
104
|
+
confidence: 1.0,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
// Build fact content
|
|
108
|
+
let factContent = `Event: "${data.title}" on ${formatDate(data.startTime)}`;
|
|
109
|
+
if (data.startTime)
|
|
110
|
+
factContent += ` at ${formatTime(data.startTime)}`;
|
|
111
|
+
if (data.endTime)
|
|
112
|
+
factContent += ` - ${formatTime(data.endTime)}`;
|
|
113
|
+
if (data.location)
|
|
114
|
+
factContent += ` at ${data.location}`;
|
|
115
|
+
if (data.organizers?.length)
|
|
116
|
+
factContent += `. Hosted by ${data.organizers.join(', ')}`;
|
|
117
|
+
if (data.description)
|
|
118
|
+
factContent += `. ${data.description.slice(0, 300)}`;
|
|
119
|
+
const fact = {
|
|
120
|
+
content: factContent,
|
|
121
|
+
importance: 0.8,
|
|
122
|
+
confidence: 1.0,
|
|
123
|
+
sourceType: (data.sourceType === 'vault' ? 'structured_vault' : 'structured_event'),
|
|
124
|
+
modality: 'text',
|
|
125
|
+
tags: ['structured', 'event', ...(data.provider ? [data.provider] : [])],
|
|
126
|
+
originalContent: JSON.stringify(data),
|
|
127
|
+
entityCanonicalNames: [eventCanonical, ...entities.filter(e => e.canonicalName !== eventCanonical).map(e => e.canonicalName)],
|
|
128
|
+
eventDate: new Date(data.startTime),
|
|
129
|
+
documentDate: new Date(),
|
|
130
|
+
};
|
|
131
|
+
return {
|
|
132
|
+
facts: [fact],
|
|
133
|
+
entities,
|
|
134
|
+
edges,
|
|
135
|
+
tier: 'heuristic',
|
|
136
|
+
confidence: 1.0,
|
|
137
|
+
tokensInput: 0,
|
|
138
|
+
tokensOutput: 0,
|
|
139
|
+
model: null,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export function extractStructuredTask(data) {
|
|
143
|
+
const entities = [];
|
|
144
|
+
const edges = [];
|
|
145
|
+
const taskCanonical = canonicalize(data.title);
|
|
146
|
+
entities.push({
|
|
147
|
+
name: data.title,
|
|
148
|
+
entityType: 'task',
|
|
149
|
+
canonicalName: taskCanonical,
|
|
150
|
+
properties: {
|
|
151
|
+
status: data.status,
|
|
152
|
+
priority: data.priority,
|
|
153
|
+
category: data.category,
|
|
154
|
+
dueDate: data.dueDate,
|
|
155
|
+
externalId: data.externalId,
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
// Category entity
|
|
159
|
+
if (data.category) {
|
|
160
|
+
const catCanonical = canonicalize(data.category);
|
|
161
|
+
entities.push({
|
|
162
|
+
name: data.category,
|
|
163
|
+
entityType: 'topic',
|
|
164
|
+
canonicalName: catCanonical,
|
|
165
|
+
properties: {},
|
|
166
|
+
});
|
|
167
|
+
edges.push({
|
|
168
|
+
sourceName: taskCanonical,
|
|
169
|
+
targetName: catCanonical,
|
|
170
|
+
relation: 'categorized_as',
|
|
171
|
+
edgeType: 'hierarchical',
|
|
172
|
+
confidence: 1.0,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
let factContent = `Task: "${data.title}"`;
|
|
176
|
+
if (data.status)
|
|
177
|
+
factContent += ` (${data.status})`;
|
|
178
|
+
if (data.priority)
|
|
179
|
+
factContent += `, priority: ${data.priority}`;
|
|
180
|
+
if (data.dueDate)
|
|
181
|
+
factContent += `, due ${formatDate(data.dueDate)}`;
|
|
182
|
+
if (data.description)
|
|
183
|
+
factContent += `. ${data.description.slice(0, 200)}`;
|
|
184
|
+
const fact = {
|
|
185
|
+
content: factContent,
|
|
186
|
+
importance: data.priority === 'high' || data.priority === 'urgent' ? 0.9 : 0.7,
|
|
187
|
+
confidence: 1.0,
|
|
188
|
+
sourceType: 'structured_task',
|
|
189
|
+
modality: 'text',
|
|
190
|
+
tags: ['structured', 'task', ...(data.tags ?? [])],
|
|
191
|
+
originalContent: JSON.stringify(data),
|
|
192
|
+
entityCanonicalNames: [taskCanonical],
|
|
193
|
+
eventDate: data.dueDate ? new Date(data.dueDate) : undefined,
|
|
194
|
+
documentDate: new Date(),
|
|
195
|
+
};
|
|
196
|
+
return {
|
|
197
|
+
facts: [fact],
|
|
198
|
+
entities,
|
|
199
|
+
edges,
|
|
200
|
+
tier: 'heuristic',
|
|
201
|
+
confidence: 1.0,
|
|
202
|
+
tokensInput: 0,
|
|
203
|
+
tokensOutput: 0,
|
|
204
|
+
model: null,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
export function extractStructuredEmail(data) {
|
|
208
|
+
const entities = [];
|
|
209
|
+
const edges = [];
|
|
210
|
+
// Sender entity
|
|
211
|
+
const senderCanonical = canonicalize(data.from);
|
|
212
|
+
entities.push({
|
|
213
|
+
name: data.from,
|
|
214
|
+
entityType: 'person',
|
|
215
|
+
canonicalName: senderCanonical,
|
|
216
|
+
properties: { email: data.from },
|
|
217
|
+
});
|
|
218
|
+
// Subject as topic entity if substantial
|
|
219
|
+
if (data.subject && data.subject.length > 5) {
|
|
220
|
+
const subjectCanonical = canonicalize(data.subject);
|
|
221
|
+
entities.push({
|
|
222
|
+
name: data.subject,
|
|
223
|
+
entityType: 'topic',
|
|
224
|
+
canonicalName: subjectCanonical,
|
|
225
|
+
properties: { threadId: data.threadId, provider: data.provider },
|
|
226
|
+
});
|
|
227
|
+
edges.push({
|
|
228
|
+
sourceName: senderCanonical,
|
|
229
|
+
targetName: subjectCanonical,
|
|
230
|
+
relation: 'authored',
|
|
231
|
+
edgeType: 'associative',
|
|
232
|
+
confidence: 1.0,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
// Recipients
|
|
236
|
+
for (const to of data.to ?? []) {
|
|
237
|
+
const toCanonical = canonicalize(to);
|
|
238
|
+
entities.push({
|
|
239
|
+
name: to,
|
|
240
|
+
entityType: 'person',
|
|
241
|
+
canonicalName: toCanonical,
|
|
242
|
+
properties: { email: to },
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
let factContent = `Email from ${data.from}: "${data.subject}"`;
|
|
246
|
+
if (data.date)
|
|
247
|
+
factContent += ` on ${formatDate(data.date)}`;
|
|
248
|
+
if (data.body)
|
|
249
|
+
factContent += `. ${data.body.slice(0, 300)}`;
|
|
250
|
+
const fact = {
|
|
251
|
+
content: factContent,
|
|
252
|
+
importance: data.isUnread ? 0.8 : 0.5,
|
|
253
|
+
confidence: 1.0,
|
|
254
|
+
sourceType: 'structured_email',
|
|
255
|
+
modality: 'text',
|
|
256
|
+
tags: ['structured', 'email', ...(data.provider ? [data.provider] : []), ...(data.isUnread ? ['unread'] : [])],
|
|
257
|
+
originalContent: JSON.stringify(data),
|
|
258
|
+
entityCanonicalNames: [senderCanonical],
|
|
259
|
+
eventDate: new Date(data.date),
|
|
260
|
+
documentDate: new Date(),
|
|
261
|
+
};
|
|
262
|
+
return {
|
|
263
|
+
facts: [fact],
|
|
264
|
+
entities,
|
|
265
|
+
edges,
|
|
266
|
+
tier: 'heuristic',
|
|
267
|
+
confidence: 1.0,
|
|
268
|
+
tokensInput: 0,
|
|
269
|
+
tokensOutput: 0,
|
|
270
|
+
model: null,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export function extractStructuredVault(data) {
|
|
274
|
+
const entities = [];
|
|
275
|
+
const edges = [];
|
|
276
|
+
const vaultCanonical = canonicalize(data.title);
|
|
277
|
+
entities.push({
|
|
278
|
+
name: data.title,
|
|
279
|
+
entityType: data.contentType === 'event' ? 'event' : 'topic',
|
|
280
|
+
canonicalName: vaultCanonical,
|
|
281
|
+
properties: {
|
|
282
|
+
contentType: data.contentType,
|
|
283
|
+
url: data.url,
|
|
284
|
+
source: data.source,
|
|
285
|
+
savedAt: data.savedAt,
|
|
286
|
+
externalId: data.externalId,
|
|
287
|
+
...(data.metadata ?? {}),
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
// Source domain entity
|
|
291
|
+
if (data.source) {
|
|
292
|
+
const sourceCanonical = canonicalize(data.source);
|
|
293
|
+
entities.push({
|
|
294
|
+
name: data.source,
|
|
295
|
+
entityType: 'source',
|
|
296
|
+
canonicalName: sourceCanonical,
|
|
297
|
+
properties: {},
|
|
298
|
+
});
|
|
299
|
+
edges.push({
|
|
300
|
+
sourceName: vaultCanonical,
|
|
301
|
+
targetName: sourceCanonical,
|
|
302
|
+
relation: 'saved_from',
|
|
303
|
+
edgeType: 'associative',
|
|
304
|
+
confidence: 1.0,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
// If event type, extract organizers from metadata
|
|
308
|
+
const organizers = data.metadata?.organizer || data.metadata?.organizers;
|
|
309
|
+
if (organizers) {
|
|
310
|
+
const orgList = typeof organizers === 'string'
|
|
311
|
+
? organizers.split(/,\s*|(?:\s+and\s+)/)
|
|
312
|
+
: Array.isArray(organizers) ? organizers : [];
|
|
313
|
+
for (const org of orgList) {
|
|
314
|
+
const trimmed = org.trim();
|
|
315
|
+
if (!trimmed)
|
|
316
|
+
continue;
|
|
317
|
+
const orgCanonical = canonicalize(trimmed);
|
|
318
|
+
entities.push({
|
|
319
|
+
name: trimmed,
|
|
320
|
+
entityType: 'organization',
|
|
321
|
+
canonicalName: orgCanonical,
|
|
322
|
+
properties: {},
|
|
323
|
+
});
|
|
324
|
+
edges.push({
|
|
325
|
+
sourceName: vaultCanonical,
|
|
326
|
+
targetName: orgCanonical,
|
|
327
|
+
relation: 'hosted_by',
|
|
328
|
+
edgeType: 'associative',
|
|
329
|
+
confidence: 1.0,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
let factContent = `Saved to vault: "${data.title}" (${data.contentType})`;
|
|
334
|
+
if (data.source)
|
|
335
|
+
factContent += ` from ${data.source}`;
|
|
336
|
+
if (data.savedAt)
|
|
337
|
+
factContent += ` on ${formatDate(data.savedAt)}`;
|
|
338
|
+
if (data.content)
|
|
339
|
+
factContent += `. ${data.content.slice(0, 300)}`;
|
|
340
|
+
const fact = {
|
|
341
|
+
content: factContent,
|
|
342
|
+
importance: 0.7,
|
|
343
|
+
confidence: 1.0,
|
|
344
|
+
sourceType: 'structured_vault',
|
|
345
|
+
modality: 'text',
|
|
346
|
+
tags: ['structured', 'vault', data.contentType],
|
|
347
|
+
originalContent: JSON.stringify(data),
|
|
348
|
+
entityCanonicalNames: [vaultCanonical, ...entities.filter(e => e.canonicalName !== vaultCanonical).map(e => e.canonicalName)],
|
|
349
|
+
eventDate: data.metadata?.date ? new Date(data.metadata.date) : undefined,
|
|
350
|
+
documentDate: new Date(data.savedAt),
|
|
351
|
+
};
|
|
352
|
+
return {
|
|
353
|
+
facts: [fact],
|
|
354
|
+
entities,
|
|
355
|
+
edges,
|
|
356
|
+
tier: 'heuristic',
|
|
357
|
+
confidence: 1.0,
|
|
358
|
+
tokensInput: 0,
|
|
359
|
+
tokensOutput: 0,
|
|
360
|
+
model: null,
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
// ---------------------------------------------------------------------------
|
|
364
|
+
// Router — picks the right extractor based on inputType
|
|
365
|
+
// ---------------------------------------------------------------------------
|
|
366
|
+
const STRUCTURED_INPUT_TYPES = new Set([
|
|
367
|
+
'structured_event',
|
|
368
|
+
'structured_task',
|
|
369
|
+
'structured_email',
|
|
370
|
+
'structured_vault',
|
|
371
|
+
]);
|
|
372
|
+
export function isStructuredInput(inputType) {
|
|
373
|
+
return STRUCTURED_INPUT_TYPES.has(inputType);
|
|
374
|
+
}
|
|
375
|
+
export function extractStructured(inputType, data) {
|
|
376
|
+
switch (inputType) {
|
|
377
|
+
case 'structured_event':
|
|
378
|
+
return extractStructuredEvent(data);
|
|
379
|
+
case 'structured_task':
|
|
380
|
+
return extractStructuredTask(data);
|
|
381
|
+
case 'structured_email':
|
|
382
|
+
return extractStructuredEmail(data);
|
|
383
|
+
case 'structured_vault':
|
|
384
|
+
return extractStructuredVault(data);
|
|
385
|
+
default:
|
|
386
|
+
throw new Error(`Unknown structured input type: ${inputType}`);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
//# sourceMappingURL=structured-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-extractor.js","sourceRoot":"","sources":["../../src/extraction/structured-extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyDH,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACtF,CAAC;AAED,S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ACf,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;QACf,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,wDAAwD;AACxD,8EAA8E;AAE9E,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,OAAO,sBAAsB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAiB,EAAE,IAAa;IAChE,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,kBAAkB;YACrB,OAAO,sBAAsB,CAAC,IAAuB,CAAC,CAAC;QACzD,KAAK,iBAAiB;YACpB,OAAO,qBAAqB,CAAC,IAAsB,CAAC,CAAC;QACvD,KAAK,kBAAkB;YACrB,OAAO,sBAAsB,CAAC,IAAuB,CAAC,CAAC;QACzD,KAAK,kBAAkB;YACrB,OAAO,sBAAsB,CAAC,IAAuB,CAAC,CAAC;QACzD;YACE,MAAM,IAAI,KAAK,CAAC,kCAAkC,SAAS,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC"}
|
|
@@ -55,7 +55,7 @@ export interface ExtractionInput {
|
|
|
55
55
|
scope: Scope;
|
|
56
56
|
scopeId: string;
|
|
57
57
|
sessionId?: string;
|
|
58
|
-
inputType: 'conversation' | 'document' | 'url' | 'raw_text' | 'image' | 'audio' | 'code' | 'codebase_scan' | 'file_change' | 'architecture_doc';
|
|
58
|
+
inputType: 'conversation' | 'document' | 'url' | 'raw_text' | 'image' | 'audio' | 'code' | 'codebase_scan' | 'file_change' | 'architecture_doc' | 'structured_event' | 'structured_task' | 'structured_email' | 'structured_vault';
|
|
59
59
|
data: unknown;
|
|
60
60
|
existingFacts?: Array<{
|
|
61
61
|
id: string;
|
|
@@ -1 +1 @@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
6
|
targetId: z.ZodString;
|
|
7
7
|
relation: z.ZodString;
|
|
8
|
-
edgeType: z.ZodEnum<["associative", "causal", "temporal", "contradictory", "hierarchical", "updates", "extends", "derives", "precedes", "depends_on", "deadline", "imports", "implements", "owns", "configures", "tested_by"]>;
|
|
8
|
+
edgeType: z.ZodEnum<["associative", "causal", "temporal", "contradictory", "hierarchical", "updates", "extends", "derives", "precedes", "depends_on", "deadline", "imports", "implements", "owns", "configures", "same_as", "tested_by"]>;
|
|
9
9
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
10
10
|
validFrom: z.ZodDate;
|
|
11
11
|
validUntil: z.ZodNullable<z.ZodDate>;
|
|
@@ -24,7 +24,7 @@ export declare const EdgeSchema: z.ZodObject<{
|
|
|
24
24
|
sourceId: string;
|
|
25
25
|
targetId: string;
|
|
26
26
|
relation: string;
|
|
27
|
-
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "tested_by";
|
|
27
|
+
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "same_as" | "tested_by";
|
|
28
28
|
weight: number;
|
|
29
29
|
factId: string | null;
|
|
30
30
|
}, {
|
|
@@ -38,7 +38,7 @@ export declare const EdgeSchema: z.ZodObject<{
|
|
|
38
38
|
sourceId: string;
|
|
39
39
|
targetId: string;
|
|
40
40
|
relation: string;
|
|
41
|
-
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "tested_by";
|
|
41
|
+
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "same_as" | "tested_by";
|
|
42
42
|
factId: string | null;
|
|
43
43
|
weight?: number | undefined;
|
|
44
44
|
}>;
|
|
@@ -48,7 +48,7 @@ export declare const CreateEdgeSchema: z.ZodObject<{
|
|
|
48
48
|
sourceId: z.ZodString;
|
|
49
49
|
targetId: z.ZodString;
|
|
50
50
|
relation: z.ZodString;
|
|
51
|
-
edgeType: z.ZodEnum<["associative", "causal", "temporal", "contradictory", "hierarchical", "updates", "extends", "derives", "precedes", "depends_on", "deadline", "imports", "implements", "owns", "configures", "tested_by"]>;
|
|
51
|
+
edgeType: z.ZodEnum<["associative", "causal", "temporal", "contradictory", "hierarchical", "updates", "extends", "derives", "precedes", "depends_on", "deadline", "imports", "implements", "owns", "configures", "same_as", "tested_by"]>;
|
|
52
52
|
weight: z.ZodDefault<z.ZodNumber>;
|
|
53
53
|
factId: z.ZodOptional<z.ZodString>;
|
|
54
54
|
confidence: z.ZodDefault<z.ZodNumber>;
|
|
@@ -60,7 +60,7 @@ export declare const CreateEdgeSchema: z.ZodObject<{
|
|
|
60
60
|
sourceId: string;
|
|
61
61
|
targetId: string;
|
|
62
62
|
relation: string;
|
|
63
|
-
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "tested_by";
|
|
63
|
+
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "same_as" | "tested_by";
|
|
64
64
|
weight: number;
|
|
65
65
|
factId?: string | undefined;
|
|
66
66
|
}, {
|
|
@@ -68,7 +68,7 @@ export declare const CreateEdgeSchema: z.ZodObject<{
|
|
|
68
68
|
sourceId: string;
|
|
69
69
|
targetId: string;
|
|
70
70
|
relation: string;
|
|
71
|
-
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "tested_by";
|
|
71
|
+
edgeType: "temporal" | "associative" | "causal" | "contradictory" | "hierarchical" | "updates" | "extends" | "derives" | "precedes" | "depends_on" | "deadline" | "imports" | "implements" | "owns" | "configures" | "same_as" | "tested_by";
|
|
72
72
|
confidence?: number | undefined;
|
|
73
73
|
metadata?: Record<string, unknown> | undefined;
|
|
74
74
|
weight?: number | undefined;
|
|
@@ -3,7 +3,7 @@ export declare const ExtractionSchema: z.ZodObject<{
|
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
tenantId: z.ZodString;
|
|
5
5
|
status: z.ZodEnum<["queued", "processing", "completed", "failed", "deduped"]>;
|
|
6
|
-
inputType: z.ZodEnum<["conversation", "document", "url", "raw_text", "image", "audio", "code", "codebase_scan", "file_change", "architecture_doc"]>;
|
|
6
|
+
inputType: z.ZodEnum<["conversation", "document", "url", "raw_text", "image", "audio", "code", "codebase_scan", "file_change", "architecture_doc", "structured_event", "structured_task", "structured_email", "structured_vault"]>;
|
|
7
7
|
inputData: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
8
8
|
inputHash: z.ZodString;
|
|
9
9
|
inputSize: z.ZodNullable<z.ZodNumber>;
|
|
@@ -33,7 +33,7 @@ export declare const ExtractionSchema: z.ZodObject<{
|
|
|
33
33
|
scopeId: string;
|
|
34
34
|
sessionId: string | null;
|
|
35
35
|
createdAt: Date;
|
|
36
|
-
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
36
|
+
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "structured_event" | "structured_task" | "structured_email" | "structured_vault" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
37
37
|
inputData: string | Record<string, unknown> | null;
|
|
38
38
|
inputHash: string;
|
|
39
39
|
inputSize: number | null;
|
|
@@ -59,7 +59,7 @@ export declare const ExtractionSchema: z.ZodObject<{
|
|
|
59
59
|
scopeId: string;
|
|
60
60
|
sessionId: string | null;
|
|
61
61
|
createdAt: Date;
|
|
62
|
-
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
62
|
+
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "structured_event" | "structured_task" | "structured_email" | "structured_vault" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
63
63
|
inputData: string | Record<string, unknown> | null;
|
|
64
64
|
inputHash: string;
|
|
65
65
|
inputSize: number | null;
|
|
@@ -81,7 +81,7 @@ export declare const ExtractionSchema: z.ZodObject<{
|
|
|
81
81
|
export type Extraction = z.infer<typeof ExtractionSchema>;
|
|
82
82
|
export declare const CreateExtractionSchema: z.ZodObject<{
|
|
83
83
|
tenantId: z.ZodString;
|
|
84
|
-
inputType: z.ZodEnum<["conversation", "document", "url", "raw_text", "image", "audio", "code", "codebase_scan", "file_change", "architecture_doc"]>;
|
|
84
|
+
inputType: z.ZodEnum<["conversation", "document", "url", "raw_text", "image", "audio", "code", "codebase_scan", "file_change", "architecture_doc", "structured_event", "structured_task", "structured_email", "structured_vault"]>;
|
|
85
85
|
inputData: z.ZodString;
|
|
86
86
|
inputHash: z.ZodString;
|
|
87
87
|
inputSize: z.ZodOptional<z.ZodNumber>;
|
|
@@ -92,7 +92,7 @@ export declare const CreateExtractionSchema: z.ZodObject<{
|
|
|
92
92
|
tenantId: string;
|
|
93
93
|
scope: "user" | "agent" | "session" | "hive" | "codebase";
|
|
94
94
|
scopeId: string;
|
|
95
|
-
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
95
|
+
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "structured_event" | "structured_task" | "structured_email" | "structured_vault" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
96
96
|
inputData: string;
|
|
97
97
|
inputHash: string;
|
|
98
98
|
sessionId?: string | undefined;
|
|
@@ -101,7 +101,7 @@ export declare const CreateExtractionSchema: z.ZodObject<{
|
|
|
101
101
|
tenantId: string;
|
|
102
102
|
scope: "user" | "agent" | "session" | "hive" | "codebase";
|
|
103
103
|
scopeId: string;
|
|
104
|
-
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
104
|
+
inputType: "code" | "conversation" | "document" | "url" | "raw_text" | "structured_event" | "structured_task" | "structured_email" | "structured_vault" | "image" | "audio" | "codebase_scan" | "file_change" | "architecture_doc";
|
|
105
105
|
inputData: string;
|
|
106
106
|
inputHash: string;
|
|
107
107
|
sessionId?: string | undefined;
|
package/dist/models/fact.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const FactSchema: z.ZodObject<{
|
|
|
20
20
|
decayScore: z.ZodNumber;
|
|
21
21
|
contradictionStatus: z.ZodEnum<["none", "active", "resolved", "superseded"]>;
|
|
22
22
|
contradictsId: z.ZodNullable<z.ZodString>;
|
|
23
|
-
sourceType: z.ZodEnum<["conversation", "document", "url", "raw_text", "api", "agent_self", "file_analysis", "ast_parse", "git_history", "dependency_scan"]>;
|
|
23
|
+
sourceType: z.ZodEnum<["conversation", "document", "url", "raw_text", "api", "agent_self", "file_analysis", "ast_parse", "git_history", "dependency_scan", "structured_event", "structured_task", "structured_email", "structured_vault"]>;
|
|
24
24
|
sourceRef: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
25
25
|
confidence: z.ZodNumber;
|
|
26
26
|
originalContent: z.ZodNullable<z.ZodString>;
|
|
@@ -57,7 +57,7 @@ export declare const FactSchema: z.ZodObject<{
|
|
|
57
57
|
decayScore: number;
|
|
58
58
|
contradictionStatus: "none" | "active" | "resolved" | "superseded";
|
|
59
59
|
contradictsId: string | null;
|
|
60
|
-
sourceType: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan";
|
|
60
|
+
sourceType: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan" | "structured_event" | "structured_task" | "structured_email" | "structured_vault";
|
|
61
61
|
sourceRef: Record<string, unknown> | null;
|
|
62
62
|
confidence: number;
|
|
63
63
|
originalContent: string | null;
|
|
@@ -91,7 +91,7 @@ export declare const FactSchema: z.ZodObject<{
|
|
|
91
91
|
decayScore: number;
|
|
92
92
|
contradictionStatus: "none" | "active" | "resolved" | "superseded";
|
|
93
93
|
contradictsId: string | null;
|
|
94
|
-
sourceType: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan";
|
|
94
|
+
sourceType: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan" | "structured_event" | "structured_task" | "structured_email" | "structured_vault";
|
|
95
95
|
sourceRef: Record<string, unknown> | null;
|
|
96
96
|
confidence: number;
|
|
97
97
|
originalContent: string | null;
|
|
@@ -121,7 +121,7 @@ export declare const CreateFactSchema: z.ZodObject<{
|
|
|
121
121
|
operation: z.ZodDefault<z.ZodEnum<["create", "update", "invalidate"]>>;
|
|
122
122
|
contradictionStatus: z.ZodDefault<z.ZodEnum<["none", "active", "resolved", "superseded"]>>;
|
|
123
123
|
contradictsId: z.ZodOptional<z.ZodString>;
|
|
124
|
-
sourceType: z.ZodOptional<z.ZodEnum<["conversation", "document", "url", "raw_text", "api", "agent_self", "file_analysis", "ast_parse", "git_history", "dependency_scan"]>>;
|
|
124
|
+
sourceType: z.ZodOptional<z.ZodEnum<["conversation", "document", "url", "raw_text", "api", "agent_self", "file_analysis", "ast_parse", "git_history", "dependency_scan", "structured_event", "structured_task", "structured_email", "structured_vault"]>>;
|
|
125
125
|
sourceRef: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
126
126
|
originalContent: z.ZodOptional<z.ZodString>;
|
|
127
127
|
extractionId: z.ZodOptional<z.ZodString>;
|
|
@@ -152,7 +152,7 @@ export declare const CreateFactSchema: z.ZodObject<{
|
|
|
152
152
|
lineageId?: string | undefined;
|
|
153
153
|
parentId?: string | undefined;
|
|
154
154
|
contradictsId?: string | undefined;
|
|
155
|
-
sourceType?: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan" | undefined;
|
|
155
|
+
sourceType?: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan" | "structured_event" | "structured_task" | "structured_email" | "structured_vault" | undefined;
|
|
156
156
|
sourceRef?: Record<string, unknown> | undefined;
|
|
157
157
|
originalContent?: string | undefined;
|
|
158
158
|
extractionId?: string | undefined;
|
|
@@ -174,7 +174,7 @@ export declare const CreateFactSchema: z.ZodObject<{
|
|
|
174
174
|
importance?: number | undefined;
|
|
175
175
|
contradictionStatus?: "none" | "active" | "resolved" | "superseded" | undefined;
|
|
176
176
|
contradictsId?: string | undefined;
|
|
177
|
-
sourceType?: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan" | undefined;
|
|
177
|
+
sourceType?: "conversation" | "document" | "url" | "raw_text" | "api" | "agent_self" | "file_analysis" | "ast_parse" | "git_history" | "dependency_scan" | "structured_event" | "structured_task" | "structured_email" | "structured_vault" | undefined;
|
|
178
178
|
sourceRef?: Record<string, unknown> | undefined;
|
|
179
179
|
confidence?: number | undefined;
|
|
180
180
|
originalContent?: string | undefined;
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -72,6 +72,10 @@ export const SOURCE_TYPES = [
|
|
|
72
72
|
'ast_parse',
|
|
73
73
|
'git_history',
|
|
74
74
|
'dependency_scan',
|
|
75
|
+
'structured_event',
|
|
76
|
+
'structured_task',
|
|
77
|
+
'structured_email',
|
|
78
|
+
'structured_vault',
|
|
75
79
|
] as const;
|
|
76
80
|
export type SourceType = (typeof SOURCE_TYPES)[number];
|
|
77
81
|
|
|
@@ -100,6 +104,7 @@ export const EDGE_TYPES = [
|
|
|
100
104
|
'implements', // A implements interface/contract B
|
|
101
105
|
'owns', // A owns/contains B (package → module)
|
|
102
106
|
'configures', // A configures/sets up B
|
|
107
|
+
'same_as', // A and B are the same real-world thing (vault item = calendar event)
|
|
103
108
|
'tested_by', // A is tested by B (module → test file)
|
|
104
109
|
] as const;
|
|
105
110
|
export type EdgeType = (typeof EDGE_TYPES)[number];
|
|
@@ -124,6 +129,10 @@ export const INPUT_TYPES = [
|
|
|
124
129
|
'codebase_scan',
|
|
125
130
|
'file_change',
|
|
126
131
|
'architecture_doc',
|
|
132
|
+
'structured_event',
|
|
133
|
+
'structured_task',
|
|
134
|
+
'structured_email',
|
|
135
|
+
'structured_vault',
|
|
127
136
|
] as const;
|
|
128
137
|
export type InputType = (typeof INPUT_TYPES)[number];
|
|
129
138
|
|
package/src/extraction/index.ts
CHANGED