aifastdb 3.1.1 → 3.1.3
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/aifastdb.win32-x64-msvc.node +0 -0
- package/dist/llm-gateway.d.ts +12 -0
- package/dist/llm-gateway.d.ts.map +1 -1
- package/dist/llm-gateway.js.map +1 -1
- package/package.json +4 -1
- package/dist/carpool/carpool-matcher.test.d.ts +0 -9
- package/dist/carpool/carpool-matcher.test.d.ts.map +0 -1
- package/dist/carpool/carpool-matcher.test.js +0 -413
- package/dist/carpool/carpool-matcher.test.js.map +0 -1
- package/dist/carpool/carpool-repo.test.d.ts +0 -9
- package/dist/carpool/carpool-repo.test.d.ts.map +0 -1
- package/dist/carpool/carpool-repo.test.js +0 -462
- package/dist/carpool/carpool-repo.test.js.map +0 -1
- package/dist/carpool/carpool-service.test.d.ts +0 -9
- package/dist/carpool/carpool-service.test.d.ts.map +0 -1
- package/dist/carpool/carpool-service.test.js +0 -465
- package/dist/carpool/carpool-service.test.js.map +0 -1
- package/dist/carpool/vehicle.test.d.ts +0 -8
- package/dist/carpool/vehicle.test.d.ts.map +0 -1
- package/dist/carpool/vehicle.test.js +0 -551
- package/dist/carpool/vehicle.test.js.map +0 -1
- package/dist/social-graph-v2-traversal.test.d.ts +0 -14
- package/dist/social-graph-v2-traversal.test.d.ts.map +0 -1
- package/dist/social-graph-v2-traversal.test.js +0 -212
- package/dist/social-graph-v2-traversal.test.js.map +0 -1
- package/dist/social-graph-v2-uri.test.d.ts +0 -12
- package/dist/social-graph-v2-uri.test.d.ts.map +0 -1
- package/dist/social-graph-v2-uri.test.js +0 -141
- package/dist/social-graph-v2-uri.test.js.map +0 -1
- package/dist/social-graph-v2-vector.test.d.ts +0 -14
- package/dist/social-graph-v2-vector.test.d.ts.map +0 -1
- package/dist/social-graph-v2-vector.test.js +0 -251
- package/dist/social-graph-v2-vector.test.js.map +0 -1
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* SocialGraphV2 Graph Traversal & Mutations — Integration Test (T107.4)
|
|
5
|
-
*
|
|
6
|
-
* Covers:
|
|
7
|
-
* - outgoingByType / incomingByType (typed relation queries)
|
|
8
|
-
* - extractSubgraph (N-hop sub-graph extraction)
|
|
9
|
-
* - traverse (BFS/DFS/WeightedBFS)
|
|
10
|
-
* - applyMutations (batch graph mutations)
|
|
11
|
-
* - updateRelationWeight / adjustRelationWeight / updateRelationMetadata
|
|
12
|
-
* - dynamicRecordAccess / dynamicDemote / dynamicPromote / dynamicScan
|
|
13
|
-
*/
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
const os = __importStar(require("os"));
|
|
49
|
-
const path = __importStar(require("path"));
|
|
50
|
-
const fs = __importStar(require("fs"));
|
|
51
|
-
const social_graph_v2_1 = require("./social-graph-v2");
|
|
52
|
-
// ============================================================================
|
|
53
|
-
// Test Utilities
|
|
54
|
-
// ============================================================================
|
|
55
|
-
let passed = 0;
|
|
56
|
-
let failed = 0;
|
|
57
|
-
const failures = [];
|
|
58
|
-
function assert(condition, message) {
|
|
59
|
-
if (condition) {
|
|
60
|
-
passed++;
|
|
61
|
-
console.log(` ✅ ${message}`);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
failed++;
|
|
65
|
-
failures.push(message);
|
|
66
|
-
console.log(` ❌ ${message}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function section(name) {
|
|
70
|
-
console.log(`\n── ${name} ──`);
|
|
71
|
-
}
|
|
72
|
-
function createTempDir() {
|
|
73
|
-
const dir = path.join(os.tmpdir(), `sgv2-traversal-test-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
74
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
75
|
-
return dir;
|
|
76
|
-
}
|
|
77
|
-
function cleanup(dir) {
|
|
78
|
-
try {
|
|
79
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
80
|
-
}
|
|
81
|
-
catch { /* ignore */ }
|
|
82
|
-
}
|
|
83
|
-
// ============================================================================
|
|
84
|
-
// Main Test
|
|
85
|
-
// ============================================================================
|
|
86
|
-
async function main() {
|
|
87
|
-
passed = 0;
|
|
88
|
-
failed = 0;
|
|
89
|
-
failures.length = 0;
|
|
90
|
-
console.log('=== SocialGraphV2 Traversal & Mutations Tests (Phase-107) ===\n');
|
|
91
|
-
const dir = createTempDir();
|
|
92
|
-
let sg;
|
|
93
|
-
try {
|
|
94
|
-
sg = social_graph_v2_1.SocialGraphV2.open(dir);
|
|
95
|
-
// Build a small test graph:
|
|
96
|
-
// Alice --FRIEND--> Bob --FRIEND--> Charlie
|
|
97
|
-
// Alice --COLLEAGUE--> Dave
|
|
98
|
-
// Bob --COLLEAGUE--> Eve
|
|
99
|
-
sg.addPerson({ id: 'alice', name: 'Alice', properties: { gender: 'F' } });
|
|
100
|
-
sg.addPerson({ id: 'bob', name: 'Bob', properties: { gender: 'M' } });
|
|
101
|
-
sg.addPerson({ id: 'charlie', name: 'Charlie', properties: { gender: 'M' } });
|
|
102
|
-
sg.addPerson({ id: 'dave', name: 'Dave', properties: { gender: 'M' } });
|
|
103
|
-
sg.addPerson({ id: 'eve', name: 'Eve', properties: { gender: 'F' } });
|
|
104
|
-
sg.addFriend('alice', 'bob', { relationType: 'friend', weight: 0.9 });
|
|
105
|
-
sg.addFriend('bob', 'charlie', { relationType: 'friend', weight: 0.8 });
|
|
106
|
-
sg.addFriend('alice', 'dave', { relationType: 'colleague', weight: 0.5 });
|
|
107
|
-
sg.addFriend('bob', 'eve', { relationType: 'colleague', weight: 0.3 });
|
|
108
|
-
// ── Typed Relation Queries ──
|
|
109
|
-
section('outgoingByType / incomingByType');
|
|
110
|
-
const friendsFromAlice = sg.outgoingByType('alice', 'FRIEND');
|
|
111
|
-
assert(friendsFromAlice.length >= 1, `outgoingByType FRIEND from Alice found ${friendsFromAlice.length} relation(s)`);
|
|
112
|
-
const colleaguesFromAlice = sg.outgoingByType('alice', 'COLLEAGUE');
|
|
113
|
-
assert(colleaguesFromAlice.length >= 1, `outgoingByType COLLEAGUE from Alice found ${colleaguesFromAlice.length} relation(s)`);
|
|
114
|
-
const incomingToBob = sg.incomingByType('bob', 'FRIEND');
|
|
115
|
-
assert(incomingToBob.length >= 1, `incomingByType FRIEND to Bob found ${incomingToBob.length} relation(s)`);
|
|
116
|
-
// ── Sub-graph Extraction ──
|
|
117
|
-
section('extractSubgraph');
|
|
118
|
-
const subgraph1 = sg.extractSubgraph('alice', { max_hops: 1 });
|
|
119
|
-
assert(subgraph1 != null, 'extractSubgraph returned a result');
|
|
120
|
-
assert(subgraph1.root_id === 'alice', 'subgraph root_id is alice');
|
|
121
|
-
assert(subgraph1.entity_count >= 3, `subgraph 1-hop has ${subgraph1.entity_count} entities (≥3 expected: alice+bob+dave)`);
|
|
122
|
-
const subgraph2 = sg.extractSubgraph('alice', { max_hops: 2 });
|
|
123
|
-
assert(subgraph2.entity_count >= 4, `subgraph 2-hop has ${subgraph2.entity_count} entities (≥4 expected)`);
|
|
124
|
-
const subgraphFiltered = sg.extractSubgraph('alice', { max_hops: 2, relation_type_filter: ['FRIEND'] });
|
|
125
|
-
// With FRIEND filter: alice → bob → charlie, should not include dave/eve (COLLEAGUE)
|
|
126
|
-
assert(subgraphFiltered.entity_count >= 2, `subgraph FRIEND-only has ${subgraphFiltered.entity_count} entities`);
|
|
127
|
-
// ── Graph Traversal ──
|
|
128
|
-
section('traverse');
|
|
129
|
-
const bfsResult = sg.traverse('alice', { max_hops: 3, strategy: 'BFS' });
|
|
130
|
-
assert(bfsResult != null, 'BFS traverse returned a result');
|
|
131
|
-
assert(bfsResult.visited_order.length >= 3, `BFS visited ${bfsResult.visited_order.length} entities`);
|
|
132
|
-
assert(bfsResult.visited_order[0] === 'alice', 'BFS starts with alice');
|
|
133
|
-
const dfsResult = sg.traverse('alice', { max_hops: 3, strategy: 'DFS' });
|
|
134
|
-
assert(dfsResult != null, 'DFS traverse returned a result');
|
|
135
|
-
assert(dfsResult.visited_order.length >= 3, `DFS visited ${dfsResult.visited_order.length} entities`);
|
|
136
|
-
const weightedResult = sg.traverse('alice', { max_hops: 2, strategy: 'WeightedBFS' });
|
|
137
|
-
assert(weightedResult != null, 'WeightedBFS traverse returned a result');
|
|
138
|
-
assert(weightedResult.visited_order.length >= 2, `WeightedBFS visited ${weightedResult.visited_order.length} entities`);
|
|
139
|
-
// ── Relation Weight Updates ──
|
|
140
|
-
section('updateRelationWeight / adjustRelationWeight / updateRelationMetadata');
|
|
141
|
-
// Find a relation to update
|
|
142
|
-
const aliceRels = sg.getEntityRelations('alice');
|
|
143
|
-
const friendRel = aliceRels.find((r) => r.relation_type === 'FRIEND' || r.relationType === 'FRIEND');
|
|
144
|
-
if (friendRel) {
|
|
145
|
-
const relId = friendRel.id;
|
|
146
|
-
await sg.updateRelationWeight(relId, 'alice', 0.95);
|
|
147
|
-
assert(true, `updateRelationWeight succeeded for relation ${relId}`);
|
|
148
|
-
await sg.adjustRelationWeight(relId, 'alice', 0.02);
|
|
149
|
-
assert(true, `adjustRelationWeight succeeded for relation ${relId}`);
|
|
150
|
-
await sg.updateRelationMetadata(relId, 'alice', 'note', 'best-friend');
|
|
151
|
-
assert(true, `updateRelationMetadata succeeded for relation ${relId}`);
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
assert(false, 'Could not find a FRIEND relation to test updates on');
|
|
155
|
-
}
|
|
156
|
-
// ── Batch Mutations ──
|
|
157
|
-
section('applyMutations');
|
|
158
|
-
const mutCount = await sg.applyMutations([
|
|
159
|
-
{
|
|
160
|
-
type: 'PutEntity',
|
|
161
|
-
entity: { id: 'frank', name: 'Frank', entity_type: 'person', properties: {}, memory_refs: [], created_at: Date.now(), updated_at: Date.now() },
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
type: 'PutRelation',
|
|
165
|
-
relation: { id: 'rel-frank-alice', source: 'frank', target: 'alice', relation_type: 'FRIEND', weight: 0.7, bidirectional: false, metadata: {}, created_at: Date.now() },
|
|
166
|
-
},
|
|
167
|
-
]);
|
|
168
|
-
assert(mutCount === 2, `applyMutations applied ${mutCount} mutations (expected 2)`);
|
|
169
|
-
// Verify the entity was created
|
|
170
|
-
const frank = sg.getEntity('frank');
|
|
171
|
-
assert(frank != null, 'Frank entity exists after PutEntity mutation');
|
|
172
|
-
// ── Dynamic Node Management ──
|
|
173
|
-
section('dynamicRecordAccess / dynamicDemote / dynamicPromote');
|
|
174
|
-
const stats = sg.dynamicRecordAccess('alice');
|
|
175
|
-
assert(stats != null, 'dynamicRecordAccess returned stats for alice');
|
|
176
|
-
if (stats) {
|
|
177
|
-
assert(stats.hit_count >= 1, `alice hit_count=${stats.hit_count} after recordAccess`);
|
|
178
|
-
}
|
|
179
|
-
const demoted = sg.dynamicDemote('charlie');
|
|
180
|
-
assert(typeof demoted === 'boolean', `dynamicDemote returned boolean: ${demoted}`);
|
|
181
|
-
const isShadow = sg.isShadowEntity('charlie');
|
|
182
|
-
assert(typeof isShadow === 'boolean', `isShadowEntity returned boolean: ${isShadow}`);
|
|
183
|
-
if (isShadow) {
|
|
184
|
-
const promoted = sg.dynamicPromote('charlie');
|
|
185
|
-
assert(typeof promoted === 'boolean', `dynamicPromote returned boolean: ${promoted}`);
|
|
186
|
-
}
|
|
187
|
-
// ── Summary ──
|
|
188
|
-
console.log(`\n${'═'.repeat(50)}`);
|
|
189
|
-
console.log(`Total: ${passed + failed} | ✅ Passed: ${passed} | ❌ Failed: ${failed}`);
|
|
190
|
-
if (failures.length > 0) {
|
|
191
|
-
console.log('\nFailures:');
|
|
192
|
-
failures.forEach((f) => console.log(` - ${f}`));
|
|
193
|
-
}
|
|
194
|
-
console.log(`${'═'.repeat(50)}`);
|
|
195
|
-
}
|
|
196
|
-
finally {
|
|
197
|
-
cleanup(dir);
|
|
198
|
-
}
|
|
199
|
-
if (failed > 0) {
|
|
200
|
-
throw new Error(`SocialGraphV2 traversal test failed (${failed} failures)`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
if (require.main === module) {
|
|
204
|
-
main().catch((err) => {
|
|
205
|
-
console.error('Fatal error:', err);
|
|
206
|
-
process.exit(2);
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
test('SocialGraphV2 traversal & mutations integration', async () => {
|
|
210
|
-
await main();
|
|
211
|
-
});
|
|
212
|
-
//# sourceMappingURL=social-graph-v2-traversal.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"social-graph-v2-traversal.test.js","sourceRoot":"","sources":["../ts/social-graph-v2-traversal.test.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,uDAAkD;AAElD,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,MAAM,QAAQ,GAAa,EAAE,CAAC;AAE9B,SAAS,MAAM,CAAC,SAAkB,EAAE,OAAe;IACjD,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,CAAC;QACT,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC;IAChC,CAAC;AACH,CAAC;AAED,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,uBAAuB,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/G,EAAE,CAAC,SAAS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CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAC3B,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAEnC,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,wCAAwC,MAAM,YAAY,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;IACjE,MAAM,IAAI,EAAE,CAAC;AACf,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* SocialGraphV2 URI / Path Indexing — Integration Test (T132.5)
|
|
4
|
-
*
|
|
5
|
-
* Covers:
|
|
6
|
-
* - anchorUpsert() auto URI/path generation
|
|
7
|
-
* - anchorFindByUri() direct URI lookup
|
|
8
|
-
* - anchorListByPath() directory-style browsing
|
|
9
|
-
* - anchorBackfillUriPath() idempotent migration API
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=social-graph-v2-uri.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"social-graph-v2-uri.test.d.ts","sourceRoot":"","sources":["../ts/social-graph-v2-uri.test.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* SocialGraphV2 URI / Path Indexing — Integration Test (T132.5)
|
|
5
|
-
*
|
|
6
|
-
* Covers:
|
|
7
|
-
* - anchorUpsert() auto URI/path generation
|
|
8
|
-
* - anchorFindByUri() direct URI lookup
|
|
9
|
-
* - anchorListByPath() directory-style browsing
|
|
10
|
-
* - anchorBackfillUriPath() idempotent migration API
|
|
11
|
-
*/
|
|
12
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(o, k2, desc);
|
|
19
|
-
}) : (function(o, m, k, k2) {
|
|
20
|
-
if (k2 === undefined) k2 = k;
|
|
21
|
-
o[k2] = m[k];
|
|
22
|
-
}));
|
|
23
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
-
}) : function(o, v) {
|
|
26
|
-
o["default"] = v;
|
|
27
|
-
});
|
|
28
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
-
var ownKeys = function(o) {
|
|
30
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
-
var ar = [];
|
|
32
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
-
return ar;
|
|
34
|
-
};
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
const os = __importStar(require("os"));
|
|
47
|
-
const path = __importStar(require("path"));
|
|
48
|
-
const fs = __importStar(require("fs"));
|
|
49
|
-
const social_graph_v2_1 = require("./social-graph-v2");
|
|
50
|
-
let passed = 0;
|
|
51
|
-
let failed = 0;
|
|
52
|
-
const failures = [];
|
|
53
|
-
function assert(condition, message) {
|
|
54
|
-
if (condition) {
|
|
55
|
-
passed++;
|
|
56
|
-
console.log(` OK ${message}`);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
failed++;
|
|
60
|
-
failures.push(message);
|
|
61
|
-
console.log(` FAIL ${message}`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function section(name) {
|
|
65
|
-
console.log(`\n-- ${name} --`);
|
|
66
|
-
}
|
|
67
|
-
function createTempDir() {
|
|
68
|
-
const dir = path.join(os.tmpdir(), `sgv2-uri-test-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
69
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
70
|
-
return dir;
|
|
71
|
-
}
|
|
72
|
-
function cleanup(dir) {
|
|
73
|
-
try {
|
|
74
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
// ignore
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
async function main() {
|
|
81
|
-
passed = 0;
|
|
82
|
-
failed = 0;
|
|
83
|
-
failures.length = 0;
|
|
84
|
-
console.log('=== SocialGraphV2 URI / Path Integration Test (Phase-132) ===');
|
|
85
|
-
const dir = createTempDir();
|
|
86
|
-
let sg = null;
|
|
87
|
-
try {
|
|
88
|
-
sg = social_graph_v2_1.SocialGraphV2.open(dir);
|
|
89
|
-
section('anchorUpsert auto URI/path');
|
|
90
|
-
const rag = sg.anchorUpsert('RagChat', 'module', 'RAG chat module');
|
|
91
|
-
const planner = sg.anchorUpsert('Query Planner', 'module', 'planner module');
|
|
92
|
-
const concept = sg.anchorUpsert('Score Propagation', 'concept', 'ranking strategy');
|
|
93
|
-
assert(!!rag.uri && rag.uri.startsWith('aidb://memory/anchors/module/'), 'rag.uri generated');
|
|
94
|
-
assert(rag.path === 'anchors/module/ragchat', 'rag.path normalized to anchors/module/ragchat');
|
|
95
|
-
assert(planner.path === 'anchors/module/query-planner', 'planner.path slug normalized');
|
|
96
|
-
assert(concept.path === 'anchors/concept/score-propagation', 'concept.path slug normalized');
|
|
97
|
-
section('anchorFindByUri direct lookup');
|
|
98
|
-
const foundByUri = rag.uri ? sg.anchorFindByUri(rag.uri) : null;
|
|
99
|
-
assert(foundByUri !== null, 'anchorFindByUri returns anchor');
|
|
100
|
-
assert(foundByUri?.id === rag.id, 'anchorFindByUri returns expected anchor id');
|
|
101
|
-
section('anchorListByPath directory browsing');
|
|
102
|
-
const moduleAnchors = sg.anchorListByPath('anchors/module');
|
|
103
|
-
assert(moduleAnchors.length >= 2, 'path prefix anchors/module returns module anchors');
|
|
104
|
-
assert(moduleAnchors.some((a) => a.id === rag.id) &&
|
|
105
|
-
moduleAnchors.some((a) => a.id === planner.id), 'module path contains rag and planner anchors');
|
|
106
|
-
assert(moduleAnchors.every((a) => (a.path ?? '').startsWith('anchors/module/')), 'module path result items keep module prefix');
|
|
107
|
-
const moduleAnchorsByUri = sg.anchorListByPath('aidb://memory/anchors/module');
|
|
108
|
-
assert(moduleAnchorsByUri.length >= 2, 'URI prefix works for directory listing');
|
|
109
|
-
section('anchorBackfillUriPath idempotent migration API');
|
|
110
|
-
const first = sg.anchorBackfillUriPath();
|
|
111
|
-
assert(first.total_anchors >= 3, 'backfill report total_anchors is valid');
|
|
112
|
-
assert(first.updated_anchors === 0, 'fresh data should not need backfill updates');
|
|
113
|
-
const second = sg.anchorBackfillUriPath();
|
|
114
|
-
assert(second.updated_anchors === 0, 'second backfill remains zero updates (idempotent)');
|
|
115
|
-
assert(second.unchanged_anchors >= 3, 'second backfill unchanged_anchors is valid');
|
|
116
|
-
console.log(`\nTotal: ${passed + failed} | Passed: ${passed} | Failed: ${failed}`);
|
|
117
|
-
if (failures.length > 0) {
|
|
118
|
-
console.log('Failures:');
|
|
119
|
-
for (const f of failures)
|
|
120
|
-
console.log(` - ${f}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
finally {
|
|
124
|
-
if (sg)
|
|
125
|
-
sg.shutdown();
|
|
126
|
-
cleanup(dir);
|
|
127
|
-
}
|
|
128
|
-
if (failed > 0) {
|
|
129
|
-
throw new Error(`SocialGraphV2 URI test failed (${failed} failures)`);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
if (require.main === module) {
|
|
133
|
-
main().catch((err) => {
|
|
134
|
-
console.error('Fatal error:', err);
|
|
135
|
-
process.exit(2);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
test('SocialGraphV2 URI / Path integration', async () => {
|
|
139
|
-
await main();
|
|
140
|
-
});
|
|
141
|
-
//# sourceMappingURL=social-graph-v2-uri.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"social-graph-v2-uri.test.js","sourceRoot":"","sources":["../ts/social-graph-v2-uri.test.ts"],"names":[],"mappings":";;AACA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,uDAAkD;AAElD,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,IAAI,MA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AM,GAAG,MAAM,cAAc,MAAM,cAAc,MAAM,EAAE,CAAC,CAAC;QACnF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACzB,KAAK,MAAM,CAAC,IAAI,QAAQ;gBAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;YAAS,CAAC;QACT,IAAI,EAAE;YAAE,EAAE,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAED,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,MAAM,YAAY,CAAC,CAAC;IACxE,CAAC;AACH,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;IACtD,MAAM,IAAI,EAAE,CAAC;AACf,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* SocialGraphV2 Vector Search — Integration Test (T32.4)
|
|
4
|
-
*
|
|
5
|
-
* Covers:
|
|
6
|
-
* - Vector search configuration via constructor
|
|
7
|
-
* - isVectorSearchEnabled / vectorCount
|
|
8
|
-
* - indexEntity / removeEntityVector
|
|
9
|
-
* - searchEntitiesByVector (k-NN)
|
|
10
|
-
* - hybridSearch (vector + text fusion)
|
|
11
|
-
* - Entity type filtering
|
|
12
|
-
*/
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=social-graph-v2-vector.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"social-graph-v2-vector.test.d.ts","sourceRoot":"","sources":["../ts/social-graph-v2-vector.test.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG"}
|