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:
David Snelling 2026-02-02 09:20:38 -08:00
parent 0ec3d85c39
commit 932fb9520b
6 changed files with 31 additions and 48 deletions

View file

@ -369,12 +369,14 @@ export interface GraphNoun {
*/
export interface GraphVerb {
id: string // Unique identifier for the verb
source: string // ID of the source noun
target: string // ID of the target noun
source: string // Entity UUID of the source noun
target: string // Entity UUID of the target noun
sourceId?: string // Alias for source (coreTypes compatibility)
targetId?: string // Alias for target (coreTypes compatibility)
label?: string // Optional descriptive label
verb: VerbType // Type of relationship
createdAt: Timestamp // When the verb was created
updatedAt: Timestamp // When the verb was last updated
createdAt: Timestamp | number // When the verb was created
updatedAt: Timestamp | number // When the verb was last updated
createdBy: CreatorMetadata // Information about what created this verb
service?: string // Multi-tenancy support - which service created this verb
data?: Record<string, any> // Additional flexible data storage