Add features across agents, collab, trust, indexes, and hyperbee.
Manual pass: task cancelTask, workflow topologicalOrder/fail/reset, collab kick/replay, trust trustedPeers and multisig TTL sweep, graph shortestPath, inverted topTerms, dedup filterNew, bee notifyBatch/seekVersion — all with tests. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -10,6 +10,18 @@ test('trust-graph: edge and score', async (t) => {
|
||||
await g.close()
|
||||
})
|
||||
|
||||
test('trust-graph: neighbors and trustedPeers', async (t) => {
|
||||
const g = new HyperP2PTrustGraph()
|
||||
g.addEdge('a', 'b', 0.9)
|
||||
t.ok(g.listNeighbors('a').includes('b'))
|
||||
t.ok(g.removeEdge('a', 'b'))
|
||||
t.is(g.listNeighbors('a').length, 0)
|
||||
g.addEdge('a', 'b', 1)
|
||||
const trusted = g.trustedPeers('a', 0.5)
|
||||
t.ok(trusted.length >= 1)
|
||||
await g.close()
|
||||
})
|
||||
|
||||
test('trust-graph: merge', async (t) => {
|
||||
const a = new HyperP2PTrustGraph()
|
||||
const b = new HyperP2PTrustGraph()
|
||||
|
||||
Reference in New Issue
Block a user