@equationalapplications/core-llm-wiki 6.0.1 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,9 @@ type OntologyMode = 'strict' | 'emergent' | 'off';
36
36
  interface OntologyNodeType {
37
37
  type: string;
38
38
  description: string;
39
+ /** Optional parent type slug. One level only — the parent must exist in the
40
+ * same manifest and must not itself declare a `parent_type`. */
41
+ parent_type?: string;
39
42
  }
40
43
  interface OntologyEdgeType {
41
44
  type: string;
@@ -36,6 +36,9 @@ type OntologyMode = 'strict' | 'emergent' | 'off';
36
36
  interface OntologyNodeType {
37
37
  type: string;
38
38
  description: string;
39
+ /** Optional parent type slug. One level only — the parent must exist in the
40
+ * same manifest and must not itself declare a `parent_type`. */
41
+ parent_type?: string;
39
42
  }
40
43
  interface OntologyEdgeType {
41
44
  type: string;
@@ -1,3 +1,3 @@
1
- export { a3 as EmbeddingService, a4 as ImportExportService, a5 as IngestionService, a6 as JobManager, a6 as JobManagerType, a7 as MaintenanceService, a8 as RetrievalService, a9 as SearchService, a9 as SearchServiceType, Y as WikiMemoryTestAccess, aa as WriteService } from './testing-DgqVB29I.mjs';
1
+ export { a3 as EmbeddingService, a4 as ImportExportService, a5 as IngestionService, a6 as JobManager, a6 as JobManagerType, a7 as MaintenanceService, a8 as RetrievalService, a9 as SearchService, a9 as SearchServiceType, Y as WikiMemoryTestAccess, aa as WriteService } from './testing-D0m2V9-E.mjs';
2
2
  import '@equationalapplications/core-okf';
3
3
  import 'minisearch';
package/dist/testing.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { a3 as EmbeddingService, a4 as ImportExportService, a5 as IngestionService, a6 as JobManager, a6 as JobManagerType, a7 as MaintenanceService, a8 as RetrievalService, a9 as SearchService, a9 as SearchServiceType, Y as WikiMemoryTestAccess, aa as WriteService } from './testing-DgqVB29I.js';
1
+ export { a3 as EmbeddingService, a4 as ImportExportService, a5 as IngestionService, a6 as JobManager, a6 as JobManagerType, a7 as MaintenanceService, a8 as RetrievalService, a9 as SearchService, a9 as SearchServiceType, Y as WikiMemoryTestAccess, aa as WriteService } from './testing-D0m2V9-E.js';
2
2
  import '@equationalapplications/core-okf';
3
3
  import 'minisearch';
package/dist/testing.js CHANGED
@@ -745,6 +745,17 @@ var EmbeddingService = class {
745
745
  function normalizeTitleKey(title) {
746
746
  return title.trim().toLowerCase().replace(/\s+/g, " ");
747
747
  }
748
+ function typeSatisfies(declaredType, concreteType, manifest) {
749
+ const concrete = concreteType.trim().toLowerCase();
750
+ const declared = declaredType.trim().toLowerCase();
751
+ if (!concrete || !declared) return false;
752
+ if (declared === concrete) return true;
753
+ const def = (manifest.node_types ?? []).find(
754
+ (n) => typeof n?.type === "string" && n.type.trim().toLowerCase() === concrete
755
+ );
756
+ const parent = typeof def?.parent_type === "string" ? def.parent_type.trim().toLowerCase() : "";
757
+ return parent !== "" && parent === declared;
758
+ }
748
759
 
749
760
  // src/repositories/MetadataRepository.ts
750
761
  function entitySummaryMetaKey(entityId) {
@@ -1735,7 +1746,7 @@ var IngestionService = class {
1735
1746
  }
1736
1747
  const sourceType = sourceIdToType.get(edge.sourceId);
1737
1748
  const candidates = (manifest.edge_types ?? []).filter(
1738
- (d) => d.type.toLowerCase() === edge.type.toLowerCase() && d.source_type.toLowerCase() === (sourceType ?? "").toLowerCase()
1749
+ (d) => d.type.toLowerCase() === edge.type.toLowerCase() && typeSatisfies(d.source_type, sourceType ?? "", manifest)
1739
1750
  );
1740
1751
  const match = candidates[0];
1741
1752
  if (!match) {