mindgraph 0.11.0 → 0.13.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/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
@@ -389,6 +415,8 @@ interface RetrieveRequest {
389
415
  * reflect what the user likes.
390
416
  */
391
417
  query?: string;
418
+ /** Corpus Project whose member sources define the retrieval boundary. */
419
+ project_uid?: string;
392
420
  k?: number;
393
421
  threshold?: number;
394
422
  layer?: string;
@@ -427,7 +455,12 @@ interface TraverseRequest {
427
455
  max_depth?: number;
428
456
  direction?: "outgoing" | "incoming" | "both";
429
457
  edge_types?: string[];
458
+ exclude_edge_types?: string[];
430
459
  weight_threshold?: number;
460
+ /** Include ingestion/provenance edges excluded by default. */
461
+ include_provenance?: boolean;
462
+ /** Global distinct-node budget, including the seed (default 500). */
463
+ max_nodes?: number;
431
464
  /** `top_k_paths` only: number of cheapest paths to return (default 3, cap 25). */
432
465
  k?: number;
433
466
  /** `top_k_paths` only: max edges per path (default 8, cap 16). */
@@ -497,6 +530,8 @@ interface IngestChunkResponse {
497
530
  interface IngestDocumentRequest {
498
531
  content: string;
499
532
  title?: string;
533
+ /** Corpus Project to attach the ingested document to. */
534
+ project_uid?: string;
500
535
  document_type?: string;
501
536
  /** Semantic content type: "article" (default), "meeting_notes", "journal". Drives default extraction layers. */
502
537
  content_type?: string;
@@ -561,6 +596,8 @@ interface IngestSessionRequest {
561
596
  }
562
597
  interface RetrieveContextRequest {
563
598
  query: string;
599
+ /** Corpus Project whose member sources define the retrieval boundary. */
600
+ project_uid?: string;
564
601
  /** Max graph nodes to return (default 10). */
565
602
  node_limit?: number;
566
603
  /** Max wiki articles to return (default 3). Set to 0 to skip. */
@@ -571,6 +608,11 @@ interface RetrieveContextRequest {
571
608
  layer?: string;
572
609
  include_graph?: boolean;
573
610
  min_similarity?: number;
611
+ /** Reserve up to this many node slots for cheapest-first graph expansion.
612
+ * Default 0 preserves direct-only retrieval. */
613
+ graph_expansion_limit?: number;
614
+ /** Maximum graph-expansion hops (default 2). */
615
+ graph_max_depth?: number;
574
616
  /**
575
617
  * M3 as-of (valid time): ISO-8601 date to judge validity windows against.
576
618
  * Windowed nodes then carry `valid_at_time` instead of `currently_valid`.
@@ -666,6 +708,11 @@ interface RetrieveContextResponse {
666
708
  currently_valid?: boolean;
667
709
  /** As-of variant of `currently_valid` when the request set `valid_at`. */
668
710
  valid_at_time?: boolean;
711
+ /** Present when the node was added by budgeted graph expansion. */
712
+ retrieval_origin?: "graph_expansion";
713
+ retrieval_path_cost?: number;
714
+ retrieval_depth?: number;
715
+ retrieval_parent_uid?: string | null;
669
716
  })[];
670
717
  edges: Record<string, unknown>[];
671
718
  };
@@ -828,11 +875,136 @@ interface MindGraphConfig {
828
875
  apiKey?: string;
829
876
  jwt?: string;
830
877
  orgId?: string;
878
+ /**
879
+ * Non-security telemetry hint for first-party adapters. The cloud accepts
880
+ * only `dashboard`/`mcp`, normalizes everything else to `api`, and never
881
+ * uses this value for authorization or result membership.
882
+ */
883
+ telemetrySurface?: "dashboard" | "mcp";
831
884
  /** Max retries for 503 (server warming up) responses. Default: 3. Set to 0 to disable. */
832
885
  maxRetries?: number;
833
886
  /** Initial backoff in ms before first retry. Doubles each attempt. Default: 1000. */
834
887
  retryBackoffMs?: number;
835
888
  }
889
+ /** Schema-level behavior for compiled semantic-match diagnostics. */
890
+ type SemanticValidationMode = "off" | "advisory" | "review" | "strict";
891
+ /** Validation modes accepted by the M5.1 schema update endpoint. */
892
+ type SemanticValidationAuthoringMode = "off" | "advisory";
893
+ /** The six storage/runtime behaviors supported by semantic profile v1. */
894
+ type SemanticRuntimeTemplate = "entity" | "dependent_entity" | "collective" | "relationship_object" | "event" | "observation";
895
+ /** Optional orthogonal classifications that do not introduce storage layouts. */
896
+ type SemanticModifier = "role" | "phase" | "social_construct";
897
+ type OntologicalBaseKind = "kind" | "subkind" | "dependent_particular" | "collective" | "relator" | "event" | "quality" | "unspecified";
898
+ type SemanticRigidity = "rigid" | "anti_rigid" | "unspecified";
899
+ type SemanticIdentityMode = "provided" | "inherited" | "derived" | "unspecified";
900
+ type SemanticDependence = "independent" | "bearer" | "external" | "unspecified";
901
+ type SemanticTemporalMode = "persistent" | "interval" | "occurrence" | "observation_time" | "unspecified";
902
+ type SemanticMatchStatus = "candidate" | "accepted" | "rejected" | "superseded";
903
+ type SemanticEvidenceSourceKind = "corpus_span" | "declared_structure" | "sql_metadata" | "graph_usage" | "human_review" | "llm_classification";
904
+ type SemanticSignalKind = "own_identity" | "borrowed_identity" | "host_attachment" | "participant_count" | "membership_relation" | "occurs_at" | "observed_at" | "externally_assigned" | "lifecycle_stage" | "institutionally_defined" | "relation_endpoints";
905
+ type ParticipantSlotKind = "bearer" | "player" | "context" | "subject" | "source" | "participant" | "member" | "observed_entity" | "base_type";
906
+ /** A typed participant requirement resolved against the containing schema version. */
907
+ interface SemanticParticipantSlot {
908
+ name: string;
909
+ template_slot: ParticipantSlotKind;
910
+ object_types?: string[];
911
+ min?: number;
912
+ max?: number;
913
+ relation_type?: string;
914
+ }
915
+ type FieldSemanticKind = "phase_indicator" | "role_indicator" | "internal_disposition" | "event_time" | "observed_at" | "source_wording";
916
+ /** Typed meaning for a concrete object field; prose is never compiled. */
917
+ interface FieldSemantic {
918
+ field: string;
919
+ semantic: FieldSemanticKind;
920
+ temporal_mode?: SemanticTemporalMode;
921
+ lossy?: boolean;
922
+ }
923
+ type NormativeKind = "need" | "constraint" | "obligation" | "preference" | "unspecified";
924
+ type CanonicalAttachmentAuthority = "relation" | "reference_field";
925
+ type CanonicalAttachmentDirection = "outgoing" | "incoming";
926
+ /** Declares which of a relation/reference-field pair owns an attachment fact. */
927
+ interface CanonicalAttachmentBinding {
928
+ slot: string;
929
+ relation_type: string;
930
+ reference_field?: string;
931
+ authority: CanonicalAttachmentAuthority;
932
+ direction: CanonicalAttachmentDirection;
933
+ }
934
+ /** Pins a match to one immutable global archetype template version. */
935
+ interface SemanticTemplateRef {
936
+ id: string;
937
+ version: number;
938
+ }
939
+ interface SemanticEvidenceRef {
940
+ id: string;
941
+ source_kind: SemanticEvidenceSourceKind;
942
+ source_ref: string;
943
+ asserted_by?: string;
944
+ asserted_at?: string;
945
+ }
946
+ interface SemanticGeneratorRef {
947
+ id: string;
948
+ version: number;
949
+ proposal_ref?: string;
950
+ }
951
+ interface SemanticSignal {
952
+ signal: SemanticSignalKind;
953
+ value: boolean | number | string;
954
+ evidence_ref: SemanticEvidenceRef;
955
+ generator?: SemanticGeneratorRef;
956
+ confidence: number;
957
+ observed_at?: string;
958
+ }
959
+ interface SemanticNegativeControl {
960
+ template: SemanticTemplateRef;
961
+ reason: string;
962
+ }
963
+ interface SemanticMatchAlternative {
964
+ template: SemanticTemplateRef;
965
+ confidence: number;
966
+ reason: string;
967
+ evidence?: SemanticSignal[];
968
+ }
969
+ interface SemanticModifierMatch {
970
+ template: SemanticTemplateRef;
971
+ evidence: SemanticSignal[];
972
+ negative_control: SemanticNegativeControl;
973
+ }
974
+ interface SemanticReviewDecision {
975
+ actor: string;
976
+ decided_at: string;
977
+ rationale: string;
978
+ premises?: string[];
979
+ supersedes?: string;
980
+ }
981
+ interface SemanticTenantBindings {
982
+ ontological_base_kind?: OntologicalBaseKind;
983
+ rigidity?: SemanticRigidity;
984
+ identity_mode?: SemanticIdentityMode;
985
+ dependence?: SemanticDependence;
986
+ temporal_mode?: SemanticTemporalMode;
987
+ slots?: SemanticParticipantSlot[];
988
+ fields?: FieldSemantic[];
989
+ normative_kind?: NormativeKind;
990
+ attachments?: CanonicalAttachmentBinding[];
991
+ }
992
+ type SemanticRelationKind = "association" | "mediation" | "participation" | "membership" | "characterization" | "part_whole" | "derivation" | "classification" | "unspecified";
993
+ /** Unified evidence-backed classification for object and relation types. */
994
+ interface SemanticMatch {
995
+ version: number;
996
+ template: SemanticTemplateRef;
997
+ modifiers?: SemanticModifierMatch[];
998
+ status: SemanticMatchStatus;
999
+ evidence: SemanticSignal[];
1000
+ negative_control: SemanticNegativeControl;
1001
+ alternatives?: SemanticMatchAlternative[];
1002
+ bindings?: SemanticTenantBindings;
1003
+ confidence: number;
1004
+ rationale: string;
1005
+ proposed_by?: SemanticGeneratorRef[];
1006
+ decision?: SemanticReviewDecision;
1007
+ }
836
1008
  /** Field schema entry inside `OntologyObjectType.fields_json`. */
837
1009
  interface FieldDefinition {
838
1010
  name: string;
@@ -910,6 +1082,12 @@ interface OntologySchema {
910
1082
  description?: string;
911
1083
  status: "draft" | "active" | "deprecated" | "archived";
912
1084
  version: number;
1085
+ /**
1086
+ * Advisory semantic-profile validation is opt-in per schema. Optional so the
1087
+ * SDK tolerates servers that predate the field (the server itself defaults
1088
+ * absent rows to "off").
1089
+ */
1090
+ semantic_validation_mode?: SemanticValidationMode;
913
1091
  propose_status?: "pending" | "running" | "ready" | "failed" | null;
914
1092
  propose_job_id?: string | null;
915
1093
  propose_error?: string | null;
@@ -935,6 +1113,8 @@ interface OntologyObjectType {
935
1113
  extraction_hints?: string | null;
936
1114
  default_confidence: number;
937
1115
  review_policy: "always" | "low_confidence" | "never";
1116
+ /** Accepted semantic match. Candidates remain in the proposal ledger. */
1117
+ semantic_match?: SemanticMatch | null;
938
1118
  /** Datasource binding (null = extracted/authored). */
939
1119
  backing?: ObjectBacking | null;
940
1120
  status: "active" | "deprecated" | "archived";
@@ -957,7 +1137,10 @@ interface OntologyRelationType {
957
1137
  inverse_relation_type?: string | null;
958
1138
  fields_json: FieldDefinition[];
959
1139
  extraction_hints?: string | null;
1140
+ default_confidence: number;
960
1141
  review_policy: "always" | "low_confidence" | "never";
1142
+ /** Accepted relation match. Candidates remain in the proposal ledger. */
1143
+ semantic_match?: SemanticMatch | null;
961
1144
  /** Datasource binding (null = extracted/authored). */
962
1145
  backing?: RelationBacking | null;
963
1146
  status: "active" | "deprecated" | "archived";
@@ -975,8 +1158,10 @@ interface OntologyToolDescriptor {
975
1158
  description: string;
976
1159
  schema_id: string;
977
1160
  object_type: string;
978
- /** "search" | "object" | "object_context" */
979
- maps_to: string;
1161
+ maps_to: "search" | "object" | "object_context" | "related" | "structured_query";
1162
+ relation?: string;
1163
+ entry_role?: "source" | "target";
1164
+ far_type?: string;
980
1165
  input_schema: Record<string, unknown>;
981
1166
  }
982
1167
  interface CreateOntologySchemaRequest {
@@ -986,6 +1171,7 @@ interface CreateOntologySchemaRequest {
986
1171
  interface UpdateOntologySchemaRequest {
987
1172
  name?: string;
988
1173
  description?: string;
1174
+ semantic_validation_mode?: SemanticValidationAuthoringMode;
989
1175
  }
990
1176
  interface OntologyObjectTypeInput {
991
1177
  name: string;
@@ -999,6 +1185,8 @@ interface OntologyObjectTypeInput {
999
1185
  extraction_hints?: string;
1000
1186
  default_confidence?: number;
1001
1187
  review_policy?: "always" | "low_confidence" | "never";
1188
+ /** Add, replace, or clear the object's accepted semantic match. */
1189
+ semantic_match?: SemanticMatch | null;
1002
1190
  /** Bind this object type to an external source (SQL). Omit for extracted/authored. */
1003
1191
  backing?: ObjectBacking | null;
1004
1192
  }
@@ -1014,7 +1202,10 @@ interface OntologyRelationTypeInput {
1014
1202
  inverse_relation_type?: string;
1015
1203
  fields?: FieldDefinition[];
1016
1204
  extraction_hints?: string;
1205
+ default_confidence?: number;
1017
1206
  review_policy?: "always" | "low_confidence" | "never";
1207
+ /** Add, replace, or clear the relation's accepted semantic match. */
1208
+ semantic_match?: SemanticMatch | null;
1018
1209
  /** Bind this relation to an FK column or M:M join table. Both endpoints must be sql-mapped. */
1019
1210
  backing?: RelationBacking | null;
1020
1211
  }
@@ -1025,6 +1216,8 @@ interface OntologyProposal {
1025
1216
  schema_id: string;
1026
1217
  proposal_type: string;
1027
1218
  proposed_by_agent_id?: string | null;
1219
+ proposed_by_user_id?: string | null;
1220
+ extract_job_id?: string | null;
1028
1221
  source_uids: string[];
1029
1222
  source_scope_ids: string[];
1030
1223
  changes_json: {
@@ -1049,6 +1242,34 @@ interface OntologyProposal {
1049
1242
  resolved_at?: string | null;
1050
1243
  resolved_by?: string | null;
1051
1244
  }
1245
+ interface OntologyDuplicateAudit {
1246
+ schema_id: string;
1247
+ object_groups: Array<{
1248
+ object_type: string;
1249
+ identity_hash: string;
1250
+ canonical_uid: string;
1251
+ members: Array<{
1252
+ uid: string;
1253
+ label: string;
1254
+ source_uids: string[];
1255
+ }>;
1256
+ conflicting_fields: string[];
1257
+ affected_edges: number;
1258
+ auto_merge_safe: boolean;
1259
+ }>;
1260
+ relation_groups: Array<{
1261
+ relation_type: string;
1262
+ identity_hash: string;
1263
+ canonical_uid: string;
1264
+ edge_uids: string[];
1265
+ from_uid: string;
1266
+ to_uid: string;
1267
+ auto_merge_safe: boolean;
1268
+ }>;
1269
+ objects_without_deterministic_identity: number;
1270
+ context_ambiguous_objects: number;
1271
+ repeatable_relations_skipped: number;
1272
+ }
1052
1273
  interface ProposalEdits {
1053
1274
  canonical_name?: string;
1054
1275
  fields?: Record<string, unknown>;
@@ -1071,20 +1292,125 @@ interface ProposeOntologySchemaRequest {
1071
1292
  interface OntologyQueryRequest {
1072
1293
  query: string;
1073
1294
  schema_id: string;
1295
+ project_uid?: string;
1074
1296
  object_types?: string[];
1075
1297
  include_cognitive_context?: boolean;
1076
1298
  include_sources?: boolean;
1077
1299
  depth?: number;
1078
1300
  limit?: number;
1079
1301
  }
1302
+ type OntologyPredicateOperator = "eq" | "neq" | "in" | "contains" | "gte" | "lte" | "exists";
1303
+ interface OntologyQueryPredicate {
1304
+ field: string;
1305
+ op: OntologyPredicateOperator;
1306
+ value?: unknown;
1307
+ }
1308
+ interface StructuredOntologyQueryRequest {
1309
+ schema_id: string;
1310
+ select: string;
1311
+ project_uid?: string;
1312
+ anchor?: {
1313
+ type: string;
1314
+ uid?: string;
1315
+ match?: {
1316
+ value: string;
1317
+ field?: string;
1318
+ };
1319
+ };
1320
+ path?: Array<{
1321
+ relation: string;
1322
+ entry_role: "source" | "target";
1323
+ }>;
1324
+ where?: OntologyQueryPredicate[];
1325
+ include?: {
1326
+ provenance?: boolean;
1327
+ related?: string[];
1328
+ };
1329
+ page?: {
1330
+ limit?: number;
1331
+ offset?: number;
1332
+ };
1333
+ aggregate?: {
1334
+ op: "count" | "customer_demand_rank";
1335
+ group_by?: string;
1336
+ };
1337
+ }
1338
+ interface StructuredOntologyQueryResponse {
1339
+ plan: Record<string, unknown>;
1340
+ rows: Array<{
1341
+ object: DomainObject;
1342
+ related?: Record<string, DomainObject[]>;
1343
+ }>;
1344
+ relations: Array<{
1345
+ uid: string;
1346
+ relation: string;
1347
+ from_uid: string;
1348
+ to_uid: string;
1349
+ fields: unknown;
1350
+ leg_index?: number;
1351
+ }>;
1352
+ provenance: Array<{
1353
+ node_uid: string;
1354
+ source_uid: string;
1355
+ text_span: string;
1356
+ }>;
1357
+ aggregate?: unknown;
1358
+ total_count: number;
1359
+ total_count_exact: boolean;
1360
+ returned_count: number;
1361
+ has_more: boolean;
1362
+ coverage_complete: boolean;
1363
+ truncation_reasons: string[];
1364
+ diagnostics: string[];
1365
+ metrics: Record<string, unknown>;
1366
+ }
1367
+ interface RelatedDomainObjectsRequest {
1368
+ schema_id: string;
1369
+ entry_type: string;
1370
+ uid: string;
1371
+ relation: string;
1372
+ entry_role: "source" | "target";
1373
+ far_type: string;
1374
+ where?: OntologyQueryPredicate[];
1375
+ include_provenance?: boolean;
1376
+ limit?: number;
1377
+ offset?: number;
1378
+ project_uid?: string;
1379
+ }
1080
1380
  interface OntologyQueryResponse {
1081
1381
  objects: GraphNode[];
1082
- relations: GraphEdge[];
1083
- cognitive_context: Record<string, GraphNode[]>;
1382
+ relations: Array<{
1383
+ edge_uid: string | null;
1384
+ from_uid: string;
1385
+ to_uid: string;
1386
+ edge_type: string;
1387
+ traversal_role: string;
1388
+ depth: number;
1389
+ }>;
1390
+ cognitive_context: Record<string, Array<{
1391
+ uid: string;
1392
+ label: string;
1393
+ node_type: string;
1394
+ layer: string;
1395
+ depth: number;
1396
+ }>>;
1084
1397
  external_refs: unknown[];
1085
1398
  graph: {
1086
- nodes: GraphNode[];
1087
- edges: GraphEdge[];
1399
+ nodes: Array<{
1400
+ uid: string;
1401
+ label: string;
1402
+ node_type: string;
1403
+ layer: string;
1404
+ depth: number;
1405
+ }>;
1406
+ edges: Array<{
1407
+ edge_uid: string | null;
1408
+ from_uid: string;
1409
+ to_uid: string;
1410
+ edge_type: string;
1411
+ traversal_role: string;
1412
+ depth: number;
1413
+ }>;
1088
1414
  };
1089
1415
  provenance: Array<{
1090
1416
  node_uid: string;
@@ -1094,6 +1420,9 @@ interface OntologyQueryResponse {
1094
1420
  confidence: {
1095
1421
  overall: number;
1096
1422
  };
1423
+ returned_count: number;
1424
+ has_more: boolean;
1425
+ seed_cap_hit: boolean;
1097
1426
  truncated?: Record<string, boolean>;
1098
1427
  }
1099
1428
  interface LinkDomainObjectsRequest {
@@ -1132,6 +1461,7 @@ declare class MindGraph {
1132
1461
  private headers;
1133
1462
  private maxRetries;
1134
1463
  private retryBackoffMs;
1464
+ private telemetrySurface?;
1135
1465
  constructor(config: MindGraphConfig);
1136
1466
  private request;
1137
1467
  private get;
@@ -1235,6 +1565,11 @@ declare class MindGraph {
1235
1565
  */
1236
1566
  resolveDecision(decisionUid: string, chosenOptionUid: string, opts?: {
1237
1567
  summary?: string;
1568
+ props?: Record<string, unknown>;
1569
+ informs_uid?: string[];
1570
+ as_of_date?: string;
1571
+ session_id?: string;
1572
+ retrieval_trace_id?: string;
1238
1573
  agent_id?: string;
1239
1574
  }): Promise<unknown>;
1240
1575
  procedure(req: ProcedureRequest): Promise<unknown>;
@@ -1343,6 +1678,7 @@ declare class MindGraph {
1343
1678
  edge_type?: string;
1344
1679
  }): Promise<GraphEdge[]>;
1345
1680
  search(query: string, opts?: {
1681
+ project_uid?: string;
1346
1682
  node_type?: string;
1347
1683
  layer?: string;
1348
1684
  limit?: number;
@@ -1356,6 +1692,7 @@ declare class MindGraph {
1356
1692
  * the "why retrieved" detail (server ≥ 1.2.0; older servers ignore it).
1357
1693
  */
1358
1694
  hybridSearch(query: string, opts?: {
1695
+ project_uid?: string;
1359
1696
  k?: number;
1360
1697
  node_types?: string[];
1361
1698
  layer?: string;
@@ -1441,6 +1778,8 @@ declare class MindGraph {
1441
1778
  * merge/dismiss decision (server >= 1.3).
1442
1779
  */
1443
1780
  getMergeCandidates(): Promise<MergeCandidate[]>;
1781
+ /** Load-bearing conclusions awaiting repair after a premise changed. */
1782
+ getStaleDerivations(limit?: number, offset?: number): Promise<StaleDerivation[]>;
1444
1783
  getPendingApprovals(): Promise<GraphNode[]>;
1445
1784
  ingestChunk(req: IngestChunkRequest): Promise<IngestChunkResponse>;
1446
1785
  ingestDocument(req: IngestDocumentRequest): Promise<IngestDocumentResponse>;
@@ -1546,10 +1885,18 @@ declare class MindGraph {
1546
1885
  addOntologyRelationType(schemaId: string, req: OntologyRelationTypeInput): Promise<OntologyRelationType>;
1547
1886
  updateOntologyRelationType(schemaId: string, typeId: string, req: Partial<OntologyRelationTypeInput>): Promise<OntologyRelationType>;
1548
1887
  deleteOntologyRelationType(schemaId: string, typeId: string): Promise<OntologyRelationType>;
1888
+ /** Generate inert semantic classifications for individual human review. */
1889
+ analyzeOntologySemanticGuidance(schemaId: string): Promise<{
1890
+ created: number;
1891
+ }>;
1892
+ /** Read-only exact-identity collision audit; never merges graph data. */
1893
+ auditOntologyDuplicates(schemaId: string): Promise<OntologyDuplicateAudit>;
1549
1894
  listOntologyProposals(opts?: {
1550
1895
  status?: string;
1551
1896
  schema_id?: string;
1552
1897
  object_type?: string;
1898
+ proposal_type?: string;
1899
+ extract_job_id?: string;
1553
1900
  limit?: number;
1554
1901
  offset?: number;
1555
1902
  }): Promise<{
@@ -1585,17 +1932,26 @@ declare class MindGraph {
1585
1932
  }[];
1586
1933
  }>;
1587
1934
  queryOntology(req: OntologyQueryRequest): Promise<OntologyQueryResponse>;
1935
+ queryDomainStructured(req: StructuredOntologyQueryRequest): Promise<StructuredOntologyQueryResponse>;
1936
+ queryRelatedDomainObjects(req: RelatedDomainObjectsRequest): Promise<StructuredOntologyQueryResponse>;
1588
1937
  /**
1589
- * Read-only agent tool descriptors generated from the active ontology
1590
- * schema(s). Each maps to a generic `/ontology` read endpoint with
1591
- * `object_type` bound. Used by the MCP server to expose typed per-object
1592
- * tools (`search_customers`, `summarize_customer`, …).
1938
+ * Schema-qualified read-tool descriptors generated from every active
1939
+ * ontology. Includes per-object discovery/point/context tools,
1940
+ * relation-and-role-specific related tools, and one structured composite.
1593
1941
  */
1594
1942
  listOntologyTools(): Promise<{
1595
1943
  tools: OntologyToolDescriptor[];
1596
1944
  }>;
1597
- getDomainObject(uid: string): Promise<DomainObject>;
1598
- getDomainObjectContext(uid: string, depth?: number): Promise<OntologyQueryResponse>;
1945
+ getDomainObject(uid: string, binding?: {
1946
+ schema_id: string;
1947
+ object_type: string;
1948
+ project_uid?: string;
1949
+ }): Promise<DomainObject>;
1950
+ getDomainObjectContext(uid: string, depth?: number, binding?: {
1951
+ schema_id: string;
1952
+ object_type: string;
1953
+ project_uid?: string;
1954
+ }): Promise<OntologyQueryResponse>;
1599
1955
  getDomainObjectHistory(uid: string): Promise<{
1600
1956
  versions: Array<{
1601
1957
  version: number;
@@ -1620,12 +1976,19 @@ declare class MindGraph {
1620
1976
  searchDomainObjects(query: string, opts?: {
1621
1977
  schema_id?: string;
1622
1978
  object_types?: string[];
1979
+ filters?: OntologyQueryPredicate[];
1623
1980
  limit?: number;
1624
1981
  }): Promise<{
1625
1982
  items: Array<{
1626
1983
  object: DomainObject;
1627
1984
  score: number;
1628
1985
  }>;
1986
+ returned_count: number;
1987
+ has_more: boolean;
1988
+ seed_cap_hit: boolean;
1989
+ truncation_reasons: string[];
1990
+ total_count: null;
1991
+ total_count_exact: false;
1629
1992
  }>;
1630
1993
  /**
1631
1994
  * Per-object-type coverage stats for a schema (C2f): field fill rates
@@ -1666,4 +2029,4 @@ declare class MindGraph {
1666
2029
  }>;
1667
2030
  }
1668
2031
 
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 };
2032
+ 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 OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, 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 StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };