ai-database 2.0.2 → 2.1.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/CHANGELOG.md +36 -0
- package/dist/actions.d.ts +247 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +260 -0
- package/dist/actions.js.map +1 -0
- package/dist/ai-promise-db.d.ts +34 -2
- package/dist/ai-promise-db.d.ts.map +1 -1
- package/dist/ai-promise-db.js +511 -66
- package/dist/ai-promise-db.js.map +1 -1
- package/dist/constants.d.ts +16 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +16 -0
- package/dist/constants.js.map +1 -0
- package/dist/events.d.ts +153 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +154 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/memory-provider.d.ts +144 -2
- package/dist/memory-provider.d.ts.map +1 -1
- package/dist/memory-provider.js +569 -13
- package/dist/memory-provider.js.map +1 -1
- package/dist/schema/cascade.d.ts +96 -0
- package/dist/schema/cascade.d.ts.map +1 -0
- package/dist/schema/cascade.js +528 -0
- package/dist/schema/cascade.js.map +1 -0
- package/dist/schema/index.d.ts +197 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +1211 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/parse.d.ts +225 -0
- package/dist/schema/parse.d.ts.map +1 -0
- package/dist/schema/parse.js +732 -0
- package/dist/schema/parse.js.map +1 -0
- package/dist/schema/provider.d.ts +176 -0
- package/dist/schema/provider.d.ts.map +1 -0
- package/dist/schema/provider.js +258 -0
- package/dist/schema/provider.js.map +1 -0
- package/dist/schema/resolve.d.ts +87 -0
- package/dist/schema/resolve.d.ts.map +1 -0
- package/dist/schema/resolve.js +474 -0
- package/dist/schema/resolve.js.map +1 -0
- package/dist/schema/semantic.d.ts +53 -0
- package/dist/schema/semantic.d.ts.map +1 -0
- package/dist/schema/semantic.js +247 -0
- package/dist/schema/semantic.js.map +1 -0
- package/dist/schema/types.d.ts +528 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +9 -0
- package/dist/schema/types.js.map +1 -0
- package/dist/schema.d.ts +24 -867
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +41 -1124
- package/dist/schema.js.map +1 -1
- package/dist/semantic.d.ts +175 -0
- package/dist/semantic.d.ts.map +1 -0
- package/dist/semantic.js +338 -0
- package/dist/semantic.js.map +1 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +13 -4
- package/.turbo/turbo-build.log +0 -5
- package/TESTING.md +0 -410
- package/TEST_SUMMARY.md +0 -250
- package/TODO.md +0 -128
- package/src/ai-promise-db.ts +0 -1243
- package/src/authorization.ts +0 -1102
- package/src/durable-clickhouse.ts +0 -596
- package/src/durable-promise.ts +0 -582
- package/src/execution-queue.ts +0 -608
- package/src/index.test.ts +0 -868
- package/src/index.ts +0 -337
- package/src/linguistic.ts +0 -404
- package/src/memory-provider.test.ts +0 -1036
- package/src/memory-provider.ts +0 -1119
- package/src/schema.test.ts +0 -1254
- package/src/schema.ts +0 -2296
- package/src/tests.ts +0 -725
- package/src/types.ts +0 -1177
- package/test/README.md +0 -153
- package/test/edge-cases.test.ts +0 -646
- package/test/provider-resolution.test.ts +0 -402
- package/tsconfig.json +0 -9
- package/vitest.config.ts +0 -19
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic Search and Matching
|
|
3
|
+
*
|
|
4
|
+
* Contains backward fuzzy (<~) and forward fuzzy (~>) resolution functions
|
|
5
|
+
* for semantic search-based relationship matching.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { hasSemanticSearch } from './provider.js';
|
|
10
|
+
import { resolveNestedPending } from './resolve.js';
|
|
11
|
+
import { generateEntity } from './cascade.js';
|
|
12
|
+
/**
|
|
13
|
+
* Safely extract the fuzzy threshold from entity schema
|
|
14
|
+
*
|
|
15
|
+
* Checks for the `$fuzzyThreshold` metadata property in the entity schema
|
|
16
|
+
* and returns its value if valid, otherwise returns the default of 0.75.
|
|
17
|
+
*
|
|
18
|
+
* @param entity - The parsed entity definition
|
|
19
|
+
* @returns The fuzzy matching threshold (0-1), defaults to 0.75
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
function getFuzzyThreshold(entity) {
|
|
24
|
+
const schema = entity.schema;
|
|
25
|
+
if (schema && '$fuzzyThreshold' in schema) {
|
|
26
|
+
const threshold = schema.$fuzzyThreshold;
|
|
27
|
+
if (typeof threshold === 'number') {
|
|
28
|
+
return threshold;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return 0.75;
|
|
32
|
+
}
|
|
33
|
+
// =============================================================================
|
|
34
|
+
// Backward Fuzzy Resolution
|
|
35
|
+
// =============================================================================
|
|
36
|
+
/**
|
|
37
|
+
* Resolve backward fuzzy (<~) fields by using semantic search to find existing entities
|
|
38
|
+
*
|
|
39
|
+
* The <~ operator differs from <- in that it uses semantic/fuzzy matching:
|
|
40
|
+
* - Uses AI/embedding-based similarity to find the best match from existing entities
|
|
41
|
+
* - Does NOT generate new entities - only grounds to existing reference data
|
|
42
|
+
* - Uses hint fields (e.g., categoryHint for category field) to guide matching
|
|
43
|
+
*
|
|
44
|
+
* @param typeName - The type of entity being created
|
|
45
|
+
* @param data - The input data including hint fields
|
|
46
|
+
* @param entity - The parsed entity definition
|
|
47
|
+
* @param schema - The parsed schema
|
|
48
|
+
* @param provider - The database provider (must support semanticSearch)
|
|
49
|
+
* @returns The resolved data with backward fuzzy fields populated with matched entity IDs
|
|
50
|
+
*/
|
|
51
|
+
export async function resolveBackwardFuzzy(typeName, data, entity, schema, provider) {
|
|
52
|
+
const resolved = { ...data };
|
|
53
|
+
const threshold = getFuzzyThreshold(entity);
|
|
54
|
+
for (const [fieldName, field] of entity.fields) {
|
|
55
|
+
if (field.operator === '<~' && field.direction === 'backward') {
|
|
56
|
+
// Skip if value already provided
|
|
57
|
+
if (resolved[fieldName] !== undefined && resolved[fieldName] !== null) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
// Get the hint field value - uses fieldNameHint convention
|
|
61
|
+
const hintKey = `${fieldName}Hint`;
|
|
62
|
+
const searchQuery = data[hintKey] || field.prompt || '';
|
|
63
|
+
// Skip if no search query available (optional fields without hint)
|
|
64
|
+
if (!searchQuery) {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
// Check if provider supports semantic search
|
|
68
|
+
if (hasSemanticSearch(provider)) {
|
|
69
|
+
const matches = await provider.semanticSearch(field.relatedType, searchQuery, { minScore: threshold, limit: field.isArray ? 10 : 1 });
|
|
70
|
+
if (matches.length > 0) {
|
|
71
|
+
if (field.isArray) {
|
|
72
|
+
// For array fields, return all matches above threshold
|
|
73
|
+
resolved[fieldName] = matches
|
|
74
|
+
.filter((m) => m.$score >= threshold)
|
|
75
|
+
.map((m) => m.$id);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// For single fields, return the best match
|
|
79
|
+
const firstMatch = matches[0];
|
|
80
|
+
if (firstMatch) {
|
|
81
|
+
resolved[fieldName] = firstMatch.$id;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// Note: <~ typically doesn't generate - it grounds to existing data
|
|
87
|
+
// If no match found and field is optional, leave as undefined
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return resolved;
|
|
91
|
+
}
|
|
92
|
+
// =============================================================================
|
|
93
|
+
// Forward Fuzzy Resolution
|
|
94
|
+
// =============================================================================
|
|
95
|
+
/**
|
|
96
|
+
* Resolve forward fuzzy (~>) fields via semantic search then generation
|
|
97
|
+
*
|
|
98
|
+
* The ~> operator differs from -> in that it first attempts semantic search:
|
|
99
|
+
* - Searches existing entities via embedding similarity
|
|
100
|
+
* - If a match is found above threshold, reuses the existing entity
|
|
101
|
+
* - If no match is found, generates a new entity
|
|
102
|
+
* - Respects configurable similarity threshold ($fuzzyThreshold or field-level)
|
|
103
|
+
*
|
|
104
|
+
* @param typeName - The type of entity being created
|
|
105
|
+
* @param data - The input data including hint fields
|
|
106
|
+
* @param entity - The parsed entity definition
|
|
107
|
+
* @param schema - The parsed schema
|
|
108
|
+
* @param provider - The database provider (must support semanticSearch)
|
|
109
|
+
* @param parentId - Pre-generated ID of the parent entity for backward refs
|
|
110
|
+
* @returns Object with resolved data and pending relations for array fields
|
|
111
|
+
*/
|
|
112
|
+
export async function resolveForwardFuzzy(typeName, data, entity, schema, provider, parentId) {
|
|
113
|
+
const resolved = { ...data };
|
|
114
|
+
const pendingRelations = [];
|
|
115
|
+
// Default threshold from entity schema or 0.75
|
|
116
|
+
const defaultThreshold = getFuzzyThreshold(entity);
|
|
117
|
+
for (const [fieldName, field] of entity.fields) {
|
|
118
|
+
if (field.operator === '~>' && field.direction === 'forward') {
|
|
119
|
+
// Skip if value already provided
|
|
120
|
+
if (resolved[fieldName] !== undefined && resolved[fieldName] !== null) {
|
|
121
|
+
// If value is provided for array field, we still need to create relationships
|
|
122
|
+
if (field.isArray && Array.isArray(resolved[fieldName])) {
|
|
123
|
+
const ids = resolved[fieldName];
|
|
124
|
+
for (const targetId of ids) {
|
|
125
|
+
pendingRelations.push({ fieldName, targetType: field.relatedType, targetId });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
// Get the hint field value - uses fieldNameHint convention
|
|
131
|
+
const hintKey = `${fieldName}Hint`;
|
|
132
|
+
const hintValue = data[hintKey];
|
|
133
|
+
const searchQuery = (typeof hintValue === 'string' ? hintValue : undefined) || field.prompt || fieldName;
|
|
134
|
+
// Get threshold - field-level overrides entity-level
|
|
135
|
+
const threshold = field.threshold ?? defaultThreshold;
|
|
136
|
+
if (field.isArray) {
|
|
137
|
+
// Array fuzzy field - can contain both matched and generated
|
|
138
|
+
const hints = Array.isArray(hintValue) ? hintValue : [hintValue].filter(Boolean);
|
|
139
|
+
const resultIds = [];
|
|
140
|
+
const usedEntityIds = new Set(); // Track already-matched entities to avoid duplicates
|
|
141
|
+
for (const hint of hints) {
|
|
142
|
+
const hintStr = String(hint || fieldName);
|
|
143
|
+
let matched = false;
|
|
144
|
+
// Try semantic search first
|
|
145
|
+
if (hasSemanticSearch(provider)) {
|
|
146
|
+
const matches = await provider.semanticSearch(field.relatedType, hintStr, { minScore: threshold, limit: 10 } // Get more results to find unused matches
|
|
147
|
+
);
|
|
148
|
+
// Find the best match that hasn't been used yet
|
|
149
|
+
for (const match of matches) {
|
|
150
|
+
const matchId = match.$id;
|
|
151
|
+
if (match.$score >= threshold && !usedEntityIds.has(matchId)) {
|
|
152
|
+
resultIds.push(matchId);
|
|
153
|
+
usedEntityIds.add(matchId);
|
|
154
|
+
pendingRelations.push({
|
|
155
|
+
fieldName,
|
|
156
|
+
targetType: field.relatedType,
|
|
157
|
+
targetId: matchId,
|
|
158
|
+
similarity: match.$score
|
|
159
|
+
});
|
|
160
|
+
// Update the matched entity with $generated: false and similarity metadata
|
|
161
|
+
await provider.update(field.relatedType, matchId, {
|
|
162
|
+
$generated: false,
|
|
163
|
+
$similarity: match.$score
|
|
164
|
+
});
|
|
165
|
+
matched = true;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// Generate if no match found (or all matches were already used)
|
|
171
|
+
if (!matched) {
|
|
172
|
+
const generated = await generateEntity(field.relatedType, hintStr, { parent: typeName, parentData: data, parentId }, schema);
|
|
173
|
+
// Resolve any pending nested relations
|
|
174
|
+
const relatedEntity = schema.entities.get(field.relatedType);
|
|
175
|
+
if (relatedEntity) {
|
|
176
|
+
const resolvedGenerated = await resolveNestedPending(generated, relatedEntity, schema, provider);
|
|
177
|
+
const created = await provider.create(field.relatedType, undefined, {
|
|
178
|
+
...resolvedGenerated,
|
|
179
|
+
$generated: true,
|
|
180
|
+
$generatedBy: parentId,
|
|
181
|
+
$sourceField: fieldName
|
|
182
|
+
});
|
|
183
|
+
resultIds.push(created.$id);
|
|
184
|
+
pendingRelations.push({
|
|
185
|
+
fieldName,
|
|
186
|
+
targetType: field.relatedType,
|
|
187
|
+
targetId: created.$id
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
resolved[fieldName] = resultIds;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
// Single fuzzy field
|
|
196
|
+
let matched = false;
|
|
197
|
+
// Try semantic search first
|
|
198
|
+
if (hasSemanticSearch(provider)) {
|
|
199
|
+
const matches = await provider.semanticSearch(field.relatedType, searchQuery, { minScore: threshold, limit: 5 });
|
|
200
|
+
const firstMatch = matches[0];
|
|
201
|
+
if (firstMatch && firstMatch.$score >= threshold) {
|
|
202
|
+
const matchedId = firstMatch.$id;
|
|
203
|
+
resolved[fieldName] = matchedId;
|
|
204
|
+
resolved[`${fieldName}$matched`] = true;
|
|
205
|
+
resolved[`${fieldName}$score`] = firstMatch.$score;
|
|
206
|
+
pendingRelations.push({
|
|
207
|
+
fieldName,
|
|
208
|
+
targetType: field.relatedType,
|
|
209
|
+
targetId: matchedId,
|
|
210
|
+
similarity: firstMatch.$score
|
|
211
|
+
});
|
|
212
|
+
// Update the matched entity with $generated: false and similarity metadata
|
|
213
|
+
await provider.update(field.relatedType, matchedId, {
|
|
214
|
+
$generated: false,
|
|
215
|
+
$similarity: firstMatch.$score
|
|
216
|
+
});
|
|
217
|
+
matched = true;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// Generate if no match found
|
|
221
|
+
if (!matched) {
|
|
222
|
+
const generated = await generateEntity(field.relatedType, searchQuery, // Use searchQuery which prioritizes hint over field.prompt
|
|
223
|
+
{ parent: typeName, parentData: data, parentId }, schema);
|
|
224
|
+
// Resolve any pending nested relations
|
|
225
|
+
const relatedEntity = schema.entities.get(field.relatedType);
|
|
226
|
+
if (relatedEntity) {
|
|
227
|
+
const resolvedGenerated = await resolveNestedPending(generated, relatedEntity, schema, provider);
|
|
228
|
+
const created = await provider.create(field.relatedType, undefined, {
|
|
229
|
+
...resolvedGenerated,
|
|
230
|
+
$generated: true,
|
|
231
|
+
$generatedBy: parentId,
|
|
232
|
+
$sourceField: fieldName
|
|
233
|
+
});
|
|
234
|
+
resolved[fieldName] = created.$id;
|
|
235
|
+
pendingRelations.push({
|
|
236
|
+
fieldName,
|
|
237
|
+
targetType: field.relatedType,
|
|
238
|
+
targetId: created.$id
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
return { data: resolved, pendingRelations };
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=semantic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.js","sourceRoot":"","sources":["../../src/schema/semantic.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;;;;;GAUG;AACH,SAAS,iBAAiB,CAAC,MAAoB;IAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAkC,CAAA;IACxD,IAAI,MAAM,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,eAAe,CAAA;QACxC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,SAAS,CAAA;QAClB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;A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