mindgraph 0.11.0 → 0.12.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.
package/README.md CHANGED
@@ -88,6 +88,7 @@ const entity = await graph.findOrCreateEntity("Some Entity");
88
88
  |--------|-------------|
89
89
  | `commit(req)` | Create a goal, project, or milestone |
90
90
  | `deliberate(req)` | Open decisions, add options/constraints, resolve decisions |
91
+ | `resolveDecision(decisionUid, optionUid, opts)` | Resolve with optional dated context and session/retrieval-trace linkage |
91
92
 
92
93
  ### Action Layer
93
94
 
@@ -102,7 +103,7 @@ const entity = await graph.findOrCreateEntity("Some Entity");
102
103
  |--------|-------------|
103
104
  | `session(req)` | Open a session, record traces, or close a session |
104
105
  | `journal(label, props, options?)` | Record a journal entry linked to an optional session |
105
- | `distill(req)` | Create a summary that distills multiple source nodes |
106
+ | `distill(req)` | Create a Summary (default) or Lesson with source provenance |
106
107
  | `memoryConfig(req)` | Set/get preferences and memory policies |
107
108
 
108
109
  ### Agent Layer
@@ -184,7 +185,7 @@ See the [Operational Ontology](https://mindgraph.cloud/docs/ontology) and [Conne
184
185
  | `ingestChunk(req)` | Ingest a single text chunk (sync): stores, embeds, and runs LLM extraction |
185
186
  | `ingestDocument(req)` | Ingest a full document (async): chunks text, returns job ID |
186
187
  | `ingestSession(req)` | Ingest a session transcript (async): links to session, returns job ID |
187
- | `retrieveContext(req)` | Retrieve semantically matched chunks + connected graph nodes/edges |
188
+ | `retrieveContext(req)` | Direct retrieval plus optional cheapest-first graph expansion (`graph_expansion_limit`, `graph_max_depth`) |
188
189
  | `getJob(id)` | Get async job status and progress |
189
190
  | `clearGraph()` | Clear all graph data |
190
191
 
@@ -200,7 +201,7 @@ See the [Operational Ontology](https://mindgraph.cloud/docs/ontology) and [Conne
200
201
  | Method | Description |
201
202
  |--------|-------------|
202
203
  | `retrieve(req)` | Unified retrieval: text search, active goals, open questions, weak claims |
203
- | `traverse(req)` | Graph traversal: chain, neighborhood, path, or subgraph |
204
+ | `traverse(req)` | Budgeted min-cost traversal; `depth` is the selected witness hop count |
204
205
  | `evolve(req)` | Lifecycle mutations: update, tombstone, restore, decay, history |
205
206
 
206
207
  ### Health & Stats
package/dist/index.d.mts CHANGED
@@ -72,6 +72,25 @@ interface MergeCandidate {
72
72
  similarity: number | null;
73
73
  /** How the candidate was found: "exact" | "fuzzy" | "semantic" | "llm". */
74
74
  method: string | null;
75
+ /**
76
+ * Normalized `truth_status` of each side (Claims), so curation UIs can
77
+ * warn before merging a refuted claim. Absent on servers older than the
78
+ * hardening batch.
79
+ */
80
+ node_a_truth_status?: string | null;
81
+ node_b_truth_status?: string | null;
82
+ }
83
+ /** A derived statement awaiting review after a load-bearing premise changed. */
84
+ interface StaleDerivation {
85
+ invalidation_uid: string;
86
+ invalidator_uid: string;
87
+ invalidator_label: string;
88
+ node_uid: string;
89
+ node_label: string;
90
+ node_summary: string;
91
+ node_type: string;
92
+ reason: string | null;
93
+ invalidated_at: string | null;
75
94
  }
76
95
  /** A `/retrieve` hybrid result: the full node plus the fused RRF score. */
77
96
  interface HybridSearchResult {
@@ -99,11 +118,10 @@ interface PathStep {
99
118
  edge_type: string | null;
100
119
  depth: number;
101
120
  parent_uid: string | null;
102
- /** Min-plus cost of the returned BFS path from the start node
103
- * (sum of -ln(weight), weights clamped to (1e-9, 1]); cost of the path
104
- * the traversal returned, not the cheapest path. 0 at the start node. */
121
+ /** Min-plus cost of the selected cheapest path from the start node
122
+ * (sum of -ln(weight), weights clamped to (1e-9, 1]). */
105
123
  path_cost?: number;
106
- /** Product of edge confidences along the returned BFS path (clamped to
124
+ /** Product of edge confidences along the selected min-cost path (clamped to
107
125
  * (1e-9, 1]); a ranking signal, not a calibrated probability. 1 at the
108
126
  * start node. */
109
127
  path_confidence?: number;
@@ -271,6 +289,12 @@ interface DeliberationRequest {
271
289
  chosen_option_uid?: string;
272
290
  blocks_uid?: string;
273
291
  informs_uid?: string[];
292
+ /** ISO 8601 date when resolve-time context was available. */
293
+ as_of_date?: string;
294
+ /** Session whose retrieval context informed the resolution. */
295
+ session_id?: string;
296
+ /** Optional identifier of the decision-time retrieval trace. */
297
+ retrieval_trace_id?: string;
274
298
  props?: Record<string, unknown>;
275
299
  agent_id?: string;
276
300
  }
@@ -311,6 +335,8 @@ interface SessionRequest {
311
335
  }
312
336
  interface DistillRequest {
313
337
  label: string;
338
+ /** Defaults to "summary" for backward compatibility. */
339
+ output_type?: "summary" | "lesson";
314
340
  summary?: string;
315
341
  confidence?: number;
316
342
  salience?: number;
@@ -377,7 +403,7 @@ interface RetrieveRequest {
377
403
  * Retrieval action. Note: `"semantic"` requires a configured embedding
378
404
  * provider on the server; for semantic search use `retrieveContext()` instead.
379
405
  */
380
- action: "text" | "semantic" | "hybrid" | "active_goals" | "open_questions" | "weak_claims" | "pending_approvals" | "unresolved_contradictions" | "preferences" | "layer" | "recent";
406
+ action: "text" | "semantic" | "hybrid" | "active_goals" | "open_questions" | "weak_claims" | "pending_approvals" | "unresolved_contradictions" | "stale_derivations" | "preferences" | "layer" | "recent";
381
407
  /**
382
408
  * Required for `"text"`, `"semantic"`, `"hybrid"`. Optional for
383
409
  * `"preferences"`: with a `query` you get topic-relevant preferences (the
@@ -427,7 +453,12 @@ interface TraverseRequest {
427
453
  max_depth?: number;
428
454
  direction?: "outgoing" | "incoming" | "both";
429
455
  edge_types?: string[];
456
+ exclude_edge_types?: string[];
430
457
  weight_threshold?: number;
458
+ /** Include ingestion/provenance edges excluded by default. */
459
+ include_provenance?: boolean;
460
+ /** Global distinct-node budget, including the seed (default 500). */
461
+ max_nodes?: number;
431
462
  /** `top_k_paths` only: number of cheapest paths to return (default 3, cap 25). */
432
463
  k?: number;
433
464
  /** `top_k_paths` only: max edges per path (default 8, cap 16). */
@@ -571,6 +602,11 @@ interface RetrieveContextRequest {
571
602
  layer?: string;
572
603
  include_graph?: boolean;
573
604
  min_similarity?: number;
605
+ /** Reserve up to this many node slots for cheapest-first graph expansion.
606
+ * Default 0 preserves direct-only retrieval. */
607
+ graph_expansion_limit?: number;
608
+ /** Maximum graph-expansion hops (default 2). */
609
+ graph_max_depth?: number;
574
610
  /**
575
611
  * M3 as-of (valid time): ISO-8601 date to judge validity windows against.
576
612
  * Windowed nodes then carry `valid_at_time` instead of `currently_valid`.
@@ -666,6 +702,11 @@ interface RetrieveContextResponse {
666
702
  currently_valid?: boolean;
667
703
  /** As-of variant of `currently_valid` when the request set `valid_at`. */
668
704
  valid_at_time?: boolean;
705
+ /** Present when the node was added by budgeted graph expansion. */
706
+ retrieval_origin?: "graph_expansion";
707
+ retrieval_path_cost?: number;
708
+ retrieval_depth?: number;
709
+ retrieval_parent_uid?: string | null;
669
710
  })[];
670
711
  edges: Record<string, unknown>[];
671
712
  };
@@ -833,6 +874,125 @@ interface MindGraphConfig {
833
874
  /** Initial backoff in ms before first retry. Doubles each attempt. Default: 1000. */
834
875
  retryBackoffMs?: number;
835
876
  }
877
+ /** Schema-level behavior for compiled semantic-match diagnostics. */
878
+ type SemanticValidationMode = "off" | "advisory" | "review" | "strict";
879
+ /** Validation modes accepted by the M5.1 schema update endpoint. */
880
+ type SemanticValidationAuthoringMode = "off" | "advisory";
881
+ /** The six storage/runtime behaviors supported by semantic profile v1. */
882
+ type SemanticRuntimeTemplate = "entity" | "dependent_entity" | "collective" | "relationship_object" | "event" | "observation";
883
+ /** Optional orthogonal classifications that do not introduce storage layouts. */
884
+ type SemanticModifier = "role" | "phase" | "social_construct";
885
+ type OntologicalBaseKind = "kind" | "subkind" | "dependent_particular" | "collective" | "relator" | "event" | "quality" | "unspecified";
886
+ type SemanticRigidity = "rigid" | "anti_rigid" | "unspecified";
887
+ type SemanticIdentityMode = "provided" | "inherited" | "derived" | "unspecified";
888
+ type SemanticDependence = "independent" | "bearer" | "external" | "unspecified";
889
+ type SemanticTemporalMode = "persistent" | "interval" | "occurrence" | "observation_time" | "unspecified";
890
+ type SemanticMatchStatus = "candidate" | "accepted" | "rejected" | "superseded";
891
+ type SemanticEvidenceSourceKind = "corpus_span" | "declared_structure" | "sql_metadata" | "graph_usage" | "human_review" | "llm_classification";
892
+ type SemanticSignalKind = "own_identity" | "borrowed_identity" | "host_attachment" | "participant_count" | "membership_relation" | "occurs_at" | "observed_at" | "externally_assigned" | "lifecycle_stage" | "institutionally_defined" | "relation_endpoints";
893
+ type ParticipantSlotKind = "bearer" | "player" | "context" | "subject" | "source" | "participant" | "member" | "observed_entity" | "base_type";
894
+ /** A typed participant requirement resolved against the containing schema version. */
895
+ interface SemanticParticipantSlot {
896
+ name: string;
897
+ template_slot: ParticipantSlotKind;
898
+ object_types?: string[];
899
+ min?: number;
900
+ max?: number;
901
+ relation_type?: string;
902
+ }
903
+ type FieldSemanticKind = "phase_indicator" | "role_indicator" | "internal_disposition" | "event_time" | "observed_at" | "source_wording";
904
+ /** Typed meaning for a concrete object field; prose is never compiled. */
905
+ interface FieldSemantic {
906
+ field: string;
907
+ semantic: FieldSemanticKind;
908
+ temporal_mode?: SemanticTemporalMode;
909
+ lossy?: boolean;
910
+ }
911
+ type NormativeKind = "need" | "constraint" | "obligation" | "preference" | "unspecified";
912
+ type CanonicalAttachmentAuthority = "relation" | "reference_field";
913
+ type CanonicalAttachmentDirection = "outgoing" | "incoming";
914
+ /** Declares which of a relation/reference-field pair owns an attachment fact. */
915
+ interface CanonicalAttachmentBinding {
916
+ slot: string;
917
+ relation_type: string;
918
+ reference_field?: string;
919
+ authority: CanonicalAttachmentAuthority;
920
+ direction: CanonicalAttachmentDirection;
921
+ }
922
+ /** Pins a match to one immutable global archetype template version. */
923
+ interface SemanticTemplateRef {
924
+ id: string;
925
+ version: number;
926
+ }
927
+ interface SemanticEvidenceRef {
928
+ id: string;
929
+ source_kind: SemanticEvidenceSourceKind;
930
+ source_ref: string;
931
+ asserted_by?: string;
932
+ asserted_at?: string;
933
+ }
934
+ interface SemanticGeneratorRef {
935
+ id: string;
936
+ version: number;
937
+ proposal_ref?: string;
938
+ }
939
+ interface SemanticSignal {
940
+ signal: SemanticSignalKind;
941
+ value: boolean | number | string;
942
+ evidence_ref: SemanticEvidenceRef;
943
+ generator?: SemanticGeneratorRef;
944
+ confidence: number;
945
+ observed_at?: string;
946
+ }
947
+ interface SemanticNegativeControl {
948
+ template: SemanticTemplateRef;
949
+ reason: string;
950
+ }
951
+ interface SemanticMatchAlternative {
952
+ template: SemanticTemplateRef;
953
+ confidence: number;
954
+ reason: string;
955
+ evidence?: SemanticSignal[];
956
+ }
957
+ interface SemanticModifierMatch {
958
+ template: SemanticTemplateRef;
959
+ evidence: SemanticSignal[];
960
+ negative_control: SemanticNegativeControl;
961
+ }
962
+ interface SemanticReviewDecision {
963
+ actor: string;
964
+ decided_at: string;
965
+ rationale: string;
966
+ premises?: string[];
967
+ supersedes?: string;
968
+ }
969
+ interface SemanticTenantBindings {
970
+ ontological_base_kind?: OntologicalBaseKind;
971
+ rigidity?: SemanticRigidity;
972
+ identity_mode?: SemanticIdentityMode;
973
+ dependence?: SemanticDependence;
974
+ temporal_mode?: SemanticTemporalMode;
975
+ slots?: SemanticParticipantSlot[];
976
+ fields?: FieldSemantic[];
977
+ normative_kind?: NormativeKind;
978
+ attachments?: CanonicalAttachmentBinding[];
979
+ }
980
+ type SemanticRelationKind = "association" | "mediation" | "participation" | "membership" | "characterization" | "part_whole" | "derivation" | "classification" | "unspecified";
981
+ /** Unified evidence-backed classification for object and relation types. */
982
+ interface SemanticMatch {
983
+ version: number;
984
+ template: SemanticTemplateRef;
985
+ modifiers?: SemanticModifierMatch[];
986
+ status: SemanticMatchStatus;
987
+ evidence: SemanticSignal[];
988
+ negative_control: SemanticNegativeControl;
989
+ alternatives?: SemanticMatchAlternative[];
990
+ bindings?: SemanticTenantBindings;
991
+ confidence: number;
992
+ rationale: string;
993
+ proposed_by?: SemanticGeneratorRef[];
994
+ decision?: SemanticReviewDecision;
995
+ }
836
996
  /** Field schema entry inside `OntologyObjectType.fields_json`. */
837
997
  interface FieldDefinition {
838
998
  name: string;
@@ -910,6 +1070,12 @@ interface OntologySchema {
910
1070
  description?: string;
911
1071
  status: "draft" | "active" | "deprecated" | "archived";
912
1072
  version: number;
1073
+ /**
1074
+ * Advisory semantic-profile validation is opt-in per schema. Optional so the
1075
+ * SDK tolerates servers that predate the field (the server itself defaults
1076
+ * absent rows to "off").
1077
+ */
1078
+ semantic_validation_mode?: SemanticValidationMode;
913
1079
  propose_status?: "pending" | "running" | "ready" | "failed" | null;
914
1080
  propose_job_id?: string | null;
915
1081
  propose_error?: string | null;
@@ -935,6 +1101,8 @@ interface OntologyObjectType {
935
1101
  extraction_hints?: string | null;
936
1102
  default_confidence: number;
937
1103
  review_policy: "always" | "low_confidence" | "never";
1104
+ /** Accepted semantic match. Candidates remain in the proposal ledger. */
1105
+ semantic_match?: SemanticMatch | null;
938
1106
  /** Datasource binding (null = extracted/authored). */
939
1107
  backing?: ObjectBacking | null;
940
1108
  status: "active" | "deprecated" | "archived";
@@ -957,7 +1125,10 @@ interface OntologyRelationType {
957
1125
  inverse_relation_type?: string | null;
958
1126
  fields_json: FieldDefinition[];
959
1127
  extraction_hints?: string | null;
1128
+ default_confidence: number;
960
1129
  review_policy: "always" | "low_confidence" | "never";
1130
+ /** Accepted relation match. Candidates remain in the proposal ledger. */
1131
+ semantic_match?: SemanticMatch | null;
961
1132
  /** Datasource binding (null = extracted/authored). */
962
1133
  backing?: RelationBacking | null;
963
1134
  status: "active" | "deprecated" | "archived";
@@ -986,6 +1157,7 @@ interface CreateOntologySchemaRequest {
986
1157
  interface UpdateOntologySchemaRequest {
987
1158
  name?: string;
988
1159
  description?: string;
1160
+ semantic_validation_mode?: SemanticValidationAuthoringMode;
989
1161
  }
990
1162
  interface OntologyObjectTypeInput {
991
1163
  name: string;
@@ -999,6 +1171,8 @@ interface OntologyObjectTypeInput {
999
1171
  extraction_hints?: string;
1000
1172
  default_confidence?: number;
1001
1173
  review_policy?: "always" | "low_confidence" | "never";
1174
+ /** Add, replace, or clear the object's accepted semantic match. */
1175
+ semantic_match?: SemanticMatch | null;
1002
1176
  /** Bind this object type to an external source (SQL). Omit for extracted/authored. */
1003
1177
  backing?: ObjectBacking | null;
1004
1178
  }
@@ -1014,7 +1188,10 @@ interface OntologyRelationTypeInput {
1014
1188
  inverse_relation_type?: string;
1015
1189
  fields?: FieldDefinition[];
1016
1190
  extraction_hints?: string;
1191
+ default_confidence?: number;
1017
1192
  review_policy?: "always" | "low_confidence" | "never";
1193
+ /** Add, replace, or clear the relation's accepted semantic match. */
1194
+ semantic_match?: SemanticMatch | null;
1018
1195
  /** Bind this relation to an FK column or M:M join table. Both endpoints must be sql-mapped. */
1019
1196
  backing?: RelationBacking | null;
1020
1197
  }
@@ -1025,6 +1202,8 @@ interface OntologyProposal {
1025
1202
  schema_id: string;
1026
1203
  proposal_type: string;
1027
1204
  proposed_by_agent_id?: string | null;
1205
+ proposed_by_user_id?: string | null;
1206
+ extract_job_id?: string | null;
1028
1207
  source_uids: string[];
1029
1208
  source_scope_ids: string[];
1030
1209
  changes_json: {
@@ -1049,6 +1228,34 @@ interface OntologyProposal {
1049
1228
  resolved_at?: string | null;
1050
1229
  resolved_by?: string | null;
1051
1230
  }
1231
+ interface OntologyDuplicateAudit {
1232
+ schema_id: string;
1233
+ object_groups: Array<{
1234
+ object_type: string;
1235
+ identity_hash: string;
1236
+ canonical_uid: string;
1237
+ members: Array<{
1238
+ uid: string;
1239
+ label: string;
1240
+ source_uids: string[];
1241
+ }>;
1242
+ conflicting_fields: string[];
1243
+ affected_edges: number;
1244
+ auto_merge_safe: boolean;
1245
+ }>;
1246
+ relation_groups: Array<{
1247
+ relation_type: string;
1248
+ identity_hash: string;
1249
+ canonical_uid: string;
1250
+ edge_uids: string[];
1251
+ from_uid: string;
1252
+ to_uid: string;
1253
+ auto_merge_safe: boolean;
1254
+ }>;
1255
+ objects_without_deterministic_identity: number;
1256
+ context_ambiguous_objects: number;
1257
+ repeatable_relations_skipped: number;
1258
+ }
1052
1259
  interface ProposalEdits {
1053
1260
  canonical_name?: string;
1054
1261
  fields?: Record<string, unknown>;
@@ -1235,6 +1442,11 @@ declare class MindGraph {
1235
1442
  */
1236
1443
  resolveDecision(decisionUid: string, chosenOptionUid: string, opts?: {
1237
1444
  summary?: string;
1445
+ props?: Record<string, unknown>;
1446
+ informs_uid?: string[];
1447
+ as_of_date?: string;
1448
+ session_id?: string;
1449
+ retrieval_trace_id?: string;
1238
1450
  agent_id?: string;
1239
1451
  }): Promise<unknown>;
1240
1452
  procedure(req: ProcedureRequest): Promise<unknown>;
@@ -1441,6 +1653,8 @@ declare class MindGraph {
1441
1653
  * merge/dismiss decision (server >= 1.3).
1442
1654
  */
1443
1655
  getMergeCandidates(): Promise<MergeCandidate[]>;
1656
+ /** Load-bearing conclusions awaiting repair after a premise changed. */
1657
+ getStaleDerivations(limit?: number, offset?: number): Promise<StaleDerivation[]>;
1444
1658
  getPendingApprovals(): Promise<GraphNode[]>;
1445
1659
  ingestChunk(req: IngestChunkRequest): Promise<IngestChunkResponse>;
1446
1660
  ingestDocument(req: IngestDocumentRequest): Promise<IngestDocumentResponse>;
@@ -1546,10 +1760,18 @@ declare class MindGraph {
1546
1760
  addOntologyRelationType(schemaId: string, req: OntologyRelationTypeInput): Promise<OntologyRelationType>;
1547
1761
  updateOntologyRelationType(schemaId: string, typeId: string, req: Partial<OntologyRelationTypeInput>): Promise<OntologyRelationType>;
1548
1762
  deleteOntologyRelationType(schemaId: string, typeId: string): Promise<OntologyRelationType>;
1763
+ /** Generate inert semantic classifications for individual human review. */
1764
+ analyzeOntologySemanticGuidance(schemaId: string): Promise<{
1765
+ created: number;
1766
+ }>;
1767
+ /** Read-only exact-identity collision audit; never merges graph data. */
1768
+ auditOntologyDuplicates(schemaId: string): Promise<OntologyDuplicateAudit>;
1549
1769
  listOntologyProposals(opts?: {
1550
1770
  status?: string;
1551
1771
  schema_id?: string;
1552
1772
  object_type?: string;
1773
+ proposal_type?: string;
1774
+ extract_job_id?: string;
1553
1775
  limit?: number;
1554
1776
  offset?: number;
1555
1777
  }): Promise<{
@@ -1666,4 +1888,4 @@ declare class MindGraph {
1666
1888
  }>;
1667
1889
  }
1668
1890
 
1669
- export { type AnalogyCandidate, type ArgumentRequest, type ArticleResult, type BatchRequest, type BelievedBy, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type DecayRequest, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type OrganizationProps, type Participant, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type PurgeRequest, type RankedClaimHub, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SessionRequest, type SignalsQuery, type SignalsResponse, type SourceChunk, type StructureRequest, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest };
1891
+ export { type AnalogyCandidate, type ArgumentRequest, type ArticleResult, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateOntologySchemaRequest, type DecayRequest, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyProposal, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SessionRequest, type SignalsQuery, type SignalsResponse, type SourceChunk, type StructureRequest, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };
package/dist/index.d.ts CHANGED
@@ -72,6 +72,25 @@ interface MergeCandidate {
72
72
  similarity: number | null;
73
73
  /** How the candidate was found: "exact" | "fuzzy" | "semantic" | "llm". */
74
74
  method: string | null;
75
+ /**
76
+ * Normalized `truth_status` of each side (Claims), so curation UIs can
77
+ * warn before merging a refuted claim. Absent on servers older than the
78
+ * hardening batch.
79
+ */
80
+ node_a_truth_status?: string | null;
81
+ node_b_truth_status?: string | null;
82
+ }
83
+ /** A derived statement awaiting review after a load-bearing premise changed. */
84
+ interface StaleDerivation {
85
+ invalidation_uid: string;
86
+ invalidator_uid: string;
87
+ invalidator_label: string;
88
+ node_uid: string;
89
+ node_label: string;
90
+ node_summary: string;
91
+ node_type: string;
92
+ reason: string | null;
93
+ invalidated_at: string | null;
75
94
  }
76
95
  /** A `/retrieve` hybrid result: the full node plus the fused RRF score. */
77
96
  interface HybridSearchResult {
@@ -99,11 +118,10 @@ interface PathStep {
99
118
  edge_type: string | null;
100
119
  depth: number;
101
120
  parent_uid: string | null;
102
- /** Min-plus cost of the returned BFS path from the start node
103
- * (sum of -ln(weight), weights clamped to (1e-9, 1]); cost of the path
104
- * the traversal returned, not the cheapest path. 0 at the start node. */
121
+ /** Min-plus cost of the selected cheapest path from the start node
122
+ * (sum of -ln(weight), weights clamped to (1e-9, 1]). */
105
123
  path_cost?: number;
106
- /** Product of edge confidences along the returned BFS path (clamped to
124
+ /** Product of edge confidences along the selected min-cost path (clamped to
107
125
  * (1e-9, 1]); a ranking signal, not a calibrated probability. 1 at the
108
126
  * start node. */
109
127
  path_confidence?: number;
@@ -271,6 +289,12 @@ interface DeliberationRequest {
271
289
  chosen_option_uid?: string;
272
290
  blocks_uid?: string;
273
291
  informs_uid?: string[];
292
+ /** ISO 8601 date when resolve-time context was available. */
293
+ as_of_date?: string;
294
+ /** Session whose retrieval context informed the resolution. */
295
+ session_id?: string;
296
+ /** Optional identifier of the decision-time retrieval trace. */
297
+ retrieval_trace_id?: string;
274
298
  props?: Record<string, unknown>;
275
299
  agent_id?: string;
276
300
  }
@@ -311,6 +335,8 @@ interface SessionRequest {
311
335
  }
312
336
  interface DistillRequest {
313
337
  label: string;
338
+ /** Defaults to "summary" for backward compatibility. */
339
+ output_type?: "summary" | "lesson";
314
340
  summary?: string;
315
341
  confidence?: number;
316
342
  salience?: number;
@@ -377,7 +403,7 @@ interface RetrieveRequest {
377
403
  * Retrieval action. Note: `"semantic"` requires a configured embedding
378
404
  * provider on the server; for semantic search use `retrieveContext()` instead.
379
405
  */
380
- action: "text" | "semantic" | "hybrid" | "active_goals" | "open_questions" | "weak_claims" | "pending_approvals" | "unresolved_contradictions" | "preferences" | "layer" | "recent";
406
+ action: "text" | "semantic" | "hybrid" | "active_goals" | "open_questions" | "weak_claims" | "pending_approvals" | "unresolved_contradictions" | "stale_derivations" | "preferences" | "layer" | "recent";
381
407
  /**
382
408
  * Required for `"text"`, `"semantic"`, `"hybrid"`. Optional for
383
409
  * `"preferences"`: with a `query` you get topic-relevant preferences (the
@@ -427,7 +453,12 @@ interface TraverseRequest {
427
453
  max_depth?: number;
428
454
  direction?: "outgoing" | "incoming" | "both";
429
455
  edge_types?: string[];
456
+ exclude_edge_types?: string[];
430
457
  weight_threshold?: number;
458
+ /** Include ingestion/provenance edges excluded by default. */
459
+ include_provenance?: boolean;
460
+ /** Global distinct-node budget, including the seed (default 500). */
461
+ max_nodes?: number;
431
462
  /** `top_k_paths` only: number of cheapest paths to return (default 3, cap 25). */
432
463
  k?: number;
433
464
  /** `top_k_paths` only: max edges per path (default 8, cap 16). */
@@ -571,6 +602,11 @@ interface RetrieveContextRequest {
571
602
  layer?: string;
572
603
  include_graph?: boolean;
573
604
  min_similarity?: number;
605
+ /** Reserve up to this many node slots for cheapest-first graph expansion.
606
+ * Default 0 preserves direct-only retrieval. */
607
+ graph_expansion_limit?: number;
608
+ /** Maximum graph-expansion hops (default 2). */
609
+ graph_max_depth?: number;
574
610
  /**
575
611
  * M3 as-of (valid time): ISO-8601 date to judge validity windows against.
576
612
  * Windowed nodes then carry `valid_at_time` instead of `currently_valid`.
@@ -666,6 +702,11 @@ interface RetrieveContextResponse {
666
702
  currently_valid?: boolean;
667
703
  /** As-of variant of `currently_valid` when the request set `valid_at`. */
668
704
  valid_at_time?: boolean;
705
+ /** Present when the node was added by budgeted graph expansion. */
706
+ retrieval_origin?: "graph_expansion";
707
+ retrieval_path_cost?: number;
708
+ retrieval_depth?: number;
709
+ retrieval_parent_uid?: string | null;
669
710
  })[];
670
711
  edges: Record<string, unknown>[];
671
712
  };
@@ -833,6 +874,125 @@ interface MindGraphConfig {
833
874
  /** Initial backoff in ms before first retry. Doubles each attempt. Default: 1000. */
834
875
  retryBackoffMs?: number;
835
876
  }
877
+ /** Schema-level behavior for compiled semantic-match diagnostics. */
878
+ type SemanticValidationMode = "off" | "advisory" | "review" | "strict";
879
+ /** Validation modes accepted by the M5.1 schema update endpoint. */
880
+ type SemanticValidationAuthoringMode = "off" | "advisory";
881
+ /** The six storage/runtime behaviors supported by semantic profile v1. */
882
+ type SemanticRuntimeTemplate = "entity" | "dependent_entity" | "collective" | "relationship_object" | "event" | "observation";
883
+ /** Optional orthogonal classifications that do not introduce storage layouts. */
884
+ type SemanticModifier = "role" | "phase" | "social_construct";
885
+ type OntologicalBaseKind = "kind" | "subkind" | "dependent_particular" | "collective" | "relator" | "event" | "quality" | "unspecified";
886
+ type SemanticRigidity = "rigid" | "anti_rigid" | "unspecified";
887
+ type SemanticIdentityMode = "provided" | "inherited" | "derived" | "unspecified";
888
+ type SemanticDependence = "independent" | "bearer" | "external" | "unspecified";
889
+ type SemanticTemporalMode = "persistent" | "interval" | "occurrence" | "observation_time" | "unspecified";
890
+ type SemanticMatchStatus = "candidate" | "accepted" | "rejected" | "superseded";
891
+ type SemanticEvidenceSourceKind = "corpus_span" | "declared_structure" | "sql_metadata" | "graph_usage" | "human_review" | "llm_classification";
892
+ type SemanticSignalKind = "own_identity" | "borrowed_identity" | "host_attachment" | "participant_count" | "membership_relation" | "occurs_at" | "observed_at" | "externally_assigned" | "lifecycle_stage" | "institutionally_defined" | "relation_endpoints";
893
+ type ParticipantSlotKind = "bearer" | "player" | "context" | "subject" | "source" | "participant" | "member" | "observed_entity" | "base_type";
894
+ /** A typed participant requirement resolved against the containing schema version. */
895
+ interface SemanticParticipantSlot {
896
+ name: string;
897
+ template_slot: ParticipantSlotKind;
898
+ object_types?: string[];
899
+ min?: number;
900
+ max?: number;
901
+ relation_type?: string;
902
+ }
903
+ type FieldSemanticKind = "phase_indicator" | "role_indicator" | "internal_disposition" | "event_time" | "observed_at" | "source_wording";
904
+ /** Typed meaning for a concrete object field; prose is never compiled. */
905
+ interface FieldSemantic {
906
+ field: string;
907
+ semantic: FieldSemanticKind;
908
+ temporal_mode?: SemanticTemporalMode;
909
+ lossy?: boolean;
910
+ }
911
+ type NormativeKind = "need" | "constraint" | "obligation" | "preference" | "unspecified";
912
+ type CanonicalAttachmentAuthority = "relation" | "reference_field";
913
+ type CanonicalAttachmentDirection = "outgoing" | "incoming";
914
+ /** Declares which of a relation/reference-field pair owns an attachment fact. */
915
+ interface CanonicalAttachmentBinding {
916
+ slot: string;
917
+ relation_type: string;
918
+ reference_field?: string;
919
+ authority: CanonicalAttachmentAuthority;
920
+ direction: CanonicalAttachmentDirection;
921
+ }
922
+ /** Pins a match to one immutable global archetype template version. */
923
+ interface SemanticTemplateRef {
924
+ id: string;
925
+ version: number;
926
+ }
927
+ interface SemanticEvidenceRef {
928
+ id: string;
929
+ source_kind: SemanticEvidenceSourceKind;
930
+ source_ref: string;
931
+ asserted_by?: string;
932
+ asserted_at?: string;
933
+ }
934
+ interface SemanticGeneratorRef {
935
+ id: string;
936
+ version: number;
937
+ proposal_ref?: string;
938
+ }
939
+ interface SemanticSignal {
940
+ signal: SemanticSignalKind;
941
+ value: boolean | number | string;
942
+ evidence_ref: SemanticEvidenceRef;
943
+ generator?: SemanticGeneratorRef;
944
+ confidence: number;
945
+ observed_at?: string;
946
+ }
947
+ interface SemanticNegativeControl {
948
+ template: SemanticTemplateRef;
949
+ reason: string;
950
+ }
951
+ interface SemanticMatchAlternative {
952
+ template: SemanticTemplateRef;
953
+ confidence: number;
954
+ reason: string;
955
+ evidence?: SemanticSignal[];
956
+ }
957
+ interface SemanticModifierMatch {
958
+ template: SemanticTemplateRef;
959
+ evidence: SemanticSignal[];
960
+ negative_control: SemanticNegativeControl;
961
+ }
962
+ interface SemanticReviewDecision {
963
+ actor: string;
964
+ decided_at: string;
965
+ rationale: string;
966
+ premises?: string[];
967
+ supersedes?: string;
968
+ }
969
+ interface SemanticTenantBindings {
970
+ ontological_base_kind?: OntologicalBaseKind;
971
+ rigidity?: SemanticRigidity;
972
+ identity_mode?: SemanticIdentityMode;
973
+ dependence?: SemanticDependence;
974
+ temporal_mode?: SemanticTemporalMode;
975
+ slots?: SemanticParticipantSlot[];
976
+ fields?: FieldSemantic[];
977
+ normative_kind?: NormativeKind;
978
+ attachments?: CanonicalAttachmentBinding[];
979
+ }
980
+ type SemanticRelationKind = "association" | "mediation" | "participation" | "membership" | "characterization" | "part_whole" | "derivation" | "classification" | "unspecified";
981
+ /** Unified evidence-backed classification for object and relation types. */
982
+ interface SemanticMatch {
983
+ version: number;
984
+ template: SemanticTemplateRef;
985
+ modifiers?: SemanticModifierMatch[];
986
+ status: SemanticMatchStatus;
987
+ evidence: SemanticSignal[];
988
+ negative_control: SemanticNegativeControl;
989
+ alternatives?: SemanticMatchAlternative[];
990
+ bindings?: SemanticTenantBindings;
991
+ confidence: number;
992
+ rationale: string;
993
+ proposed_by?: SemanticGeneratorRef[];
994
+ decision?: SemanticReviewDecision;
995
+ }
836
996
  /** Field schema entry inside `OntologyObjectType.fields_json`. */
837
997
  interface FieldDefinition {
838
998
  name: string;
@@ -910,6 +1070,12 @@ interface OntologySchema {
910
1070
  description?: string;
911
1071
  status: "draft" | "active" | "deprecated" | "archived";
912
1072
  version: number;
1073
+ /**
1074
+ * Advisory semantic-profile validation is opt-in per schema. Optional so the
1075
+ * SDK tolerates servers that predate the field (the server itself defaults
1076
+ * absent rows to "off").
1077
+ */
1078
+ semantic_validation_mode?: SemanticValidationMode;
913
1079
  propose_status?: "pending" | "running" | "ready" | "failed" | null;
914
1080
  propose_job_id?: string | null;
915
1081
  propose_error?: string | null;
@@ -935,6 +1101,8 @@ interface OntologyObjectType {
935
1101
  extraction_hints?: string | null;
936
1102
  default_confidence: number;
937
1103
  review_policy: "always" | "low_confidence" | "never";
1104
+ /** Accepted semantic match. Candidates remain in the proposal ledger. */
1105
+ semantic_match?: SemanticMatch | null;
938
1106
  /** Datasource binding (null = extracted/authored). */
939
1107
  backing?: ObjectBacking | null;
940
1108
  status: "active" | "deprecated" | "archived";
@@ -957,7 +1125,10 @@ interface OntologyRelationType {
957
1125
  inverse_relation_type?: string | null;
958
1126
  fields_json: FieldDefinition[];
959
1127
  extraction_hints?: string | null;
1128
+ default_confidence: number;
960
1129
  review_policy: "always" | "low_confidence" | "never";
1130
+ /** Accepted relation match. Candidates remain in the proposal ledger. */
1131
+ semantic_match?: SemanticMatch | null;
961
1132
  /** Datasource binding (null = extracted/authored). */
962
1133
  backing?: RelationBacking | null;
963
1134
  status: "active" | "deprecated" | "archived";
@@ -986,6 +1157,7 @@ interface CreateOntologySchemaRequest {
986
1157
  interface UpdateOntologySchemaRequest {
987
1158
  name?: string;
988
1159
  description?: string;
1160
+ semantic_validation_mode?: SemanticValidationAuthoringMode;
989
1161
  }
990
1162
  interface OntologyObjectTypeInput {
991
1163
  name: string;
@@ -999,6 +1171,8 @@ interface OntologyObjectTypeInput {
999
1171
  extraction_hints?: string;
1000
1172
  default_confidence?: number;
1001
1173
  review_policy?: "always" | "low_confidence" | "never";
1174
+ /** Add, replace, or clear the object's accepted semantic match. */
1175
+ semantic_match?: SemanticMatch | null;
1002
1176
  /** Bind this object type to an external source (SQL). Omit for extracted/authored. */
1003
1177
  backing?: ObjectBacking | null;
1004
1178
  }
@@ -1014,7 +1188,10 @@ interface OntologyRelationTypeInput {
1014
1188
  inverse_relation_type?: string;
1015
1189
  fields?: FieldDefinition[];
1016
1190
  extraction_hints?: string;
1191
+ default_confidence?: number;
1017
1192
  review_policy?: "always" | "low_confidence" | "never";
1193
+ /** Add, replace, or clear the relation's accepted semantic match. */
1194
+ semantic_match?: SemanticMatch | null;
1018
1195
  /** Bind this relation to an FK column or M:M join table. Both endpoints must be sql-mapped. */
1019
1196
  backing?: RelationBacking | null;
1020
1197
  }
@@ -1025,6 +1202,8 @@ interface OntologyProposal {
1025
1202
  schema_id: string;
1026
1203
  proposal_type: string;
1027
1204
  proposed_by_agent_id?: string | null;
1205
+ proposed_by_user_id?: string | null;
1206
+ extract_job_id?: string | null;
1028
1207
  source_uids: string[];
1029
1208
  source_scope_ids: string[];
1030
1209
  changes_json: {
@@ -1049,6 +1228,34 @@ interface OntologyProposal {
1049
1228
  resolved_at?: string | null;
1050
1229
  resolved_by?: string | null;
1051
1230
  }
1231
+ interface OntologyDuplicateAudit {
1232
+ schema_id: string;
1233
+ object_groups: Array<{
1234
+ object_type: string;
1235
+ identity_hash: string;
1236
+ canonical_uid: string;
1237
+ members: Array<{
1238
+ uid: string;
1239
+ label: string;
1240
+ source_uids: string[];
1241
+ }>;
1242
+ conflicting_fields: string[];
1243
+ affected_edges: number;
1244
+ auto_merge_safe: boolean;
1245
+ }>;
1246
+ relation_groups: Array<{
1247
+ relation_type: string;
1248
+ identity_hash: string;
1249
+ canonical_uid: string;
1250
+ edge_uids: string[];
1251
+ from_uid: string;
1252
+ to_uid: string;
1253
+ auto_merge_safe: boolean;
1254
+ }>;
1255
+ objects_without_deterministic_identity: number;
1256
+ context_ambiguous_objects: number;
1257
+ repeatable_relations_skipped: number;
1258
+ }
1052
1259
  interface ProposalEdits {
1053
1260
  canonical_name?: string;
1054
1261
  fields?: Record<string, unknown>;
@@ -1235,6 +1442,11 @@ declare class MindGraph {
1235
1442
  */
1236
1443
  resolveDecision(decisionUid: string, chosenOptionUid: string, opts?: {
1237
1444
  summary?: string;
1445
+ props?: Record<string, unknown>;
1446
+ informs_uid?: string[];
1447
+ as_of_date?: string;
1448
+ session_id?: string;
1449
+ retrieval_trace_id?: string;
1238
1450
  agent_id?: string;
1239
1451
  }): Promise<unknown>;
1240
1452
  procedure(req: ProcedureRequest): Promise<unknown>;
@@ -1441,6 +1653,8 @@ declare class MindGraph {
1441
1653
  * merge/dismiss decision (server >= 1.3).
1442
1654
  */
1443
1655
  getMergeCandidates(): Promise<MergeCandidate[]>;
1656
+ /** Load-bearing conclusions awaiting repair after a premise changed. */
1657
+ getStaleDerivations(limit?: number, offset?: number): Promise<StaleDerivation[]>;
1444
1658
  getPendingApprovals(): Promise<GraphNode[]>;
1445
1659
  ingestChunk(req: IngestChunkRequest): Promise<IngestChunkResponse>;
1446
1660
  ingestDocument(req: IngestDocumentRequest): Promise<IngestDocumentResponse>;
@@ -1546,10 +1760,18 @@ declare class MindGraph {
1546
1760
  addOntologyRelationType(schemaId: string, req: OntologyRelationTypeInput): Promise<OntologyRelationType>;
1547
1761
  updateOntologyRelationType(schemaId: string, typeId: string, req: Partial<OntologyRelationTypeInput>): Promise<OntologyRelationType>;
1548
1762
  deleteOntologyRelationType(schemaId: string, typeId: string): Promise<OntologyRelationType>;
1763
+ /** Generate inert semantic classifications for individual human review. */
1764
+ analyzeOntologySemanticGuidance(schemaId: string): Promise<{
1765
+ created: number;
1766
+ }>;
1767
+ /** Read-only exact-identity collision audit; never merges graph data. */
1768
+ auditOntologyDuplicates(schemaId: string): Promise<OntologyDuplicateAudit>;
1549
1769
  listOntologyProposals(opts?: {
1550
1770
  status?: string;
1551
1771
  schema_id?: string;
1552
1772
  object_type?: string;
1773
+ proposal_type?: string;
1774
+ extract_job_id?: string;
1553
1775
  limit?: number;
1554
1776
  offset?: number;
1555
1777
  }): Promise<{
@@ -1666,4 +1888,4 @@ declare class MindGraph {
1666
1888
  }>;
1667
1889
  }
1668
1890
 
1669
- export { type AnalogyCandidate, type ArgumentRequest, type ArticleResult, type BatchRequest, type BelievedBy, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type DecayRequest, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type OrganizationProps, type Participant, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type PurgeRequest, type RankedClaimHub, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SessionRequest, type SignalsQuery, type SignalsResponse, type SourceChunk, type StructureRequest, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest };
1891
+ export { type AnalogyCandidate, type ArgumentRequest, type ArticleResult, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateOntologySchemaRequest, type DecayRequest, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyProposal, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SessionRequest, type SignalsQuery, type SignalsResponse, type SourceChunk, type StructureRequest, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };
package/dist/index.js CHANGED
@@ -564,6 +564,10 @@ var MindGraph = class {
564
564
  async getMergeCandidates() {
565
565
  return this.post("/retrieve", { action: "merge_candidates" });
566
566
  }
567
+ /** Load-bearing conclusions awaiting repair after a premise changed. */
568
+ async getStaleDerivations(limit = 50, offset = 0) {
569
+ return this.post("/retrieve", { action: "stale_derivations", limit, offset });
570
+ }
567
571
  async getPendingApprovals() {
568
572
  return this.get("/approvals/pending");
569
573
  }
@@ -745,12 +749,25 @@ var MindGraph = class {
745
749
  `/v1/ontology/schemas/${schemaId}/relation-types/${typeId}`
746
750
  );
747
751
  }
752
+ /** Generate inert semantic classifications for individual human review. */
753
+ async analyzeOntologySemanticGuidance(schemaId) {
754
+ return this.post(
755
+ `/v1/ontology/schemas/${schemaId}/semantic-guidance/analyze`,
756
+ {}
757
+ );
758
+ }
759
+ /** Read-only exact-identity collision audit; never merges graph data. */
760
+ async auditOntologyDuplicates(schemaId) {
761
+ return this.post(`/v1/ontology/schemas/${schemaId}/duplicates/audit`, {});
762
+ }
748
763
  // ---- Proposals ----
749
764
  async listOntologyProposals(opts) {
750
765
  const q = new URLSearchParams();
751
766
  if (opts?.status) q.set("status", opts.status);
752
767
  if (opts?.schema_id) q.set("schema_id", opts.schema_id);
753
768
  if (opts?.object_type) q.set("object_type", opts.object_type);
769
+ if (opts?.proposal_type) q.set("proposal_type", opts.proposal_type);
770
+ if (opts?.extract_job_id) q.set("extract_job_id", opts.extract_job_id);
754
771
  if (opts?.limit != null) q.set("limit", String(opts.limit));
755
772
  if (opts?.offset != null) q.set("offset", String(opts.offset));
756
773
  const qs = q.toString();
package/dist/index.mjs CHANGED
@@ -537,6 +537,10 @@ var MindGraph = class {
537
537
  async getMergeCandidates() {
538
538
  return this.post("/retrieve", { action: "merge_candidates" });
539
539
  }
540
+ /** Load-bearing conclusions awaiting repair after a premise changed. */
541
+ async getStaleDerivations(limit = 50, offset = 0) {
542
+ return this.post("/retrieve", { action: "stale_derivations", limit, offset });
543
+ }
540
544
  async getPendingApprovals() {
541
545
  return this.get("/approvals/pending");
542
546
  }
@@ -718,12 +722,25 @@ var MindGraph = class {
718
722
  `/v1/ontology/schemas/${schemaId}/relation-types/${typeId}`
719
723
  );
720
724
  }
725
+ /** Generate inert semantic classifications for individual human review. */
726
+ async analyzeOntologySemanticGuidance(schemaId) {
727
+ return this.post(
728
+ `/v1/ontology/schemas/${schemaId}/semantic-guidance/analyze`,
729
+ {}
730
+ );
731
+ }
732
+ /** Read-only exact-identity collision audit; never merges graph data. */
733
+ async auditOntologyDuplicates(schemaId) {
734
+ return this.post(`/v1/ontology/schemas/${schemaId}/duplicates/audit`, {});
735
+ }
721
736
  // ---- Proposals ----
722
737
  async listOntologyProposals(opts) {
723
738
  const q = new URLSearchParams();
724
739
  if (opts?.status) q.set("status", opts.status);
725
740
  if (opts?.schema_id) q.set("schema_id", opts.schema_id);
726
741
  if (opts?.object_type) q.set("object_type", opts.object_type);
742
+ if (opts?.proposal_type) q.set("proposal_type", opts.proposal_type);
743
+ if (opts?.extract_job_id) q.set("extract_job_id", opts.extract_job_id);
727
744
  if (opts?.limit != null) q.set("limit", String(opts.limit));
728
745
  if (opts?.offset != null) q.set("offset", String(opts.offset));
729
746
  const qs = q.toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindgraph",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "TypeScript client for the MindGraph Cloud API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",