@kortexya/reasoninglayer 1.13.0 → 1.14.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.cjs +524 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +605 -145
- package/dist/index.d.ts +605 -145
- package/dist/index.js +524 -148
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
|
|
|
109
109
|
* This is the single source of truth for the version constant.
|
|
110
110
|
* The `scripts/release.sh` script updates this value alongside `package.json`.
|
|
111
111
|
*/
|
|
112
|
-
declare const SDK_VERSION = "1.
|
|
112
|
+
declare const SDK_VERSION = "1.14.0";
|
|
113
113
|
/**
|
|
114
114
|
* Authentication mode for the SDK.
|
|
115
115
|
*
|
|
@@ -720,7 +720,7 @@ interface AddRuleRequest$1 {
|
|
|
720
720
|
* When present, the rule's head term receives an `"aggregator"` feature
|
|
721
721
|
* containing a serialized `RuleAggregator` descriptor.
|
|
722
722
|
*/
|
|
723
|
-
aggregator?: null | RuleAggregatorDto;
|
|
723
|
+
aggregator?: null | RuleAggregatorDto$1;
|
|
724
724
|
/**
|
|
725
725
|
* Antecedent terms (body of the rule)
|
|
726
726
|
* These go into the `when` feature
|
|
@@ -5997,7 +5997,7 @@ interface DetectMissingAttributesRequest$1 {
|
|
|
5997
5997
|
definition_attributes: string[];
|
|
5998
5998
|
}
|
|
5999
5999
|
/** Request to validate a Difference-in-Differences design */
|
|
6000
|
-
interface DiDValidationRequest {
|
|
6000
|
+
interface DiDValidationRequest$1 {
|
|
6001
6001
|
/** Conditioning set (covariates) */
|
|
6002
6002
|
covariates?: string[];
|
|
6003
6003
|
/** Post-treatment outcome variable */
|
|
@@ -6008,7 +6008,7 @@ interface DiDValidationRequest {
|
|
|
6008
6008
|
treatment: string;
|
|
6009
6009
|
}
|
|
6010
6010
|
/** Response for DiD validation */
|
|
6011
|
-
interface DiDValidationResponse {
|
|
6011
|
+
interface DiDValidationResponse$1 {
|
|
6012
6012
|
/** Identified "bad controls" (nodes that induce bias if conditioned on) */
|
|
6013
6013
|
bad_controls: string[];
|
|
6014
6014
|
/** Explanation of the result */
|
|
@@ -19279,7 +19279,7 @@ interface RowUnifyResponse$1 {
|
|
|
19279
19279
|
* `target` feature. This eliminates run-to-run variance from proof-order
|
|
19280
19280
|
* sensitivity and makes `max_solutions` cap unique groups, not raw proofs.
|
|
19281
19281
|
*/
|
|
19282
|
-
interface RuleAggregatorDto {
|
|
19282
|
+
interface RuleAggregatorDto$1 {
|
|
19283
19283
|
/**
|
|
19284
19284
|
* Feature names that define the aggregation group key.
|
|
19285
19285
|
* Proofs with identical values for all `group_by` features are merged.
|
|
@@ -27436,6 +27436,17 @@ interface ProofDto {
|
|
|
27436
27436
|
subproofs?: ProofDto[];
|
|
27437
27437
|
/** Certainty of this proof step. */
|
|
27438
27438
|
certainty: number;
|
|
27439
|
+
/**
|
|
27440
|
+
* True iff this node is a residuated (suspended/unknown) leaf — an open-world
|
|
27441
|
+
* antecedent with neither a witnessing fact nor a deriving rule.
|
|
27442
|
+
*
|
|
27443
|
+
* @remarks
|
|
27444
|
+
* Unknown, never false: a residuated leaf means the engine could not decide the goal,
|
|
27445
|
+
* not that the goal is refuted. Distinct from {@link SolutionDto.residuatedSorts},
|
|
27446
|
+
* which names the *sorts* of a solution's residuated antecedents rather than marking
|
|
27447
|
+
* an individual node of the proof tree.
|
|
27448
|
+
*/
|
|
27449
|
+
residuated?: boolean;
|
|
27439
27450
|
}
|
|
27440
27451
|
/**
|
|
27441
27452
|
* Confidence/provenance information for a derived fact.
|
|
@@ -27465,6 +27476,19 @@ interface SolutionDto {
|
|
|
27465
27476
|
evidenceMatched?: number | null;
|
|
27466
27477
|
/** Evidence ratio for open-world inference (matched/total antecedents). Null in closed-world mode. */
|
|
27467
27478
|
evidenceRatio?: number | null;
|
|
27479
|
+
/**
|
|
27480
|
+
* **Deep evidential support** in `[0, 1]` (open-world only): the fraction of
|
|
27481
|
+
* ground-fact leaves the proof rests on that are actually witnessed by facts,
|
|
27482
|
+
* computed recursively over the proof tree.
|
|
27483
|
+
*
|
|
27484
|
+
* @remarks
|
|
27485
|
+
* Unlike {@link evidenceRatio} (shallow, top-level), this sees through chained
|
|
27486
|
+
* derivations, so residuation inside a derived sub-goal is reflected. It is the
|
|
27487
|
+
* epistemic ranking axis, **orthogonal to {@link certainty}** (the
|
|
27488
|
+
* residuation-faithful degree): rank candidate solutions by this to prefer the
|
|
27489
|
+
* ones actually grounded in evidence.
|
|
27490
|
+
*/
|
|
27491
|
+
evidenceSupport?: number | null;
|
|
27468
27492
|
/** Sort names that were residuated (suspended due to missing information). Open-world only. */
|
|
27469
27493
|
residuatedSorts?: string[];
|
|
27470
27494
|
}
|
|
@@ -27570,6 +27594,20 @@ interface ForwardChainRequest {
|
|
|
27570
27594
|
maxIterations?: number;
|
|
27571
27595
|
/** Maximum number of facts to derive. */
|
|
27572
27596
|
maxFacts?: number;
|
|
27597
|
+
/**
|
|
27598
|
+
* Emit W3C PROV-O lineage for this run (default: `false`).
|
|
27599
|
+
*
|
|
27600
|
+
* @remarks
|
|
27601
|
+
* When true, the run's derivation provenance (which rule and which antecedents
|
|
27602
|
+
* produced each derived fact) is reified into `prov:wasDerivedFrom` /
|
|
27603
|
+
* `prov:wasAttributedTo` Ψ-terms and persisted, so lineage becomes ordinary facts the
|
|
27604
|
+
* engine can query (OSFQL / backward chaining) and serialise (RDF export) — not an
|
|
27605
|
+
* opaque side index. Forces real derivation, bypassing the derivation cache.
|
|
27606
|
+
*
|
|
27607
|
+
* Distinct from {@link enableProvenanceTags}, which attaches confidence scores to the
|
|
27608
|
+
* response rather than persisting queryable lineage.
|
|
27609
|
+
*/
|
|
27610
|
+
emitProvenance?: boolean;
|
|
27573
27611
|
}
|
|
27574
27612
|
/** Response from forward chaining inference. */
|
|
27575
27613
|
interface ForwardChainResponse {
|
|
@@ -27588,6 +27626,37 @@ interface ForwardChainResponse {
|
|
|
27588
27626
|
/** Provenance tags for derived facts (only present when `enable_provenance_tags` was true). */
|
|
27589
27627
|
provenanceTags?: ProvenanceTagDto[];
|
|
27590
27628
|
}
|
|
27629
|
+
/**
|
|
27630
|
+
* Rule aggregator descriptor for engine-side aggregation on rule heads.
|
|
27631
|
+
*
|
|
27632
|
+
* @remarks
|
|
27633
|
+
* When declared on a rule, the engine aggregates multiple proofs of that rule which
|
|
27634
|
+
* share the same {@link groupBy} feature values, applying {@link op} to the
|
|
27635
|
+
* {@link target} feature. This eliminates run-to-run variance from proof-order
|
|
27636
|
+
* sensitivity and makes `maxSolutions` cap unique **groups**, not raw proofs.
|
|
27637
|
+
*
|
|
27638
|
+
* Wire format is snake_case (`group_by`).
|
|
27639
|
+
*
|
|
27640
|
+
* @example
|
|
27641
|
+
* ```typescript
|
|
27642
|
+
* const aggregator: RuleAggregatorDto = {
|
|
27643
|
+
* groupBy: ['customer_id'],
|
|
27644
|
+
* op: 'sum',
|
|
27645
|
+
* target: 'amount',
|
|
27646
|
+
* };
|
|
27647
|
+
* ```
|
|
27648
|
+
*/
|
|
27649
|
+
interface RuleAggregatorDto {
|
|
27650
|
+
/**
|
|
27651
|
+
* Feature names that define the aggregation group key. Proofs with identical values
|
|
27652
|
+
* for all `groupBy` features are merged.
|
|
27653
|
+
*/
|
|
27654
|
+
groupBy: string[];
|
|
27655
|
+
/** Aggregation operator: `"sum"`, `"max"`, `"min"`, `"count"`, or `"first"`. */
|
|
27656
|
+
op: string;
|
|
27657
|
+
/** Feature name whose value is aggregated within each group. */
|
|
27658
|
+
target: string;
|
|
27659
|
+
}
|
|
27591
27660
|
/**
|
|
27592
27661
|
* Request to add a rule to the inference engine.
|
|
27593
27662
|
*
|
|
@@ -27601,6 +27670,14 @@ interface AddRuleRequest {
|
|
|
27601
27670
|
antecedents?: TermInputDto[];
|
|
27602
27671
|
/** Certainty factor (default: 1.0). */
|
|
27603
27672
|
certainty?: number;
|
|
27673
|
+
/**
|
|
27674
|
+
* Optional engine-side aggregator declared on the rule head.
|
|
27675
|
+
*
|
|
27676
|
+
* @remarks
|
|
27677
|
+
* When present, the rule's head term receives an `"aggregator"` feature containing a
|
|
27678
|
+
* serialized `RuleAggregator` descriptor. See {@link RuleAggregatorDto}.
|
|
27679
|
+
*/
|
|
27680
|
+
aggregator?: RuleAggregatorDto | null;
|
|
27604
27681
|
}
|
|
27605
27682
|
/**
|
|
27606
27683
|
* Request to add a fact to the inference engine.
|
|
@@ -27672,6 +27749,18 @@ interface FuzzyProveRequest {
|
|
|
27672
27749
|
saveGoal?: boolean;
|
|
27673
27750
|
/** T-norm strategy: "min", "product", or "lukasiewicz". */
|
|
27674
27751
|
tnorm?: string;
|
|
27752
|
+
/**
|
|
27753
|
+
* Open-world reasoning **scope**: ground feature constraints every witnessing fact
|
|
27754
|
+
* must satisfy, as `feature → value` (string values).
|
|
27755
|
+
*
|
|
27756
|
+
* @remarks
|
|
27757
|
+
* **Safety-relevant.** For patient-scoped clinical reasoning send
|
|
27758
|
+
* `{ patient_id: '<id>' }` so only that patient's observations witness a diagnosis —
|
|
27759
|
+
* another patient's fact of the same sort never does. A fact lacking the feature is
|
|
27760
|
+
* unconstrained (open world). **Empty or absent ⇒ tenant-wide (legacy) behavior**,
|
|
27761
|
+
* where any tenant fact may witness the goal.
|
|
27762
|
+
*/
|
|
27763
|
+
scope?: Record<string, string>;
|
|
27675
27764
|
}
|
|
27676
27765
|
/** Response from fuzzy proof search. */
|
|
27677
27766
|
interface FuzzyProveResponse {
|
|
@@ -28312,6 +28401,7 @@ type inference_NafProveRequest = NafProveRequest;
|
|
|
28312
28401
|
type inference_NafProveResponse = NafProveResponse;
|
|
28313
28402
|
type inference_ProofDto = ProofDto;
|
|
28314
28403
|
type inference_ProvenanceTagDto = ProvenanceTagDto;
|
|
28404
|
+
type inference_RuleAggregatorDto = RuleAggregatorDto;
|
|
28315
28405
|
type inference_RuleDraftClarificationQuestionDto = RuleDraftClarificationQuestionDto;
|
|
28316
28406
|
type inference_RuleDraftDto = RuleDraftDto;
|
|
28317
28407
|
type inference_RuleEntryDto = RuleEntryDto;
|
|
@@ -28321,7 +28411,7 @@ type inference_TaggedDerivedFact = TaggedDerivedFact;
|
|
|
28321
28411
|
type inference_TaggedForwardChainRequest = TaggedForwardChainRequest;
|
|
28322
28412
|
type inference_TaggedForwardChainResponse = TaggedForwardChainResponse;
|
|
28323
28413
|
declare namespace inference {
|
|
28324
|
-
export type { inference_AddFactRequest as AddFactRequest, inference_AddFactResponse as AddFactResponse, inference_AddRuleRequest as AddRuleRequest, inference_AddRuleResponse as AddRuleResponse, inference_AllenRelation as AllenRelation, inference_BackwardChainRequest as BackwardChainRequest, inference_BackwardChainResponse as BackwardChainResponse, inference_BayesianEffectDto as BayesianEffectDto, inference_BayesianPredictRequest as BayesianPredictRequest, inference_BayesianPredictResponse as BayesianPredictResponse, inference_BindingDto as BindingDto, inference_BulkAddFactsRequest as BulkAddFactsRequest, inference_BulkAddFactsResponse as BulkAddFactsResponse, inference_BulkAddRulesRequest as BulkAddRulesRequest, inference_BulkAddRulesResponse as BulkAddRulesResponse, inference_BulkFuzzyProveRequest as BulkFuzzyProveRequest, inference_BulkFuzzyProveResponse as BulkFuzzyProveResponse, inference_ClearFactsResponse as ClearFactsResponse, inference_ConstraintInputDto as ConstraintInputDto, inference_CreateGoalRequest as CreateGoalRequest, inference_CreateGoalResponse as CreateGoalResponse, inference_DeleteGoalResponse as DeleteGoalResponse, inference_DraftRulesRequest as DraftRulesRequest, inference_DraftRulesResponse as DraftRulesResponse, inference_FactConfidenceEntry as FactConfidenceEntry, inference_ForwardChainRequest as ForwardChainRequest, inference_ForwardChainResponse as ForwardChainResponse, inference_FuzzyProveRequest as FuzzyProveRequest, inference_FuzzyProveResponse as FuzzyProveResponse, inference_GetFactsResponse as GetFactsResponse, inference_GetRulesResponse as GetRulesResponse, inference_GoalDto as GoalDto, inference_GoalSummaryDto as GoalSummaryDto, inference_GuardOp as GuardOp, inference_HomoiconicSubstitutionDto as HomoiconicSubstitutionDto, inference_ListGoalsResponse as ListGoalsResponse, inference_LiteralInputDto as LiteralInputDto, inference_MetaSortsResponse as MetaSortsResponse, inference_NafProveRequest as NafProveRequest, inference_NafProveResponse as NafProveResponse, inference_ProofDto as ProofDto, inference_ProvenanceTagDto as ProvenanceTagDto, inference_RuleDraftClarificationQuestionDto as RuleDraftClarificationQuestionDto, inference_RuleDraftDto as RuleDraftDto, inference_RuleEntryDto as RuleEntryDto, inference_RuleTermDraftDto as RuleTermDraftDto, inference_SolutionDto as SolutionDto, inference_TaggedDerivedFact as TaggedDerivedFact, inference_TaggedForwardChainRequest as TaggedForwardChainRequest, inference_TaggedForwardChainResponse as TaggedForwardChainResponse };
|
|
28414
|
+
export type { inference_AddFactRequest as AddFactRequest, inference_AddFactResponse as AddFactResponse, inference_AddRuleRequest as AddRuleRequest, inference_AddRuleResponse as AddRuleResponse, inference_AllenRelation as AllenRelation, inference_BackwardChainRequest as BackwardChainRequest, inference_BackwardChainResponse as BackwardChainResponse, inference_BayesianEffectDto as BayesianEffectDto, inference_BayesianPredictRequest as BayesianPredictRequest, inference_BayesianPredictResponse as BayesianPredictResponse, inference_BindingDto as BindingDto, inference_BulkAddFactsRequest as BulkAddFactsRequest, inference_BulkAddFactsResponse as BulkAddFactsResponse, inference_BulkAddRulesRequest as BulkAddRulesRequest, inference_BulkAddRulesResponse as BulkAddRulesResponse, inference_BulkFuzzyProveRequest as BulkFuzzyProveRequest, inference_BulkFuzzyProveResponse as BulkFuzzyProveResponse, inference_ClearFactsResponse as ClearFactsResponse, inference_ConstraintInputDto as ConstraintInputDto, inference_CreateGoalRequest as CreateGoalRequest, inference_CreateGoalResponse as CreateGoalResponse, inference_DeleteGoalResponse as DeleteGoalResponse, inference_DraftRulesRequest as DraftRulesRequest, inference_DraftRulesResponse as DraftRulesResponse, inference_FactConfidenceEntry as FactConfidenceEntry, inference_ForwardChainRequest as ForwardChainRequest, inference_ForwardChainResponse as ForwardChainResponse, inference_FuzzyProveRequest as FuzzyProveRequest, inference_FuzzyProveResponse as FuzzyProveResponse, inference_GetFactsResponse as GetFactsResponse, inference_GetRulesResponse as GetRulesResponse, inference_GoalDto as GoalDto, inference_GoalSummaryDto as GoalSummaryDto, inference_GuardOp as GuardOp, inference_HomoiconicSubstitutionDto as HomoiconicSubstitutionDto, inference_ListGoalsResponse as ListGoalsResponse, inference_LiteralInputDto as LiteralInputDto, inference_MetaSortsResponse as MetaSortsResponse, inference_NafProveRequest as NafProveRequest, inference_NafProveResponse as NafProveResponse, inference_ProofDto as ProofDto, inference_ProvenanceTagDto as ProvenanceTagDto, inference_RuleAggregatorDto as RuleAggregatorDto, inference_RuleDraftClarificationQuestionDto as RuleDraftClarificationQuestionDto, inference_RuleDraftDto as RuleDraftDto, inference_RuleEntryDto as RuleEntryDto, inference_RuleTermDraftDto as RuleTermDraftDto, inference_SolutionDto as SolutionDto, inference_TaggedDerivedFact as TaggedDerivedFact, inference_TaggedForwardChainRequest as TaggedForwardChainRequest, inference_TaggedForwardChainResponse as TaggedForwardChainResponse };
|
|
28325
28415
|
}
|
|
28326
28416
|
|
|
28327
28417
|
/**
|
|
@@ -28346,13 +28436,28 @@ declare class InferenceClient {
|
|
|
28346
28436
|
/**
|
|
28347
28437
|
* Add an inference rule.
|
|
28348
28438
|
*
|
|
28349
|
-
* @param request - Rule definition using TermInputDto.
|
|
28439
|
+
* @param request - Rule definition using TermInputDto. Set `aggregator` to declare an
|
|
28440
|
+
* engine-side head aggregator (see {@link RuleAggregatorDto}).
|
|
28350
28441
|
* @returns The created rule wrapped in an AddRuleResponse.
|
|
28442
|
+
* @throws {ApiError} If the rule is rejected or the request fails.
|
|
28443
|
+
*
|
|
28444
|
+
* @remarks
|
|
28445
|
+
* **Serialization format**: untagged `TermInputDto` / `FeatureInputValueDto`.
|
|
28446
|
+
*
|
|
28447
|
+
* @example
|
|
28448
|
+
* ```typescript
|
|
28449
|
+
* await client.inference.addRule({
|
|
28450
|
+
* term: psi('total_spend', { customer_id: Var('C'), amount: Var('A') }),
|
|
28451
|
+
* antecedents: [psi('order', { customer_id: Var('C'), amount: Var('A') })],
|
|
28452
|
+
* aggregator: { groupBy: ['customer_id'], op: 'sum', target: 'amount' },
|
|
28453
|
+
* });
|
|
28454
|
+
* ```
|
|
28351
28455
|
*/
|
|
28352
28456
|
addRule(request: {
|
|
28353
28457
|
term: TermInputArg;
|
|
28354
28458
|
antecedents?: TermInputArg[];
|
|
28355
28459
|
certainty?: number;
|
|
28460
|
+
aggregator?: RuleAggregatorDto | null;
|
|
28356
28461
|
}): Promise<AddRuleResponse>;
|
|
28357
28462
|
/**
|
|
28358
28463
|
* Add a fact.
|
|
@@ -34907,7 +35012,7 @@ declare class Causal<SecurityDataType = unknown> {
|
|
|
34907
35012
|
* @request POST:/api/v1/causal/validate-did
|
|
34908
35013
|
* @secure
|
|
34909
35014
|
*/
|
|
34910
|
-
validateDid: (data: DiDValidationRequest, params?: RequestParams) => Promise<HttpResponse<DiDValidationResponse, void>>;
|
|
35015
|
+
validateDid: (data: DiDValidationRequest$1, params?: RequestParams) => Promise<HttpResponse<DiDValidationResponse$1, void>>;
|
|
34911
35016
|
}
|
|
34912
35017
|
|
|
34913
35018
|
/** A single step in the agent's execution trajectory. */
|
|
@@ -36663,6 +36768,41 @@ interface CausalAnalyzeRequest {
|
|
|
36663
36768
|
/** Causal question to analyze. */
|
|
36664
36769
|
question: CausalAnalyzeQuestionDto;
|
|
36665
36770
|
}
|
|
36771
|
+
/**
|
|
36772
|
+
* Request to validate a Difference-in-Differences design.
|
|
36773
|
+
*
|
|
36774
|
+
* @remarks
|
|
36775
|
+
* The design is checked against the causal structure the backend builds from the
|
|
36776
|
+
* tenant's homoiconic rules — no sample data is submitted, only the variable
|
|
36777
|
+
* names that play each role.
|
|
36778
|
+
*/
|
|
36779
|
+
interface DiDValidationRequest {
|
|
36780
|
+
/**
|
|
36781
|
+
* Conditioning set (covariates). Omit for an unconditional design — the
|
|
36782
|
+
* backend defaults it to the empty set. Members that turn out to be bad
|
|
36783
|
+
* controls are reported back in {@link DiDValidationResponse.badControls}.
|
|
36784
|
+
*/
|
|
36785
|
+
covariates?: string[];
|
|
36786
|
+
/** Post-treatment outcome variable. */
|
|
36787
|
+
outcomePost: string;
|
|
36788
|
+
/** Pre-treatment outcome variable. */
|
|
36789
|
+
outcomePre: string;
|
|
36790
|
+
/** The treatment variable. */
|
|
36791
|
+
treatment: string;
|
|
36792
|
+
}
|
|
36793
|
+
/**
|
|
36794
|
+
* Response for DiD validation.
|
|
36795
|
+
*/
|
|
36796
|
+
interface DiDValidationResponse {
|
|
36797
|
+
/** Identified "bad controls" — nodes that induce bias if conditioned on. */
|
|
36798
|
+
badControls: string[];
|
|
36799
|
+
/** Explanation of the result. */
|
|
36800
|
+
explanation: string;
|
|
36801
|
+
/** The framework used for validation. */
|
|
36802
|
+
framework: string;
|
|
36803
|
+
/** Whether the design is valid. */
|
|
36804
|
+
isValid: boolean;
|
|
36805
|
+
}
|
|
36666
36806
|
|
|
36667
36807
|
type causal_ActValueDto = ActValueDto;
|
|
36668
36808
|
type causal_AddCausalRelationRequest = AddCausalRelationRequest;
|
|
@@ -36712,6 +36852,8 @@ type causal_DecisionAuditResponse = DecisionAuditResponse;
|
|
|
36712
36852
|
type causal_DeclareLatentVariableRequest = DeclareLatentVariableRequest;
|
|
36713
36853
|
type causal_DeclareLatentVariableResponse = DeclareLatentVariableResponse;
|
|
36714
36854
|
type causal_DensityRatioDiagnosticDto = DensityRatioDiagnosticDto;
|
|
36855
|
+
type causal_DiDValidationRequest = DiDValidationRequest;
|
|
36856
|
+
type causal_DiDValidationResponse = DiDValidationResponse;
|
|
36715
36857
|
type causal_DmlAteRequest = DmlAteRequest;
|
|
36716
36858
|
type causal_DoseResponseRequest = DoseResponseRequest;
|
|
36717
36859
|
type causal_DoseResponseResponse = DoseResponseResponse;
|
|
@@ -36760,7 +36902,7 @@ type causal_ShiftEffectRequest = ShiftEffectRequest;
|
|
|
36760
36902
|
type causal_ShiftEffectResponse = ShiftEffectResponse;
|
|
36761
36903
|
type causal_StructuralAssignmentDto = StructuralAssignmentDto;
|
|
36762
36904
|
declare namespace causal {
|
|
36763
|
-
export type { causal_ActValueDto as ActValueDto, causal_AddCausalRelationRequest as AddCausalRelationRequest, causal_AddCausalRelationResponse as AddCausalRelationResponse, causal_AssignmentMechanism as AssignmentMechanism, causal_AssignmentRowDto as AssignmentRowDto, causal_AssumptionAuditRequest as AssumptionAuditRequest, causal_AssumptionAuditResponse as AssumptionAuditResponse, causal_AteEstimateRequest as AteEstimateRequest, causal_AteEstimateResponse as AteEstimateResponse, causal_AuditedAssumptionDto as AuditedAssumptionDto, causal_CategoryProbabilityDto as CategoryProbabilityDto, causal_CausalActionSpecDto as CausalActionSpecDto, causal_CausalAnalyzeAssumptionsDto as CausalAnalyzeAssumptionsDto, causal_CausalAnalyzeDataDto as CausalAnalyzeDataDto, causal_CausalAnalyzeIndependenceTestDto as CausalAnalyzeIndependenceTestDto, causal_CausalAnalyzePolicyDto as CausalAnalyzePolicyDto, causal_CausalAnalyzeQuestionDto as CausalAnalyzeQuestionDto, causal_CausalAnalyzeQuestionKind as CausalAnalyzeQuestionKind, causal_CausalAnalyzeRegressionDto as CausalAnalyzeRegressionDto, causal_CausalAnalyzeRequest as CausalAnalyzeRequest, causal_CausalAncestorRequest as CausalAncestorRequest, causal_CausalAncestorResponse as CausalAncestorResponse, causal_CausalAssumptionDto as CausalAssumptionDto, causal_CausalChainDto as CausalChainDto, causal_CausalDecisionSpecDto as CausalDecisionSpecDto, causal_CausalDerivationStepDto as CausalDerivationStepDto, causal_CausalEdgeDto as CausalEdgeDto, causal_CausalHedgeDto as CausalHedgeDto, causal_CausalProofTreeDto as CausalProofTreeDto, CausalRelationshipDto$1 as CausalRelationshipDto, causal_CausationProbabilitiesRequest as CausationProbabilitiesRequest, causal_CausationProbabilitiesResponse as CausationProbabilitiesResponse, causal_CausesRequest as CausesRequest, causal_CausesResponse as CausesResponse, causal_ClusteredAteRequest as ClusteredAteRequest, causal_ClusteredObservationDto as ClusteredObservationDto, causal_ContinuousMediationObservationDto as ContinuousMediationObservationDto, causal_ContinuousObservationDto as ContinuousObservationDto, causal_ContinuousTreatmentObservationDto as ContinuousTreatmentObservationDto, causal_CounterfactualRequest as CounterfactualRequest, causal_CounterfactualResponse as CounterfactualResponse, causal_CounterfactualTraceDto as CounterfactualTraceDto, causal_DSeparatedRequest as DSeparatedRequest, causal_DSeparatedResponse as DSeparatedResponse, causal_DecisionAuditRequest as DecisionAuditRequest, causal_DecisionAuditResponse as DecisionAuditResponse, causal_DeclareLatentVariableRequest as DeclareLatentVariableRequest, causal_DeclareLatentVariableResponse as DeclareLatentVariableResponse, causal_DensityRatioDiagnosticDto as DensityRatioDiagnosticDto, causal_DmlAteRequest as DmlAteRequest, causal_DoseResponseRequest as DoseResponseRequest, causal_DoseResponseResponse as DoseResponseResponse, causal_ExogenousNoiseDto as ExogenousNoiseDto, causal_FrontDoorObservationDto as FrontDoorObservationDto, causal_FrontDoorRequest as FrontDoorRequest, causal_FrontDoorResponse as FrontDoorResponse, causal_GetCausalModelResponse as GetCausalModelResponse, causal_IdentificationRefDto as IdentificationRefDto, causal_IdentifyEffectRequest as IdentifyEffectRequest, causal_IdentifyEffectResponse as IdentifyEffectResponse, causal_InterventionRequest as InterventionRequest, causal_InterventionResponse as InterventionResponse, causal_MeasurementRole as MeasurementRole, causal_MediationDmlRequest as MediationDmlRequest, causal_MediationEffectDto as MediationEffectDto, causal_MediationObservationDto as MediationObservationDto, causal_MediationRequest as MediationRequest, causal_MediationResponse as MediationResponse, causal_MultiMediationObservationDto as MultiMediationObservationDto, causal_MultiMediationRequest as MultiMediationRequest, causal_ObservationDto as ObservationDto, causal_ObservationalProbabilitiesDto as ObservationalProbabilitiesDto, causal_OverlapDiagnosticDto as OverlapDiagnosticDto, causal_PolicyRowDto as PolicyRowDto, causal_PolicyRuleDto as PolicyRuleDto, causal_PolicyValueRequest as PolicyValueRequest, causal_PolicyValueResponse as PolicyValueResponse, causal_ProbabilityBoundDto as ProbabilityBoundDto, causal_ProofNodeDto as ProofNodeDto, causal_ProofStatisticsDto as ProofStatisticsDto, causal_QueryResultDto as QueryResultDto, causal_RefutationCheckDto as RefutationCheckDto, causal_RefutationObservationDto as RefutationObservationDto, causal_RefuteEstimateRequest as RefuteEstimateRequest, causal_RefuteEstimateResponse as RefuteEstimateResponse, causal_RegressionBasis as RegressionBasis, causal_RootCauseAnalysisRequest as RootCauseAnalysisRequest, causal_RootCauseAnalysisResponse as RootCauseAnalysisResponse, causal_RootCauseDto as RootCauseDto, causal_RootCauseWithProofResponse as RootCauseWithProofResponse, causal_ScmCounterfactualRequest as ScmCounterfactualRequest, causal_ScmCounterfactualResponse as ScmCounterfactualResponse, causal_SensitivityDto as SensitivityDto, causal_ShiftEffectRequest as ShiftEffectRequest, causal_ShiftEffectResponse as ShiftEffectResponse, causal_StructuralAssignmentDto as StructuralAssignmentDto };
|
|
36905
|
+
export type { causal_ActValueDto as ActValueDto, causal_AddCausalRelationRequest as AddCausalRelationRequest, causal_AddCausalRelationResponse as AddCausalRelationResponse, causal_AssignmentMechanism as AssignmentMechanism, causal_AssignmentRowDto as AssignmentRowDto, causal_AssumptionAuditRequest as AssumptionAuditRequest, causal_AssumptionAuditResponse as AssumptionAuditResponse, causal_AteEstimateRequest as AteEstimateRequest, causal_AteEstimateResponse as AteEstimateResponse, causal_AuditedAssumptionDto as AuditedAssumptionDto, causal_CategoryProbabilityDto as CategoryProbabilityDto, causal_CausalActionSpecDto as CausalActionSpecDto, causal_CausalAnalyzeAssumptionsDto as CausalAnalyzeAssumptionsDto, causal_CausalAnalyzeDataDto as CausalAnalyzeDataDto, causal_CausalAnalyzeIndependenceTestDto as CausalAnalyzeIndependenceTestDto, causal_CausalAnalyzePolicyDto as CausalAnalyzePolicyDto, causal_CausalAnalyzeQuestionDto as CausalAnalyzeQuestionDto, causal_CausalAnalyzeQuestionKind as CausalAnalyzeQuestionKind, causal_CausalAnalyzeRegressionDto as CausalAnalyzeRegressionDto, causal_CausalAnalyzeRequest as CausalAnalyzeRequest, causal_CausalAncestorRequest as CausalAncestorRequest, causal_CausalAncestorResponse as CausalAncestorResponse, causal_CausalAssumptionDto as CausalAssumptionDto, causal_CausalChainDto as CausalChainDto, causal_CausalDecisionSpecDto as CausalDecisionSpecDto, causal_CausalDerivationStepDto as CausalDerivationStepDto, causal_CausalEdgeDto as CausalEdgeDto, causal_CausalHedgeDto as CausalHedgeDto, causal_CausalProofTreeDto as CausalProofTreeDto, CausalRelationshipDto$1 as CausalRelationshipDto, causal_CausationProbabilitiesRequest as CausationProbabilitiesRequest, causal_CausationProbabilitiesResponse as CausationProbabilitiesResponse, causal_CausesRequest as CausesRequest, causal_CausesResponse as CausesResponse, causal_ClusteredAteRequest as ClusteredAteRequest, causal_ClusteredObservationDto as ClusteredObservationDto, causal_ContinuousMediationObservationDto as ContinuousMediationObservationDto, causal_ContinuousObservationDto as ContinuousObservationDto, causal_ContinuousTreatmentObservationDto as ContinuousTreatmentObservationDto, causal_CounterfactualRequest as CounterfactualRequest, causal_CounterfactualResponse as CounterfactualResponse, causal_CounterfactualTraceDto as CounterfactualTraceDto, causal_DSeparatedRequest as DSeparatedRequest, causal_DSeparatedResponse as DSeparatedResponse, causal_DecisionAuditRequest as DecisionAuditRequest, causal_DecisionAuditResponse as DecisionAuditResponse, causal_DeclareLatentVariableRequest as DeclareLatentVariableRequest, causal_DeclareLatentVariableResponse as DeclareLatentVariableResponse, causal_DensityRatioDiagnosticDto as DensityRatioDiagnosticDto, causal_DiDValidationRequest as DiDValidationRequest, causal_DiDValidationResponse as DiDValidationResponse, causal_DmlAteRequest as DmlAteRequest, causal_DoseResponseRequest as DoseResponseRequest, causal_DoseResponseResponse as DoseResponseResponse, causal_ExogenousNoiseDto as ExogenousNoiseDto, causal_FrontDoorObservationDto as FrontDoorObservationDto, causal_FrontDoorRequest as FrontDoorRequest, causal_FrontDoorResponse as FrontDoorResponse, causal_GetCausalModelResponse as GetCausalModelResponse, causal_IdentificationRefDto as IdentificationRefDto, causal_IdentifyEffectRequest as IdentifyEffectRequest, causal_IdentifyEffectResponse as IdentifyEffectResponse, causal_InterventionRequest as InterventionRequest, causal_InterventionResponse as InterventionResponse, causal_MeasurementRole as MeasurementRole, causal_MediationDmlRequest as MediationDmlRequest, causal_MediationEffectDto as MediationEffectDto, causal_MediationObservationDto as MediationObservationDto, causal_MediationRequest as MediationRequest, causal_MediationResponse as MediationResponse, causal_MultiMediationObservationDto as MultiMediationObservationDto, causal_MultiMediationRequest as MultiMediationRequest, causal_ObservationDto as ObservationDto, causal_ObservationalProbabilitiesDto as ObservationalProbabilitiesDto, causal_OverlapDiagnosticDto as OverlapDiagnosticDto, causal_PolicyRowDto as PolicyRowDto, causal_PolicyRuleDto as PolicyRuleDto, causal_PolicyValueRequest as PolicyValueRequest, causal_PolicyValueResponse as PolicyValueResponse, causal_ProbabilityBoundDto as ProbabilityBoundDto, causal_ProofNodeDto as ProofNodeDto, causal_ProofStatisticsDto as ProofStatisticsDto, causal_QueryResultDto as QueryResultDto, causal_RefutationCheckDto as RefutationCheckDto, causal_RefutationObservationDto as RefutationObservationDto, causal_RefuteEstimateRequest as RefuteEstimateRequest, causal_RefuteEstimateResponse as RefuteEstimateResponse, causal_RegressionBasis as RegressionBasis, causal_RootCauseAnalysisRequest as RootCauseAnalysisRequest, causal_RootCauseAnalysisResponse as RootCauseAnalysisResponse, causal_RootCauseDto as RootCauseDto, causal_RootCauseWithProofResponse as RootCauseWithProofResponse, causal_ScmCounterfactualRequest as ScmCounterfactualRequest, causal_ScmCounterfactualResponse as ScmCounterfactualResponse, causal_SensitivityDto as SensitivityDto, causal_ShiftEffectRequest as ShiftEffectRequest, causal_ShiftEffectResponse as ShiftEffectResponse, causal_StructuralAssignmentDto as StructuralAssignmentDto };
|
|
36764
36906
|
}
|
|
36765
36907
|
|
|
36766
36908
|
/**
|
|
@@ -37400,6 +37542,45 @@ declare class CausalClient {
|
|
|
37400
37542
|
* ```
|
|
37401
37543
|
*/
|
|
37402
37544
|
refuteEstimate(request: RefuteEstimateRequest): Promise<RefuteEstimateResponse>;
|
|
37545
|
+
/**
|
|
37546
|
+
* Validate a Difference-in-Differences (DiD) design.
|
|
37547
|
+
*
|
|
37548
|
+
* @param request - The treatment variable, the pre- and post-treatment outcome
|
|
37549
|
+
* variables, and an optional conditioning set.
|
|
37550
|
+
* @returns Whether the design is theoretically sound, an explanation, the bad
|
|
37551
|
+
* controls found in the conditioning set, and the framework used.
|
|
37552
|
+
* @throws {BadRequestError} If the request is malformed.
|
|
37553
|
+
* @throws {ApiError} If the request otherwise fails.
|
|
37554
|
+
*
|
|
37555
|
+
* @remarks
|
|
37556
|
+
* Checks the design against the causal structure the backend builds from the
|
|
37557
|
+
* tenant's homoiconic rules, using the Transformed SWIG (Delta-SWIG) framework
|
|
37558
|
+
* of Knaus & Pfleiderer (2026). This is a design check over the *graph*: no
|
|
37559
|
+
* sample data is submitted and nothing is estimated — validate the design here,
|
|
37560
|
+
* then estimate the effect with {@link CausalClient.ateEstimate}.
|
|
37561
|
+
*
|
|
37562
|
+
* A design can be invalid even with an empty conditioning set (parallel trends
|
|
37563
|
+
* unsupported by the structure); `badControls` names the covariates that induce
|
|
37564
|
+
* bias if conditioned on, so an invalid design is often repaired by dropping
|
|
37565
|
+
* them and re-validating.
|
|
37566
|
+
*
|
|
37567
|
+
* Plain scalar JSON — no value serialization (`ValueDto` / `FeatureValueDto`)
|
|
37568
|
+
* is involved.
|
|
37569
|
+
*
|
|
37570
|
+
* @example
|
|
37571
|
+
* ```typescript
|
|
37572
|
+
* const did = await client.causal.validateDid({
|
|
37573
|
+
* treatment: 'minimum_wage_hike',
|
|
37574
|
+
* outcomePre: 'employment_2025',
|
|
37575
|
+
* outcomePost: 'employment_2026',
|
|
37576
|
+
* covariates: ['county_gdp'],
|
|
37577
|
+
* });
|
|
37578
|
+
* console.log(did.isValid); // false
|
|
37579
|
+
* console.log(did.badControls); // ['county_gdp']
|
|
37580
|
+
* console.log(did.framework); // 'Delta-SWIG (Knaus & Pfleiderer, 2026)'
|
|
37581
|
+
* ```
|
|
37582
|
+
*/
|
|
37583
|
+
validateDid(request: DiDValidationRequest): Promise<DiDValidationResponse>;
|
|
37403
37584
|
}
|
|
37404
37585
|
|
|
37405
37586
|
declare class Ingestion<SecurityDataType = unknown> {
|
|
@@ -38813,7 +38994,9 @@ declare class TimeoutError extends ReasoningLayerError {
|
|
|
38813
38994
|
/**
|
|
38814
38995
|
* Client-side validation error.
|
|
38815
38996
|
*
|
|
38816
|
-
* Thrown before a request is sent when input fails client-side validation
|
|
38997
|
+
* Thrown before a request is sent when input fails client-side validation, and
|
|
38998
|
+
* when a successful response violates the endpoint's documented contract in a way
|
|
38999
|
+
* the SDK cannot faithfully represent.
|
|
38817
39000
|
*/
|
|
38818
39001
|
declare class ValidationError extends ReasoningLayerError {
|
|
38819
39002
|
name: string;
|
|
@@ -42979,12 +43162,44 @@ declare class StructuredIngestion<SecurityDataType = unknown> {
|
|
|
42979
43162
|
registerSource: (data: RegisterSourceRequest$1, params?: RequestParams) => Promise<HttpResponse<RegisterSourceResponse$1, void>>;
|
|
42980
43163
|
}
|
|
42981
43164
|
|
|
43165
|
+
/**
|
|
43166
|
+
* The write-path mode of a source — whether its rows stay in place or become facts.
|
|
43167
|
+
*
|
|
43168
|
+
* @remarks
|
|
43169
|
+
* The two modes are deliberately exhaustive: a source that is both a live view and a
|
|
43170
|
+
* materialized snapshot is the footgun this distinction exists to make unrepresentable.
|
|
43171
|
+
*
|
|
43172
|
+
* - `transpile` — the source's bound sorts are live SQL views (zero copy).
|
|
43173
|
+
* `POST /api/v1/sources/{id}/ingest` is refused with **409**: materializing such a
|
|
43174
|
+
* source would create a second, divergent namespace over the same rows.
|
|
43175
|
+
* - `ingest` — rows become Ψ-term facts. Any SQL sort-table binding on the source is
|
|
43176
|
+
* honored as a column→feature projection, so ingested facts land on the sort's
|
|
43177
|
+
* declared feature names.
|
|
43178
|
+
*
|
|
43179
|
+
* Sent verbatim on the wire. Anything outside this set is rejected by the backend with
|
|
43180
|
+
* **422** (serde fails the variant before the handler runs), which is why
|
|
43181
|
+
* {@link RegisterSourceRequest.mode} is typed as this union rather than a bare string.
|
|
43182
|
+
*
|
|
43183
|
+
* @example
|
|
43184
|
+
* ```typescript
|
|
43185
|
+
* const mode: SourceWriteMode = 'ingest';
|
|
43186
|
+
* ```
|
|
43187
|
+
*/
|
|
43188
|
+
type SourceWriteMode = 'transpile' | 'ingest';
|
|
42982
43189
|
/**
|
|
42983
43190
|
* Summary of a registered source.
|
|
42984
43191
|
*/
|
|
42985
43192
|
interface SourceSummaryDto {
|
|
42986
43193
|
/** Whether the source is currently available/reachable. */
|
|
42987
43194
|
available: boolean;
|
|
43195
|
+
/**
|
|
43196
|
+
* Resolved write-path mode: `"transpile"` or `"ingest"` (see {@link SourceWriteMode}).
|
|
43197
|
+
*
|
|
43198
|
+
* Typed as `string` rather than the union because the wire contract declares a plain
|
|
43199
|
+
* string — narrowing it would mean inventing a fallback for a value this SDK version
|
|
43200
|
+
* does not know.
|
|
43201
|
+
*/
|
|
43202
|
+
mode: string;
|
|
42988
43203
|
/** Source identifier. */
|
|
42989
43204
|
sourceId: string;
|
|
42990
43205
|
/** Source type. */
|
|
@@ -43053,6 +43268,11 @@ interface DiscoveredSourceRelationDto {
|
|
|
43053
43268
|
interface StructuredIngestionStatsDto {
|
|
43054
43269
|
/** Number of columns discovered. */
|
|
43055
43270
|
columnsDiscovered: number;
|
|
43271
|
+
/**
|
|
43272
|
+
* Number of columns dropped by the projection because the binding does not declare
|
|
43273
|
+
* them. Never silent — the dropped column names are named in the response `errors`.
|
|
43274
|
+
*/
|
|
43275
|
+
columnsDropped: number;
|
|
43056
43276
|
/** Number of documents rendered and processed. */
|
|
43057
43277
|
documentsRendered: number;
|
|
43058
43278
|
/** Total elapsed time in milliseconds. */
|
|
@@ -43073,6 +43293,12 @@ interface StructuredIngestionStatsDto {
|
|
|
43073
43293
|
tablesDiscovered: number;
|
|
43074
43294
|
/** Number of terms created. */
|
|
43075
43295
|
termsCreated: number;
|
|
43296
|
+
/**
|
|
43297
|
+
* Number of Ψ-terms materialized by *projecting* a bound table through its SQL
|
|
43298
|
+
* binding: declared feature names, declared types, key-derived identity, no LLM.
|
|
43299
|
+
* Zero when none of the source's tables carry a binding.
|
|
43300
|
+
*/
|
|
43301
|
+
termsProjected: number;
|
|
43076
43302
|
}
|
|
43077
43303
|
/**
|
|
43078
43304
|
* Request to register a data source.
|
|
@@ -43086,6 +43312,15 @@ interface RegisterSourceRequest {
|
|
|
43086
43312
|
sourceType: string;
|
|
43087
43313
|
/** Source-specific configuration (varies by source_type). */
|
|
43088
43314
|
config: Record<string, unknown>;
|
|
43315
|
+
/**
|
|
43316
|
+
* Declared write-path intent — see {@link SourceWriteMode}.
|
|
43317
|
+
*
|
|
43318
|
+
* Omitted ⇒ capability-grounded default: `transpile` for `postgres` (`postgresql`),
|
|
43319
|
+
* `ingest` for every other source type (postgres is the only adapter whose transpiled
|
|
43320
|
+
* SQL the engine can execute). The resolved value is always echoed back on
|
|
43321
|
+
* {@link RegisterSourceResponse.mode}, so the applied default is never invisible.
|
|
43322
|
+
*/
|
|
43323
|
+
mode?: SourceWriteMode | null;
|
|
43089
43324
|
}
|
|
43090
43325
|
/**
|
|
43091
43326
|
* Response from source registration.
|
|
@@ -43097,6 +43332,15 @@ interface RegisterSourceResponse {
|
|
|
43097
43332
|
sourceId: string;
|
|
43098
43333
|
/** Source type. */
|
|
43099
43334
|
sourceType: string;
|
|
43335
|
+
/**
|
|
43336
|
+
* The **resolved** write-path mode: `"transpile"` or `"ingest"` (see
|
|
43337
|
+
* {@link SourceWriteMode}).
|
|
43338
|
+
*
|
|
43339
|
+
* Always echoed, including when the caller omitted `mode` and the default applied —
|
|
43340
|
+
* otherwise the default is invisible and a later 409 on ingest reads as arbitrary.
|
|
43341
|
+
* Typed as `string` for the reason given on {@link SourceSummaryDto.mode}.
|
|
43342
|
+
*/
|
|
43343
|
+
mode: string;
|
|
43100
43344
|
/** Status message. */
|
|
43101
43345
|
message: string;
|
|
43102
43346
|
}
|
|
@@ -43119,6 +43363,11 @@ interface SourceDetailResponse {
|
|
|
43119
43363
|
sourceType: string;
|
|
43120
43364
|
/** Whether the source is currently available. */
|
|
43121
43365
|
available: boolean;
|
|
43366
|
+
/**
|
|
43367
|
+
* Resolved write-path mode: `"transpile"` or `"ingest"` (see {@link SourceWriteMode}).
|
|
43368
|
+
* Typed as `string` for the reason given on {@link SourceSummaryDto.mode}.
|
|
43369
|
+
*/
|
|
43370
|
+
mode: string;
|
|
43122
43371
|
}
|
|
43123
43372
|
/**
|
|
43124
43373
|
* One discoverable type of a source, as reported by the cheap name-only listing.
|
|
@@ -43261,9 +43510,10 @@ type sources_RegisterSourceRequest = RegisterSourceRequest;
|
|
|
43261
43510
|
type sources_RegisterSourceResponse = RegisterSourceResponse;
|
|
43262
43511
|
type sources_SourceDetailResponse = SourceDetailResponse;
|
|
43263
43512
|
type sources_SourceSummaryDto = SourceSummaryDto;
|
|
43513
|
+
type sources_SourceWriteMode = SourceWriteMode;
|
|
43264
43514
|
type sources_StructuredIngestionStatsDto = StructuredIngestionStatsDto;
|
|
43265
43515
|
declare namespace sources {
|
|
43266
|
-
export type { sources_DiscoverSchemaRequest as DiscoverSchemaRequest, sources_DiscoverSchemaResponse as DiscoverSchemaResponse, sources_DiscoverableTypeDto as DiscoverableTypeDto, sources_DiscoveredFeatureDto as DiscoveredFeatureDto, sources_DiscoveredSortDto as DiscoveredSortDto, sources_DiscoveredSourceRelationDto as DiscoveredSourceRelationDto, sources_IngestFromSourceRequest as IngestFromSourceRequest, sources_IngestFromSourceResponse as IngestFromSourceResponse, sources_ListSourcesResponse as ListSourcesResponse, sources_ListTablesResponse as ListTablesResponse, sources_RegisterSourceRequest as RegisterSourceRequest, sources_RegisterSourceResponse as RegisterSourceResponse, sources_SourceDetailResponse as SourceDetailResponse, sources_SourceSummaryDto as SourceSummaryDto, sources_StructuredIngestionStatsDto as StructuredIngestionStatsDto };
|
|
43516
|
+
export type { sources_DiscoverSchemaRequest as DiscoverSchemaRequest, sources_DiscoverSchemaResponse as DiscoverSchemaResponse, sources_DiscoverableTypeDto as DiscoverableTypeDto, sources_DiscoveredFeatureDto as DiscoveredFeatureDto, sources_DiscoveredSortDto as DiscoveredSortDto, sources_DiscoveredSourceRelationDto as DiscoveredSourceRelationDto, sources_IngestFromSourceRequest as IngestFromSourceRequest, sources_IngestFromSourceResponse as IngestFromSourceResponse, sources_ListSourcesResponse as ListSourcesResponse, sources_ListTablesResponse as ListTablesResponse, sources_RegisterSourceRequest as RegisterSourceRequest, sources_RegisterSourceResponse as RegisterSourceResponse, sources_SourceDetailResponse as SourceDetailResponse, sources_SourceSummaryDto as SourceSummaryDto, sources_SourceWriteMode as SourceWriteMode, sources_StructuredIngestionStatsDto as StructuredIngestionStatsDto };
|
|
43267
43517
|
}
|
|
43268
43518
|
|
|
43269
43519
|
/**
|
|
@@ -43283,8 +43533,31 @@ declare class SourcesClient {
|
|
|
43283
43533
|
/**
|
|
43284
43534
|
* Register a new data source.
|
|
43285
43535
|
*
|
|
43286
|
-
* @param request - Source registration request.
|
|
43287
|
-
*
|
|
43536
|
+
* @param request - Source registration request. Set `mode` to declare the write-path
|
|
43537
|
+
* intent (`'transpile'` for live SQL views, `'ingest'` to materialize rows as
|
|
43538
|
+
* Ψ-term facts); omit it to take the capability-grounded default (`transpile` for
|
|
43539
|
+
* postgres, `ingest` otherwise).
|
|
43540
|
+
* @returns Registration result. `mode` always carries the **resolved** write-path
|
|
43541
|
+
* mode, including when the default applied.
|
|
43542
|
+
* @throws {ApiError} If registration fails, or with **422** if `mode` is not one of
|
|
43543
|
+
* `transpile` / `ingest`.
|
|
43544
|
+
*
|
|
43545
|
+
* @remarks
|
|
43546
|
+
* Registering with `mode: 'transpile'` makes {@link SourcesClient.ingest} refuse this
|
|
43547
|
+
* source with a **409** — materializing a transpiled source would create a second,
|
|
43548
|
+
* divergent namespace over the same rows.
|
|
43549
|
+
*
|
|
43550
|
+
* @example
|
|
43551
|
+
* ```typescript
|
|
43552
|
+
* const result = await client.sources.register({
|
|
43553
|
+
* sourceId: 'crm_postgres',
|
|
43554
|
+
* sourceName: 'CRM PostgreSQL',
|
|
43555
|
+
* sourceType: 'postgres',
|
|
43556
|
+
* config: { connection_string: 'postgres://user:pass@host/db' },
|
|
43557
|
+
* mode: 'ingest',
|
|
43558
|
+
* });
|
|
43559
|
+
* console.log(result.mode); // 'ingest'
|
|
43560
|
+
* ```
|
|
43288
43561
|
*/
|
|
43289
43562
|
register(request: RegisterSourceRequest): Promise<RegisterSourceResponse>;
|
|
43290
43563
|
/**
|
|
@@ -52280,6 +52553,14 @@ declare class Osfql<SecurityDataType = unknown> {
|
|
|
52280
52553
|
interface OsfqlRequest {
|
|
52281
52554
|
/** The OSFQL program text (one or more statements separated by `;`). */
|
|
52282
52555
|
query: string;
|
|
52556
|
+
/**
|
|
52557
|
+
* Opt into **reactive (streaming) mode**: after the program runs, any suspended
|
|
52558
|
+
* `AWAIT` demon whose trigger is now satisfied fires automatically — no explicit
|
|
52559
|
+
* `RELEASE RESIDUATIONS` needed.
|
|
52560
|
+
*
|
|
52561
|
+
* @defaultValue `false` — demons stay suspended until an explicit RELEASE.
|
|
52562
|
+
*/
|
|
52563
|
+
reactive?: boolean;
|
|
52283
52564
|
}
|
|
52284
52565
|
/**
|
|
52285
52566
|
* A nested Psi-term returned by a `FETCH` clause.
|
|
@@ -52290,12 +52571,22 @@ interface OsfqlRequest {
|
|
|
52290
52571
|
* no separate document type. A shared or cyclic reference that was left un-inlined appears as
|
|
52291
52572
|
* an {@link OsfqlValue} `term_ref` instead, preserving coreference identity.
|
|
52292
52573
|
*
|
|
52293
|
-
*
|
|
52294
|
-
* `
|
|
52574
|
+
* Serialized as `{"sort": "person", "features": {"name": {"type": "string", "value": "Alice"}}}`.
|
|
52575
|
+
* The backend publishes `features` as a free-form JSON object
|
|
52576
|
+
* (`#[schema(value_type = Object)]`), which erases the recursion; the Rust type is
|
|
52577
|
+
* `BTreeMap<String, OsfqlValueDto>`, so the SDK ships the true recursive shape.
|
|
52578
|
+
*
|
|
52579
|
+
* @example
|
|
52580
|
+
* ```typescript
|
|
52581
|
+
* const term: OsfqlTermValue = {
|
|
52582
|
+
* sort: 'person',
|
|
52583
|
+
* features: { name: { type: 'string', value: 'Alice' } },
|
|
52584
|
+
* };
|
|
52585
|
+
* ```
|
|
52295
52586
|
*/
|
|
52296
52587
|
interface OsfqlTermValue {
|
|
52297
52588
|
/** The term's named features, each resolved to a nested value. */
|
|
52298
|
-
features:
|
|
52589
|
+
features: Record<string, OsfqlValue>;
|
|
52299
52590
|
/** The term's sort name. */
|
|
52300
52591
|
sort: string;
|
|
52301
52592
|
}
|
|
@@ -52305,10 +52596,27 @@ interface OsfqlTermValue {
|
|
|
52305
52596
|
* @remarks
|
|
52306
52597
|
* Uses a tagged discriminated union with `type` as the discriminant. The discriminants are
|
|
52307
52598
|
* **lowercase** on the wire (`"string"`, not `"String"`) — this is *not* the tagged
|
|
52308
|
-
* `ValueDto` format used by term CRUD
|
|
52599
|
+
* `ValueDto` format used by term CRUD, and not the untagged `FeatureValueDto` inference
|
|
52600
|
+
* format. The Rust DTO is adjacently tagged (`#[serde(tag = "type", content = "value")]`),
|
|
52601
|
+
* so every non-`null` variant carries its payload under a single `value` key.
|
|
52602
|
+
*
|
|
52603
|
+
* The union is genuinely recursive: `list` holds `Vec<OsfqlValueDto>` and a `term`'s
|
|
52604
|
+
* `features` hold `BTreeMap<String, OsfqlValueDto>`. The backend erases both with
|
|
52605
|
+
* `#[schema(value_type = ...Object)]`, so the SDK hand-writes the recursion against the
|
|
52606
|
+
* Rust source rather than degrading the nested payloads to `object`.
|
|
52309
52607
|
*
|
|
52310
|
-
* The
|
|
52311
|
-
*
|
|
52608
|
+
* The property-graph endpoints return this exact DTO — {@link PropertyGraphValue} is an
|
|
52609
|
+
* alias of this type.
|
|
52610
|
+
*
|
|
52611
|
+
* @example
|
|
52612
|
+
* ```typescript
|
|
52613
|
+
* const text: OsfqlValue = { type: 'string', value: 'Alice' };
|
|
52614
|
+
* const list: OsfqlValue = { type: 'list', value: [{ type: 'integer', value: 1 }] };
|
|
52615
|
+
* const term: OsfqlValue = {
|
|
52616
|
+
* type: 'term',
|
|
52617
|
+
* value: { sort: 'person', features: { name: text } },
|
|
52618
|
+
* };
|
|
52619
|
+
* ```
|
|
52312
52620
|
*/
|
|
52313
52621
|
type OsfqlValue = {
|
|
52314
52622
|
type: 'null';
|
|
@@ -52326,7 +52634,7 @@ type OsfqlValue = {
|
|
|
52326
52634
|
value: boolean;
|
|
52327
52635
|
} | {
|
|
52328
52636
|
type: 'list';
|
|
52329
|
-
value:
|
|
52637
|
+
value: OsfqlValue[];
|
|
52330
52638
|
} | {
|
|
52331
52639
|
type: 'term_ref';
|
|
52332
52640
|
value: string;
|
|
@@ -52457,15 +52765,28 @@ declare class OsfqlClient {
|
|
|
52457
52765
|
* Execute an OSFQL program.
|
|
52458
52766
|
*
|
|
52459
52767
|
* @param query - The OSFQL program text (one or more statements separated by `;`).
|
|
52768
|
+
* @param options - Optional execution options. Set `reactive` to fire suspended
|
|
52769
|
+
* `AWAIT` demons whose triggers the program has just satisfied.
|
|
52460
52770
|
* @returns The execution result including variable bindings, produced term IDs,
|
|
52461
52771
|
* defined sort IDs, diagnostics, and statement count.
|
|
52462
52772
|
* @throws {ApiError} If the request fails.
|
|
52773
|
+
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
52774
|
+
* published {@link OsfqlValue} contract.
|
|
52463
52775
|
*
|
|
52464
52776
|
* @remarks
|
|
52465
52777
|
* The query is parsed, compiled, and executed against the caller's tenant-isolated
|
|
52466
52778
|
* knowledge base. Results include variable bindings from MATCH queries and IDs of
|
|
52467
52779
|
* any terms or sorts created by INSERT, DERIVE, or DEFINE statements.
|
|
52468
52780
|
*
|
|
52781
|
+
* Bindings use the **tagged** {@link OsfqlValue} format with lowercase `type`
|
|
52782
|
+
* discriminators — not the PascalCase `ValueDto` term-CRUD format.
|
|
52783
|
+
*
|
|
52784
|
+
* `reactive` opts into **reactive (streaming) mode**: once the program has run,
|
|
52785
|
+
* any suspended `AWAIT` demon whose trigger is now satisfied fires
|
|
52786
|
+
* automatically, with no explicit `RELEASE RESIDUATIONS` statement. It defaults
|
|
52787
|
+
* to `false` — demons stay suspended until an explicit RELEASE — so omitting it
|
|
52788
|
+
* leaves the request byte-identical to before.
|
|
52789
|
+
*
|
|
52469
52790
|
* @example
|
|
52470
52791
|
* ```typescript
|
|
52471
52792
|
* // Insert a record and query it back
|
|
@@ -52476,9 +52797,19 @@ declare class OsfqlClient {
|
|
|
52476
52797
|
* console.log(result.bindings); // [{ N: { type: "string", value: "Alice" } }]
|
|
52477
52798
|
* console.log(result.producedTermIds); // ["<uuid>"]
|
|
52478
52799
|
* console.log(result.statementCount); // 2
|
|
52800
|
+
*
|
|
52801
|
+
* // Let an AWAIT demon fire as soon as its trigger is satisfied
|
|
52802
|
+
* await client.osfql.execute('AWAIT person(name: "Bob");');
|
|
52803
|
+
* const reactive = await client.osfql.execute(
|
|
52804
|
+
* 'INSERT person(name: "Bob", age: 41);',
|
|
52805
|
+
* { reactive: true },
|
|
52806
|
+
* );
|
|
52807
|
+
* console.log(reactive.producedTermIds); // includes the demon's own output
|
|
52479
52808
|
* ```
|
|
52480
52809
|
*/
|
|
52481
|
-
execute(query: string
|
|
52810
|
+
execute(query: string, options?: {
|
|
52811
|
+
reactive?: boolean;
|
|
52812
|
+
}): Promise<OsfqlResponse>;
|
|
52482
52813
|
/**
|
|
52483
52814
|
* Diagnose an OSFQL program for contradictions and inconsistencies.
|
|
52484
52815
|
*
|
|
@@ -52568,6 +52899,30 @@ interface ConversationMessageRequest {
|
|
|
52568
52899
|
currentSortContext?: string | null;
|
|
52569
52900
|
/** When true, generate a cryptographic validity certificate for this response. */
|
|
52570
52901
|
generateCertificate?: boolean;
|
|
52902
|
+
/**
|
|
52903
|
+
* Per-request override for constrained-decode repair of a hallucinated query.
|
|
52904
|
+
*
|
|
52905
|
+
* @remarks
|
|
52906
|
+
* `false` disables the repair — the certify-or-abstain gate just abstains, surfacing
|
|
52907
|
+
* the raw model output. `true` / omitted keep the default (repair when configured).
|
|
52908
|
+
* Lets a UI toggle constrained decoding to compare the correction against the raw
|
|
52909
|
+
* query. See {@link ConversationMessageResponse.repaired}.
|
|
52910
|
+
*/
|
|
52911
|
+
constrainedDecode?: boolean | null;
|
|
52912
|
+
/**
|
|
52913
|
+
* Model id selecting which served NL→OSFQL endpoint answers this turn.
|
|
52914
|
+
*
|
|
52915
|
+
* @remarks
|
|
52916
|
+
* Omitted means the server's default LLM. Drives side-by-side model comparison —
|
|
52917
|
+
* one call per model — and is echoed back as
|
|
52918
|
+
* {@link ConversationMessageResponse.modelId}, which the server populates only
|
|
52919
|
+
* when this is set.
|
|
52920
|
+
*
|
|
52921
|
+
* The backend documents the ids as coming from a compare registry at
|
|
52922
|
+
* `GET /api/v1/conversation/models`, but that route is absent from the published
|
|
52923
|
+
* OpenAPI spec, so the SDK does not wrap it; ids must come from configuration.
|
|
52924
|
+
*/
|
|
52925
|
+
model?: string | null;
|
|
52571
52926
|
}
|
|
52572
52927
|
/**
|
|
52573
52928
|
* A proof trace node for backward chaining derivation trees.
|
|
@@ -52784,6 +53139,36 @@ interface ConversationMessageResponse {
|
|
|
52784
53139
|
validityCertificateHash?: string | null;
|
|
52785
53140
|
/** ID of the validity certificate (if generate_certificate was true). */
|
|
52786
53141
|
validityCertificateId?: string | null;
|
|
53142
|
+
/**
|
|
53143
|
+
* Hex SHA-256 of the rule program active when the validity certificate was issued —
|
|
53144
|
+
* the durable "which rule version served this proof" pin.
|
|
53145
|
+
*/
|
|
53146
|
+
validityCertificateRuleProgramHash?: string | null;
|
|
53147
|
+
/**
|
|
53148
|
+
* In-process rule-program revision ordinal at issuance. Present only when
|
|
53149
|
+
* rule-revision tracking is enabled on the executing store.
|
|
53150
|
+
*/
|
|
53151
|
+
validityCertificateRuleRevision?: number | null;
|
|
53152
|
+
/**
|
|
53153
|
+
* The model id (compare registry) that produced this turn, when a per-request model
|
|
53154
|
+
* was set — so a UI can label which model a side-by-side column came from.
|
|
53155
|
+
*/
|
|
53156
|
+
modelId?: string | null;
|
|
53157
|
+
/**
|
|
53158
|
+
* Prompt-prefill wall-clock (ms) for the NL→OSFQL generation — the one-time cost
|
|
53159
|
+
* before decoding begins.
|
|
53160
|
+
*
|
|
53161
|
+
* @remarks
|
|
53162
|
+
* Surfaced beside {@link tokensPerSec} (which is *decode-only* on the device path) so
|
|
53163
|
+
* a short query's prefill is visible instead of crushing the apparent rate. Absent
|
|
53164
|
+
* unless measured.
|
|
53165
|
+
*/
|
|
53166
|
+
prefillMs?: number | null;
|
|
53167
|
+
/**
|
|
53168
|
+
* Decode throughput for the NL→OSFQL generation, in tokens/second (wall-clock of the
|
|
53169
|
+
* LLM call ÷ generated tokens). Approximate; surfaced for model comparison.
|
|
53170
|
+
*/
|
|
53171
|
+
tokensPerSec?: number | null;
|
|
52787
53172
|
}
|
|
52788
53173
|
/**
|
|
52789
53174
|
* A single conversation turn (message).
|
|
@@ -58685,56 +59070,33 @@ interface PropertyGraphQueryRequest {
|
|
|
58685
59070
|
* A bound value returned by a property-graph query after lowering to OSFQL.
|
|
58686
59071
|
*
|
|
58687
59072
|
* @remarks
|
|
59073
|
+
* An alias of {@link OsfqlValue}: the property-graph endpoints return the very
|
|
59074
|
+
* same backend DTO (`OsfqlValueDto` — see `bindings: Vec<BTreeMap<String,
|
|
59075
|
+
* OsfqlValueDto>>` on the Rust `PropertyGraphExecuteResponse`), because a
|
|
59076
|
+
* GQL/Cypher/Gremlin query is lowered to OSFQL and executed by the OSFQL engine.
|
|
59077
|
+
* The alias is kept so the property-graph surface reads in its own vocabulary
|
|
59078
|
+
* while there remains exactly one definition of the shape.
|
|
59079
|
+
*
|
|
58688
59080
|
* Uses **tagged** serialization with a lowercase `type` discriminator
|
|
58689
59081
|
* (e.g. `{"type": "string", "value": "Alice"}`). This is the OSFQL binding
|
|
58690
59082
|
* value format — *not* the `ValueDto` term-CRUD format (which uses PascalCase
|
|
58691
59083
|
* tags such as `{"type": "String", ...}`) and not the untagged
|
|
58692
59084
|
* `FeatureValueDto` inference format.
|
|
58693
59085
|
*
|
|
58694
|
-
* The `list` and `term`
|
|
58695
|
-
*
|
|
58696
|
-
* `term.value.features` entries are themselves values of this shape.
|
|
59086
|
+
* The union is recursive: `list.value` elements and `term.value.features`
|
|
59087
|
+
* entries are themselves values of this shape.
|
|
58697
59088
|
*
|
|
58698
59089
|
* @example
|
|
58699
59090
|
* ```typescript
|
|
58700
59091
|
* const value: PropertyGraphValue = { type: 'string', value: 'Alice' };
|
|
58701
59092
|
* const nothing: PropertyGraphValue = { type: 'null' };
|
|
59093
|
+
* const person: PropertyGraphValue = {
|
|
59094
|
+
* type: 'term',
|
|
59095
|
+
* value: { sort: 'person', features: { name: value } },
|
|
59096
|
+
* };
|
|
58702
59097
|
* ```
|
|
58703
59098
|
*/
|
|
58704
|
-
type PropertyGraphValue =
|
|
58705
|
-
type: 'null';
|
|
58706
|
-
} | {
|
|
58707
|
-
type: 'integer';
|
|
58708
|
-
value: number;
|
|
58709
|
-
} | {
|
|
58710
|
-
type: 'float';
|
|
58711
|
-
value: number;
|
|
58712
|
-
} | {
|
|
58713
|
-
type: 'string';
|
|
58714
|
-
value: string;
|
|
58715
|
-
} | {
|
|
58716
|
-
type: 'boolean';
|
|
58717
|
-
value: boolean;
|
|
58718
|
-
} | {
|
|
58719
|
-
type: 'list';
|
|
58720
|
-
value: object[];
|
|
58721
|
-
} | {
|
|
58722
|
-
type: 'term_ref';
|
|
58723
|
-
value: string;
|
|
58724
|
-
} | {
|
|
58725
|
-
type: 'term';
|
|
58726
|
-
/**
|
|
58727
|
-
* A nested Psi-term: the term's sort name plus its named features, each
|
|
58728
|
-
* resolved to a nested value. Coreference is inlined into containment;
|
|
58729
|
-
* a cycle or an already-materialized shared term appears as `term_ref`.
|
|
58730
|
-
*/
|
|
58731
|
-
value: {
|
|
58732
|
-
/** The term's sort name. */
|
|
58733
|
-
sort: string;
|
|
58734
|
-
/** The term's named features, each resolved to a nested value. */
|
|
58735
|
-
features: object;
|
|
58736
|
-
};
|
|
58737
|
-
};
|
|
59099
|
+
type PropertyGraphValue = OsfqlValue;
|
|
58738
59100
|
/**
|
|
58739
59101
|
* Execution result for a GQL/Cypher/Gremlin query after lowering to OSFQL.
|
|
58740
59102
|
*
|
|
@@ -58853,6 +59215,12 @@ declare class PropertyGraphClient {
|
|
|
58853
59215
|
private readonly api;
|
|
58854
59216
|
/** @internal */
|
|
58855
59217
|
constructor(api: PropertyGraph);
|
|
59218
|
+
/**
|
|
59219
|
+
* Parse an execution response, failing loudly on a contract violation.
|
|
59220
|
+
*
|
|
59221
|
+
* @internal
|
|
59222
|
+
*/
|
|
59223
|
+
private static parseExecuteResponse;
|
|
58856
59224
|
/**
|
|
58857
59225
|
* Execute a Cypher query.
|
|
58858
59226
|
*
|
|
@@ -58860,6 +59228,8 @@ declare class PropertyGraphClient {
|
|
|
58860
59228
|
* @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
|
|
58861
59229
|
* defined sort IDs, diagnostics, compatibility notes, and the statement count.
|
|
58862
59230
|
* @throws {ApiError} If the query cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
|
|
59231
|
+
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
59232
|
+
* published {@link PropertyGraphValue} contract.
|
|
58863
59233
|
*
|
|
58864
59234
|
* @remarks
|
|
58865
59235
|
* The query is parsed as Cypher, lowered to OSFQL, and executed against the
|
|
@@ -58883,6 +59253,8 @@ declare class PropertyGraphClient {
|
|
|
58883
59253
|
* @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
|
|
58884
59254
|
* defined sort IDs, diagnostics, compatibility notes, and the statement count.
|
|
58885
59255
|
* @throws {ApiError} If the query cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
|
|
59256
|
+
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
59257
|
+
* published {@link PropertyGraphValue} contract.
|
|
58886
59258
|
*
|
|
58887
59259
|
* @remarks
|
|
58888
59260
|
* The query is parsed as GQL, lowered to OSFQL, and executed against the
|
|
@@ -58906,6 +59278,8 @@ declare class PropertyGraphClient {
|
|
|
58906
59278
|
* @returns Execution result: bindings, the OSFQL program that ran, produced term IDs,
|
|
58907
59279
|
* defined sort IDs, diagnostics, compatibility notes, and the statement count.
|
|
58908
59280
|
* @throws {ApiError} If the traversal cannot be parsed, cannot be lowered to OSFQL, or fails to execute.
|
|
59281
|
+
* @throws {ReasoningLayerError} If the server returns bindings that do not satisfy the
|
|
59282
|
+
* published {@link PropertyGraphValue} contract.
|
|
58909
59283
|
*
|
|
58910
59284
|
* @remarks
|
|
58911
59285
|
* The traversal is parsed as Gremlin, lowered to OSFQL, and executed against the
|
|
@@ -59610,31 +59984,109 @@ declare class OsfDiff<SecurityDataType = unknown> {
|
|
|
59610
59984
|
}
|
|
59611
59985
|
|
|
59612
59986
|
/**
|
|
59613
|
-
*
|
|
59987
|
+
* Selects a set of Psi-terms to diff.
|
|
59614
59988
|
*
|
|
59615
59989
|
* @remarks
|
|
59616
|
-
* A
|
|
59617
|
-
*
|
|
59618
|
-
*
|
|
59619
|
-
*
|
|
59620
|
-
*
|
|
59990
|
+
* A union discriminated by `type`. The OSF diff engine compares **any two sets
|
|
59991
|
+
* of OSF terms** — a document is just one way to select a set; others are
|
|
59992
|
+
* collections, sorts, OSFQL query results, snapshots, or points in time.
|
|
59993
|
+
* `snapshot` and `as_of` accept an optional nested `filter`, so selections
|
|
59994
|
+
* compose recursively (e.g. "the terms of sort `clause` as of 2026-01-01").
|
|
59621
59995
|
*
|
|
59622
|
-
*
|
|
59996
|
+
* This is the canonical definition, mirroring the backend, where the enum lives
|
|
59997
|
+
* in the OSF diff module (`osfkb_domain::extraction::osf_diff::TermSetSelector`)
|
|
59998
|
+
* and is imported by the temporal-series and coherence endpoints. The temporal
|
|
59999
|
+
* surface re-exports it — there is exactly one definition.
|
|
60000
|
+
*
|
|
60001
|
+
* Serialized to the wire as a tagged snake_case object — for example
|
|
60002
|
+
* `{"type":"sort","sort_name":"clause","include_descendants":true}`. This is a
|
|
60003
|
+
* plain JSON tagged union, **not** the tagged `ValueDto` value format. The SDK
|
|
60004
|
+
* surface is camelCase (`sortName`); the normalizer converts it at the boundary.
|
|
60005
|
+
*
|
|
60006
|
+
* The backend publishes the selector as a free-form JSON object
|
|
60007
|
+
* (`#[schema(value_type = Object)]`), which erases the union in the OpenAPI
|
|
60008
|
+
* spec; the SDK hand-writes it against the Rust source, whose own doc comment
|
|
60009
|
+
* states "the variants double as the wire format".
|
|
59623
60010
|
*
|
|
59624
60011
|
* @example
|
|
59625
60012
|
* ```typescript
|
|
59626
|
-
* const
|
|
60013
|
+
* const byDocument: TermSetSelector = { type: 'document', documentId: '3f0c...' };
|
|
60014
|
+
* const bySort: TermSetSelector = { type: 'sort', sortName: 'clause', includeDescendants: true };
|
|
60015
|
+
* const historic: TermSetSelector = { type: 'as_of', at: '2026-01-01T00:00:00Z', filter: bySort };
|
|
59627
60016
|
* ```
|
|
59628
60017
|
*/
|
|
59629
|
-
type
|
|
60018
|
+
type TermSetSelector =
|
|
60019
|
+
/** All terms extracted from one document. */
|
|
60020
|
+
{
|
|
60021
|
+
type: 'document';
|
|
60022
|
+
documentId: string;
|
|
60023
|
+
}
|
|
60024
|
+
/** Alias of `document` used by the version-chain endpoints. */
|
|
60025
|
+
| {
|
|
60026
|
+
type: 'document_version';
|
|
60027
|
+
documentId: string;
|
|
60028
|
+
}
|
|
60029
|
+
/** Union of all documents in a collection path. */
|
|
60030
|
+
| {
|
|
60031
|
+
type: 'collection';
|
|
60032
|
+
path: string;
|
|
60033
|
+
}
|
|
60034
|
+
/** An explicit list of term IDs. */
|
|
60035
|
+
| {
|
|
60036
|
+
type: 'term_ids';
|
|
60037
|
+
ids: string[];
|
|
60038
|
+
}
|
|
60039
|
+
/** All terms of a sort (optionally including descendant sorts). */
|
|
60040
|
+
| {
|
|
60041
|
+
type: 'sort';
|
|
60042
|
+
sortName: string;
|
|
60043
|
+
includeDescendants?: boolean;
|
|
60044
|
+
}
|
|
60045
|
+
/** The result set of an OSFQL FINDALL/MATCH query. */
|
|
60046
|
+
| {
|
|
60047
|
+
type: 'query';
|
|
60048
|
+
osfql: string;
|
|
60049
|
+
}
|
|
60050
|
+
/** The set as captured in a tenant snapshot (optionally filtered). */
|
|
60051
|
+
| {
|
|
60052
|
+
type: 'snapshot';
|
|
60053
|
+
snapshotId: string;
|
|
60054
|
+
filter?: TermSetSelector;
|
|
60055
|
+
}
|
|
60056
|
+
/** The set as of a timestamp (RFC 3339), optionally filtered. */
|
|
60057
|
+
| {
|
|
60058
|
+
type: 'as_of';
|
|
60059
|
+
at: string;
|
|
60060
|
+
filter?: TermSetSelector;
|
|
60061
|
+
};
|
|
60062
|
+
/**
|
|
60063
|
+
* Selector identifying one side of an OSF diff.
|
|
60064
|
+
*
|
|
60065
|
+
* @remarks
|
|
60066
|
+
* An alias of {@link TermSetSelector}, the union the OSF diff endpoints resolve.
|
|
60067
|
+
* The name is kept because the diff surface names its inputs "selectors".
|
|
60068
|
+
*
|
|
60069
|
+
* @example
|
|
60070
|
+
* ```typescript
|
|
60071
|
+
* const selector: OsfDiffSelector = { type: 'document', documentId: '3f0c...' };
|
|
60072
|
+
* ```
|
|
60073
|
+
*/
|
|
60074
|
+
type OsfDiffSelector = TermSetSelector;
|
|
59630
60075
|
/**
|
|
59631
60076
|
* A serialized OSF diff report.
|
|
59632
60077
|
*
|
|
59633
60078
|
* @remarks
|
|
59634
|
-
* The structural delta between the two sides of a diff
|
|
59635
|
-
*
|
|
59636
|
-
*
|
|
59637
|
-
*
|
|
60079
|
+
* The structural delta between the two sides of a diff: matched/added/removed
|
|
60080
|
+
* entities with their match degrees and provenance, plus, when requested,
|
|
60081
|
+
* clause-level changes with deontic strictness classification and contradiction
|
|
60082
|
+
* detection.
|
|
60083
|
+
*
|
|
60084
|
+
* Ships opaquely. The report is a large, still-evolving aggregate that the
|
|
60085
|
+
* backend publishes as a free-form JSON object (`#[schema(value_type = Object)]`),
|
|
60086
|
+
* so — unlike {@link TermSetSelector}, whose variants are a small fixed contract
|
|
60087
|
+
* the Rust documents as the wire format — pinning it in the SDK would freeze an
|
|
60088
|
+
* unstable shape and break consumers on every backend addition. Its keys are
|
|
60089
|
+
* wire-format (snake_case); narrow it yourself if you need to read it.
|
|
59638
60090
|
*
|
|
59639
60091
|
* @example
|
|
59640
60092
|
* ```typescript
|
|
@@ -59648,9 +60100,9 @@ type OsfDiffReport = object;
|
|
|
59648
60100
|
*
|
|
59649
60101
|
* @remarks
|
|
59650
60102
|
* The pairwise deltas across an ordered chain of three or more sides (e.g. the
|
|
59651
|
-
* version chain of a document family).
|
|
59652
|
-
*
|
|
59653
|
-
* wire-format (snake_case)
|
|
60103
|
+
* version chain of a document family). Ships opaquely for the same reason as
|
|
60104
|
+
* {@link OsfDiffReport}: it is a large, still-evolving aggregate published as a
|
|
60105
|
+
* free-form JSON object. Its keys are wire-format (snake_case).
|
|
59654
60106
|
*
|
|
59655
60107
|
* @example
|
|
59656
60108
|
* ```typescript
|
|
@@ -59693,8 +60145,8 @@ interface TemporalPoint {
|
|
|
59693
60145
|
* @example
|
|
59694
60146
|
* ```typescript
|
|
59695
60147
|
* const request: OsfDiffRequest = {
|
|
59696
|
-
* a: { type: 'document',
|
|
59697
|
-
* b: { type: 'document',
|
|
60148
|
+
* a: { type: 'document', documentId: 'a1b2...' },
|
|
60149
|
+
* b: { type: 'document', documentId: 'c3d4...' },
|
|
59698
60150
|
* includeClauseDiff: true,
|
|
59699
60151
|
* threshold: 0.8,
|
|
59700
60152
|
* };
|
|
@@ -59778,7 +60230,7 @@ interface OsfDiffSequenceResponse {
|
|
|
59778
60230
|
* const request: OsfDiffTemporalRequest = {
|
|
59779
60231
|
* from: { at: '2026-01-01T00:00:00Z' },
|
|
59780
60232
|
* to: {}, // live
|
|
59781
|
-
* filter: { type: 'document',
|
|
60233
|
+
* filter: { type: 'document', documentId: 'a1b2...' },
|
|
59782
60234
|
* };
|
|
59783
60235
|
* ```
|
|
59784
60236
|
*/
|
|
@@ -59831,8 +60283,9 @@ type osfDiff_OsfDiffSequenceRequest = OsfDiffSequenceRequest;
|
|
|
59831
60283
|
type osfDiff_OsfDiffSequenceResponse = OsfDiffSequenceResponse;
|
|
59832
60284
|
type osfDiff_OsfDiffTemporalRequest = OsfDiffTemporalRequest;
|
|
59833
60285
|
type osfDiff_TemporalPoint = TemporalPoint;
|
|
60286
|
+
type osfDiff_TermSetSelector = TermSetSelector;
|
|
59834
60287
|
declare namespace osfDiff {
|
|
59835
|
-
export type { osfDiff_CompareDocumentsRequest as CompareDocumentsRequest, osfDiff_OsfDiffReport as OsfDiffReport, osfDiff_OsfDiffRequest as OsfDiffRequest, osfDiff_OsfDiffResponse as OsfDiffResponse, osfDiff_OsfDiffSelector as OsfDiffSelector, osfDiff_OsfDiffSequenceReport as OsfDiffSequenceReport, osfDiff_OsfDiffSequenceRequest as OsfDiffSequenceRequest, osfDiff_OsfDiffSequenceResponse as OsfDiffSequenceResponse, osfDiff_OsfDiffTemporalRequest as OsfDiffTemporalRequest, osfDiff_TemporalPoint as TemporalPoint };
|
|
60288
|
+
export type { osfDiff_CompareDocumentsRequest as CompareDocumentsRequest, osfDiff_OsfDiffReport as OsfDiffReport, osfDiff_OsfDiffRequest as OsfDiffRequest, osfDiff_OsfDiffResponse as OsfDiffResponse, osfDiff_OsfDiffSelector as OsfDiffSelector, osfDiff_OsfDiffSequenceReport as OsfDiffSequenceReport, osfDiff_OsfDiffSequenceRequest as OsfDiffSequenceRequest, osfDiff_OsfDiffSequenceResponse as OsfDiffSequenceResponse, osfDiff_OsfDiffTemporalRequest as OsfDiffTemporalRequest, osfDiff_TemporalPoint as TemporalPoint, osfDiff_TermSetSelector as TermSetSelector };
|
|
59836
60289
|
}
|
|
59837
60290
|
|
|
59838
60291
|
/**
|
|
@@ -59851,9 +60304,13 @@ declare namespace osfDiff {
|
|
|
59851
60304
|
* - {@link OsfDiffClient.diffTemporal} — the same subject across two bitemporal points.
|
|
59852
60305
|
* - {@link OsfDiffClient.compareDocuments} — the document-to-document convenience form.
|
|
59853
60306
|
*
|
|
59854
|
-
* Selectors
|
|
59855
|
-
*
|
|
59856
|
-
*
|
|
60307
|
+
* Selectors are typed: {@link TermSetSelector} (aliased as {@link OsfDiffSelector})
|
|
60308
|
+
* is a `type`-discriminated union covering documents, collections, sorts, OSFQL
|
|
60309
|
+
* queries, snapshots, and points in time. The SDK surface is camelCase and the
|
|
60310
|
+
* normalizer converts it to the tagged snake_case wire object at the boundary.
|
|
60311
|
+
* The diff *reports* remain opaque snake_case JSON — they are large, still-evolving
|
|
60312
|
+
* aggregates the backend publishes without a schema. No tagged/untagged value
|
|
60313
|
+
* serialization is involved on these endpoints.
|
|
59857
60314
|
*
|
|
59858
60315
|
* Delegates to generated route classes for type-safe HTTP calls.
|
|
59859
60316
|
*/
|
|
@@ -59873,13 +60330,14 @@ declare class OsfDiffClient {
|
|
|
59873
60330
|
* Entities are matched by OSF unification; `threshold` (default 0.7) is the
|
|
59874
60331
|
* minimum match degree at which two entities are considered the same. Set
|
|
59875
60332
|
* `includeClauseDiff` / `includeEntityDiff` to control which deltas the report
|
|
59876
|
-
* carries.
|
|
60333
|
+
* carries. Each side is a typed {@link OsfDiffSelector}; the report is an opaque
|
|
60334
|
+
* wire-format JSON object.
|
|
59877
60335
|
*
|
|
59878
60336
|
* @example
|
|
59879
60337
|
* ```typescript
|
|
59880
60338
|
* const result = await client.osfDiff.diff({
|
|
59881
|
-
* a: { type: 'document',
|
|
59882
|
-
* b: { type: 'document',
|
|
60339
|
+
* a: { type: 'document', documentId: 'a1b2c3d4-...' },
|
|
60340
|
+
* b: { type: 'document', documentId: 'e5f6a7b8-...' },
|
|
59883
60341
|
* includeClauseDiff: true,
|
|
59884
60342
|
* threshold: 0.8,
|
|
59885
60343
|
* });
|
|
@@ -59931,7 +60389,7 @@ declare class OsfDiffClient {
|
|
|
59931
60389
|
* const result = await client.osfDiff.diffTemporal({
|
|
59932
60390
|
* from: { at: '2026-01-01T00:00:00Z' },
|
|
59933
60391
|
* to: {}, // live
|
|
59934
|
-
* filter: { type: 'document',
|
|
60392
|
+
* filter: { type: 'document', documentId: 'a1b2c3d4-...' },
|
|
59935
60393
|
* });
|
|
59936
60394
|
* console.log(result.report);
|
|
59937
60395
|
* ```
|
|
@@ -60807,12 +61265,19 @@ declare class SatClient {
|
|
|
60807
61265
|
* Solver statistics are attached to every branch.
|
|
60808
61266
|
* @throws {ApiError} If the request fails (e.g. a literal references a variable
|
|
60809
61267
|
* index `>= numVars`, or a clause is empty).
|
|
61268
|
+
* @throws {ValidationError} If a `satisfiable` verdict arrives without a
|
|
61269
|
+
* well-formed Boolean model, which violates the endpoint contract.
|
|
60810
61270
|
*
|
|
60811
61271
|
* @remarks
|
|
60812
61272
|
* Narrow on `result` to reach the model — it exists only on the `satisfiable`
|
|
60813
61273
|
* branch. `maxConflicts: 0` (the default) means an unlimited budget, in which
|
|
60814
61274
|
* case `unknown` cannot be returned.
|
|
60815
61275
|
*
|
|
61276
|
+
* The model is index-aligned with the variables (`model[i]` is the value of
|
|
61277
|
+
* variable `i`). A `satisfiable` response whose model is missing or holds a
|
|
61278
|
+
* non-Boolean is reported as a {@link ValidationError} rather than silently
|
|
61279
|
+
* shortened — dropping an entry would shift every later variable's assignment.
|
|
61280
|
+
*
|
|
60816
61281
|
* Plain JSON serialization: literals are `{ var, negated }` objects and the
|
|
60817
61282
|
* model is a `boolean[]` indexed by variable number. No tagged `ValueDto` or
|
|
60818
61283
|
* untagged `FeatureValueDto` encoding is used.
|
|
@@ -61889,54 +62354,7 @@ interface TemporalModelCheckResponse {
|
|
|
61889
62354
|
/** A counterexample witness from the first failing initial state, when one could be extracted. */
|
|
61890
62355
|
counterexample?: CtlCounterExample;
|
|
61891
62356
|
}
|
|
61892
|
-
|
|
61893
|
-
* Selects the set of Ψ-terms a temporal series is built from.
|
|
61894
|
-
*
|
|
61895
|
-
* @remarks
|
|
61896
|
-
* A union discriminated by `type`, resolved tenant-scoped by the same backend
|
|
61897
|
-
* resolver the OSF diff endpoints use. `snapshot` and `asOf` accept an optional
|
|
61898
|
-
* nested `filter` selector, so selections compose recursively (e.g. "the terms
|
|
61899
|
-
* of sort `reading` as of 2026-01-01").
|
|
61900
|
-
*
|
|
61901
|
-
* Serialized to the wire as a tagged snake_case object — for example
|
|
61902
|
-
* `{"type":"sort","sort_name":"reading","include_descendants":true}`. This is a
|
|
61903
|
-
* plain JSON tagged union, **not** the tagged `ValueDto` value format.
|
|
61904
|
-
*
|
|
61905
|
-
* @example
|
|
61906
|
-
* ```typescript
|
|
61907
|
-
* const bySort: TermSetSelector = { type: 'sort', sortName: 'sensor_reading', includeDescendants: true };
|
|
61908
|
-
* const byIds: TermSetSelector = { type: 'term_ids', ids: ['3f0c...', '7a1b...'] };
|
|
61909
|
-
* const historic: TermSetSelector = { type: 'as_of', at: '2026-01-01T00:00:00Z', filter: bySort };
|
|
61910
|
-
* ```
|
|
61911
|
-
*/
|
|
61912
|
-
type TermSetSelector = {
|
|
61913
|
-
type: 'document';
|
|
61914
|
-
documentId: string;
|
|
61915
|
-
} | {
|
|
61916
|
-
type: 'document_version';
|
|
61917
|
-
documentId: string;
|
|
61918
|
-
} | {
|
|
61919
|
-
type: 'collection';
|
|
61920
|
-
path: string;
|
|
61921
|
-
} | {
|
|
61922
|
-
type: 'term_ids';
|
|
61923
|
-
ids: string[];
|
|
61924
|
-
} | {
|
|
61925
|
-
type: 'sort';
|
|
61926
|
-
sortName: string;
|
|
61927
|
-
includeDescendants?: boolean;
|
|
61928
|
-
} | {
|
|
61929
|
-
type: 'query';
|
|
61930
|
-
osfql: string;
|
|
61931
|
-
} | {
|
|
61932
|
-
type: 'snapshot';
|
|
61933
|
-
snapshotId: string;
|
|
61934
|
-
filter?: TermSetSelector;
|
|
61935
|
-
} | {
|
|
61936
|
-
type: 'as_of';
|
|
61937
|
-
at: string;
|
|
61938
|
-
filter?: TermSetSelector;
|
|
61939
|
-
};
|
|
62357
|
+
|
|
61940
62358
|
/**
|
|
61941
62359
|
* Granularity of an integer epoch feature.
|
|
61942
62360
|
*
|
|
@@ -64883,6 +65301,10 @@ type OntologyExportFormat = 'json' | 'turtle' | 'ntriples' | 'rdfxml' | 'jsonld'
|
|
|
64883
65301
|
* `base` and `root` are query parameters; `format` selects the `Accept` header.
|
|
64884
65302
|
* Omitting `root` exports the whole tenant schema.
|
|
64885
65303
|
*
|
|
65304
|
+
* `root` is repeatable: pass an array to select several sub-lattices in one
|
|
65305
|
+
* export. It is serialized as a repeated parameter (`?root=a&root=b`), which is
|
|
65306
|
+
* what the backend parses.
|
|
65307
|
+
*
|
|
64886
65308
|
* @example
|
|
64887
65309
|
* ```typescript
|
|
64888
65310
|
* const options: OntologyExportOptions = {
|
|
@@ -64890,6 +65312,12 @@ type OntologyExportFormat = 'json' | 'turtle' | 'ntriples' | 'rdfxml' | 'jsonld'
|
|
|
64890
65312
|
* root: 'clinical_entity',
|
|
64891
65313
|
* format: 'turtle',
|
|
64892
65314
|
* };
|
|
65315
|
+
*
|
|
65316
|
+
* // Several sub-lattices in one export
|
|
65317
|
+
* const multi: OntologyExportOptions = {
|
|
65318
|
+
* root: ['clinical_entity', 'administrative_entity'],
|
|
65319
|
+
* format: 'turtle',
|
|
65320
|
+
* };
|
|
64893
65321
|
* ```
|
|
64894
65322
|
*/
|
|
64895
65323
|
interface OntologyExportOptions {
|
|
@@ -64904,10 +65332,15 @@ interface OntologyExportOptions {
|
|
|
64904
65332
|
*/
|
|
64905
65333
|
format?: OntologyExportFormat;
|
|
64906
65334
|
/**
|
|
64907
|
-
* Restrict the export to the sub-lattice under this sort
|
|
64908
|
-
*
|
|
65335
|
+
* Restrict the export to the sub-lattice under this sort, or — given an array —
|
|
65336
|
+
* to the union of the sub-lattices under each of these sorts. Omit to export
|
|
65337
|
+
* the whole tenant schema.
|
|
65338
|
+
*
|
|
65339
|
+
* @remarks
|
|
65340
|
+
* Serialized as a repeated query parameter (`?root=a&root=b`). Every named
|
|
65341
|
+
* sort must exist: the backend 404s on the first unknown name.
|
|
64909
65342
|
*/
|
|
64910
|
-
root?: string;
|
|
65343
|
+
root?: string | string[];
|
|
64911
65344
|
}
|
|
64912
65345
|
/**
|
|
64913
65346
|
* An exported ontology document, verbatim.
|
|
@@ -64919,10 +65352,14 @@ interface OntologyExportOptions {
|
|
|
64919
65352
|
* with. RDF serializations are text; the default JSON rendering is JSON text
|
|
64920
65353
|
* (parse it with `JSON.parse` when you need the object).
|
|
64921
65354
|
*
|
|
65355
|
+
* The media type is the server's `Content-Type` verbatim, parameters included —
|
|
65356
|
+
* Turtle is served as `text/turtle; charset=utf-8`, not a bare `text/turtle`, so
|
|
65357
|
+
* match on a prefix rather than comparing for equality.
|
|
65358
|
+
*
|
|
64922
65359
|
* @example
|
|
64923
65360
|
* ```typescript
|
|
64924
65361
|
* const result: OntologyExportDocument = {
|
|
64925
|
-
* contentType: 'text/turtle',
|
|
65362
|
+
* contentType: 'text/turtle; charset=utf-8',
|
|
64926
65363
|
* document: '@prefix : <urn:osfkb:tenant:...> .\n',
|
|
64927
65364
|
* };
|
|
64928
65365
|
* ```
|
|
@@ -64967,21 +65404,37 @@ declare class OntologyExportClient {
|
|
|
64967
65404
|
private readonly api;
|
|
64968
65405
|
/** @internal */
|
|
64969
65406
|
constructor(api: OntologyExport);
|
|
65407
|
+
/**
|
|
65408
|
+
* Issue a content-negotiated export request and project the response.
|
|
65409
|
+
*
|
|
65410
|
+
* @internal
|
|
65411
|
+
* @remarks
|
|
65412
|
+
* Goes through the transport directly rather than through the generated route
|
|
65413
|
+
* methods: `root` is repeatable server-side (`?root=a&root=b`), but utoipa
|
|
65414
|
+
* cannot express a repeated query parameter, so the generated routes type it as
|
|
65415
|
+
* a lone `root?: string` — narrower than the endpoint each route's own
|
|
65416
|
+
* "(repeatable)" doc comment describes. The transport's query serializer
|
|
65417
|
+
* already branches on `Array.isArray` and emits the repeats correctly.
|
|
65418
|
+
*/
|
|
65419
|
+
private requestExport;
|
|
64970
65420
|
/**
|
|
64971
65421
|
* Export the tenant's sort lattice (or a sub-lattice) as an OWL ontology.
|
|
64972
65422
|
*
|
|
64973
65423
|
* @param options - Export options: the base IRI for synthesized IRIs, the root
|
|
64974
|
-
* sort to restrict the export to, and the serialization to
|
|
65424
|
+
* sort (or sorts) to restrict the export to, and the serialization to
|
|
65425
|
+
* negotiate on.
|
|
64975
65426
|
* @returns The exported document, verbatim, with the media type the server
|
|
64976
65427
|
* answered with.
|
|
64977
65428
|
* @throws {BadRequestError} If the base IRI is invalid or the query is malformed.
|
|
64978
|
-
* @throws {NotFoundError} If
|
|
65429
|
+
* @throws {NotFoundError} If a requested root sort does not exist.
|
|
64979
65430
|
* @throws {ApiError} If the request otherwise fails.
|
|
64980
65431
|
*
|
|
64981
65432
|
* @remarks
|
|
64982
65433
|
* Omit `root` to export the whole tenant schema. Omit `base` to let the backend
|
|
64983
65434
|
* synthesize IRIs under `urn:osfkb:tenant:{tenant_id}`.
|
|
64984
65435
|
*
|
|
65436
|
+
* `root` is repeatable: pass an array to export several sub-lattices at once.
|
|
65437
|
+
*
|
|
64985
65438
|
* `format` selects the `Accept` header: an RDF serialization yields an RDF
|
|
64986
65439
|
* document, and the default (`'json'`) yields the backend's JSON rendering as
|
|
64987
65440
|
* JSON text — parse it with `JSON.parse` when you need the object.
|
|
@@ -64994,8 +65447,13 @@ declare class OntologyExportClient {
|
|
|
64994
65447
|
* format: 'turtle',
|
|
64995
65448
|
* });
|
|
64996
65449
|
*
|
|
64997
|
-
* console.log(owl.contentType); // 'text/turtle'
|
|
65450
|
+
* console.log(owl.contentType); // 'text/turtle; charset=utf-8'
|
|
64998
65451
|
* console.log(owl.document); // '@prefix : <https://example.org/ontology#> ...'
|
|
65452
|
+
*
|
|
65453
|
+
* // Several sub-lattices in one export -> ?root=clinical_entity&root=administrative_entity
|
|
65454
|
+
* const both = await client.ontologyExport.exportOwl({
|
|
65455
|
+
* root: ['clinical_entity', 'administrative_entity'],
|
|
65456
|
+
* });
|
|
64999
65457
|
* ```
|
|
65000
65458
|
*/
|
|
65001
65459
|
exportOwl(options?: OntologyExportOptions): Promise<OntologyExportDocument>;
|
|
@@ -65004,16 +65462,18 @@ declare class OntologyExportClient {
|
|
|
65004
65462
|
* shapes.
|
|
65005
65463
|
*
|
|
65006
65464
|
* @param options - Export options: the base IRI for synthesized IRIs, the root
|
|
65007
|
-
* sort to restrict the export to, and the serialization to
|
|
65465
|
+
* sort (or sorts) to restrict the export to, and the serialization to
|
|
65466
|
+
* negotiate on.
|
|
65008
65467
|
* @returns The exported document, verbatim, with the media type the server
|
|
65009
65468
|
* answered with.
|
|
65010
65469
|
* @throws {BadRequestError} If the base IRI is invalid or the query is malformed.
|
|
65011
|
-
* @throws {NotFoundError} If
|
|
65470
|
+
* @throws {NotFoundError} If a requested root sort does not exist.
|
|
65012
65471
|
* @throws {ApiError} If the request otherwise fails.
|
|
65013
65472
|
*
|
|
65014
65473
|
* @remarks
|
|
65015
65474
|
* Each exported shape targets one sort and constrains its features. Omit `root`
|
|
65016
|
-
* to export the whole tenant schema
|
|
65475
|
+
* to export the whole tenant schema; pass an array to export the shapes of
|
|
65476
|
+
* several sub-lattices at once.
|
|
65017
65477
|
*
|
|
65018
65478
|
* `format` selects the `Accept` header: an RDF serialization yields an RDF
|
|
65019
65479
|
* document, and the default (`'json'`) yields the backend's JSON rendering of
|
|
@@ -65023,7 +65483,7 @@ declare class OntologyExportClient {
|
|
|
65023
65483
|
* ```typescript
|
|
65024
65484
|
* const shacl = await client.ontologyExport.exportShacl({ format: 'turtle' });
|
|
65025
65485
|
*
|
|
65026
|
-
* console.log(shacl.contentType); // 'text/turtle'
|
|
65486
|
+
* console.log(shacl.contentType); // 'text/turtle; charset=utf-8'
|
|
65027
65487
|
* console.log(shacl.document); // '... sh:NodeShape ...'
|
|
65028
65488
|
* ```
|
|
65029
65489
|
*/
|
|
@@ -66775,4 +67235,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
|
|
|
66775
67235
|
*/
|
|
66776
67236
|
declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
|
|
66777
67237
|
|
|
66778
|
-
export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, agui as Agui, type AguiEvent, type AguiMessage, type AguiRole, type AguiRunOptions, type AguiTool, type AiGroup, type AlcConcept, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, authz as Authz, type AuthzAction, type AuthzDryRunRequest, type AuthzDryRunResponse, type AuthzEffect, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, type CascadeOptions, type CatalogPage, causal as Causal, type CertificateDetail, chase as Chase, type ChaseArgDto, type ChaseAtomDto, type ChaseRunRequest, type ChaseRunResponse, type CheckDocumentRequest, type CheckDocumentResponse, type CheckFinding, type CheckSummary, type ClaimAssessment, type ClaimSubtype, type ClaimVerdict, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, coherence as Coherence, type CoherenceAnalyzeRequest, type CoherenceAnalyzeResponse, collections as Collections, communities as Communities, type CompareDocumentsRequest, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, conformance as Conformance, type ConformanceCheckResponse, type ConformanceRepairResponse, type ConformanceRequest, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, corpus as Corpus, type CorpusBridgesRequest, type CorpusBridgesResponse, type CorpusCommunitiesRequest, type CorpusCommunitiesResponse, type CorpusCrossCuttingRequest, type CorpusCrossCuttingResponse, type CorpusScope, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type CtlFormula, dl as DL, type DataGroup, discovery as Discovery, type DlSatisfiableRequest, type DlSatisfiableResponse, type DlSubsumesRequest, type DlSubsumesResponse, documentCheck as DocumentCheck, documents as Documents, type EqLiteralDto, type EqualityAtomDto, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, type FindingKind, type FindingSeverity, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, forecast as Forecast, type ForecastDomain, type ForecastDomainsResponse, type ForecastEntityInput, type ForecastRequest, type ForecastResponse, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, type GraphSparqlQueryRequest, type GraphSparqlResults, guardrail as Guardrail, type GuardrailReport, type GuardrailRequest, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type InlineDocument, type InstallList, type InstallPluginRequest, type InstallPluginResponse, type InstallState, type InstallSummary, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, type KripkeState, type KripkeTransition, LP, ltn as LTN, type ListCatalogParams, type ListConversationsResponse, type ListInstallsParams, type ListResearchSessionsResponse, type LtnInstance, type LtnQueryRequest, type LtnQueryResponse, type LtnRefuteRequest, type LtnRefuteResponse, type LtnRule, type LtnTrainRequest, type LtnTrainResponse, type LubRequest, type LubResponse, marketplace as Marketplace, type MarketplaceScope, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyExport as OntologyExport, type OntologyExportDocument, type OntologyExportFormat, type OntologyExportOptions, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, osfDiff as OsfDiff, type OsfDiffReport, type OsfDiffRequest, type OsfDiffResponse, type OsfDiffSelector, type OsfDiffSequenceReport, type OsfDiffSequenceRequest, type OsfDiffSequenceResponse, type OsfDiffTemporalRequest, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, type PluginDependency, type PluginDetail, type PluginManifest, type PluginSummary, type PluginVersion, preferences as Preferences, proofEngine as ProofEngine, propertyGraph as PropertyGraph, type PropertyGraphErrorResponse, type PropertyGraphExecuteResponse, type PropertyGraphQueryRequest, type PropertyGraphTranslateResponse, type PropertyGraphValue, type PsiTermDto, type PsiTermInput, type PublishPluginRequest, type PublishPluginResponse, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionSummaryDto, type ResolvedCoreferenceDto, reviews as Reviews, row as Row, type RunAgentRequest, SDK_VERSION, sat as Sat, type SatLiteralDto, type SatSolveRequest, type SatSolveResponse, type SatVerdict, scenarios as Scenarios, scheduling as Scheduling, type SearchCatalogRequest, type SearchCatalogResponse, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, type SimpleTgdDto, smt as Smt, type SmtCheckRequest, type SmtCheckResponse, type SmtFunctionApplicationDto, type SmtVerdict, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, sparql as Sparql, type SparqlAskResults, type SparqlBindingSet, type SparqlEntailmentRegime, type SparqlQueryRequest, type SparqlQueryResults, type SparqlRdfTerm, type SparqlSelectResults, type SparqlTranslation, type SparqlUpdateRequest, type SparqlUpdateTranslation, statistical as Statistical, synthetic as Synthetic, type SystemGroup, temporal as Temporal, type TemporalModelCheckRequest, type TemporalModelCheckResponse, type TemporalSeriesRequest, type TemporalSeriesResponse, type TemporalSeriesSpec, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, type TermSetSelector, terms as Terms, TimeoutError, type TurnDto, ui as UI, type UpdateTermRequest, type UpgradeInstallRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, type YankPluginRequest, type YankPluginResponse, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
|
|
67238
|
+
export { ANY_ROLE, actionReviews as ActionReviews, actions as Actions, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, agui as Agui, type AguiContextItem, type AguiEvent, type AguiFunctionCall, type AguiMessage, type AguiRole, type AguiRunOptions, type AguiTool, type AguiToolCall, type AiGroup, type AlcConcept, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type ArithmeticOp, type AuthConfig, AuthenticationError, authz as Authz, type AuthzAction, type AuthzDryRunRequest, type AuthzDryRunResponse, type AuthzEffect, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, type CascadeOptions, type CatalogPage, causal as Causal, type CertificateDetail, chase as Chase, type ChaseArgDto, type ChaseAtomDto, type ChaseRunRequest, type ChaseRunResponse, type CheckDocumentRequest, type CheckDocumentResponse, type CheckFinding, type CheckSummary, type ClaimAssessment, type ClaimCitation, type ClaimSubtype, type ClaimVerdict, type ClassifyEdgesInput, type ClassifyEdgesVars, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, type CognitiveStrategyDto, coherence as Coherence, type CoherenceAnalyzeRequest, type CoherenceAnalyzeResponse, collections as Collections, communities as Communities, type CompareDocumentsRequest, type ComparisonOp, compliance as Compliance, complianceMarkings as ComplianceMarkings, conformance as Conformance, type ConformanceCheckResponse, type ConformanceRepairResponse, type ConformanceRequest, type ConstrainedPlainVar, Constraint, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, corpus as Corpus, type CorpusBridgesRequest, type CorpusBridgesResponse, type CorpusCommunitiesRequest, type CorpusCommunitiesResponse, type CorpusCrossCuttingRequest, type CorpusCrossCuttingResponse, type CorpusScope, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type CtlFormula, dl as DL, type DataGroup, discovery as Discovery, type DlSatisfiableRequest, type DlSatisfiableResponse, type DlSubsumesRequest, type DlSubsumesResponse, documentCheck as DocumentCheck, documents as Documents, type EqLiteralDto, type EqualityAtomDto, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, feasibility as Feasibility, type FeatureInputValueDto, type FeatureValueDto, type FindingKind, type FindingSeverity, Flow, type FlowProblem as FlowBuilderProblem, type FlowEdgeInput, type FlowEdgeOptions, flowNetworks as FlowNetworks, type FlowNode, type FlowProblemInputBase, type FocusEntryDto, ForbiddenError, forecast as Forecast, type ForecastDomain, type ForecastDomainsResponse, type ForecastEntityInput, type ForecastRequest, type ForecastResponse, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, type GraphSparqlQueryRequest, type GraphSparqlResults, guardrail as Guardrail, type GuardrailReport, type GuardrailRequest, type GuardrailSummary, health as Health, homoiconic as Homoiconic, ilp as ILP, imageExtraction as ImageExtraction, inference as Inference, type IngestPaperRequest, type IngestPaperResponse, ingestion as Ingestion, IngestionFailedError, IngestionSession, type IngestionSyncOptions, type InlineDocument, type InstallList, type InstallPluginRequest, type InstallPluginResponse, type InstallState, type InstallSummary, type Interceptor, InternalServerError, type JsonValue$1 as JsonValue, type KripkeState, type KripkeTransition, LP, ltn as LTN, type ListCatalogParams, type ListConversationsResponse, type ListInstallsParams, type ListResearchSessionsResponse, type LtnInstance, type LtnQueryRequest, type LtnQueryResponse, type LtnRefuteRequest, type LtnRefuteResponse, type LtnRule, type LtnTrainRequest, type LtnTrainResponse, type LubRequest, type LubResponse, marketplace as Marketplace, type MarketplaceScope, type MaxFlowInput, type MaxFlowVars, type MinCostMaxFlowInput, type MinCostMaxFlowVars, type MinCutInput, type MinCutVars, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, ontologyAlignment as OntologyAlignment, ontologyBridge as OntologyBridge, ontologyExport as OntologyExport, type OntologyExportDocument, type OntologyExportFormat, type OntologyExportOptions, ontologyFacade as OntologyFacade, type Operand, operations as Operations, optimize as Optimize, osfDiff as OsfDiff, type OsfDiffReport, type OsfDiffRequest, type OsfDiffResponse, type OsfDiffSelector, type OsfDiffSequenceReport, type OsfDiffSequenceRequest, type OsfDiffSequenceResponse, type OsfDiffTemporalRequest, type OsfSearchRequest, type OsfSearchResponse, osfql as Osfql, type OsfqlRequest, type OsfqlResponse, type OsfqlValue, oversight as Oversight, type PaginationParams, type PaperMetadataDto, type PaperSource, type PlainFeatureMap, type PlainFeatureValue, plainValues as PlainValues, type PluginDependency, type PluginDetail, type PluginManifest, type PluginSummary, type PluginVersion, preferences as Preferences, proofEngine as ProofEngine, propertyGraph as PropertyGraph, type PropertyGraphErrorResponse, type PropertyGraphExecuteResponse, type PropertyGraphQueryRequest, type PropertyGraphTranslateResponse, type PropertyGraphValue, type PsiTermDto, type PsiTermInput, type PublishPluginRequest, type PublishPluginResponse, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type ReasoningStageDto, type ReasoningTraceDto, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, type ResearchSessionSummaryDto, type ResolvedCoreferenceDto, reviews as Reviews, row as Row, type RuleAggregatorDto, type RunAgentRequest, SDK_VERSION, sat as Sat, type SatLiteralDto, type SatSolveRequest, type SatSolveResponse, type SatVerdict, scenarios as Scenarios, scheduling as Scheduling, type SearchCatalogRequest, type SearchCatalogResponse, type SearchPapersRequest, type SearchPapersResponse, type SessionGraphDto, type SimpleTgdDto, smt as Smt, type SmtCheckRequest, type SmtCheckResponse, type SmtFunctionApplicationDto, type SmtVerdict, solver as Solver, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, sparql as Sparql, type SparqlAskResults, type SparqlBindingSet, type SparqlEntailmentRegime, type SparqlQueryRequest, type SparqlQueryResults, type SparqlRdfTerm, type SparqlSelectResults, type SparqlTranslation, type SparqlUpdateRequest, type SparqlUpdateTranslation, statistical as Statistical, synthetic as Synthetic, type SystemGroup, temporal as Temporal, type TemporalModelCheckRequest, type TemporalModelCheckResponse, type TemporalSeriesRequest, type TemporalSeriesResponse, type TemporalSeriesSpec, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, type TermSetSelector, terms as Terms, TimeoutError, type TurnDto, ui as UI, type UpdateTermRequest, type UpgradeInstallRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, verification as Verification, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, type YankPluginRequest, type YankPluginResponse, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
|