chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase
This commit is contained in:
parent
970e08c466
commit
1f7e365a4e
237 changed files with 1951 additions and 49413 deletions
|
|
@ -36,6 +36,11 @@ export interface DetectedEntity {
|
|||
suggestedId: string
|
||||
reasoning: string
|
||||
alternativeTypes: Array<{ type: string, confidence: number }>
|
||||
/**
|
||||
* Subtype tag set by the extractor, if any. Takes precedence over
|
||||
* `NeuralImportOptions.defaultSubtype` during import execution.
|
||||
*/
|
||||
subtype?: string
|
||||
}
|
||||
|
||||
export interface DetectedRelationship {
|
||||
|
|
@ -47,6 +52,11 @@ export interface DetectedRelationship {
|
|||
reasoning: string
|
||||
context: string
|
||||
metadata?: Record<string, any>
|
||||
/**
|
||||
* Subtype tag set by the extractor, if any. Takes precedence over
|
||||
* `NeuralImportOptions.defaultSubtype` during import execution.
|
||||
*/
|
||||
subtype?: string
|
||||
}
|
||||
|
||||
export interface NeuralInsight {
|
||||
|
|
@ -791,7 +801,7 @@ export class NeuralImport {
|
|||
await this.brainy.add({
|
||||
data: this.extractMainText(entity.originalData),
|
||||
type: entity.nounType as NounType,
|
||||
subtype: (entity as any).subtype ?? options.defaultSubtype ?? 'extracted',
|
||||
subtype: entity.subtype ?? options.defaultSubtype ?? 'extracted',
|
||||
metadata: {
|
||||
...entity.originalData,
|
||||
confidence: entity.confidence,
|
||||
|
|
@ -806,7 +816,7 @@ export class NeuralImport {
|
|||
from: relationship.sourceId,
|
||||
to: relationship.targetId,
|
||||
type: relationship.verbType as VerbType,
|
||||
subtype: (relationship as any).subtype ?? options.defaultSubtype ?? 'extracted',
|
||||
subtype: relationship.subtype ?? options.defaultSubtype ?? 'extracted',
|
||||
weight: relationship.weight,
|
||||
confidence: relationship.confidence, // reserved field — dedicated param, not metadata
|
||||
metadata: {
|
||||
|
|
|
|||
Reference in a new issue