Defines the optional native graph-acceleration provider (cor 3.0) that
brainy feature-detects and routes brain.graph.* / related({node}) /
find({connected}) to, falling back to pure-TS adjacency when absent. This is
the published seam cor wires its native build against (mirrors the existing
VersionedIndexProvider pattern: defined in plugin.ts, exported from index.ts,
implemented externally, feature-detected at runtime).
Contract (locked cross-team in the design thread):
- GraphAccelerationProvider: traverse, edgesForNode, graphCursorOpen/Next/Close,
pageRank, connectedComponents, shortestPath, neighborhoodSample, topByDegree.
Every read op is generation-aware (optional trailing generation?: bigint) so
db.asOf(g).graph.* resolves historically; omitted = now.
- Subgraph: columnar wire format (BigInt64Array node/edge columns, Uint16Array
edgeTypes, optional Uint8Array nodeDepth, truncated flag) — parallel typed
arrays, never array-of-objects; brainy maps u64<->UUID lazily for rendered rows.
- OpaqueIdSet: a find() universe forwarded opaquely into traverse/search for the
zero-crossing query->expand fusion (brainy never inspects it; the provider
version-tags + validates the envelope).
- VectorIndexProvider.search gains allowedIds?: OpaqueIdSet | ReadonlySet<string>
(predicate pushdown — recovers filtered recall lost to post-filtering).
- EntityIdMapperProvider gains entityIntsToUuids(BigInt64Array) — the bigint batch
reverse resolver for Subgraph.nodes; implemented on the JS mapper (TS fallback).
All new public types exported from index.ts. Test: entityIntsToUuids round-trip
+ order-preservation + empty-int sentinel.
|
||
|---|---|---|
| .. | ||
| roaring | ||
| adaptiveBackpressure.ts | ||
| BoundedRegistry.ts | ||
| brainyTypes.ts | ||
| callerLocation.ts | ||
| collation.ts | ||
| contentExtractor.ts | ||
| crypto.ts | ||
| deletedItemsIndex.ts | ||
| distance.ts | ||
| embedding.ts | ||
| ensureDeleted.ts | ||
| entityIdMapper.ts | ||
| environment.ts | ||
| fieldNameTracking.ts | ||
| fieldTypeInference.ts | ||
| idNormalization.ts | ||
| import-progress-tracker.ts | ||
| index.ts | ||
| jsonProcessing.ts | ||
| logger.ts | ||
| memoryDetection.ts | ||
| metadataFilter.ts | ||
| metadataIndex.ts | ||
| metadataIndexCache.ts | ||
| metadataIndexChunking.ts | ||
| metadataNamespace.ts | ||
| metadataWriteBuffer.ts | ||
| mutex.ts | ||
| operationUtils.ts | ||
| paramValidation.ts | ||
| performanceMonitor.ts | ||
| rebuildCounts.ts | ||
| recallPreset.ts | ||
| resultRanking.ts | ||
| statisticsCollector.ts | ||
| structuredLogger.ts | ||
| typeUtils.ts | ||
| typeValidation.ts | ||
| unifiedCache.ts | ||
| version.ts | ||
| writeBuffer.ts | ||