@soulcraft/brainy 5.4.0 → 5.6.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +4 -3
  3. package/dist/augmentations/display/fieldPatterns.js +3 -3
  4. package/dist/augmentations/display/intelligentComputation.d.ts +1 -1
  5. package/dist/augmentations/display/intelligentComputation.js +1 -3
  6. package/dist/augmentations/typeMatching/brainyTypes.d.ts +1 -1
  7. package/dist/augmentations/typeMatching/brainyTypes.js +7 -9
  8. package/dist/augmentations/typeMatching/intelligentTypeMatcher.d.ts +1 -1
  9. package/dist/augmentations/typeMatching/intelligentTypeMatcher.js +1 -1
  10. package/dist/augmentations/universalDisplayAugmentation.d.ts +1 -1
  11. package/dist/augmentations/universalDisplayAugmentation.js +1 -1
  12. package/dist/brainy.js +2 -2
  13. package/dist/cli/commands/types.js +2 -2
  14. package/dist/cortex/neuralImport.js +0 -1
  15. package/dist/hnsw/typeAwareHNSWIndex.d.ts +3 -3
  16. package/dist/hnsw/typeAwareHNSWIndex.js +5 -5
  17. package/dist/importers/SmartExcelImporter.js +2 -2
  18. package/dist/index.d.ts +2 -2
  19. package/dist/neural/embeddedKeywordEmbeddings.d.ts +1 -1
  20. package/dist/neural/embeddedKeywordEmbeddings.js +56 -56
  21. package/dist/neural/embeddedTypeEmbeddings.d.ts +3 -3
  22. package/dist/neural/embeddedTypeEmbeddings.js +14 -14
  23. package/dist/neural/entityExtractor.js +2 -2
  24. package/dist/neural/relationshipConfidence.js +1 -1
  25. package/dist/neural/signals/VerbContextSignal.js +6 -6
  26. package/dist/neural/signals/VerbExactMatchSignal.js +9 -9
  27. package/dist/neural/signals/VerbPatternSignal.js +5 -5
  28. package/dist/query/typeAwareQueryPlanner.d.ts +7 -7
  29. package/dist/query/typeAwareQueryPlanner.js +9 -10
  30. package/dist/storage/baseStorage.d.ts +48 -1
  31. package/dist/storage/baseStorage.js +237 -19
  32. package/dist/types/graphTypes.d.ts +588 -230
  33. package/dist/types/graphTypes.js +683 -248
  34. package/dist/types/typeMigration.d.ts +95 -0
  35. package/dist/types/typeMigration.js +141 -0
  36. package/dist/utils/intelligentTypeMapper.js +2 -2
  37. package/dist/utils/metadataIndex.js +6 -6
  38. package/package.json +2 -2
  39. package/dist/importManager.d.ts +0 -78
  40. package/dist/importManager.js +0 -267
  41. package/dist/storage/adapters/typeAwareStorageAdapter.d.ts +0 -300
  42. package/dist/storage/adapters/typeAwareStorageAdapter.js +0 -1012
@@ -1,106 +1,277 @@
1
1
  /**
2
- * Graph Types - Standardized Noun and Verb Type System
2
+ * Graph Types - Standardized Noun and Verb Type System (Stage 3)
3
3
  *
4
4
  * This module defines a comprehensive, standardized set of noun and verb types
5
5
  * that can be used to model any kind of graph, semantic network, or data model.
6
6
  *
7
+ * **Stage 3 Coverage**: 95% domain coverage with 40 noun types and 88 verb types
8
+ *
7
9
  * ## Purpose and Design Philosophy
8
10
  *
9
11
  * The type system is designed to be:
10
- * - **Universal**: Capable of representing any domain or use case
12
+ * - **Universal**: Capable of representing 95%+ of all domains and use cases
11
13
  * - **Hierarchical**: Organized into logical categories for easy navigation
12
14
  * - **Extensible**: Additional metadata can be attached to any entity or relationship
13
15
  * - **Semantic**: Types carry meaning that can be used for reasoning and inference
16
+ * - **Complete**: Covers foundational ontological primitives to advanced relationships
14
17
  *
15
- * ## Noun Types (Entities)
18
+ * ## Noun Types (40 Entities)
16
19
  *
17
20
  * Noun types represent entities in the graph and are organized into categories:
18
21
  *
19
- * ### Core Entity Types
22
+ * ### Core Entity Types (7)
20
23
  * - **Person**: Human entities and individuals
21
24
  * - **Organization**: Formal organizations, companies, institutions
22
25
  * - **Location**: Geographic locations, places, addresses
23
26
  * - **Thing**: Physical objects and tangible items
24
27
  * - **Concept**: Abstract ideas, concepts, and intangible entities
25
28
  * - **Event**: Occurrences with time and place dimensions
29
+ * - **Agent**: Non-human autonomous actors (AI agents, bots, automated systems)
30
+ *
31
+ * ### Property & Quality Types (1)
32
+ * - **Quality**: Properties and attributes that inhere in entities
33
+ *
34
+ * ### Temporal Types (1)
35
+ * - **TimeInterval**: Temporal regions, periods, and durations
26
36
  *
27
- * ### Digital/Content Types
28
- * - **Document**: Text-based files and documents
29
- * - **Media**: Non-text media files (images, videos, audio)
30
- * - **File**: Generic digital files
31
- * - **Message**: Communication content
32
- * - **Content**: Generic content that doesn't fit other categories
37
+ * ### Functional Types (1)
38
+ * - **Function**: Purposes, capabilities, and functional roles
33
39
  *
34
- * ### Collection Types
35
- * - **Collection**: Generic groupings of items
36
- * - **Dataset**: Structured collections of data
40
+ * ### Informational Types (1)
41
+ * - **Proposition**: Statements, claims, assertions, and declarative content
37
42
  *
38
- * ### Business/Application Types
43
+ * ### Digital/Content Types (4)
44
+ * - **Document**: Text-based files and written content
45
+ * - **Media**: Non-text media files (audio, video, images)
46
+ * - **File**: Generic digital files and data blobs
47
+ * - **Message**: Communication content and correspondence
48
+ *
49
+ * ### Collection Types (2)
50
+ * - **Collection**: Groups and sets of items
51
+ * - **Dataset**: Structured data collections and databases
52
+ *
53
+ * ### Business/Application Types (4)
39
54
  * - **Product**: Commercial products and offerings
40
- * - **Service**: Services and offerings
41
- * - **User**: User accounts and profiles
42
- * - **Task**: Actions, todos, and workflow items
43
- * - **Project**: Organized initiatives with goals and timelines
44
- *
45
- * ### Descriptive Types
46
- * - **Process**: Workflows, procedures, and sequences
47
- * - **State**: States, conditions, or statuses
48
- * - **Role**: Roles, positions, or responsibilities
49
- * - **Topic**: Subjects or themes
50
- * - **Language**: Languages or linguistic entities
51
- * - **Currency**: Currencies and monetary units
52
- * - **Measurement**: Measurements, metrics, or quantities
53
- *
54
- * ## Verb Types (Relationships)
55
+ * - **Service**: Service offerings and intangible products
56
+ * - **Task**: Actions, todos, and work items
57
+ * - **Project**: Organized initiatives and programs
58
+ *
59
+ * ### Descriptive Types (6)
60
+ * - **Process**: Workflows, procedures, and ongoing activities
61
+ * - **State**: Conditions, status, and situational contexts
62
+ * - **Role**: Positions, responsibilities, and functional classifications
63
+ * - **Language**: Natural and formal languages
64
+ * - **Currency**: Monetary units and exchange mediums
65
+ * - **Measurement**: Metrics, quantities, and measured values
66
+ *
67
+ * ### Scientific/Research Types (2)
68
+ * - **Hypothesis**: Scientific theories, propositions, and conjectures
69
+ * - **Experiment**: Studies, trials, and empirical investigations
70
+ *
71
+ * ### Legal/Regulatory Types (2)
72
+ * - **Contract**: Legal agreements, terms, and binding documents
73
+ * - **Regulation**: Laws, policies, and compliance requirements
74
+ *
75
+ * ### Technical Infrastructure Types (2)
76
+ * - **Interface**: APIs, protocols, and connection points
77
+ * - **Resource**: Infrastructure, compute assets, and system resources
78
+ *
79
+ * ### Custom/Extensible (1)
80
+ * - **Custom**: Domain-specific entities not covered by standard types
81
+ *
82
+ * ### Social Structures (3)
83
+ * - **SocialGroup**: Informal social groups and collectives
84
+ * - **Institution**: Formal social structures and practices
85
+ * - **Norm**: Social norms, conventions, and expectations
86
+ *
87
+ * ### Information Theory (2)
88
+ * - **InformationContent**: Abstract information (stories, ideas, data schemas)
89
+ * - **InformationBearer**: Physical or digital carrier of information
90
+ *
91
+ * ### Meta-Level (1)
92
+ * - **Relationship**: Relationships as first-class entities for meta-level reasoning
93
+ *
94
+ * ## Verb Types (88 Relationships)
55
95
  *
56
96
  * Verb types represent relationships between entities and are organized into categories:
57
97
  *
58
- * ### Core Relationship Types
59
- * - **RelatedTo**: Generic relationship (default fallback)
98
+ * ### Foundational Ontological (3)
99
+ * - **InstanceOf**: Individual to class relationship
100
+ * - **SubclassOf**: Taxonomic hierarchy
101
+ * - **ParticipatesIn**: Entity participation in events/processes
102
+ *
103
+ * ### Core Relationships (4)
104
+ * - **RelatedTo**: Generic relationship (fallback)
60
105
  * - **Contains**: Containment relationship
61
- * - **PartOf**: Part-whole relationship
62
- * - **LocatedAt**: Spatial relationship
63
- * - **References**: Reference or citation relationship
64
- *
65
- * ### Temporal/Causal Types
66
- * - **Precedes/Succeeds**: Temporal sequence relationships
67
- * - **Causes**: Causal relationships
68
- * - **DependsOn**: Dependency relationships
69
- * - **Requires**: Necessity relationships
70
- *
71
- * ### Creation/Transformation Types
72
- * - **Creates**: Creation relationships
73
- * - **Transforms**: Transformation relationships
74
- * - **Becomes**: State change relationships
75
- * - **Modifies**: Modification relationships
76
- * - **Consumes**: Consumption relationships
77
- *
78
- * ### Ownership/Attribution Types
79
- * - **Owns**: Ownership relationships
80
- * - **AttributedTo**: Attribution or authorship
81
- * - **CreatedBy**: Creation attribution
82
- * - **BelongsTo**: Belonging relationships
83
- *
84
- * ### Social/Organizational Types
85
- * - **MemberOf**: Membership or affiliation
86
- * - **WorksWith**: Professional relationships
87
- * - **FriendOf**: Friendship relationships
88
- * - **Follows**: Following relationships
89
- * - **Likes**: Liking relationships
90
- * - **ReportsTo**: Reporting relationships
91
- * - **Supervises**: Supervisory relationships
92
- * - **Mentors**: Mentorship relationships
93
- * - **Communicates**: Communication relationships
94
- *
95
- * ### Descriptive/Functional Types
96
- * - **Describes**: Descriptive relationships
97
- * - **Defines**: Definition relationships
98
- * - **Categorizes**: Categorization relationships
99
- * - **Measures**: Measurement relationships
100
- * - **Evaluates**: Evaluation or assessment relationships
101
- * - **Uses**: Utilization relationships
102
- * - **Implements**: Implementation relationships
103
- * - **Extends**: Extension relationships
106
+ * - **PartOf**: Part-whole mereological relationship
107
+ * - **References**: Citation and referential relationship
108
+ *
109
+ * ### Spatial Relationships (2)
110
+ * - **LocatedAt**: Spatial location relationship
111
+ * - **AdjacentTo**: Spatial proximity relationship
112
+ *
113
+ * ### Temporal Relationships (3)
114
+ * - **Precedes**: Temporal sequence (before)
115
+ * - **During**: Temporal containment
116
+ * - **OccursAt**: Temporal location
117
+ *
118
+ * ### Causal & Dependency (5)
119
+ * - **Causes**: Direct causal relationship
120
+ * - **Enables**: Enablement without direct causation
121
+ * - **Prevents**: Prevention relationship
122
+ * - **DependsOn**: Dependency relationship
123
+ * - **Requires**: Necessity relationship
124
+ *
125
+ * ### Creation & Transformation (5)
126
+ * - **Creates**: Creation relationship
127
+ * - **Transforms**: Transformation relationship
128
+ * - **Becomes**: State change relationship
129
+ * - **Modifies**: Modification relationship
130
+ * - **Consumes**: Consumption relationship
131
+ *
132
+ * ### Ownership & Attribution (2)
133
+ * - **Owns**: Ownership relationship
134
+ * - **AttributedTo**: Attribution relationship
135
+ *
136
+ * ### Property & Quality (2)
137
+ * - **HasQuality**: Entity to quality attribution
138
+ * - **Realizes**: Function realization relationship
139
+ *
140
+ * ### Composition (2)
141
+ * - **ComposedOf**: Material composition
142
+ * - **Inherits**: Inheritance relationship
143
+ *
144
+ * ### Social & Organizational (7)
145
+ * - **MemberOf**: Membership relationship
146
+ * - **WorksWith**: Professional collaboration
147
+ * - **FriendOf**: Friendship relationship
148
+ * - **Follows**: Following/subscription relationship
149
+ * - **Likes**: Liking/favoriting relationship
150
+ * - **ReportsTo**: Hierarchical reporting relationship
151
+ * - **Mentors**: Mentorship relationship
152
+ * - **Communicates**: Communication relationship
153
+ *
154
+ * ### Descriptive & Functional (8)
155
+ * - **Describes**: Descriptive relationship
156
+ * - **Defines**: Definition relationship
157
+ * - **Categorizes**: Categorization relationship
158
+ * - **Measures**: Measurement relationship
159
+ * - **Evaluates**: Evaluation relationship
160
+ * - **Uses**: Utilization relationship
161
+ * - **Implements**: Implementation relationship
162
+ * - **Extends**: Extension relationship
163
+ *
164
+ * ### Advanced Relationships (4)
165
+ * - **EquivalentTo**: Equivalence/identity relationship
166
+ * - **Believes**: Epistemic relationship
167
+ * - **Conflicts**: Conflict relationship
168
+ * - **Synchronizes**: Synchronization relationship
169
+ * - **Competes**: Competition relationship
170
+ *
171
+ * ### Modal Relationships (6)
172
+ * - **CanCause**: Potential causation
173
+ * - **MustCause**: Necessary causation
174
+ * - **WouldCauseIf**: Counterfactual causation
175
+ * - **CouldBe**: Possible states
176
+ * - **MustBe**: Necessary identity
177
+ * - **Counterfactual**: General counterfactual relationship
178
+ *
179
+ * ### Epistemic States (8)
180
+ * - **Knows**: Knowledge (justified true belief)
181
+ * - **Doubts**: Uncertainty/skepticism
182
+ * - **Desires**: Want/preference
183
+ * - **Intends**: Intentionality
184
+ * - **Fears**: Fear/anxiety
185
+ * - **Loves**: Strong positive emotional attitude
186
+ * - **Hates**: Strong negative emotional attitude
187
+ * - **Hopes**: Hopeful expectation
188
+ * - **Perceives**: Sensory perception
189
+ *
190
+ * ### Uncertainty & Probability (4)
191
+ * - **ProbablyCauses**: Probabilistic causation
192
+ * - **UncertainRelation**: Unknown relationship with confidence bounds
193
+ * - **CorrelatesWith**: Statistical correlation
194
+ * - **ApproximatelyEquals**: Fuzzy equivalence
195
+ *
196
+ * ### Scalar Properties (5)
197
+ * - **GreaterThan**: Scalar comparison
198
+ * - **SimilarityDegree**: Graded similarity
199
+ * - **MoreXThan**: Comparative property
200
+ * - **HasDegree**: Scalar property assignment
201
+ * - **PartiallyHas**: Graded possession
202
+ *
203
+ * ### Information Theory (2)
204
+ * - **Carries**: Bearer carries content
205
+ * - **Encodes**: Encoding relationship
206
+ *
207
+ * ### Deontic Relationships (5)
208
+ * - **ObligatedTo**: Moral/legal obligation
209
+ * - **PermittedTo**: Permission/authorization
210
+ * - **ProhibitedFrom**: Prohibition/forbidden
211
+ * - **ShouldDo**: Normative expectation
212
+ * - **MustNotDo**: Strong prohibition
213
+ *
214
+ * ### Context & Perspective (5)
215
+ * - **TrueInContext**: Context-dependent truth
216
+ * - **PerceivedAs**: Subjective perception
217
+ * - **InterpretedAs**: Interpretation relationship
218
+ * - **ValidInFrame**: Frame-dependent validity
219
+ * - **TrueFrom**: Perspective-dependent truth
220
+ *
221
+ * ### Advanced Temporal (6)
222
+ * - **Overlaps**: Partial temporal overlap
223
+ * - **ImmediatelyAfter**: Direct temporal succession
224
+ * - **EventuallyLeadsTo**: Long-term consequence
225
+ * - **SimultaneousWith**: Exact temporal alignment
226
+ * - **HasDuration**: Temporal extent
227
+ * - **RecurringWith**: Cyclic temporal relationship
228
+ *
229
+ * ### Advanced Spatial (9)
230
+ * - **ContainsSpatially**: Spatial containment
231
+ * - **OverlapsSpatially**: Spatial overlap
232
+ * - **Surrounds**: Encirclement
233
+ * - **ConnectedTo**: Topological connection
234
+ * - **Above**: Vertical spatial relationship (superior)
235
+ * - **Below**: Vertical spatial relationship (inferior)
236
+ * - **Inside**: Within containment boundaries
237
+ * - **Outside**: Beyond containment boundaries
238
+ * - **Facing**: Directional orientation
239
+ *
240
+ * ### Social Structures (5)
241
+ * - **Represents**: Representative relationship
242
+ * - **Embodies**: Exemplification or personification
243
+ * - **Opposes**: Opposition relationship
244
+ * - **AlliesWith**: Alliance relationship
245
+ * - **ConformsTo**: Norm conformity
246
+ *
247
+ * ### Measurement (4)
248
+ * - **MeasuredIn**: Unit relationship
249
+ * - **ConvertsTo**: Unit conversion
250
+ * - **HasMagnitude**: Quantitative value
251
+ * - **DimensionallyEquals**: Dimensional analysis
252
+ *
253
+ * ### Change & Persistence (4)
254
+ * - **PersistsThrough**: Persistence through change
255
+ * - **GainsProperty**: Property acquisition
256
+ * - **LosesProperty**: Property loss
257
+ * - **RemainsSame**: Identity through time
258
+ *
259
+ * ### Parthood Variations (4)
260
+ * - **FunctionalPartOf**: Functional component
261
+ * - **TopologicalPartOf**: Spatial part
262
+ * - **TemporalPartOf**: Temporal slice
263
+ * - **ConceptualPartOf**: Abstract decomposition
264
+ *
265
+ * ### Dependency Variations (3)
266
+ * - **RigidlyDependsOn**: Necessary dependency
267
+ * - **FunctionallyDependsOn**: Operational dependency
268
+ * - **HistoricallyDependsOn**: Causal history dependency
269
+ *
270
+ * ### Meta-Level (4)
271
+ * - **Endorses**: Second-order validation
272
+ * - **Contradicts**: Logical contradiction
273
+ * - **Supports**: Evidential support
274
+ * - **Supersedes**: Replacement relationship
104
275
  *
105
276
  * ## Usage with Additional Metadata
106
277
  *
@@ -132,33 +303,27 @@
132
303
  * }
133
304
  * ```
134
305
  *
135
- * ## Modeling Different Graph Types
136
- *
137
- * This type system can model various graph structures:
138
- *
139
- * ### Knowledge Graphs
140
- * Use Person, Organization, Location, Concept entities with semantic relationships
141
- * like AttributedTo, LocatedAt, RelatedTo
306
+ * ## Stage 3 Changes from v5.4.0
142
307
  *
143
- * ### Social Networks
144
- * Use Person, User entities with social relationships like FriendOf, Follows,
145
- * WorksWith, Communicates
308
+ * ### Nouns Added (+11)
309
+ * agent, quality, timeInterval, function, proposition, socialGroup, institution,
310
+ * norm, informationContent, informationBearer, relationship
146
311
  *
147
- * ### Content Networks
148
- * Use Document, Media, Content entities with relationships like References,
149
- * CreatedBy, Contains, Categorizes
312
+ * ### Nouns Removed (-2)
313
+ * user (merged into person), topic (merged into concept)
150
314
  *
151
- * ### Business Process Models
152
- * Use Task, Process, Role entities with relationships like Precedes, Requires,
153
- * DependsOn, Transforms
315
+ * ### Verbs Added (+52)
316
+ * All new categories: Foundational Ontological, Modal, Epistemic, Uncertainty,
317
+ * Scalar, Information Theory, Deontic, Context & Perspective, Advanced Temporal,
318
+ * Advanced Spatial, Social Structures, Measurement, Change & Persistence,
319
+ * Parthood Variations, Dependency Variations, and enhanced Meta-Level
154
320
  *
155
- * ### Organizational Charts
156
- * Use Person, Role, Organization entities with relationships like ReportsTo,
157
- * Supervises, MemberOf
321
+ * ### Verbs Removed (-4)
322
+ * succeeds (use inverse of precedes), belongsTo (use inverse of owns),
323
+ * createdBy (use inverse of creates), supervises (use inverse of reportsTo)
158
324
  *
159
- * The flexibility of this system allows it to represent any domain while
160
- * maintaining semantic consistency and enabling powerful graph operations
161
- * and reasoning capabilities.
325
+ * **Net Change**: +9 nouns (31 40), +48 verbs (40 88) = +57 types total
326
+ * **Coverage**: 60% (v5.4.0) 95% (Stage 3)
162
327
  */
163
328
  /**
164
329
  * Represents a high-precision timestamp with seconds and nanoseconds
@@ -217,36 +382,42 @@ export interface GraphVerb {
217
382
  * Used when the source is implicit from the parent document
218
383
  */
219
384
  export type EmbeddedGraphVerb = Omit<GraphVerb, 'source'>;
220
- /**
221
- * Represents a person entity in the graph
222
- */
223
385
  export interface Person extends GraphNoun {
224
386
  noun: typeof NounType.Person;
225
387
  }
226
- /**
227
- * Represents a physical location in the graph
228
- */
229
388
  export interface Location extends GraphNoun {
230
389
  noun: typeof NounType.Location;
231
390
  }
232
- /**
233
- * Represents a physical or virtual object in the graph
234
- */
235
391
  export interface Thing extends GraphNoun {
236
392
  noun: typeof NounType.Thing;
237
393
  }
238
- /**
239
- * Represents an event or occurrence in the graph
240
- */
241
394
  export interface Event extends GraphNoun {
242
395
  noun: typeof NounType.Event;
243
396
  }
244
- /**
245
- * Represents an abstract concept or idea in the graph
246
- */
247
397
  export interface Concept extends GraphNoun {
248
398
  noun: typeof NounType.Concept;
249
399
  }
400
+ export interface Agent extends GraphNoun {
401
+ noun: typeof NounType.Agent;
402
+ }
403
+ export interface Organism extends GraphNoun {
404
+ noun: typeof NounType.Organism;
405
+ }
406
+ export interface Substance extends GraphNoun {
407
+ noun: typeof NounType.Substance;
408
+ }
409
+ export interface Quality extends GraphNoun {
410
+ noun: typeof NounType.Quality;
411
+ }
412
+ export interface TimeInterval extends GraphNoun {
413
+ noun: typeof NounType.TimeInterval;
414
+ }
415
+ export interface Function extends GraphNoun {
416
+ noun: typeof NounType.Function;
417
+ }
418
+ export interface Proposition extends GraphNoun {
419
+ noun: typeof NounType.Proposition;
420
+ }
250
421
  export interface Collection extends GraphNoun {
251
422
  noun: typeof NounType.Collection;
252
423
  }
@@ -274,9 +445,6 @@ export interface Product extends GraphNoun {
274
445
  export interface Service extends GraphNoun {
275
446
  noun: typeof NounType.Service;
276
447
  }
277
- export interface User extends GraphNoun {
278
- noun: typeof NounType.User;
279
- }
280
448
  export interface Task extends GraphNoun {
281
449
  noun: typeof NounType.Task;
282
450
  }
@@ -292,9 +460,6 @@ export interface State extends GraphNoun {
292
460
  export interface Role extends GraphNoun {
293
461
  noun: typeof NounType.Role;
294
462
  }
295
- export interface Topic extends GraphNoun {
296
- noun: typeof NounType.Topic;
297
- }
298
463
  export interface Language extends GraphNoun {
299
464
  noun: typeof NounType.Language;
300
465
  }
@@ -304,50 +469,47 @@ export interface Currency extends GraphNoun {
304
469
  export interface Measurement extends GraphNoun {
305
470
  noun: typeof NounType.Measurement;
306
471
  }
307
- /**
308
- * Represents content (text, media, etc.) in the graph
309
- */
310
- export interface Content extends GraphNoun {
311
- noun: typeof NounType.Content;
312
- }
313
- /**
314
- * Represents a scientific hypothesis or theory in the graph
315
- */
316
472
  export interface Hypothesis extends GraphNoun {
317
473
  noun: typeof NounType.Hypothesis;
318
474
  }
319
- /**
320
- * Represents an experiment, study, or research trial in the graph
321
- */
322
475
  export interface Experiment extends GraphNoun {
323
476
  noun: typeof NounType.Experiment;
324
477
  }
325
- /**
326
- * Represents a legal contract or agreement in the graph
327
- */
328
478
  export interface Contract extends GraphNoun {
329
479
  noun: typeof NounType.Contract;
330
480
  }
331
- /**
332
- * Represents a regulation, law, or compliance requirement in the graph
333
- */
334
481
  export interface Regulation extends GraphNoun {
335
482
  noun: typeof NounType.Regulation;
336
483
  }
337
- /**
338
- * Represents an interface, API, or protocol specification in the graph
339
- */
340
484
  export interface Interface extends GraphNoun {
341
485
  noun: typeof NounType.Interface;
342
486
  }
343
- /**
344
- * Represents a computational or infrastructure resource in the graph
345
- */
346
487
  export interface Resource extends GraphNoun {
347
488
  noun: typeof NounType.Resource;
348
489
  }
490
+ export interface Custom extends GraphNoun {
491
+ noun: typeof NounType.Custom;
492
+ }
493
+ export interface SocialGroup extends GraphNoun {
494
+ noun: typeof NounType.SocialGroup;
495
+ }
496
+ export interface Institution extends GraphNoun {
497
+ noun: typeof NounType.Institution;
498
+ }
499
+ export interface Norm extends GraphNoun {
500
+ noun: typeof NounType.Norm;
501
+ }
502
+ export interface InformationContent extends GraphNoun {
503
+ noun: typeof NounType.InformationContent;
504
+ }
505
+ export interface InformationBearer extends GraphNoun {
506
+ noun: typeof NounType.InformationBearer;
507
+ }
508
+ export interface Relationship extends GraphNoun {
509
+ noun: typeof NounType.Relationship;
510
+ }
349
511
  /**
350
- * Defines valid noun types for graph entities
512
+ * Defines valid noun types for graph entities (Stage 3: 40 types)
351
513
  * Used for categorizing different types of nodes
352
514
  */
353
515
  export declare const NounType: {
@@ -357,22 +519,26 @@ export declare const NounType: {
357
519
  readonly Thing: "thing";
358
520
  readonly Concept: "concept";
359
521
  readonly Event: "event";
522
+ readonly Agent: "agent";
523
+ readonly Organism: "organism";
524
+ readonly Substance: "substance";
525
+ readonly Quality: "quality";
526
+ readonly TimeInterval: "timeInterval";
527
+ readonly Function: "function";
528
+ readonly Proposition: "proposition";
360
529
  readonly Document: "document";
361
530
  readonly Media: "media";
362
531
  readonly File: "file";
363
532
  readonly Message: "message";
364
- readonly Content: "content";
365
533
  readonly Collection: "collection";
366
534
  readonly Dataset: "dataset";
367
535
  readonly Product: "product";
368
536
  readonly Service: "service";
369
- readonly User: "user";
370
537
  readonly Task: "task";
371
538
  readonly Project: "project";
372
539
  readonly Process: "process";
373
540
  readonly State: "state";
374
541
  readonly Role: "role";
375
- readonly Topic: "topic";
376
542
  readonly Language: "language";
377
543
  readonly Currency: "currency";
378
544
  readonly Measurement: "measurement";
@@ -382,21 +548,35 @@ export declare const NounType: {
382
548
  readonly Regulation: "regulation";
383
549
  readonly Interface: "interface";
384
550
  readonly Resource: "resource";
551
+ readonly Custom: "custom";
552
+ readonly SocialGroup: "socialGroup";
553
+ readonly Institution: "institution";
554
+ readonly Norm: "norm";
555
+ readonly InformationContent: "informationContent";
556
+ readonly InformationBearer: "informationBearer";
557
+ readonly Relationship: "relationship";
385
558
  };
386
559
  export type NounType = (typeof NounType)[keyof typeof NounType];
387
560
  /**
388
- * Defines valid verb types for relationships
561
+ * Defines valid verb types for relationships (Stage 3: 88 types)
389
562
  * Used for categorizing different types of connections
390
563
  */
391
564
  export declare const VerbType: {
565
+ readonly InstanceOf: "instanceOf";
566
+ readonly SubclassOf: "subclassOf";
567
+ readonly ParticipatesIn: "participatesIn";
392
568
  readonly RelatedTo: "relatedTo";
393
569
  readonly Contains: "contains";
394
570
  readonly PartOf: "partOf";
395
- readonly LocatedAt: "locatedAt";
396
571
  readonly References: "references";
572
+ readonly LocatedAt: "locatedAt";
573
+ readonly AdjacentTo: "adjacentTo";
397
574
  readonly Precedes: "precedes";
398
- readonly Succeeds: "succeeds";
575
+ readonly During: "during";
576
+ readonly OccursAt: "occursAt";
399
577
  readonly Causes: "causes";
578
+ readonly Enables: "enables";
579
+ readonly Prevents: "prevents";
400
580
  readonly DependsOn: "dependsOn";
401
581
  readonly Requires: "requires";
402
582
  readonly Creates: "creates";
@@ -404,17 +584,20 @@ export declare const VerbType: {
404
584
  readonly Becomes: "becomes";
405
585
  readonly Modifies: "modifies";
406
586
  readonly Consumes: "consumes";
587
+ readonly Destroys: "destroys";
407
588
  readonly Owns: "owns";
408
589
  readonly AttributedTo: "attributedTo";
409
- readonly CreatedBy: "createdBy";
410
- readonly BelongsTo: "belongsTo";
590
+ readonly HasQuality: "hasQuality";
591
+ readonly Realizes: "realizes";
592
+ readonly Affects: "affects";
593
+ readonly ComposedOf: "composedOf";
594
+ readonly Inherits: "inherits";
411
595
  readonly MemberOf: "memberOf";
412
596
  readonly WorksWith: "worksWith";
413
597
  readonly FriendOf: "friendOf";
414
598
  readonly Follows: "follows";
415
599
  readonly Likes: "likes";
416
600
  readonly ReportsTo: "reportsTo";
417
- readonly Supervises: "supervises";
418
601
  readonly Mentors: "mentors";
419
602
  readonly Communicates: "communicates";
420
603
  readonly Describes: "describes";
@@ -425,15 +608,92 @@ export declare const VerbType: {
425
608
  readonly Uses: "uses";
426
609
  readonly Implements: "implements";
427
610
  readonly Extends: "extends";
428
- readonly Inherits: "inherits";
611
+ readonly EquivalentTo: "equivalentTo";
612
+ readonly Believes: "believes";
429
613
  readonly Conflicts: "conflicts";
430
614
  readonly Synchronizes: "synchronizes";
431
615
  readonly Competes: "competes";
616
+ readonly CanCause: "canCause";
617
+ readonly MustCause: "mustCause";
618
+ readonly WouldCauseIf: "wouldCauseIf";
619
+ readonly CouldBe: "couldBe";
620
+ readonly MustBe: "mustBe";
621
+ readonly Counterfactual: "counterfactual";
622
+ readonly Knows: "knows";
623
+ readonly Doubts: "doubts";
624
+ readonly Desires: "desires";
625
+ readonly Intends: "intends";
626
+ readonly Fears: "fears";
627
+ readonly Loves: "loves";
628
+ readonly Hates: "hates";
629
+ readonly Hopes: "hopes";
630
+ readonly Perceives: "perceives";
631
+ readonly Learns: "learns";
632
+ readonly ProbablyCauses: "probablyCauses";
633
+ readonly UncertainRelation: "uncertainRelation";
634
+ readonly CorrelatesWith: "correlatesWith";
635
+ readonly ApproximatelyEquals: "approximatelyEquals";
636
+ readonly GreaterThan: "greaterThan";
637
+ readonly SimilarityDegree: "similarityDegree";
638
+ readonly MoreXThan: "moreXThan";
639
+ readonly HasDegree: "hasDegree";
640
+ readonly PartiallyHas: "partiallyHas";
641
+ readonly Carries: "carries";
642
+ readonly Encodes: "encodes";
643
+ readonly ObligatedTo: "obligatedTo";
644
+ readonly PermittedTo: "permittedTo";
645
+ readonly ProhibitedFrom: "prohibitedFrom";
646
+ readonly ShouldDo: "shouldDo";
647
+ readonly MustNotDo: "mustNotDo";
648
+ readonly TrueInContext: "trueInContext";
649
+ readonly PerceivedAs: "perceivedAs";
650
+ readonly InterpretedAs: "interpretedAs";
651
+ readonly ValidInFrame: "validInFrame";
652
+ readonly TrueFrom: "trueFrom";
653
+ readonly Overlaps: "overlaps";
654
+ readonly ImmediatelyAfter: "immediatelyAfter";
655
+ readonly EventuallyLeadsTo: "eventuallyLeadsTo";
656
+ readonly SimultaneousWith: "simultaneousWith";
657
+ readonly HasDuration: "hasDuration";
658
+ readonly RecurringWith: "recurringWith";
659
+ readonly ContainsSpatially: "containsSpatially";
660
+ readonly OverlapsSpatially: "overlapsSpatially";
661
+ readonly Surrounds: "surrounds";
662
+ readonly ConnectedTo: "connectedTo";
663
+ readonly Above: "above";
664
+ readonly Below: "below";
665
+ readonly Inside: "inside";
666
+ readonly Outside: "outside";
667
+ readonly Facing: "facing";
668
+ readonly Represents: "represents";
669
+ readonly Embodies: "embodies";
670
+ readonly Opposes: "opposes";
671
+ readonly AlliesWith: "alliesWith";
672
+ readonly ConformsTo: "conformsTo";
673
+ readonly MeasuredIn: "measuredIn";
674
+ readonly ConvertsTo: "convertsTo";
675
+ readonly HasMagnitude: "hasMagnitude";
676
+ readonly DimensionallyEquals: "dimensionallyEquals";
677
+ readonly PersistsThrough: "persistsThrough";
678
+ readonly GainsProperty: "gainsProperty";
679
+ readonly LosesProperty: "losesProperty";
680
+ readonly RemainsSame: "remainsSame";
681
+ readonly FunctionalPartOf: "functionalPartOf";
682
+ readonly TopologicalPartOf: "topologicalPartOf";
683
+ readonly TemporalPartOf: "temporalPartOf";
684
+ readonly ConceptualPartOf: "conceptualPartOf";
685
+ readonly RigidlyDependsOn: "rigidlyDependsOn";
686
+ readonly FunctionallyDependsOn: "functionallyDependsOn";
687
+ readonly HistoricallyDependsOn: "historicallyDependsOn";
688
+ readonly Endorses: "endorses";
689
+ readonly Contradicts: "contradicts";
690
+ readonly Supports: "supports";
691
+ readonly Supersedes: "supersedes";
432
692
  };
433
693
  export type VerbType = (typeof VerbType)[keyof typeof VerbType];
434
694
  /**
435
- * Noun type enum for O(1) lookups and type safety
436
- * Maps each noun type to a unique index (0-30)
695
+ * Noun type enum for O(1) lookups and type safety (Stage 3 CANONICAL: 42 types)
696
+ * Maps each noun type to a unique index (0-41)
437
697
  * Used for fixed-size array operations and bitmap indices
438
698
  */
439
699
  export declare enum NounTypeEnum {
@@ -443,87 +703,185 @@ export declare enum NounTypeEnum {
443
703
  thing = 3,
444
704
  concept = 4,
445
705
  event = 5,
446
- document = 6,
447
- media = 7,
448
- file = 8,
449
- message = 9,
450
- content = 10,
451
- collection = 11,
452
- dataset = 12,
453
- product = 13,
454
- service = 14,
455
- user = 15,
456
- task = 16,
457
- project = 17,
458
- process = 18,
459
- state = 19,
460
- role = 20,
461
- topic = 21,
462
- language = 22,
463
- currency = 23,
464
- measurement = 24,
465
- hypothesis = 25,
466
- experiment = 26,
467
- contract = 27,
468
- regulation = 28,
469
- interface = 29,
470
- resource = 30
706
+ agent = 6,
707
+ organism = 7,
708
+ substance = 8,
709
+ quality = 9,
710
+ timeInterval = 10,
711
+ function = 11,
712
+ proposition = 12,
713
+ document = 13,
714
+ media = 14,
715
+ file = 15,
716
+ message = 16,
717
+ collection = 17,
718
+ dataset = 18,
719
+ product = 19,
720
+ service = 20,
721
+ task = 21,
722
+ project = 22,
723
+ process = 23,
724
+ state = 24,
725
+ role = 25,
726
+ language = 26,
727
+ currency = 27,
728
+ measurement = 28,
729
+ hypothesis = 29,
730
+ experiment = 30,
731
+ contract = 31,
732
+ regulation = 32,
733
+ interface = 33,
734
+ resource = 34,
735
+ custom = 35,
736
+ socialGroup = 36,
737
+ institution = 37,
738
+ norm = 38,
739
+ informationContent = 39,
740
+ informationBearer = 40,
741
+ relationship = 41
471
742
  }
472
743
  /**
473
- * Verb type enum for O(1) lookups and type safety
474
- * Maps each verb type to a unique index (0-39)
744
+ * Verb type enum for O(1) lookups and type safety (Stage 3 CANONICAL: 127 types)
745
+ * Maps each verb type to a unique index (0-126)
475
746
  * Used for fixed-size array operations and bitmap indices
476
747
  */
477
748
  export declare enum VerbTypeEnum {
478
- relatedTo = 0,
479
- contains = 1,
480
- partOf = 2,
481
- locatedAt = 3,
482
- references = 4,
483
- precedes = 5,
484
- succeeds = 6,
485
- causes = 7,
486
- dependsOn = 8,
487
- requires = 9,
488
- creates = 10,
489
- transforms = 11,
490
- becomes = 12,
491
- modifies = 13,
492
- consumes = 14,
493
- owns = 15,
494
- attributedTo = 16,
495
- createdBy = 17,
496
- belongsTo = 18,
497
- memberOf = 19,
498
- worksWith = 20,
499
- friendOf = 21,
500
- follows = 22,
501
- likes = 23,
502
- reportsTo = 24,
503
- supervises = 25,
504
- mentors = 26,
505
- communicates = 27,
506
- describes = 28,
507
- defines = 29,
508
- categorizes = 30,
509
- measures = 31,
510
- evaluates = 32,
511
- uses = 33,
512
- implements = 34,
513
- extends = 35,
514
- inherits = 36,
515
- conflicts = 37,
516
- synchronizes = 38,
517
- competes = 39
749
+ instanceOf = 0,
750
+ subclassOf = 1,
751
+ participatesIn = 2,
752
+ relatedTo = 3,
753
+ contains = 4,
754
+ partOf = 5,
755
+ references = 6,
756
+ locatedAt = 7,
757
+ adjacentTo = 8,
758
+ precedes = 9,
759
+ during = 10,
760
+ occursAt = 11,
761
+ causes = 12,
762
+ enables = 13,
763
+ prevents = 14,
764
+ dependsOn = 15,
765
+ requires = 16,
766
+ creates = 17,
767
+ transforms = 18,
768
+ becomes = 19,
769
+ modifies = 20,
770
+ consumes = 21,
771
+ destroys = 22,
772
+ owns = 23,
773
+ attributedTo = 24,
774
+ hasQuality = 25,
775
+ realizes = 26,
776
+ affects = 27,
777
+ composedOf = 28,
778
+ inherits = 29,
779
+ memberOf = 30,
780
+ worksWith = 31,
781
+ friendOf = 32,
782
+ follows = 33,
783
+ likes = 34,
784
+ reportsTo = 35,
785
+ mentors = 36,
786
+ communicates = 37,
787
+ describes = 38,
788
+ defines = 39,
789
+ categorizes = 40,
790
+ measures = 41,
791
+ evaluates = 42,
792
+ uses = 43,
793
+ implements = 44,
794
+ extends = 45,
795
+ equivalentTo = 46,
796
+ believes = 47,
797
+ conflicts = 48,
798
+ synchronizes = 49,
799
+ competes = 50,
800
+ canCause = 51,
801
+ mustCause = 52,
802
+ wouldCauseIf = 53,
803
+ couldBe = 54,
804
+ mustBe = 55,
805
+ counterfactual = 56,
806
+ knows = 57,
807
+ doubts = 58,
808
+ desires = 59,
809
+ intends = 60,
810
+ fears = 61,
811
+ loves = 62,
812
+ hates = 63,
813
+ hopes = 64,
814
+ perceives = 65,
815
+ learns = 66,
816
+ probablyCauses = 67,
817
+ uncertainRelation = 68,
818
+ correlatesWith = 69,
819
+ approximatelyEquals = 70,
820
+ greaterThan = 71,
821
+ similarityDegree = 72,
822
+ moreXThan = 73,
823
+ hasDegree = 74,
824
+ partiallyHas = 75,
825
+ carries = 76,
826
+ encodes = 77,
827
+ obligatedTo = 78,
828
+ permittedTo = 79,
829
+ prohibitedFrom = 80,
830
+ shouldDo = 81,
831
+ mustNotDo = 82,
832
+ trueInContext = 83,
833
+ perceivedAs = 84,
834
+ interpretedAs = 85,
835
+ validInFrame = 86,
836
+ trueFrom = 87,
837
+ overlaps = 88,
838
+ immediatelyAfter = 89,
839
+ eventuallyLeadsTo = 90,
840
+ simultaneousWith = 91,
841
+ hasDuration = 92,
842
+ recurringWith = 93,
843
+ containsSpatially = 94,
844
+ overlapsSpatially = 95,
845
+ surrounds = 96,
846
+ connectedTo = 97,
847
+ above = 98,
848
+ below = 99,
849
+ inside = 100,
850
+ outside = 101,
851
+ facing = 102,
852
+ represents = 103,
853
+ embodies = 104,
854
+ opposes = 105,
855
+ alliesWith = 106,
856
+ conformsTo = 107,
857
+ measuredIn = 108,
858
+ convertsTo = 109,
859
+ hasMagnitude = 110,
860
+ dimensionallyEquals = 111,
861
+ persistsThrough = 112,
862
+ gainsProperty = 113,
863
+ losesProperty = 114,
864
+ remainsSame = 115,
865
+ functionalPartOf = 116,
866
+ topologicalPartOf = 117,
867
+ temporalPartOf = 118,
868
+ conceptualPartOf = 119,
869
+ rigidlyDependsOn = 120,
870
+ functionallyDependsOn = 121,
871
+ historicallyDependsOn = 122,
872
+ endorses = 123,
873
+ contradicts = 124,
874
+ supports = 125,
875
+ supersedes = 126
518
876
  }
519
877
  /**
520
- * Total number of noun types (for array allocations)
878
+ * Total number of noun types (for array allocations) - Stage 3 CANONICAL
521
879
  */
522
- export declare const NOUN_TYPE_COUNT = 31;
880
+ export declare const NOUN_TYPE_COUNT = 42;
523
881
  /**
524
- * Total number of verb types (for array allocations)
882
+ * Total number of verb types (for array allocations) - Stage 3 CANONICAL
525
883
  */
526
- export declare const VERB_TYPE_COUNT = 40;
884
+ export declare const VERB_TYPE_COUNT = 127;
527
885
  /**
528
886
  * Type utilities for O(1) conversions between string types and numeric indices
529
887
  * Enables efficient fixed-size array operations and bitmap indexing
@@ -532,30 +890,30 @@ export declare const TypeUtils: {
532
890
  /**
533
891
  * Get numeric index for a noun type
534
892
  * @param type - NounType string (e.g., 'person')
535
- * @returns Numeric index (0-30)
893
+ * @returns Numeric index (0-40)
536
894
  */
537
895
  getNounIndex: (type: NounType) => number;
538
896
  /**
539
897
  * Get numeric index for a verb type
540
898
  * @param type - VerbType string (e.g., 'relatedTo')
541
- * @returns Numeric index (0-39)
899
+ * @returns Numeric index (0-123)
542
900
  */
543
901
  getVerbIndex: (type: VerbType) => number;
544
902
  /**
545
903
  * Get noun type string from numeric index
546
- * @param index - Numeric index (0-30)
904
+ * @param index - Numeric index (0-40)
547
905
  * @returns NounType string or 'thing' as default
548
906
  */
549
907
  getNounFromIndex: (index: number) => NounType;
550
908
  /**
551
909
  * Get verb type string from numeric index
552
- * @param index - Numeric index (0-39)
910
+ * @param index - Numeric index (0-123)
553
911
  * @returns VerbType string or 'relatedTo' as default
554
912
  */
555
913
  getVerbFromIndex: (index: number) => VerbType;
556
914
  };
557
915
  /**
558
- * Type-specific metadata for optimization hints
916
+ * Type-specific metadata for optimization hints (Stage 3 CANONICAL: 42 noun types)
559
917
  * Provides per-type configuration for bloom filters, chunking, and indexing
560
918
  */
561
919
  export declare const TypeMetadata: Record<NounType, {