fix: set verb.source/target to entity UUID instead of NounType
relate() was setting verb.source = fromEntity.type (a NounType like "concept") instead of the entity UUID. Cortex's graph index indexes by verb.source, so lookups by UUID found nothing — causing in-session reads to return 0 results. Also fixes: - PathResolver calling private getIdsFromChunks() → public getIds() - Plugin auto-detection removed; cortex loads only via explicit config - GraphVerb types accept number timestamps and sourceId/targetId aliases - Dead autoDetect() method removed from PluginRegistry - In-session regression tests added for getRelations after relate()
This commit is contained in:
parent
0ec3d85c39
commit
932fb9520b
6 changed files with 31 additions and 48 deletions
|
|
@ -84,29 +84,6 @@ export class PluginRegistry {
|
|||
this.plugins.set(plugin.name, plugin)
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto-detect known plugins by attempting dynamic import.
|
||||
* Additional package names can be passed for third-party plugins.
|
||||
*/
|
||||
async autoDetect(additionalPackages: string[] = []): Promise<void> {
|
||||
const packages = [
|
||||
'@soulcraft/cortex',
|
||||
'@soulcraft/brainy-cortex', // deprecated — backward compat
|
||||
...additionalPackages
|
||||
]
|
||||
|
||||
for (const pkg of packages) {
|
||||
try {
|
||||
const mod = await import(pkg)
|
||||
const plugin: BrainyPlugin = mod.default || mod
|
||||
if (plugin && typeof plugin.activate === 'function' && plugin.name) {
|
||||
this.plugins.set(plugin.name, plugin)
|
||||
}
|
||||
} catch {
|
||||
// Package not installed — skip silently
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate all registered plugins.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue