@kortexya/reasoninglayer 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +892 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2026 -13
- package/dist/index.d.ts +2026 -13
- package/dist/index.js +890 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -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.0
|
|
112
|
+
declare const SDK_VERSION = "1.2.0";
|
|
113
113
|
/**
|
|
114
114
|
* Authentication mode for the SDK.
|
|
115
115
|
*
|
|
@@ -605,6 +605,12 @@ interface AddPendingReviewResponse {
|
|
|
605
605
|
}
|
|
606
606
|
/** Request to add a rule (a term with antecedents). */
|
|
607
607
|
interface AddRuleRequest$1 {
|
|
608
|
+
/**
|
|
609
|
+
* Optional engine-side aggregator declared on the rule head.
|
|
610
|
+
* When present, the rule's head term receives an `"aggregator"` feature
|
|
611
|
+
* containing a serialized `RuleAggregator` descriptor.
|
|
612
|
+
*/
|
|
613
|
+
aggregator?: null | RuleAggregatorDto;
|
|
608
614
|
/**
|
|
609
615
|
* Antecedent terms (body of the rule)
|
|
610
616
|
* These go into the `when` feature
|
|
@@ -801,6 +807,51 @@ interface AlignmentStatsDto {
|
|
|
801
807
|
*/
|
|
802
808
|
entities_unaligned: number;
|
|
803
809
|
}
|
|
810
|
+
/** Request body for `POST /api/v1/operations/anti-unify`. */
|
|
811
|
+
interface AntiUnifyRequest$1 {
|
|
812
|
+
/**
|
|
813
|
+
* First Ψ-term id; must already be registered in the tenant's
|
|
814
|
+
* term store.
|
|
815
|
+
* @format uuid
|
|
816
|
+
*/
|
|
817
|
+
term1_id: string;
|
|
818
|
+
/**
|
|
819
|
+
* Second Ψ-term id; must already be registered in the tenant's
|
|
820
|
+
* term store.
|
|
821
|
+
* @format uuid
|
|
822
|
+
*/
|
|
823
|
+
term2_id: string;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Response from anti-unification.
|
|
827
|
+
*
|
|
828
|
+
* The engine creates the LGG term inside the tenant's term store and
|
|
829
|
+
* returns its id; the full enriched [`TermDto`] is included so
|
|
830
|
+
* callers can inspect features and free variables in a single
|
|
831
|
+
* round-trip.
|
|
832
|
+
*/
|
|
833
|
+
interface AntiUnifyResponse$1 {
|
|
834
|
+
/**
|
|
835
|
+
* Computation time in milliseconds (engine + lock acquisition).
|
|
836
|
+
* @format int64
|
|
837
|
+
* @min 0
|
|
838
|
+
*/
|
|
839
|
+
computation_time_ms: number;
|
|
840
|
+
/** Full enriched view of the LGG term (sort, features, references). */
|
|
841
|
+
lgg: TermDto$1;
|
|
842
|
+
/**
|
|
843
|
+
* Id of the newly-created LGG term.
|
|
844
|
+
* @format uuid
|
|
845
|
+
*/
|
|
846
|
+
lgg_term_id: string;
|
|
847
|
+
}
|
|
848
|
+
interface AppendRequest$1 {
|
|
849
|
+
data_versions?: Record<string, string>;
|
|
850
|
+
extra?: Record<string, any>;
|
|
851
|
+
request_hash: string;
|
|
852
|
+
request_path: string;
|
|
853
|
+
response_hash: string;
|
|
854
|
+
}
|
|
804
855
|
/** Request to append residuations during unification */
|
|
805
856
|
interface AppendResiduationsRequest$1 {
|
|
806
857
|
session_id: string;
|
|
@@ -1131,6 +1182,30 @@ interface AttestationDto$1 {
|
|
|
1131
1182
|
/** Human-readable verification description */
|
|
1132
1183
|
verification_details: string;
|
|
1133
1184
|
}
|
|
1185
|
+
/**
|
|
1186
|
+
* One immutable, hash-chained audit record.
|
|
1187
|
+
*
|
|
1188
|
+
* Field order matters for hashing: serialisation is via `serde_json`
|
|
1189
|
+
* with sorted keys, so insertion order is irrelevant — only the field
|
|
1190
|
+
* *names* drive the canonical JSON layout.
|
|
1191
|
+
*/
|
|
1192
|
+
interface AuditRecord$1 {
|
|
1193
|
+
actor?: null | UserId;
|
|
1194
|
+
data_versions: Record<string, string>;
|
|
1195
|
+
extra: Record<string, object>;
|
|
1196
|
+
git_revision: string;
|
|
1197
|
+
id: AuditRecordId;
|
|
1198
|
+
prev_hash: string;
|
|
1199
|
+
record_hash: string;
|
|
1200
|
+
request_hash: string;
|
|
1201
|
+
request_path: string;
|
|
1202
|
+
response_hash: string;
|
|
1203
|
+
tenant_id: TenantId;
|
|
1204
|
+
/** @format date-time */
|
|
1205
|
+
timestamp: string;
|
|
1206
|
+
}
|
|
1207
|
+
/** @format uuid */
|
|
1208
|
+
type AuditRecordId = string;
|
|
1134
1209
|
/** An augmentation target identified by calibration. */
|
|
1135
1210
|
interface AugmentationTargetDto$1 {
|
|
1136
1211
|
/** Specific feature (if feature-level target). */
|
|
@@ -1155,6 +1230,24 @@ interface AugmentationTargetDto$1 {
|
|
|
1155
1230
|
/** Sort name. */
|
|
1156
1231
|
sort_name: string;
|
|
1157
1232
|
}
|
|
1233
|
+
/** Trace entry for a single fired knowledge axiom. */
|
|
1234
|
+
interface AxiomFiringDto {
|
|
1235
|
+
/**
|
|
1236
|
+
* Combined antecedent truth (product t-norm over antecedent gates).
|
|
1237
|
+
* @format double
|
|
1238
|
+
*/
|
|
1239
|
+
antecedent_truth: number;
|
|
1240
|
+
/**
|
|
1241
|
+
* Reichenbach satisfaction `1 − a + a · c`.
|
|
1242
|
+
* @format double
|
|
1243
|
+
*/
|
|
1244
|
+
reichenbach_satisfaction: number;
|
|
1245
|
+
/**
|
|
1246
|
+
* The rule that fired.
|
|
1247
|
+
* @format uuid
|
|
1248
|
+
*/
|
|
1249
|
+
rule_id: string;
|
|
1250
|
+
}
|
|
1158
1251
|
/** Request to backtrack to a marker or most recent choice point */
|
|
1159
1252
|
interface BacktrackRequest {
|
|
1160
1253
|
/**
|
|
@@ -1675,6 +1768,32 @@ interface BoundConstraintDto$1 {
|
|
|
1675
1768
|
/** Target feature name that will be constrained */
|
|
1676
1769
|
target: string;
|
|
1677
1770
|
}
|
|
1771
|
+
/** Request: diff two MVCC branches of the tenant's term store. */
|
|
1772
|
+
interface BranchDiffRequest {
|
|
1773
|
+
/** Source branch (the "before"). */
|
|
1774
|
+
branch_a: string;
|
|
1775
|
+
/** Target branch (the "after"). */
|
|
1776
|
+
branch_b: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* Cap the number of changed terms to render.
|
|
1779
|
+
* @format int32
|
|
1780
|
+
* @min 0
|
|
1781
|
+
*/
|
|
1782
|
+
limit?: number;
|
|
1783
|
+
}
|
|
1784
|
+
interface BranchDiffResponse {
|
|
1785
|
+
/** @min 0 */
|
|
1786
|
+
added_count: number;
|
|
1787
|
+
/** @min 0 */
|
|
1788
|
+
changed_count: number;
|
|
1789
|
+
/**
|
|
1790
|
+
* `VisualizationGraph` with each node carrying
|
|
1791
|
+
* `properties.diff = "added" | "removed" | "changed"`.
|
|
1792
|
+
*/
|
|
1793
|
+
graph: VisualizationGraphDto$1;
|
|
1794
|
+
/** @min 0 */
|
|
1795
|
+
removed_count: number;
|
|
1796
|
+
}
|
|
1678
1797
|
/** Request to broadcast a message to all agents. */
|
|
1679
1798
|
interface BroadcastMessageRequest$1 {
|
|
1680
1799
|
/** Message content (arbitrary JSON) */
|
|
@@ -2052,6 +2171,16 @@ interface CandidateMatchDto$1 {
|
|
|
2052
2171
|
*/
|
|
2053
2172
|
term_id: string;
|
|
2054
2173
|
}
|
|
2174
|
+
interface CaptureSnapshotRequest$1 {
|
|
2175
|
+
/** @format date-time */
|
|
2176
|
+
captured_after?: string | null;
|
|
2177
|
+
/**
|
|
2178
|
+
* @format int32
|
|
2179
|
+
* @min 0
|
|
2180
|
+
*/
|
|
2181
|
+
max_entries?: number | null;
|
|
2182
|
+
request_path_pattern: string;
|
|
2183
|
+
}
|
|
2055
2184
|
/** Request to check if one variable is a causal ancestor of another */
|
|
2056
2185
|
interface CausalAncestorRequest$1 {
|
|
2057
2186
|
/** The potential ancestor variable */
|
|
@@ -2496,6 +2625,19 @@ interface CollectionResponse {
|
|
|
2496
2625
|
/** Collection DTO */
|
|
2497
2626
|
collection: CollectionDto$1;
|
|
2498
2627
|
}
|
|
2628
|
+
/**
|
|
2629
|
+
* Request body for `POST /api/v1/flow-networks/{id}/commit` —
|
|
2630
|
+
* structural mutations applied in a single atomic step.
|
|
2631
|
+
*/
|
|
2632
|
+
interface CommitFlowNetworkRequest$1 {
|
|
2633
|
+
/**
|
|
2634
|
+
* Edges to append. Source/destination must reference declared
|
|
2635
|
+
* nodes.
|
|
2636
|
+
*/
|
|
2637
|
+
add_edges?: FlowEdgeDto[];
|
|
2638
|
+
/** Capacity updates keyed by edge label. */
|
|
2639
|
+
update_capacities?: EdgeCapacityUpdateDto[];
|
|
2640
|
+
}
|
|
2499
2641
|
/** Request to commit to an alternative */
|
|
2500
2642
|
interface CommitRequest$1 {
|
|
2501
2643
|
/**
|
|
@@ -3155,6 +3297,44 @@ interface CopyTermResponse {
|
|
|
3155
3297
|
copy_mode: CopyModeDto$1;
|
|
3156
3298
|
original_term_id: string;
|
|
3157
3299
|
}
|
|
3300
|
+
/**
|
|
3301
|
+
* One coreference group — a target Ψ-term that appears as the value
|
|
3302
|
+
* of multiple `(term, feature)` source-pairs in the rendered subgraph.
|
|
3303
|
+
*/
|
|
3304
|
+
interface CoreferenceGroupDto {
|
|
3305
|
+
/**
|
|
3306
|
+
* Distinguishes Aït-Kaci's strict coreference (Reference-typed
|
|
3307
|
+
* feature pointing at the same Ψ-term across positions) from
|
|
3308
|
+
* looser shared-value clustering (multiple terms ground to the
|
|
3309
|
+
* same scalar/typed value). The strict variant satisfies the
|
|
3310
|
+
* OSF identity ↤ relation; the loose variant is a useful
|
|
3311
|
+
* dataviz signal but not strictly a variable in the OSF sense.
|
|
3312
|
+
*/
|
|
3313
|
+
kind?: string;
|
|
3314
|
+
/** All `(term, feature_name)` pairs that hold this reference. */
|
|
3315
|
+
references: CoreferenceSourceDto[];
|
|
3316
|
+
/**
|
|
3317
|
+
* Visual tag (e.g. "X1", "X2") for this group — clients can label
|
|
3318
|
+
* both ends of an identity edge with this string to mirror
|
|
3319
|
+
* Aït-Kaci's `t1 ⊓ X = t2 ⊓ X` notation.
|
|
3320
|
+
*/
|
|
3321
|
+
tag: string;
|
|
3322
|
+
/**
|
|
3323
|
+
* The shared target term id (the same Ψ-term every source points at).
|
|
3324
|
+
* @format uuid
|
|
3325
|
+
*/
|
|
3326
|
+
target_term_id: string;
|
|
3327
|
+
}
|
|
3328
|
+
/** One `(term, feature)` pair contributing to a coreference group. */
|
|
3329
|
+
interface CoreferenceSourceDto {
|
|
3330
|
+
/** The feature name on that term whose value is the shared target. */
|
|
3331
|
+
feature_name: string;
|
|
3332
|
+
/**
|
|
3333
|
+
* The Ψ-term that owns the feature.
|
|
3334
|
+
* @format uuid
|
|
3335
|
+
*/
|
|
3336
|
+
term_id: string;
|
|
3337
|
+
}
|
|
3158
3338
|
/** Request to correct an entity before approval */
|
|
3159
3339
|
interface CorrectEntityRequest$1 {
|
|
3160
3340
|
/** Corrected features */
|
|
@@ -3329,6 +3509,22 @@ interface CreateExecutionSessionRequest$1 {
|
|
|
3329
3509
|
/** @format uuid */
|
|
3330
3510
|
tenant_id: string;
|
|
3331
3511
|
}
|
|
3512
|
+
/** Request body for `POST /api/v1/flow-networks`. */
|
|
3513
|
+
interface CreateFlowNetworkRequest$1 {
|
|
3514
|
+
/**
|
|
3515
|
+
* Optional human-readable description. Stored only as part of the
|
|
3516
|
+
* response for inspection convenience.
|
|
3517
|
+
*/
|
|
3518
|
+
description?: string | null;
|
|
3519
|
+
/** Initial edges. Order is preserved in inspection responses. */
|
|
3520
|
+
edges: FlowEdgeDto[];
|
|
3521
|
+
/** Node names. Must be unique. */
|
|
3522
|
+
nodes: string[];
|
|
3523
|
+
/** Sink node name. Must appear in `nodes`, distinct from `source`. */
|
|
3524
|
+
sink: string;
|
|
3525
|
+
/** Source node name. Must appear in `nodes`. */
|
|
3526
|
+
source: string;
|
|
3527
|
+
}
|
|
3332
3528
|
/**
|
|
3333
3529
|
* Request to create and persist a goal.
|
|
3334
3530
|
*
|
|
@@ -3503,6 +3699,13 @@ interface CreateSortRequest$1 {
|
|
|
3503
3699
|
name?: string;
|
|
3504
3700
|
/** Parent sort IDs */
|
|
3505
3701
|
parents?: string[];
|
|
3702
|
+
/**
|
|
3703
|
+
* Existential witnesses — proof obligations a term must discharge to
|
|
3704
|
+
* belong to this sort. Each entry is a JSON `ExistentialWitness`
|
|
3705
|
+
* (variables, constraints, certainty). When witness validation
|
|
3706
|
+
* cannot conclude immediately the term is residuated.
|
|
3707
|
+
*/
|
|
3708
|
+
witnesses?: object[];
|
|
3506
3709
|
}
|
|
3507
3710
|
/** Request to create a new computation space */
|
|
3508
3711
|
interface CreateSpaceRequest$1 {
|
|
@@ -3528,6 +3731,16 @@ interface CreateStoreTermRequest$1 {
|
|
|
3528
3731
|
interface CreateTermRequest$1 {
|
|
3529
3732
|
/** Features map */
|
|
3530
3733
|
features: Record<string, ValueDto$1>;
|
|
3734
|
+
/**
|
|
3735
|
+
* Optional client-supplied TermId. When present, the term is created
|
|
3736
|
+
* with that id; if a term with that id already exists in the tenant,
|
|
3737
|
+
* the handler returns 200 with the existing term instead of 409 —
|
|
3738
|
+
* re-runs of an idempotent seed script become safe.
|
|
3739
|
+
*
|
|
3740
|
+
* When absent, the server allocates a fresh UUID.
|
|
3741
|
+
* @format uuid
|
|
3742
|
+
*/
|
|
3743
|
+
id?: string | null;
|
|
3531
3744
|
/**
|
|
3532
3745
|
* Owner ID
|
|
3533
3746
|
* @format uuid
|
|
@@ -3941,6 +4154,59 @@ interface DereferenceResponse$1 {
|
|
|
3941
4154
|
is_bound: boolean;
|
|
3942
4155
|
original_id: string;
|
|
3943
4156
|
}
|
|
4157
|
+
/**
|
|
4158
|
+
* Request for the forward-chain derivation visualization.
|
|
4159
|
+
*
|
|
4160
|
+
* Runs the homoiconic forward chainer with provenance enabled, then
|
|
4161
|
+
* emits a meta-hypergraph: one node per Ψ-term (input fact, rule, or
|
|
4162
|
+
* derived fact); one hyperedge per rule application grouping
|
|
4163
|
+
* (rule, antecedents..., produced_fact). Aggregate contributors are
|
|
4164
|
+
* included on the same hyperedge when present.
|
|
4165
|
+
*/
|
|
4166
|
+
interface DerivationVisualizationRequest {
|
|
4167
|
+
/**
|
|
4168
|
+
* Restrict the rendered subgraph to the ancestors of these
|
|
4169
|
+
* terms (transitive provenance closure). When empty, the full
|
|
4170
|
+
* derivation lattice is returned.
|
|
4171
|
+
*/
|
|
4172
|
+
focus_term_ids?: string[];
|
|
4173
|
+
/**
|
|
4174
|
+
* Whether to include aggregate-contributor edges on each step.
|
|
4175
|
+
* Defaults to true.
|
|
4176
|
+
*/
|
|
4177
|
+
include_aggregates?: boolean;
|
|
4178
|
+
/**
|
|
4179
|
+
* Cap on chainer iterations. Defaults to 100.
|
|
4180
|
+
* @format int32
|
|
4181
|
+
* @min 0
|
|
4182
|
+
*/
|
|
4183
|
+
max_iterations?: number;
|
|
4184
|
+
}
|
|
4185
|
+
/** Response for derivation-lattice visualization. */
|
|
4186
|
+
interface DerivationVisualizationResponse {
|
|
4187
|
+
/**
|
|
4188
|
+
* Number of derived (non-input) facts in the trace.
|
|
4189
|
+
* @min 0
|
|
4190
|
+
*/
|
|
4191
|
+
derived_count: number;
|
|
4192
|
+
/**
|
|
4193
|
+
* Whether the chainer reached a fixpoint (true) or hit
|
|
4194
|
+
* max_iterations (false).
|
|
4195
|
+
*/
|
|
4196
|
+
fixpoint_reached: boolean;
|
|
4197
|
+
/** The derivation graph (meta-hypergraph over Ψ-terms). */
|
|
4198
|
+
graph: VisualizationGraphDto$1;
|
|
4199
|
+
/**
|
|
4200
|
+
* Number of forward-chainer iterations the trace covers.
|
|
4201
|
+
* @min 0
|
|
4202
|
+
*/
|
|
4203
|
+
iterations: number;
|
|
4204
|
+
/**
|
|
4205
|
+
* Number of distinct rule applications recorded.
|
|
4206
|
+
* @min 0
|
|
4207
|
+
*/
|
|
4208
|
+
rule_application_count: number;
|
|
4209
|
+
}
|
|
3944
4210
|
/** Request for derived inference (Phase 4). */
|
|
3945
4211
|
interface DerivedInferenceRequest$1 {
|
|
3946
4212
|
/** Pairs of feature vectors for inference. */
|
|
@@ -4780,6 +5046,25 @@ interface DriveDto$1 {
|
|
|
4780
5046
|
/** Drive type (curiosity, competence, social, autonomy) */
|
|
4781
5047
|
drive_type: string;
|
|
4782
5048
|
}
|
|
5049
|
+
/** Loss weighting (paper eq. 4) — `data_weight + knowledge_weight = 1.0`. */
|
|
5050
|
+
interface DualWeightedLossDto {
|
|
5051
|
+
/**
|
|
5052
|
+
* Weight on the data-axiom satisfaction.
|
|
5053
|
+
* @format double
|
|
5054
|
+
*/
|
|
5055
|
+
data_weight: number;
|
|
5056
|
+
/**
|
|
5057
|
+
* Weight on the knowledge-axiom satisfaction.
|
|
5058
|
+
* @format double
|
|
5059
|
+
*/
|
|
5060
|
+
knowledge_weight: number;
|
|
5061
|
+
/**
|
|
5062
|
+
* `p` parameter for the `pMeanError` aggregator.
|
|
5063
|
+
* @format int32
|
|
5064
|
+
* @min 0
|
|
5065
|
+
*/
|
|
5066
|
+
p_aggregator: number;
|
|
5067
|
+
}
|
|
4783
5068
|
/** Request for dynamic sort addition (Phase 6). */
|
|
4784
5069
|
interface DynamicAddSortRequest$1 {
|
|
4785
5070
|
/** Feature names associated with this sort. */
|
|
@@ -5009,8 +5294,37 @@ interface E2ETrainingResponse$1 {
|
|
|
5009
5294
|
/** Whether E2E training was triggered successfully. */
|
|
5010
5295
|
triggered: boolean;
|
|
5011
5296
|
}
|
|
5297
|
+
/** Replace the capacity of a labelled edge. */
|
|
5298
|
+
interface EdgeCapacityUpdateDto {
|
|
5299
|
+
/**
|
|
5300
|
+
* New capacity (must be ≥ 0).
|
|
5301
|
+
* @format int64
|
|
5302
|
+
*/
|
|
5303
|
+
capacity: number;
|
|
5304
|
+
/** Edge label declared at construction or via a prior commit. */
|
|
5305
|
+
label: string;
|
|
5306
|
+
}
|
|
5307
|
+
/** Flow snapshot for a single forward edge. */
|
|
5308
|
+
interface EdgeFlowDto {
|
|
5309
|
+
/**
|
|
5310
|
+
* Original capacity.
|
|
5311
|
+
* @format int64
|
|
5312
|
+
*/
|
|
5313
|
+
capacity: number;
|
|
5314
|
+
/**
|
|
5315
|
+
* Flow currently routed through this edge in the solver's output.
|
|
5316
|
+
* @format int64
|
|
5317
|
+
*/
|
|
5318
|
+
flow: number;
|
|
5319
|
+
/** Source node name. */
|
|
5320
|
+
from: string;
|
|
5321
|
+
/** Caller-supplied label, if any. */
|
|
5322
|
+
label?: string | null;
|
|
5323
|
+
/** Destination node name. */
|
|
5324
|
+
to: string;
|
|
5325
|
+
}
|
|
5012
5326
|
/** Edge type in the graph */
|
|
5013
|
-
type EdgeTypeDto$1 = "subtype" | "multiple_inheritance" | "glb_path" | "lub_path" | "constraint_dependency" | "propagation" | "feature" | "coreference" | "trigger_dependency" | "relation_source" | "relation_target" | {
|
|
5327
|
+
type EdgeTypeDto$1 = "subtype" | "multiple_inheritance" | "glb_path" | "lub_path" | "constraint_dependency" | "propagation" | "feature" | "coreference" | "trigger_dependency" | "relation_source" | "relation_target" | "identity" | "derivation" | {
|
|
5014
5328
|
custom: string;
|
|
5015
5329
|
};
|
|
5016
5330
|
/** FuzzyNumber shape for effect prediction response */
|
|
@@ -5331,6 +5645,24 @@ interface EpisodeStatsResponse$1 {
|
|
|
5331
5645
|
*/
|
|
5332
5646
|
total_episodes: number;
|
|
5333
5647
|
}
|
|
5648
|
+
/** Per-epoch training metrics. */
|
|
5649
|
+
interface EpochMetricsDto {
|
|
5650
|
+
/**
|
|
5651
|
+
* `pMeanError` over the data-axiom satisfactions (`K_D`).
|
|
5652
|
+
* @format double
|
|
5653
|
+
*/
|
|
5654
|
+
data_satisfaction: number;
|
|
5655
|
+
/**
|
|
5656
|
+
* `pMeanError` over the knowledge-axiom satisfactions (`K_K`).
|
|
5657
|
+
* @format double
|
|
5658
|
+
*/
|
|
5659
|
+
knowledge_satisfaction: number;
|
|
5660
|
+
/**
|
|
5661
|
+
* Dual-weighted loss `1 − ( w_D · K_D + w_K · K_K )`.
|
|
5662
|
+
* @format double
|
|
5663
|
+
*/
|
|
5664
|
+
total_loss: number;
|
|
5665
|
+
}
|
|
5334
5666
|
/** An equivalence class of sorts */
|
|
5335
5667
|
interface EquivalenceClass {
|
|
5336
5668
|
/**
|
|
@@ -6321,6 +6653,14 @@ interface FindBySortRequest$1 {
|
|
|
6321
6653
|
* returned. Omit or pass an empty map to disable filtering.
|
|
6322
6654
|
*/
|
|
6323
6655
|
filter?: object | null;
|
|
6656
|
+
/**
|
|
6657
|
+
* Optional cap on the number of returned terms. When set, the handler
|
|
6658
|
+
* truncates the post-filter result list to this many terms. Useful for
|
|
6659
|
+
* UI explain/combo paths that scan tens of evidence rows but never
|
|
6660
|
+
* need the full thousands. Omit (or 0) for no cap.
|
|
6661
|
+
* @min 0
|
|
6662
|
+
*/
|
|
6663
|
+
limit?: number | null;
|
|
6324
6664
|
/**
|
|
6325
6665
|
* Sort ID to search for (takes precedence over sort_name)
|
|
6326
6666
|
* @format uuid
|
|
@@ -6435,6 +6775,63 @@ interface FixSuggestionDto$1 {
|
|
|
6435
6775
|
/** Type of fix (e.g., "add_fact", "modify_feature", "narrow_sort", "add_rule") */
|
|
6436
6776
|
fix_type?: string | null;
|
|
6437
6777
|
}
|
|
6778
|
+
/** Strategy chosen at solve time. */
|
|
6779
|
+
type FlowAlgorithmDto = {
|
|
6780
|
+
kind: "max_flow";
|
|
6781
|
+
} | {
|
|
6782
|
+
kind: "min_cost_max_flow";
|
|
6783
|
+
} | {
|
|
6784
|
+
kind: "classify_edges";
|
|
6785
|
+
} | {
|
|
6786
|
+
kind: "classify_edges_optimal";
|
|
6787
|
+
} | {
|
|
6788
|
+
kind: "min_cut";
|
|
6789
|
+
};
|
|
6790
|
+
/** A single directed edge specification. */
|
|
6791
|
+
interface FlowEdgeDto {
|
|
6792
|
+
/**
|
|
6793
|
+
* Capacity (must be ≥ 0).
|
|
6794
|
+
* @format int64
|
|
6795
|
+
*/
|
|
6796
|
+
capacity: number;
|
|
6797
|
+
/**
|
|
6798
|
+
* Optional per-unit-flow cost. Defaults to zero — pure max-flow
|
|
6799
|
+
* algorithms ignore this field.
|
|
6800
|
+
* @format int64
|
|
6801
|
+
*/
|
|
6802
|
+
cost?: number | null;
|
|
6803
|
+
/** Source node name. */
|
|
6804
|
+
from: string;
|
|
6805
|
+
/**
|
|
6806
|
+
* Optional caller-supplied label. Must be unique. Used to
|
|
6807
|
+
* reference the edge in `commit` requests and to identify it in
|
|
6808
|
+
* solver output.
|
|
6809
|
+
*/
|
|
6810
|
+
label?: string | null;
|
|
6811
|
+
/** Destination node name. */
|
|
6812
|
+
to: string;
|
|
6813
|
+
}
|
|
6814
|
+
/** Status snapshot returned by every endpoint that does not solve. */
|
|
6815
|
+
interface FlowNetworkResponse$1 {
|
|
6816
|
+
/** Optional description echoed from the create request. */
|
|
6817
|
+
description?: string | null;
|
|
6818
|
+
/**
|
|
6819
|
+
* Number of declared forward edges.
|
|
6820
|
+
* @min 0
|
|
6821
|
+
*/
|
|
6822
|
+
edge_count: number;
|
|
6823
|
+
/** Stable identifier assigned at creation; clones receive a new id. */
|
|
6824
|
+
id: string;
|
|
6825
|
+
/**
|
|
6826
|
+
* Number of declared nodes.
|
|
6827
|
+
* @min 0
|
|
6828
|
+
*/
|
|
6829
|
+
node_count: number;
|
|
6830
|
+
/** Sink node name. */
|
|
6831
|
+
sink: string;
|
|
6832
|
+
/** Source node name. */
|
|
6833
|
+
source: string;
|
|
6834
|
+
}
|
|
6438
6835
|
/** Request for forall */
|
|
6439
6836
|
interface ForallRequest$1 {
|
|
6440
6837
|
/** Generator goal that produces solutions */
|
|
@@ -6701,6 +7098,33 @@ type FunctionValueDto$1 = {
|
|
|
6701
7098
|
} | {
|
|
6702
7099
|
type: "Uninstantiated";
|
|
6703
7100
|
};
|
|
7101
|
+
/**
|
|
7102
|
+
* Request: render the LIFE-function definitions in the tenant's
|
|
7103
|
+
* term store.
|
|
7104
|
+
*/
|
|
7105
|
+
interface FunctionsVisualizationRequest {
|
|
7106
|
+
/**
|
|
7107
|
+
* Maximum number of functions to render.
|
|
7108
|
+
* @format int32
|
|
7109
|
+
* @min 0
|
|
7110
|
+
*/
|
|
7111
|
+
limit?: number;
|
|
7112
|
+
/** Optional: restrict to functions matching this name prefix. */
|
|
7113
|
+
name_prefix?: string | null;
|
|
7114
|
+
}
|
|
7115
|
+
interface FunctionsVisualizationResponse {
|
|
7116
|
+
/**
|
|
7117
|
+
* Number of functions surfaced.
|
|
7118
|
+
* @min 0
|
|
7119
|
+
*/
|
|
7120
|
+
function_count: number;
|
|
7121
|
+
/**
|
|
7122
|
+
* Function definitions as a Ψ-term hyperedge graph: each
|
|
7123
|
+
* function becomes a hyperedge whose corners are head + body
|
|
7124
|
+
* + each equation, color-distinguished by role.
|
|
7125
|
+
*/
|
|
7126
|
+
graph: VisualizationGraphDto$1;
|
|
7127
|
+
}
|
|
6704
7128
|
/** Request for fuzzy merge operation */
|
|
6705
7129
|
interface FuzzyMergeRequest$1 {
|
|
6706
7130
|
/**
|
|
@@ -7875,6 +8299,64 @@ interface GoalSummaryDto$1 {
|
|
|
7875
8299
|
*/
|
|
7876
8300
|
min_degree?: number | null;
|
|
7877
8301
|
}
|
|
8302
|
+
/**
|
|
8303
|
+
* Request: render the graded-poset structure of the tenant's sort
|
|
8304
|
+
* hierarchy. Each sort becomes a poset element; dimension = depth
|
|
8305
|
+
* from root (Top); coverings = parent→child relationships.
|
|
8306
|
+
*
|
|
8307
|
+
* Surfaces the boundary B(σ) and coboundary C(σ) sets per element
|
|
8308
|
+
* as `properties.boundary` / `properties.coboundary` strings, plus
|
|
8309
|
+
* emits 4-adjacency edges (lower / upper N↑/N↓) when requested.
|
|
8310
|
+
*/
|
|
8311
|
+
interface GradedPosetRequest {
|
|
8312
|
+
/**
|
|
8313
|
+
* Include lower 4-adjacency edges (N↓): pairs (σ₁, σ₂) ∈ B(σ)
|
|
8314
|
+
* that share an element in B(σ₁) ∩ B(σ₂).
|
|
8315
|
+
*/
|
|
8316
|
+
include_lower_adjacencies?: boolean;
|
|
8317
|
+
/** Include upper 4-adjacency edges (N↑). */
|
|
8318
|
+
include_upper_adjacencies?: boolean;
|
|
8319
|
+
/**
|
|
8320
|
+
* Maximum sort elements to return (0 = unlimited). Default 500.
|
|
8321
|
+
* 4-adjacency on a 20k-sort hierarchy emits ~300k edges, which
|
|
8322
|
+
* is too much for in-browser layout — paginate to keep the UI
|
|
8323
|
+
* responsive.
|
|
8324
|
+
* @min 0
|
|
8325
|
+
*/
|
|
8326
|
+
limit?: number;
|
|
8327
|
+
/**
|
|
8328
|
+
* Skip this many sort elements (paired with `limit`).
|
|
8329
|
+
* @min 0
|
|
8330
|
+
*/
|
|
8331
|
+
offset?: number;
|
|
8332
|
+
}
|
|
8333
|
+
interface GradedPosetResponse {
|
|
8334
|
+
/** @min 0 */
|
|
8335
|
+
covering_count: number;
|
|
8336
|
+
/** @min 0 */
|
|
8337
|
+
element_count: number;
|
|
8338
|
+
/**
|
|
8339
|
+
* Poset rendering. Elements at dimension `n` get
|
|
8340
|
+
* `level=n`. Coverings are subtype edges; 4-adjacency edges
|
|
8341
|
+
* carry `edge_type=Custom("LowerAdjacency"|"UpperAdjacency")`.
|
|
8342
|
+
*/
|
|
8343
|
+
graph: VisualizationGraphDto$1;
|
|
8344
|
+
/** @min 0 */
|
|
8345
|
+
limit?: number;
|
|
8346
|
+
/**
|
|
8347
|
+
* Maximum dimension in the poset.
|
|
8348
|
+
* @min 0
|
|
8349
|
+
*/
|
|
8350
|
+
max_dimension: number;
|
|
8351
|
+
/** @min 0 */
|
|
8352
|
+
offset?: number;
|
|
8353
|
+
/**
|
|
8354
|
+
* Pagination: total elements available before offset/limit
|
|
8355
|
+
* applied. Drives "load next page" controls.
|
|
8356
|
+
* @min 0
|
|
8357
|
+
*/
|
|
8358
|
+
total_count?: number;
|
|
8359
|
+
}
|
|
7878
8360
|
/** An edge connecting two nodes */
|
|
7879
8361
|
interface GraphEdgeDto$1 {
|
|
7880
8362
|
/** Color of the edge (hex string) */
|
|
@@ -7976,6 +8458,7 @@ interface GroundTruthEntry$1 {
|
|
|
7976
8458
|
*/
|
|
7977
8459
|
term_id: string;
|
|
7978
8460
|
}
|
|
8461
|
+
type GroundTruthStatus$1 = "Pending" | "Validated" | "Refuted" | "Unknown";
|
|
7979
8462
|
/** Statistics for entity grounding (linking to external ontologies) */
|
|
7980
8463
|
interface GroundingStatsDto$1 {
|
|
7981
8464
|
/**
|
|
@@ -8094,7 +8577,7 @@ interface HyperedgeDto$1 {
|
|
|
8094
8577
|
source_term_id?: string | null;
|
|
8095
8578
|
}
|
|
8096
8579
|
/** Hyperedge type */
|
|
8097
|
-
type HyperedgeTypeDto$1 = "term_features" | "constraint_variables" | "unification_result" | {
|
|
8580
|
+
type HyperedgeTypeDto$1 = "term_features" | "constraint_variables" | "unification_result" | "coreference_group" | "derivation_step" | "aggregate" | "negation" | "entailment" | "bound_constraint" | "multiple_inheritance" | "refraction" | "fuzzy_belt" | "meta_rule" | "learned_rule" | {
|
|
8098
8581
|
custom: string;
|
|
8099
8582
|
};
|
|
8100
8583
|
/** Request for OSF term hypergraph visualization */
|
|
@@ -8103,7 +8586,21 @@ interface HypergraphRequest$1 {
|
|
|
8103
8586
|
generate_dot?: boolean;
|
|
8104
8587
|
/** Whether to include hyperedges */
|
|
8105
8588
|
include_hyperedges?: boolean;
|
|
8106
|
-
/**
|
|
8589
|
+
/**
|
|
8590
|
+
* When `true`, run the tagged forward chainer (probabilistic
|
|
8591
|
+
* semiring) on the visible subgraph and emit a per-term certainty
|
|
8592
|
+
* tag in the response's `provenance_tags`. Default false because
|
|
8593
|
+
* the chainer is O((n+m)·k) on rule count.
|
|
8594
|
+
*/
|
|
8595
|
+
include_provenance?: boolean;
|
|
8596
|
+
/**
|
|
8597
|
+
* Whether to include relation Psi-terms as intermediate hypergraph nodes.
|
|
8598
|
+
* Defaults to `true` — relation Ψ-terms (terms with source + target +
|
|
8599
|
+
* relation_type) are a first-class part of the term graph, and omitting
|
|
8600
|
+
* them by default leaves cross-entity links invisible to clients that
|
|
8601
|
+
* don't know they have to ask. Pass `false` to skip the scan when only
|
|
8602
|
+
* the per-term feature decomposition is needed.
|
|
8603
|
+
*/
|
|
8107
8604
|
include_relations?: boolean;
|
|
8108
8605
|
/**
|
|
8109
8606
|
* Maximum depth to traverse
|
|
@@ -8126,10 +8623,31 @@ interface HypergraphRequest$1 {
|
|
|
8126
8623
|
interface HypergraphResponse$1 {
|
|
8127
8624
|
/** S-connected components (if s_threshold > 0) */
|
|
8128
8625
|
components?: ComponentDto$1[];
|
|
8626
|
+
/**
|
|
8627
|
+
* Coreference groups: when multiple `(term, feature)` pairs point at
|
|
8628
|
+
* the same target Ψ-term via Reference values, those references
|
|
8629
|
+
* share an OSF-style tag (X). Aït-Kaci's Ψ-terms are graphs, not
|
|
8630
|
+
* trees — a renderer that draws each Reference as an independent
|
|
8631
|
+
* edge loses the identity. Each group is shipped with an auto-
|
|
8632
|
+
* generated visual tag so the client can label both endpoints.
|
|
8633
|
+
*/
|
|
8634
|
+
coreferences?: CoreferenceGroupDto[];
|
|
8129
8635
|
/** Degree distribution */
|
|
8130
8636
|
degree_distribution: DegreeDistributionDto$1;
|
|
8131
8637
|
/** The visualization graph */
|
|
8132
8638
|
graph: VisualizationGraphDto$1;
|
|
8639
|
+
/**
|
|
8640
|
+
* Provenance / certainty tag per visible Ψ-term, in `[0.0, 1.0]`.
|
|
8641
|
+
*
|
|
8642
|
+
* Encoded by the OSFKB `ProvenanceSemiring` — see
|
|
8643
|
+
* `crates/domain/src/types/provenance_semiring.rs`. Values are
|
|
8644
|
+
* best-effort: an asserted (root) fact yields `1.0`; a forward-
|
|
8645
|
+
* chained fact yields the tagged-FC certainty if the request
|
|
8646
|
+
* asks for it (`include_provenance: true`); otherwise defaults
|
|
8647
|
+
* to `1.0`. Renderers are expected to map this to polygon fill
|
|
8648
|
+
* opacity so audit-ability is visually obvious.
|
|
8649
|
+
*/
|
|
8650
|
+
provenance_tags?: Record<string, number>;
|
|
8133
8651
|
/** Statistics */
|
|
8134
8652
|
stats: HypergraphStats$1;
|
|
8135
8653
|
}
|
|
@@ -8828,6 +9346,13 @@ interface IngestionStatsDto$1 {
|
|
|
8828
9346
|
/** Token usage from LLM API calls during this ingestion */
|
|
8829
9347
|
token_usage?: TokenUsageDto$1;
|
|
8830
9348
|
}
|
|
9349
|
+
/** Inline Ψ-term feature payload for a single prediction. */
|
|
9350
|
+
interface InlineInferenceTermDto {
|
|
9351
|
+
/** Per-antecedent flat feature vectors. */
|
|
9352
|
+
antecedent_features: Record<string, number[]>;
|
|
9353
|
+
/** Temporal feature sequence for the conclusion gate. */
|
|
9354
|
+
temporal_features: TemporalSequenceDto;
|
|
9355
|
+
}
|
|
8831
9356
|
/** Outcome of an integrated cognitive cycle. */
|
|
8832
9357
|
interface IntegratedCycleOutcomeDto$1 {
|
|
8833
9358
|
/** Actions executed */
|
|
@@ -9211,6 +9736,15 @@ type KbChangeDto$1 = {
|
|
|
9211
9736
|
term2: string;
|
|
9212
9737
|
type: "Coreference";
|
|
9213
9738
|
};
|
|
9739
|
+
/** One labelled training Ψ-term. */
|
|
9740
|
+
interface LabelledTermDto {
|
|
9741
|
+
/** Per-antecedent flat feature vectors. */
|
|
9742
|
+
antecedent_features: Record<string, number[]>;
|
|
9743
|
+
/** Ground-truth label for the conclusion sort. */
|
|
9744
|
+
label: MortalityLabelDto;
|
|
9745
|
+
/** Temporal feature sequence for the conclusion gate. */
|
|
9746
|
+
temporal_features: TemporalSequenceDto;
|
|
9747
|
+
}
|
|
9214
9748
|
/** Statistics about the lattice */
|
|
9215
9749
|
interface LatticeStats$1 {
|
|
9216
9750
|
/**
|
|
@@ -9244,6 +9778,89 @@ interface LatticeStats$1 {
|
|
|
9244
9778
|
*/
|
|
9245
9779
|
total_sorts: number;
|
|
9246
9780
|
}
|
|
9781
|
+
/**
|
|
9782
|
+
* Request for the viewport-tile lattice endpoint. Designed for
|
|
9783
|
+
* million-scale rendering: the server pre-computes a stable global
|
|
9784
|
+
* layout for the tenant once (per hierarchy snapshot), and clients
|
|
9785
|
+
* fetch only the nodes whose (x, y) fall inside their viewport.
|
|
9786
|
+
*
|
|
9787
|
+
* The layout is deterministic: y = BFS level × level_spacing,
|
|
9788
|
+
* x = hash(sort_id) % width within that level. Not paper-faithful,
|
|
9789
|
+
* but produces stable coordinates that don't require a real force
|
|
9790
|
+
* layout — usable on tenants where 1M nodes can't be laid out
|
|
9791
|
+
* online.
|
|
9792
|
+
*/
|
|
9793
|
+
interface LatticeTileRequest {
|
|
9794
|
+
/**
|
|
9795
|
+
* When true, emit one synthetic Feature node per declared
|
|
9796
|
+
* feature on each sort, with an edge from the sort to the
|
|
9797
|
+
* feature. Lets clients render the "starburst" galaxy view
|
|
9798
|
+
* where each sort is a center surrounded by feature spokes.
|
|
9799
|
+
* Default false to preserve the millions-scale wire budget.
|
|
9800
|
+
*/
|
|
9801
|
+
include_features?: boolean;
|
|
9802
|
+
/**
|
|
9803
|
+
* Max features per sort when `include_features` is true.
|
|
9804
|
+
* Bounds bandwidth on densely-typed tenants (some sorts
|
|
9805
|
+
* declare 80+ features). Default 32.
|
|
9806
|
+
* @min 0
|
|
9807
|
+
*/
|
|
9808
|
+
max_features_per_sort?: number;
|
|
9809
|
+
/**
|
|
9810
|
+
* Hard cap on emitted nodes — when the viewport contains more
|
|
9811
|
+
* than this, the client should zoom in. Default 5000.
|
|
9812
|
+
* @min 0
|
|
9813
|
+
*/
|
|
9814
|
+
max_nodes?: number;
|
|
9815
|
+
/** @format double */
|
|
9816
|
+
max_x: number;
|
|
9817
|
+
/** @format double */
|
|
9818
|
+
max_y: number;
|
|
9819
|
+
/**
|
|
9820
|
+
* Viewport bounds in lattice coordinate space. Nodes outside
|
|
9821
|
+
* these bounds are not emitted.
|
|
9822
|
+
* @format double
|
|
9823
|
+
*/
|
|
9824
|
+
min_x: number;
|
|
9825
|
+
/** @format double */
|
|
9826
|
+
min_y: number;
|
|
9827
|
+
/**
|
|
9828
|
+
* Optional zoom level (0 = whole graph, increasing = closer).
|
|
9829
|
+
* At lower zooms we emit fewer edges (top-K by node degree)
|
|
9830
|
+
* to keep responses tractable. Default 1.0.
|
|
9831
|
+
* @format double
|
|
9832
|
+
*/
|
|
9833
|
+
zoom?: number;
|
|
9834
|
+
}
|
|
9835
|
+
interface LatticeTileResponse {
|
|
9836
|
+
/** @min 0 */
|
|
9837
|
+
emitted_count: number;
|
|
9838
|
+
/**
|
|
9839
|
+
* Subgraph of the lattice within the viewport. Each node has
|
|
9840
|
+
* `position.x`, `position.y` set so the client can place it
|
|
9841
|
+
* directly without running a layout.
|
|
9842
|
+
*/
|
|
9843
|
+
graph: VisualizationGraphDto$1;
|
|
9844
|
+
/** @format double */
|
|
9845
|
+
layout_max_x: number;
|
|
9846
|
+
/** @format double */
|
|
9847
|
+
layout_max_y: number;
|
|
9848
|
+
/**
|
|
9849
|
+
* Bounds of the full layout (so clients can compute "where am I?").
|
|
9850
|
+
* @format double
|
|
9851
|
+
*/
|
|
9852
|
+
layout_min_x: number;
|
|
9853
|
+
/** @format double */
|
|
9854
|
+
layout_min_y: number;
|
|
9855
|
+
/** Was the response truncated by max_nodes? */
|
|
9856
|
+
truncated: boolean;
|
|
9857
|
+
/**
|
|
9858
|
+
* Total nodes that fell in the viewport before max_nodes
|
|
9859
|
+
* truncation — drives "zoom in to see all" affordance.
|
|
9860
|
+
* @min 0
|
|
9861
|
+
*/
|
|
9862
|
+
viewport_count: number;
|
|
9863
|
+
}
|
|
9247
9864
|
/** Request for lattice (sort hierarchy) visualization */
|
|
9248
9865
|
interface LatticeVisualizationRequest$1 {
|
|
9249
9866
|
/** Whether to generate DOT output */
|
|
@@ -9254,12 +9871,24 @@ interface LatticeVisualizationRequest$1 {
|
|
|
9254
9871
|
layout_algorithm?: LayoutAlgorithmDto$1;
|
|
9255
9872
|
/** Layout direction preference */
|
|
9256
9873
|
layout_direction?: LayoutDirectionDto$1;
|
|
9874
|
+
/**
|
|
9875
|
+
* Maximum sort elements to return (0 = unlimited). Default 500
|
|
9876
|
+
* keeps heavy-hierarchy responses (20k+ sorts) tractable.
|
|
9877
|
+
* Paginate by stepping `offset` if the full set is needed.
|
|
9878
|
+
* @min 0
|
|
9879
|
+
*/
|
|
9880
|
+
limit?: number;
|
|
9257
9881
|
/**
|
|
9258
9882
|
* Maximum depth to traverse (default: unlimited)
|
|
9259
9883
|
* @format int32
|
|
9260
9884
|
* @min 0
|
|
9261
9885
|
*/
|
|
9262
9886
|
max_depth?: number | null;
|
|
9887
|
+
/**
|
|
9888
|
+
* Skip this many sort elements (paired with `limit`).
|
|
9889
|
+
* @min 0
|
|
9890
|
+
*/
|
|
9891
|
+
offset?: number;
|
|
9263
9892
|
/**
|
|
9264
9893
|
* Optional root sort ID to start from
|
|
9265
9894
|
* @format uuid
|
|
@@ -9270,8 +9899,24 @@ interface LatticeVisualizationRequest$1 {
|
|
|
9270
9899
|
interface LatticeVisualizationResponse$1 {
|
|
9271
9900
|
/** The visualization graph */
|
|
9272
9901
|
graph: VisualizationGraphDto$1;
|
|
9902
|
+
/**
|
|
9903
|
+
* Pagination: limit used (0 = unlimited).
|
|
9904
|
+
* @min 0
|
|
9905
|
+
*/
|
|
9906
|
+
limit?: number;
|
|
9907
|
+
/**
|
|
9908
|
+
* Pagination: offset used in this response.
|
|
9909
|
+
* @min 0
|
|
9910
|
+
*/
|
|
9911
|
+
offset?: number;
|
|
9273
9912
|
/** Statistics about the lattice */
|
|
9274
9913
|
stats: LatticeStats$1;
|
|
9914
|
+
/**
|
|
9915
|
+
* Pagination: total sorts available before offset/limit applied.
|
|
9916
|
+
* Clients can use this to drive a "load next page" UI.
|
|
9917
|
+
* @min 0
|
|
9918
|
+
*/
|
|
9919
|
+
total_count?: number;
|
|
9275
9920
|
}
|
|
9276
9921
|
/** Per-layer verification result. */
|
|
9277
9922
|
interface LayerResultDto$1 {
|
|
@@ -10660,6 +11305,18 @@ interface MetaSortsResponse$1 {
|
|
|
10660
11305
|
*/
|
|
10661
11306
|
variable: string;
|
|
10662
11307
|
}
|
|
11308
|
+
/** Min-cut partition output. */
|
|
11309
|
+
interface MinCutDto {
|
|
11310
|
+
/**
|
|
11311
|
+
* Cut edges (saturated forward edges crossing source-side →
|
|
11312
|
+
* sink-side). Their summed `capacity` equals the max flow value.
|
|
11313
|
+
*/
|
|
11314
|
+
cut_edges: EdgeFlowDto[];
|
|
11315
|
+
/** Names of nodes on the sink side of the cut. */
|
|
11316
|
+
sink_side: string[];
|
|
11317
|
+
/** Names of nodes on the source side of the cut. */
|
|
11318
|
+
source_side: string[];
|
|
11319
|
+
}
|
|
10663
11320
|
/** Information about what's missing from a query */
|
|
10664
11321
|
interface MissingInfoDto$1 {
|
|
10665
11322
|
/** Human-readable description */
|
|
@@ -10758,6 +11415,8 @@ interface MonadicFixpointResponse$1 {
|
|
|
10758
11415
|
*/
|
|
10759
11416
|
max_depth: number;
|
|
10760
11417
|
}
|
|
11418
|
+
/** Conclusion-side ground-truth label. */
|
|
11419
|
+
type MortalityLabelDto = "positive" | "negative";
|
|
10761
11420
|
/** Full motivation state DTO combining drives, deficits, and curiosity. */
|
|
10762
11421
|
interface MotivationStateDto$1 {
|
|
10763
11422
|
/** Curiosity targets sorted by exploration priority */
|
|
@@ -10964,7 +11623,7 @@ interface NlQueryResultItem$1 {
|
|
|
10964
11623
|
sort_name: string;
|
|
10965
11624
|
}
|
|
10966
11625
|
/** Node type in the graph */
|
|
10967
|
-
type NodeTypeDto$1 = "sort" | "synthetic_sort" | "root_sort" | "bottom_sort" | "constraint" | "fd_variable" | "term" | "feature" | "reference" | "residuated_term" | "trigger" | "relation" | {
|
|
11626
|
+
type NodeTypeDto$1 = "sort" | "synthetic_sort" | "root_sort" | "bottom_sort" | "constraint" | "fd_variable" | "term" | "feature" | "reference" | "residuated_term" | "trigger" | "relation" | "rule" | {
|
|
10968
11627
|
custom: string;
|
|
10969
11628
|
};
|
|
10970
11629
|
/** Number format options */
|
|
@@ -11155,6 +11814,85 @@ interface OntologyRagStatsDto$1 {
|
|
|
11155
11814
|
/** @min 0 */
|
|
11156
11815
|
terms_unified: number;
|
|
11157
11816
|
}
|
|
11817
|
+
/**
|
|
11818
|
+
* Top-level orchestrator configuration DTO.
|
|
11819
|
+
*
|
|
11820
|
+
* Mirrors
|
|
11821
|
+
* [`OrchestratorConfig`](osfkb_application::services::osf_neural_predicate_orchestrator::OrchestratorConfig)
|
|
11822
|
+
* with API-friendly enum encodings.
|
|
11823
|
+
*/
|
|
11824
|
+
interface OrchestratorConfigDto {
|
|
11825
|
+
/** Antecedent-sort gate bindings. */
|
|
11826
|
+
antecedent_bindings: SortGateBindingDto[];
|
|
11827
|
+
/** Conclusion-sort gate binding (typically `Temporal`). */
|
|
11828
|
+
conclusion_binding: SortGateBindingDto;
|
|
11829
|
+
/** Knowledge-axiom rule ids registered in the tenant's homoiconic KB. */
|
|
11830
|
+
knowledge_axioms: string[];
|
|
11831
|
+
/** Loss weighting and `pMean` aggregator hyperparameters. */
|
|
11832
|
+
loss: DualWeightedLossDto;
|
|
11833
|
+
/** Training-loop hyperparameters. */
|
|
11834
|
+
training: TrainingHyperparametersDto;
|
|
11835
|
+
}
|
|
11836
|
+
/** Request body for `POST /api/v1/inference/orchestrator/configure`. */
|
|
11837
|
+
interface OrchestratorConfigureRequest {
|
|
11838
|
+
/** The orchestrator configuration to register for the calling tenant. */
|
|
11839
|
+
config: OrchestratorConfigDto;
|
|
11840
|
+
}
|
|
11841
|
+
/** Response for the configure endpoint. */
|
|
11842
|
+
interface OrchestratorConfigureResponse {
|
|
11843
|
+
/**
|
|
11844
|
+
* UUID for retrieving and using this config in subsequent train/predict
|
|
11845
|
+
* calls.
|
|
11846
|
+
* @format uuid
|
|
11847
|
+
*/
|
|
11848
|
+
config_id: string;
|
|
11849
|
+
}
|
|
11850
|
+
/** Request body for `POST /api/v1/inference/orchestrator/predict`. */
|
|
11851
|
+
type OrchestratorPredictRequest = PredictTermDto & {
|
|
11852
|
+
/**
|
|
11853
|
+
* Identifier returned by the configure endpoint.
|
|
11854
|
+
* @format uuid
|
|
11855
|
+
*/
|
|
11856
|
+
config_id: string;
|
|
11857
|
+
};
|
|
11858
|
+
/** Response for the predict endpoint. */
|
|
11859
|
+
interface OrchestratorPredictResponse {
|
|
11860
|
+
/** Per-axiom firing trace. */
|
|
11861
|
+
axiom_trace: AxiomFiringDto[];
|
|
11862
|
+
/**
|
|
11863
|
+
* Conclusion-sort truth value τ(x ⊑ conclusion_sort).
|
|
11864
|
+
* @format double
|
|
11865
|
+
*/
|
|
11866
|
+
conclusion_probability: number;
|
|
11867
|
+
/**
|
|
11868
|
+
* Final fused confidence via noisy-OR over fired knowledge axioms.
|
|
11869
|
+
* @format double
|
|
11870
|
+
*/
|
|
11871
|
+
fused_confidence: number;
|
|
11872
|
+
}
|
|
11873
|
+
/** Request body for `POST /api/v1/inference/orchestrator/train`. */
|
|
11874
|
+
interface OrchestratorTrainRequest {
|
|
11875
|
+
/**
|
|
11876
|
+
* Identifier returned by the configure endpoint.
|
|
11877
|
+
* @format uuid
|
|
11878
|
+
*/
|
|
11879
|
+
config_id: string;
|
|
11880
|
+
/**
|
|
11881
|
+
* One or more labelled training Ψ-terms to consume in this call. Each
|
|
11882
|
+
* call performs a single training epoch.
|
|
11883
|
+
*/
|
|
11884
|
+
labelled_terms: LabelledTermDto[];
|
|
11885
|
+
}
|
|
11886
|
+
/** Response for the train endpoint. */
|
|
11887
|
+
interface OrchestratorTrainResponse {
|
|
11888
|
+
/**
|
|
11889
|
+
* Whether training stopped early (always `false` when only one epoch is
|
|
11890
|
+
* run per call; reserved for future multi-epoch extensions).
|
|
11891
|
+
*/
|
|
11892
|
+
early_stopped: boolean;
|
|
11893
|
+
/** One entry per training epoch executed in this call. */
|
|
11894
|
+
epochs: EpochMetricsDto[];
|
|
11895
|
+
}
|
|
11158
11896
|
/**
|
|
11159
11897
|
* Request for pure OSF search
|
|
11160
11898
|
*
|
|
@@ -11806,6 +12544,37 @@ interface PredictPreferencesRequest$1 {
|
|
|
11806
12544
|
interface PredictPreferencesResponse$1 {
|
|
11807
12545
|
predictions: PreferencePrediction$1[];
|
|
11808
12546
|
}
|
|
12547
|
+
/**
|
|
12548
|
+
* Inference Ψ-term — either inline features or a reference to a persisted
|
|
12549
|
+
* term id (reserved for future use; currently inline-only).
|
|
12550
|
+
*/
|
|
12551
|
+
type PredictTermDto = InlineInferenceTermDto;
|
|
12552
|
+
interface PredictionEntry$1 {
|
|
12553
|
+
/**
|
|
12554
|
+
* Verdict at capture time. Always `Pending` for newly captured
|
|
12555
|
+
* snapshots.
|
|
12556
|
+
*/
|
|
12557
|
+
captured_status: GroundTruthStatus$1;
|
|
12558
|
+
id: PredictionEntryId;
|
|
12559
|
+
request_hash: string;
|
|
12560
|
+
/**
|
|
12561
|
+
* Domain-shaped opaque payload (e.g. `{"drug": "...", "disease": "...", "score": 0.87}`).
|
|
12562
|
+
* The engine does NOT interpret this — only the consumer's
|
|
12563
|
+
* `GroundTruthProviderPort` does.
|
|
12564
|
+
*/
|
|
12565
|
+
response_summary: object;
|
|
12566
|
+
/** Back-pointer into the audit ledger this prediction was captured from. */
|
|
12567
|
+
source_record_id: AuditRecordId;
|
|
12568
|
+
/** @format date-time */
|
|
12569
|
+
validated_at?: string | null;
|
|
12570
|
+
/**
|
|
12571
|
+
* Verdict after the most recent `validate()` call. `None` until
|
|
12572
|
+
* validation has run.
|
|
12573
|
+
*/
|
|
12574
|
+
validated_status?: null | GroundTruthStatus$1;
|
|
12575
|
+
}
|
|
12576
|
+
/** @format uuid */
|
|
12577
|
+
type PredictionEntryId = string;
|
|
11809
12578
|
/** Prediction error DTO. */
|
|
11810
12579
|
interface PredictionErrorDto$1 {
|
|
11811
12580
|
/** Actual outcome */
|
|
@@ -11825,6 +12594,16 @@ interface PredictionErrorDto$1 {
|
|
|
11825
12594
|
/** Predicted outcome */
|
|
11826
12595
|
predicted: string;
|
|
11827
12596
|
}
|
|
12597
|
+
interface PredictionSnapshot$1 {
|
|
12598
|
+
/** @format date-time */
|
|
12599
|
+
captured_at: string;
|
|
12600
|
+
entries: PredictionEntry$1[];
|
|
12601
|
+
filter: SnapshotFilter$1;
|
|
12602
|
+
id: PredictionSnapshotId;
|
|
12603
|
+
tenant_id: TenantId;
|
|
12604
|
+
}
|
|
12605
|
+
/** @format uuid */
|
|
12606
|
+
type PredictionSnapshotId = string;
|
|
11828
12607
|
/** A user preference. */
|
|
11829
12608
|
interface PreferenceDto$1 {
|
|
11830
12609
|
/**
|
|
@@ -13584,6 +14363,25 @@ interface RowUnifyResponse$1 {
|
|
|
13584
14363
|
/** Unified row type (if successful) */
|
|
13585
14364
|
unified?: null | RowTypeDto$1;
|
|
13586
14365
|
}
|
|
14366
|
+
/**
|
|
14367
|
+
* Rule aggregator descriptor for engine-side aggregation on rule heads.
|
|
14368
|
+
*
|
|
14369
|
+
* When present, the engine aggregates multiple proofs of the same rule
|
|
14370
|
+
* that share the same `group_by` feature values, applying `op` to the
|
|
14371
|
+
* `target` feature. This eliminates run-to-run variance from proof-order
|
|
14372
|
+
* sensitivity and makes `max_solutions` cap unique groups, not raw proofs.
|
|
14373
|
+
*/
|
|
14374
|
+
interface RuleAggregatorDto {
|
|
14375
|
+
/**
|
|
14376
|
+
* Feature names that define the aggregation group key.
|
|
14377
|
+
* Proofs with identical values for all `group_by` features are merged.
|
|
14378
|
+
*/
|
|
14379
|
+
group_by: string[];
|
|
14380
|
+
/** Aggregation operator: "sum", "max", "min", "count", or "first". */
|
|
14381
|
+
op: string;
|
|
14382
|
+
/** Feature name whose value is aggregated within each group. */
|
|
14383
|
+
target: string;
|
|
14384
|
+
}
|
|
13587
14385
|
/** A rule clause (OSF clause) */
|
|
13588
14386
|
interface RuleClauseDto$1 {
|
|
13589
14387
|
/** Constraints on variables in this clause */
|
|
@@ -14214,6 +15012,21 @@ interface SingleCopyRequest$1 {
|
|
|
14214
15012
|
copy_mode: CopyModeDto$1;
|
|
14215
15013
|
term_id: string;
|
|
14216
15014
|
}
|
|
15015
|
+
interface SnapshotFilter$1 {
|
|
15016
|
+
/** @format date-time */
|
|
15017
|
+
captured_after?: string | null;
|
|
15018
|
+
/**
|
|
15019
|
+
* @format int32
|
|
15020
|
+
* @min 0
|
|
15021
|
+
*/
|
|
15022
|
+
max_entries?: number | null;
|
|
15023
|
+
/**
|
|
15024
|
+
* Glob-style pattern matched against `AuditRecord::request_path`.
|
|
15025
|
+
* Required — without it the snapshot would capture the entire
|
|
15026
|
+
* ledger, which is rarely useful.
|
|
15027
|
+
*/
|
|
15028
|
+
request_path_pattern: string;
|
|
15029
|
+
}
|
|
14217
15030
|
/** Request for soft unification (Phase 2). */
|
|
14218
15031
|
interface SoftUnifyRequest$1 {
|
|
14219
15032
|
/**
|
|
@@ -14283,6 +15096,35 @@ interface SolveConstraintResponse$1 {
|
|
|
14283
15096
|
success: boolean;
|
|
14284
15097
|
suspended_constraints: string[];
|
|
14285
15098
|
}
|
|
15099
|
+
/** Request body for `POST /api/v1/flow-networks/{id}/solve`. */
|
|
15100
|
+
interface SolveFlowNetworkRequest$1 {
|
|
15101
|
+
/** Algorithm to dispatch. */
|
|
15102
|
+
algorithm: FlowAlgorithmDto;
|
|
15103
|
+
}
|
|
15104
|
+
/**
|
|
15105
|
+
* Solver output. Fields irrelevant to the chosen algorithm are
|
|
15106
|
+
* omitted via `skip_serializing_if`.
|
|
15107
|
+
*/
|
|
15108
|
+
interface SolveFlowNetworkResponse$1 {
|
|
15109
|
+
/** Echo of the algorithm dispatched. */
|
|
15110
|
+
algorithm: FlowAlgorithmDto;
|
|
15111
|
+
/** Per-edge classification (classify_* algorithms only). */
|
|
15112
|
+
classifications?: any[] | null;
|
|
15113
|
+
/** Per-edge flow snapshot. */
|
|
15114
|
+
edge_flows: EdgeFlowDto[];
|
|
15115
|
+
/** Min-cut partition (min_cut algorithm only). */
|
|
15116
|
+
min_cut?: null | MinCutDto;
|
|
15117
|
+
/**
|
|
15118
|
+
* Total cost of the realised flow (mcmf only).
|
|
15119
|
+
* @format int64
|
|
15120
|
+
*/
|
|
15121
|
+
total_cost?: number | null;
|
|
15122
|
+
/**
|
|
15123
|
+
* Total flow source → sink (max-flow / mcmf / min-cut).
|
|
15124
|
+
* @format int64
|
|
15125
|
+
*/
|
|
15126
|
+
total_flow?: number | null;
|
|
15127
|
+
}
|
|
14286
15128
|
/** Response with ancestor sorts */
|
|
14287
15129
|
interface SortAncestorsResponse {
|
|
14288
15130
|
ancestors: SortInfoDto$1[];
|
|
@@ -14507,6 +15349,21 @@ interface SortDto$1 {
|
|
|
14507
15349
|
*/
|
|
14508
15350
|
tenant_id: string;
|
|
14509
15351
|
}
|
|
15352
|
+
/** Binding between a sort and the gate that scores its subsumption. */
|
|
15353
|
+
interface SortGateBindingDto {
|
|
15354
|
+
/**
|
|
15355
|
+
* Architecture flavour (selects which port the orchestrator dispatches
|
|
15356
|
+
* to).
|
|
15357
|
+
*/
|
|
15358
|
+
architecture: SubsumptionArchitectureDto;
|
|
15359
|
+
/**
|
|
15360
|
+
* Sort whose subsumption truth the gate scores.
|
|
15361
|
+
* @format uuid
|
|
15362
|
+
*/
|
|
15363
|
+
sort_id: string;
|
|
15364
|
+
/** Optional weak anchor (only meaningful for `ResiduationMlp`). */
|
|
15365
|
+
weak_anchor?: null | ThresholdAnchorDto;
|
|
15366
|
+
}
|
|
14510
15367
|
/** Basic sort information */
|
|
14511
15368
|
interface SortInfoDto$1 {
|
|
14512
15369
|
id: string;
|
|
@@ -14537,6 +15394,71 @@ interface SortListResponse$1 {
|
|
|
14537
15394
|
*/
|
|
14538
15395
|
total?: number;
|
|
14539
15396
|
}
|
|
15397
|
+
/**
|
|
15398
|
+
* Request for the focus-based "neighborhood" view of the sort
|
|
15399
|
+
* hierarchy. Designed to scale to tenants with millions of sorts —
|
|
15400
|
+
* instead of trying to display the entire lattice, the client picks
|
|
15401
|
+
* a focus sort and asks for its N-hop neighborhood, capped at
|
|
15402
|
+
* `max_nodes` so the wire payload and renderer load are bounded.
|
|
15403
|
+
*
|
|
15404
|
+
* Edges to nodes outside the returned set are kept (so accumulating
|
|
15405
|
+
* successive neighborhoods stitches the global graph) but with the
|
|
15406
|
+
* off-set endpoint represented by its UUID-derived id.
|
|
15407
|
+
*/
|
|
15408
|
+
interface SortNeighborhoodRequest {
|
|
15409
|
+
/**
|
|
15410
|
+
* Maximum hop distance (BFS depth). Default 2.
|
|
15411
|
+
* @format int32
|
|
15412
|
+
* @min 0
|
|
15413
|
+
*/
|
|
15414
|
+
hops?: number;
|
|
15415
|
+
/**
|
|
15416
|
+
* Whether to include both ancestors (parents) AND descendants
|
|
15417
|
+
* (children). Default true.
|
|
15418
|
+
*/
|
|
15419
|
+
include_ancestors?: boolean;
|
|
15420
|
+
include_descendants?: boolean;
|
|
15421
|
+
/**
|
|
15422
|
+
* When true, also emit 4-adjacency siblings of the focus
|
|
15423
|
+
* (sorts sharing a common parent or child). Default false.
|
|
15424
|
+
*/
|
|
15425
|
+
include_siblings?: boolean;
|
|
15426
|
+
/**
|
|
15427
|
+
* Hard cap on returned nodes. When BFS exceeds this, the
|
|
15428
|
+
* expansion stops and the closest `max_nodes` are emitted.
|
|
15429
|
+
* Default 5000 — keeps the client renderer responsive.
|
|
15430
|
+
* @min 0
|
|
15431
|
+
*/
|
|
15432
|
+
max_nodes?: number;
|
|
15433
|
+
/**
|
|
15434
|
+
* Focus sort. The neighborhood is centred here.
|
|
15435
|
+
* @format uuid
|
|
15436
|
+
*/
|
|
15437
|
+
sort_id: string;
|
|
15438
|
+
}
|
|
15439
|
+
interface SortNeighborhoodResponse {
|
|
15440
|
+
/**
|
|
15441
|
+
* Number of nodes actually returned.
|
|
15442
|
+
* @min 0
|
|
15443
|
+
*/
|
|
15444
|
+
emitted_count: number;
|
|
15445
|
+
/**
|
|
15446
|
+
* Subgraph centred on the focus sort. The focus node has
|
|
15447
|
+
* `properties.role = "focus"`; ancestors carry `role = "ancestor"`,
|
|
15448
|
+
* descendants `role = "descendant"`, siblings `role = "sibling"`.
|
|
15449
|
+
* `level` on each node is the signed hop distance from focus
|
|
15450
|
+
* (positive = descendant, negative = ancestor).
|
|
15451
|
+
*/
|
|
15452
|
+
graph: VisualizationGraphDto$1;
|
|
15453
|
+
/**
|
|
15454
|
+
* Total number of sorts within `hops` of focus before
|
|
15455
|
+
* truncation — clients can use this to surface "showing N of M".
|
|
15456
|
+
* @min 0
|
|
15457
|
+
*/
|
|
15458
|
+
reachable_count: number;
|
|
15459
|
+
/** Was the BFS truncated by `max_nodes`? */
|
|
15460
|
+
truncated: boolean;
|
|
15461
|
+
}
|
|
14540
15462
|
/** API representation of sort origin/provenance */
|
|
14541
15463
|
type SortOriginDto$1 = {
|
|
14542
15464
|
/** @format uuid */
|
|
@@ -15240,6 +16162,53 @@ interface SubstringRequest$1 {
|
|
|
15240
16162
|
interface SubstringResponse {
|
|
15241
16163
|
result: string;
|
|
15242
16164
|
}
|
|
16165
|
+
/**
|
|
16166
|
+
* Architecture choice for a single sort-subsumption gate.
|
|
16167
|
+
*
|
|
16168
|
+
* Tagged on a `kind` discriminator to keep the OpenAPI schema flat.
|
|
16169
|
+
*/
|
|
16170
|
+
type SubsumptionArchitectureDto = {
|
|
16171
|
+
/**
|
|
16172
|
+
* Hidden layer width.
|
|
16173
|
+
* @min 0
|
|
16174
|
+
*/
|
|
16175
|
+
hidden_dim: number;
|
|
16176
|
+
/**
|
|
16177
|
+
* Input feature dimension.
|
|
16178
|
+
* @min 0
|
|
16179
|
+
*/
|
|
16180
|
+
input_dim: number;
|
|
16181
|
+
kind: "residuation_mlp";
|
|
16182
|
+
} | {
|
|
16183
|
+
/**
|
|
16184
|
+
* Hidden state width per LSTM direction.
|
|
16185
|
+
* @min 0
|
|
16186
|
+
*/
|
|
16187
|
+
hidden_dim: number;
|
|
16188
|
+
/**
|
|
16189
|
+
* Per-timestep feature dimension.
|
|
16190
|
+
* @min 0
|
|
16191
|
+
*/
|
|
16192
|
+
input_dim: number;
|
|
16193
|
+
kind: "temporal";
|
|
16194
|
+
/**
|
|
16195
|
+
* Number of stacked BiLSTM layers.
|
|
16196
|
+
* @min 0
|
|
16197
|
+
*/
|
|
16198
|
+
n_lstm_layers: number;
|
|
16199
|
+
};
|
|
16200
|
+
interface SummaryResponse$1 {
|
|
16201
|
+
/**
|
|
16202
|
+
* @format int64
|
|
16203
|
+
* @min 0
|
|
16204
|
+
*/
|
|
16205
|
+
n_records: number;
|
|
16206
|
+
per_actor: Record<string, number>;
|
|
16207
|
+
per_request_path: Record<string, number>;
|
|
16208
|
+
tenant_id: string;
|
|
16209
|
+
ts_first?: string | null;
|
|
16210
|
+
ts_last?: string | null;
|
|
16211
|
+
}
|
|
15243
16212
|
/** Information about a suspended (incomplete) query */
|
|
15244
16213
|
interface SuspendedQueryDto$1 {
|
|
15245
16214
|
/**
|
|
@@ -15539,6 +16508,23 @@ interface TemporalPlanResponse$1 {
|
|
|
15539
16508
|
/** Selected term IDs in temporal order */
|
|
15540
16509
|
selected_term_ids: string[];
|
|
15541
16510
|
}
|
|
16511
|
+
/** Variable-length temporal feature sequence in row-major form. */
|
|
16512
|
+
interface TemporalSequenceDto {
|
|
16513
|
+
/** Row-major buffer of length `seq_len * input_dim`. */
|
|
16514
|
+
data: number[];
|
|
16515
|
+
/**
|
|
16516
|
+
* Per-timestep feature dimension.
|
|
16517
|
+
* @min 0
|
|
16518
|
+
*/
|
|
16519
|
+
input_dim: number;
|
|
16520
|
+
/**
|
|
16521
|
+
* Number of timesteps.
|
|
16522
|
+
* @min 0
|
|
16523
|
+
*/
|
|
16524
|
+
seq_len: number;
|
|
16525
|
+
}
|
|
16526
|
+
/** @format uuid */
|
|
16527
|
+
type TenantId = string;
|
|
15542
16528
|
/** Information about a single tenant in the system. */
|
|
15543
16529
|
interface TenantInfo {
|
|
15544
16530
|
/**
|
|
@@ -15617,6 +16603,23 @@ type TermInputDto$1 = {
|
|
|
15617
16603
|
features?: Record<string, FeatureInputValueDto$1>;
|
|
15618
16604
|
sort_name: string;
|
|
15619
16605
|
};
|
|
16606
|
+
/**
|
|
16607
|
+
* Request for paginated raw term listing. Parallel to the lattice
|
|
16608
|
+
* pagination endpoint but for Ψ-terms — gives clients a default-fast
|
|
16609
|
+
* "show me terms" view that bypasses the in-memory term store.
|
|
16610
|
+
*/
|
|
16611
|
+
interface TermListRequest {
|
|
16612
|
+
/**
|
|
16613
|
+
* Page size. Default 500.
|
|
16614
|
+
* @min 0
|
|
16615
|
+
*/
|
|
16616
|
+
limit?: number;
|
|
16617
|
+
/**
|
|
16618
|
+
* Page offset.
|
|
16619
|
+
* @min 0
|
|
16620
|
+
*/
|
|
16621
|
+
offset?: number;
|
|
16622
|
+
}
|
|
15620
16623
|
/** Response for term list operations */
|
|
15621
16624
|
interface TermListResponse$1 {
|
|
15622
16625
|
/**
|
|
@@ -15649,7 +16652,7 @@ interface TermResponse$1 {
|
|
|
15649
16652
|
witness_proofs?: WitnessProofDto$1[];
|
|
15650
16653
|
}
|
|
15651
16654
|
/** Term completion state (Hassan's LIFE semantics) */
|
|
15652
|
-
type TermState$1 = "complete" | "residuated" | "no_witnesses";
|
|
16655
|
+
type TermState$1 = "complete" | "residuated" | "failed" | "no_witnesses";
|
|
15653
16656
|
/** Response with term store session info */
|
|
15654
16657
|
interface TermStoreSessionResponse$1 {
|
|
15655
16658
|
session_id: string;
|
|
@@ -15665,6 +16668,29 @@ interface TermTranslationDto {
|
|
|
15665
16668
|
copied_id: string;
|
|
15666
16669
|
original_id: string;
|
|
15667
16670
|
}
|
|
16671
|
+
/** Threshold-based weak anchor for an antecedent gate. */
|
|
16672
|
+
interface ThresholdAnchorDto {
|
|
16673
|
+
/**
|
|
16674
|
+
* Index into the gate's input feature vector that the threshold reads.
|
|
16675
|
+
* @min 0
|
|
16676
|
+
*/
|
|
16677
|
+
feature_index: number;
|
|
16678
|
+
/**
|
|
16679
|
+
* Synthetic samples drawn for pre-anchoring.
|
|
16680
|
+
* @min 0
|
|
16681
|
+
*/
|
|
16682
|
+
samples: number;
|
|
16683
|
+
/**
|
|
16684
|
+
* Pre-anchoring training steps.
|
|
16685
|
+
* @min 0
|
|
16686
|
+
*/
|
|
16687
|
+
steps: number;
|
|
16688
|
+
/**
|
|
16689
|
+
* Threshold value; samples ≥ threshold are anchor-labelled `true`.
|
|
16690
|
+
* @format double
|
|
16691
|
+
*/
|
|
16692
|
+
threshold: number;
|
|
16693
|
+
}
|
|
15668
16694
|
/** Token usage from LLM API calls during ingestion */
|
|
15669
16695
|
interface TokenUsageDto$1 {
|
|
15670
16696
|
/**
|
|
@@ -15792,6 +16818,35 @@ interface TrainingExampleDto$1 {
|
|
|
15792
16818
|
/** Data source (real, synthetic, negative). */
|
|
15793
16819
|
source: string;
|
|
15794
16820
|
}
|
|
16821
|
+
/** Training-loop hyperparameters. */
|
|
16822
|
+
interface TrainingHyperparametersDto {
|
|
16823
|
+
/**
|
|
16824
|
+
* Mini-batch size.
|
|
16825
|
+
* @min 0
|
|
16826
|
+
*/
|
|
16827
|
+
batch_size: number;
|
|
16828
|
+
/**
|
|
16829
|
+
* Early-stopping patience.
|
|
16830
|
+
* @min 0
|
|
16831
|
+
*/
|
|
16832
|
+
early_stopping_patience: number;
|
|
16833
|
+
/**
|
|
16834
|
+
* Total training epochs.
|
|
16835
|
+
* @min 0
|
|
16836
|
+
*/
|
|
16837
|
+
epochs: number;
|
|
16838
|
+
/**
|
|
16839
|
+
* AdamW learning rate.
|
|
16840
|
+
* @format double
|
|
16841
|
+
*/
|
|
16842
|
+
learning_rate: number;
|
|
16843
|
+
/**
|
|
16844
|
+
* PRNG seed for deterministic batch construction.
|
|
16845
|
+
* @format int64
|
|
16846
|
+
* @min 0
|
|
16847
|
+
*/
|
|
16848
|
+
seed?: number;
|
|
16849
|
+
}
|
|
15795
16850
|
/** Response for training trigger endpoints. */
|
|
15796
16851
|
interface TrainingTriggerResponse$1 {
|
|
15797
16852
|
/** Error message if training failed to trigger. */
|
|
@@ -16328,6 +17383,8 @@ interface UpdateVisibilityRequest$1 {
|
|
|
16328
17383
|
/** New visibility level */
|
|
16329
17384
|
visibility: VisibilityDto$1;
|
|
16330
17385
|
}
|
|
17386
|
+
/** @format uuid */
|
|
17387
|
+
type UserId = string;
|
|
16331
17388
|
/**
|
|
16332
17389
|
* Request for witness-validated term creation
|
|
16333
17390
|
*
|
|
@@ -16413,6 +17470,37 @@ interface ValidatedUnifyResponse$1 {
|
|
|
16413
17470
|
/** Witnesses satisfied during unification */
|
|
16414
17471
|
witnesses_satisfied: WitnessInstantiationDto$1[];
|
|
16415
17472
|
}
|
|
17473
|
+
interface ValidationReportDto$1 {
|
|
17474
|
+
completed_at: string;
|
|
17475
|
+
/**
|
|
17476
|
+
* @format int64
|
|
17477
|
+
* @min 0
|
|
17478
|
+
*/
|
|
17479
|
+
n_pending: number;
|
|
17480
|
+
/**
|
|
17481
|
+
* @format int64
|
|
17482
|
+
* @min 0
|
|
17483
|
+
*/
|
|
17484
|
+
n_refuted: number;
|
|
17485
|
+
/**
|
|
17486
|
+
* @format int64
|
|
17487
|
+
* @min 0
|
|
17488
|
+
*/
|
|
17489
|
+
n_total: number;
|
|
17490
|
+
/**
|
|
17491
|
+
* @format int64
|
|
17492
|
+
* @min 0
|
|
17493
|
+
*/
|
|
17494
|
+
n_unknown: number;
|
|
17495
|
+
/**
|
|
17496
|
+
* @format int64
|
|
17497
|
+
* @min 0
|
|
17498
|
+
*/
|
|
17499
|
+
n_validated: number;
|
|
17500
|
+
snapshot_id: string;
|
|
17501
|
+
/** @format double */
|
|
17502
|
+
validation_rate?: number | null;
|
|
17503
|
+
}
|
|
16416
17504
|
/** DTO for validation rules (client-side validation from FeatureDescriptor constraints) */
|
|
16417
17505
|
interface ValidationRuleDto$1 {
|
|
16418
17506
|
/** Feature/field name this rule applies to */
|
|
@@ -16677,6 +17765,12 @@ interface VerifyFaithfulnessResponse$1 {
|
|
|
16677
17765
|
*/
|
|
16678
17766
|
score: number;
|
|
16679
17767
|
}
|
|
17768
|
+
interface VerifyResponse$1 {
|
|
17769
|
+
/** @min 0 */
|
|
17770
|
+
n_violations: number;
|
|
17771
|
+
ok: boolean;
|
|
17772
|
+
violations: any[];
|
|
17773
|
+
}
|
|
16680
17774
|
/**
|
|
16681
17775
|
* Request for OSF-aware round-trip faithfulness verification.
|
|
16682
17776
|
*
|
|
@@ -18705,7 +19799,7 @@ declare class Terms<SecurityDataType = unknown> {
|
|
|
18705
19799
|
* - `"residuated"` — some witnesses are suspended (missing information)
|
|
18706
19800
|
* - `"no_witnesses"` — the sort has no witness requirements
|
|
18707
19801
|
*/
|
|
18708
|
-
type TermState = 'complete' | 'residuated' | 'no_witnesses';
|
|
19802
|
+
type TermState = 'complete' | 'residuated' | 'failed' | 'no_witnesses';
|
|
18709
19803
|
/**
|
|
18710
19804
|
* Proof that a term satisfies a type witness.
|
|
18711
19805
|
*
|
|
@@ -19741,6 +20835,16 @@ declare class Inference<SecurityDataType = unknown> {
|
|
|
19741
20835
|
* @secure
|
|
19742
20836
|
*/
|
|
19743
20837
|
clearFacts: (tenantId: string, params?: RequestParams) => Promise<HttpResponse<ClearFactsResponse$1, any>>;
|
|
20838
|
+
/**
|
|
20839
|
+
* @description In OSF/LIFE terms, an orchestrator wires neural sort-subsumption gates (`τ(x ⊑ S) ∈ [0, 1]`) for a conclusion sort and a set of antecedent sorts. Knowledge axioms reference homoiconic rule Ψ-terms registered in the tenant's KB. The first call lazily instantiates the underlying Candle-backed gates; subsequent calls within the same tenant share gate state. # Authorization Requires `X-Tenant-Id` header.
|
|
20840
|
+
*
|
|
20841
|
+
* @tags inference
|
|
20842
|
+
* @name ConfigureOrchestrator
|
|
20843
|
+
* @summary Register an OSF Neural-Predicate Orchestrator configuration for the calling tenant.
|
|
20844
|
+
* @request POST:/api/v1/inference/orchestrator/configure
|
|
20845
|
+
* @secure
|
|
20846
|
+
*/
|
|
20847
|
+
configureOrchestrator: (data: OrchestratorConfigureRequest, params?: RequestParams) => Promise<HttpResponse<OrchestratorConfigureResponse, void>>;
|
|
19744
20848
|
/**
|
|
19745
20849
|
* @description # TRUE HOMOICONICITY Goals are first-class Ψ-terms that can be created, persisted, and reused. This endpoint creates a goal from clauses and optional constraints, persists it to PostgreSQL, and returns the goal ID for later use. # Authorization Requires X-Tenant-Id header.
|
|
19746
20850
|
*
|
|
@@ -19844,6 +20948,26 @@ declare class Inference<SecurityDataType = unknown> {
|
|
|
19844
20948
|
* @secure
|
|
19845
20949
|
*/
|
|
19846
20950
|
nafProve: (data: NafProveRequest$1, params?: RequestParams) => Promise<HttpResponse<BackwardChainResponse$1, any>>;
|
|
20951
|
+
/**
|
|
20952
|
+
* @description In OSF/LIFE terms, the orchestrator forwards the Ψ-term through the conclusion gate to read `τ(x ⊑ conclusion_sort)`, then for each knowledge axiom evaluates its antecedent gates and combines them with the conclusion truth via Reichenbach (`1 − a + a · c`). The fused confidence aggregates per-axiom modus-ponens witness strength via noisy-OR. # Authorization Requires `X-Tenant-Id` header.
|
|
20953
|
+
*
|
|
20954
|
+
* @tags inference
|
|
20955
|
+
* @name PredictWithOrchestrator
|
|
20956
|
+
* @summary Score a single Ψ-term: conclusion subsumption probability + per-axiom firing trace + noisy-OR fused confidence.
|
|
20957
|
+
* @request POST:/api/v1/inference/orchestrator/predict
|
|
20958
|
+
* @secure
|
|
20959
|
+
*/
|
|
20960
|
+
predictWithOrchestrator: (data: OrchestratorPredictRequest, params?: RequestParams) => Promise<HttpResponse<OrchestratorPredictResponse, void>>;
|
|
20961
|
+
/**
|
|
20962
|
+
* @description In OSF/LIFE terms, the orchestrator pushes the conclusion gate and each antecedent gate toward the dual-weighted satisfaction objective `1 − ( w_D · K_D + w_K · K_K )` (paper eq. 4). Each call performs exactly one epoch over the supplied batch — the response carries the per-epoch metrics for that single epoch (multi-epoch aggregation is the caller's responsibility). # Authorization Requires `X-Tenant-Id` header.
|
|
20963
|
+
*
|
|
20964
|
+
* @tags inference
|
|
20965
|
+
* @name TrainOrchestrator
|
|
20966
|
+
* @summary Run one training epoch over a labelled Ψ-term batch.
|
|
20967
|
+
* @request POST:/api/v1/inference/orchestrator/train
|
|
20968
|
+
* @secure
|
|
20969
|
+
*/
|
|
20970
|
+
trainOrchestrator: (data: OrchestratorTrainRequest, params?: RequestParams) => Promise<HttpResponse<OrchestratorTrainResponse, void>>;
|
|
19847
20971
|
}
|
|
19848
20972
|
|
|
19849
20973
|
/**
|
|
@@ -23723,7 +24847,7 @@ type ResiduationStateFilter = 'pending' | 'suspended' | 'ready' | 'completed' |
|
|
|
23723
24847
|
* @remarks
|
|
23724
24848
|
* Can be a predefined node type or a custom type name.
|
|
23725
24849
|
*/
|
|
23726
|
-
type NodeTypeDto = 'sort' | 'synthetic_sort' | 'root_sort' | 'bottom_sort' | 'constraint' | 'fd_variable' | 'term' | 'feature' | 'reference' | 'residuated_term' | 'trigger' | 'relation' | {
|
|
24850
|
+
type NodeTypeDto = 'sort' | 'synthetic_sort' | 'root_sort' | 'bottom_sort' | 'constraint' | 'fd_variable' | 'term' | 'feature' | 'reference' | 'residuated_term' | 'trigger' | 'relation' | 'rule' | {
|
|
23727
24851
|
custom: string;
|
|
23728
24852
|
};
|
|
23729
24853
|
/**
|
|
@@ -23732,7 +24856,7 @@ type NodeTypeDto = 'sort' | 'synthetic_sort' | 'root_sort' | 'bottom_sort' | 'co
|
|
|
23732
24856
|
* @remarks
|
|
23733
24857
|
* Can be a predefined edge type or a custom type name.
|
|
23734
24858
|
*/
|
|
23735
|
-
type EdgeTypeDto = 'subtype' | 'multiple_inheritance' | 'glb_path' | 'lub_path' | 'constraint_dependency' | 'propagation' | 'feature' | 'coreference' | 'trigger_dependency' | 'relation_source' | 'relation_target' | {
|
|
24859
|
+
type EdgeTypeDto = 'subtype' | 'multiple_inheritance' | 'glb_path' | 'lub_path' | 'constraint_dependency' | 'propagation' | 'feature' | 'coreference' | 'trigger_dependency' | 'relation_source' | 'relation_target' | 'identity' | 'derivation' | {
|
|
23736
24860
|
custom: string;
|
|
23737
24861
|
};
|
|
23738
24862
|
/**
|
|
@@ -23741,7 +24865,7 @@ type EdgeTypeDto = 'subtype' | 'multiple_inheritance' | 'glb_path' | 'lub_path'
|
|
|
23741
24865
|
* @remarks
|
|
23742
24866
|
* Can be a predefined hyperedge type or a custom type name.
|
|
23743
24867
|
*/
|
|
23744
|
-
type HyperedgeTypeDto = 'term_features' | 'constraint_variables' | 'unification_result' | {
|
|
24868
|
+
type HyperedgeTypeDto = 'term_features' | 'constraint_variables' | 'unification_result' | 'coreference_group' | 'derivation_step' | 'aggregate' | 'negation' | 'entailment' | 'bound_constraint' | 'multiple_inheritance' | 'refraction' | 'fuzzy_belt' | 'meta_rule' | 'learned_rule' | {
|
|
23745
24869
|
custom: string;
|
|
23746
24870
|
};
|
|
23747
24871
|
/**
|
|
@@ -28684,6 +29808,16 @@ declare class ReviewsClient {
|
|
|
28684
29808
|
declare class Visualization<SecurityDataType = unknown> {
|
|
28685
29809
|
http: HttpClient<SecurityDataType>;
|
|
28686
29810
|
constructor(http: HttpClient<SecurityDataType>);
|
|
29811
|
+
/**
|
|
29812
|
+
* @description Note: when MVCC branching isn't materialized as named branches in the user's store, this endpoint surfaces an empty diff. The shape is preserved so clients can rely on it without conditional code.
|
|
29813
|
+
*
|
|
29814
|
+
* @tags visualization
|
|
29815
|
+
* @name GetBranchDiffVisualization
|
|
29816
|
+
* @summary Render the diff between two MVCC branches of the tenant's term store. Each visible Ψ-term carries `properties.diff` ∈ `{added, removed, changed}` so the renderer can color-distinguish.
|
|
29817
|
+
* @request POST:/api/v1/visualization/branch-diff
|
|
29818
|
+
* @secure
|
|
29819
|
+
*/
|
|
29820
|
+
getBranchDiffVisualization: (data: BranchDiffRequest, params?: RequestParams) => Promise<HttpResponse<BranchDiffResponse, any>>;
|
|
28687
29821
|
/**
|
|
28688
29822
|
* No description
|
|
28689
29823
|
*
|
|
@@ -28694,6 +29828,46 @@ declare class Visualization<SecurityDataType = unknown> {
|
|
|
28694
29828
|
* @secure
|
|
28695
29829
|
*/
|
|
28696
29830
|
getConstraintGraph: (data: ConstraintGraphRequest$1, params?: RequestParams) => Promise<HttpResponse<ConstraintGraphResponse$1, any>>;
|
|
29831
|
+
/**
|
|
29832
|
+
* @description Each event is a JSON-encoded `DerivationStepEvent` with shape: ```json { "iteration": 3, "rule_id": "uuid", "antecedents": ["uuid",...], "derived_fact": "uuid" } ``` Sent once per record produced during the chainer pass. The client can animate each polygon emerging as its premise edges arrive.
|
|
29833
|
+
*
|
|
29834
|
+
* @tags visualization
|
|
29835
|
+
* @name GetDerivationStream
|
|
29836
|
+
* @summary SSE channel that streams the forward-chainer's derivation steps as they fire, instead of blocking until the full trace is assembled.
|
|
29837
|
+
* @request GET:/api/v1/visualization/derivation/stream
|
|
29838
|
+
* @secure
|
|
29839
|
+
*/
|
|
29840
|
+
getDerivationStream: (params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
29841
|
+
/**
|
|
29842
|
+
* @description Runs the homoiconic forward chainer with provenance enabled and emits a [`VisualizationGraph`] in which: - **Nodes** are Ψ-terms (each one is either an asserted fact, a rule, or a derived fact). Rules surface as `NodeType::Rule`. - **Edges** are `EdgeType::Derivation`, oriented antecedent → rule-application → produced-fact, mirroring the proof DAG. - **Hyperedges** are `HyperedgeType::DerivationStep` — one per rule application, grouping the rule with all its antecedents plus the produced fact. Rendering each step as a polygon makes "this fact came from these premises via this rule" visually atomic — exactly the idea behind Aït-Kaci & Sasaki's proof-tree diagrams in OSF/LIFE papers.
|
|
29843
|
+
*
|
|
29844
|
+
* @tags visualization
|
|
29845
|
+
* @name GetDerivationVisualization
|
|
29846
|
+
* @summary Get the forward-chain derivation lattice as a meta-hypergraph.
|
|
29847
|
+
* @request POST:/api/v1/visualization/derivation
|
|
29848
|
+
* @secure
|
|
29849
|
+
*/
|
|
29850
|
+
getDerivationVisualization: (data: DerivationVisualizationRequest, params?: RequestParams) => Promise<HttpResponse<DerivationVisualizationResponse, any>>;
|
|
29851
|
+
/**
|
|
29852
|
+
* No description
|
|
29853
|
+
*
|
|
29854
|
+
* @tags visualization
|
|
29855
|
+
* @name GetFunctionsVisualization
|
|
29856
|
+
* @summary Render the LIFE-style function definitions in the tenant's term store. A LIFE function is itself a Ψ-term (homoiconic) — typically a term whose sort is `function` (or a subtype) carrying features `head`, `body`, optional `equations`. This handler scans the store for terms matching that signature and emits one TermFeatures-style hyperedge per function so each is visually atomic.
|
|
29857
|
+
* @request POST:/api/v1/visualization/functions
|
|
29858
|
+
* @secure
|
|
29859
|
+
*/
|
|
29860
|
+
getFunctionsVisualization: (data: FunctionsVisualizationRequest, params?: RequestParams) => Promise<HttpResponse<FunctionsVisualizationResponse, any>>;
|
|
29861
|
+
/**
|
|
29862
|
+
* No description
|
|
29863
|
+
*
|
|
29864
|
+
* @tags visualization
|
|
29865
|
+
* @name GetGradedPosetVisualization
|
|
29866
|
+
* @summary Render the graded-poset projection of the tenant's sort hierarchy per "Weisfeiler & Lehman Go Categorical" (Choi, Kim, Yun 2026): - elements = sorts - dimension(σ) = topological depth from the lattice top - coverings = parent → child (subtype) - 4-adjacency edges when requested
|
|
29867
|
+
* @request POST:/api/v1/visualization/graded-poset
|
|
29868
|
+
* @secure
|
|
29869
|
+
*/
|
|
29870
|
+
getGradedPosetVisualization: (data: GradedPosetRequest, params?: RequestParams) => Promise<HttpResponse<GradedPosetResponse, any>>;
|
|
28697
29871
|
/**
|
|
28698
29872
|
* No description
|
|
28699
29873
|
*
|
|
@@ -28714,6 +29888,16 @@ declare class Visualization<SecurityDataType = unknown> {
|
|
|
28714
29888
|
* @secure
|
|
28715
29889
|
*/
|
|
28716
29890
|
getLatticeDot: (params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
29891
|
+
/**
|
|
29892
|
+
* @description The layout is computed once per tenant (per hierarchy snapshot) and cached. Coordinates are stable across requests, so the client can pan/zoom by submitting different bboxes and the same node always lands at the same screen position.
|
|
29893
|
+
*
|
|
29894
|
+
* @tags visualization
|
|
29895
|
+
* @name GetLatticeTile
|
|
29896
|
+
* @summary Render only the lattice nodes that fall inside the client's viewport, using a stable pre-computed deterministic layout. This scales to millions of sorts because the per-request work is O(K) where K is the number of nodes inside the viewport, not O(N).
|
|
29897
|
+
* @request POST:/api/v1/visualization/lattice-tile
|
|
29898
|
+
* @secure
|
|
29899
|
+
*/
|
|
29900
|
+
getLatticeTile: (data: LatticeTileRequest, params?: RequestParams) => Promise<HttpResponse<LatticeTileResponse, any>>;
|
|
28717
29901
|
/**
|
|
28718
29902
|
* @description Returns a graph representation of the sort hierarchy with nodes for each sort and edges for subtype relationships. Supports filtering by root sort and depth.
|
|
28719
29903
|
*
|
|
@@ -28734,6 +29918,26 @@ declare class Visualization<SecurityDataType = unknown> {
|
|
|
28734
29918
|
* @secure
|
|
28735
29919
|
*/
|
|
28736
29920
|
getResiduationState: (data: ResiduationStateRequest$1, params?: RequestParams) => Promise<HttpResponse<ResiduationStateResponse$1, any>>;
|
|
29921
|
+
/**
|
|
29922
|
+
* @description BFS expands ancestors and/or descendants from the focus, emitting each visited sort with its signed hop distance as `level`. When the visit count would exceed `max_nodes`, the BFS halts and the `truncated` flag is set; the closest sorts are kept.
|
|
29923
|
+
*
|
|
29924
|
+
* @tags visualization
|
|
29925
|
+
* @name GetSortNeighborhood
|
|
29926
|
+
* @summary Render an N-hop neighborhood around a focus sort, capped at `max_nodes`. Designed for tenants with millions of sorts — the client never sees the full lattice; it browses by picking a focus and walking outward.
|
|
29927
|
+
* @request POST:/api/v1/visualization/sort-neighborhood
|
|
29928
|
+
* @secure
|
|
29929
|
+
*/
|
|
29930
|
+
getSortNeighborhood: (data: SortNeighborhoodRequest, params?: RequestParams) => Promise<HttpResponse<SortNeighborhoodResponse, any>>;
|
|
29931
|
+
/**
|
|
29932
|
+
* No description
|
|
29933
|
+
*
|
|
29934
|
+
* @tags visualization
|
|
29935
|
+
* @name GetTermListVisualization
|
|
29936
|
+
* @summary Paginated raw list of Ψ-terms for visualization. Mirrors the `lattice` endpoint but for terms — at 9M terms in the drug-discovery tenant the first page returns sub-second without loading the in-memory term store.
|
|
29937
|
+
* @request POST:/api/v1/visualization/term-list
|
|
29938
|
+
* @secure
|
|
29939
|
+
*/
|
|
29940
|
+
getTermListVisualization: (data: TermListRequest, params?: RequestParams) => Promise<HttpResponse<TermListResponse$1, any>>;
|
|
28737
29941
|
/**
|
|
28738
29942
|
* No description
|
|
28739
29943
|
*
|
|
@@ -28754,6 +29958,16 @@ declare class Visualization<SecurityDataType = unknown> {
|
|
|
28754
29958
|
* @secure
|
|
28755
29959
|
*/
|
|
28756
29960
|
getTriggerDependencies: (data: TriggerDependencyRequest$1, params?: RequestParams) => Promise<HttpResponse<TriggerDependencyResponse$1, any>>;
|
|
29961
|
+
/**
|
|
29962
|
+
* @description **Unify (`⊔`)**: computes the meet on the Ψ-term lattice — the most-specific term that subsumes both operands. Variables in either operand bind to the corresponding sub-term in the other. **Anti-unify (`⊓`)**: computes the join — the least-general generalization (LGG) that subsumes both operands, introducing fresh variables where they disagree. This is the operation Aït-Kaci & Sasaki used for ILP rule synthesis. The handler runs the operation in a sandbox (trail-undone after snapshot) so the tenant's term store is not mutated by a visualization request. Returns operand1, operand2, and the result as polygons in one `VisualizationGraph`, with `properties.role` distinguishing each.
|
|
29963
|
+
*
|
|
29964
|
+
* @tags visualization
|
|
29965
|
+
* @name GetUnifyTermsVisualization
|
|
29966
|
+
* @summary Render the unification (or anti-unification) of two Ψ-terms.
|
|
29967
|
+
* @request POST:/api/v1/visualization/unify-terms
|
|
29968
|
+
* @secure
|
|
29969
|
+
*/
|
|
29970
|
+
getUnifyTermsVisualization: (data: UnifyTermsRequest$1, params?: RequestParams) => Promise<HttpResponse<UnifyTermsResponse$1, any>>;
|
|
28757
29971
|
/**
|
|
28758
29972
|
* No description
|
|
28759
29973
|
*
|
|
@@ -39819,6 +41033,362 @@ declare class SchedulingClient {
|
|
|
39819
41033
|
optimize(request: SchedulingOptimizeRequest): Promise<SchedulingOptimizeResponse>;
|
|
39820
41034
|
}
|
|
39821
41035
|
|
|
41036
|
+
declare class FlowNetworks<SecurityDataType = unknown> {
|
|
41037
|
+
http: HttpClient<SecurityDataType>;
|
|
41038
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
41039
|
+
/**
|
|
41040
|
+
* No description
|
|
41041
|
+
*
|
|
41042
|
+
* @tags flow-networks
|
|
41043
|
+
* @name CloneFlowNetwork
|
|
41044
|
+
* @summary Clone a flow network for what-if analysis.
|
|
41045
|
+
* @request POST:/api/v1/flow-networks/{network_id}/clone
|
|
41046
|
+
* @secure
|
|
41047
|
+
*/
|
|
41048
|
+
cloneFlowNetwork: (networkId: string, params?: RequestParams) => Promise<HttpResponse<FlowNetworkResponse$1, void>>;
|
|
41049
|
+
/**
|
|
41050
|
+
* No description
|
|
41051
|
+
*
|
|
41052
|
+
* @tags flow-networks
|
|
41053
|
+
* @name CommitFlowNetwork
|
|
41054
|
+
* @summary Commit structural mutations (capacity updates and/or new edges).
|
|
41055
|
+
* @request POST:/api/v1/flow-networks/{network_id}/commit
|
|
41056
|
+
* @secure
|
|
41057
|
+
*/
|
|
41058
|
+
commitFlowNetwork: (networkId: string, data: CommitFlowNetworkRequest$1, params?: RequestParams) => Promise<HttpResponse<FlowNetworkResponse$1, void>>;
|
|
41059
|
+
/**
|
|
41060
|
+
* No description
|
|
41061
|
+
*
|
|
41062
|
+
* @tags flow-networks
|
|
41063
|
+
* @name CreateFlowNetwork
|
|
41064
|
+
* @summary Create a new flow network.
|
|
41065
|
+
* @request POST:/api/v1/flow-networks
|
|
41066
|
+
* @secure
|
|
41067
|
+
*/
|
|
41068
|
+
createFlowNetwork: (data: CreateFlowNetworkRequest$1, params?: RequestParams) => Promise<HttpResponse<FlowNetworkResponse$1, void>>;
|
|
41069
|
+
/**
|
|
41070
|
+
* No description
|
|
41071
|
+
*
|
|
41072
|
+
* @tags flow-networks
|
|
41073
|
+
* @name GetFlowNetwork
|
|
41074
|
+
* @summary Get a flow network's status.
|
|
41075
|
+
* @request GET:/api/v1/flow-networks/{network_id}
|
|
41076
|
+
* @secure
|
|
41077
|
+
*/
|
|
41078
|
+
getFlowNetwork: (networkId: string, params?: RequestParams) => Promise<HttpResponse<FlowNetworkResponse$1, void>>;
|
|
41079
|
+
/**
|
|
41080
|
+
* No description
|
|
41081
|
+
*
|
|
41082
|
+
* @tags flow-networks
|
|
41083
|
+
* @name SolveFlowNetwork
|
|
41084
|
+
* @summary Solve a flow network with the chosen algorithm.
|
|
41085
|
+
* @request POST:/api/v1/flow-networks/{network_id}/solve
|
|
41086
|
+
* @secure
|
|
41087
|
+
*/
|
|
41088
|
+
solveFlowNetwork: (networkId: string, data: SolveFlowNetworkRequest$1, params?: RequestParams) => Promise<HttpResponse<SolveFlowNetworkResponse$1, void>>;
|
|
41089
|
+
}
|
|
41090
|
+
|
|
41091
|
+
/**
|
|
41092
|
+
* Strategy chosen at solve time.
|
|
41093
|
+
*
|
|
41094
|
+
* The flow network is algorithm-agnostic — the same persisted graph
|
|
41095
|
+
* can be solved with different algorithms, and the response shape
|
|
41096
|
+
* narrows the relevant fields per algorithm.
|
|
41097
|
+
*
|
|
41098
|
+
* - `"max_flow"` — Dinic's algorithm. Returns `totalFlow` + per-edge flow.
|
|
41099
|
+
* - `"min_cost_max_flow"` — Successive-shortest-path MCMF. Returns
|
|
41100
|
+
* `totalFlow`, `totalCost`, per-edge flow. Edges should carry `cost`.
|
|
41101
|
+
* - `"classify_edges"` — Dulmage–Mendelsohn residual classification.
|
|
41102
|
+
* Returns per-edge `always_used` / `never_used` / `sometimes_used`.
|
|
41103
|
+
* - `"classify_edges_optimal"` — As above, but only over **optimal**
|
|
41104
|
+
* (min-cost) max-flow solutions.
|
|
41105
|
+
* - `"min_cut"` — Source-sink min cut. Returns the cut partition and
|
|
41106
|
+
* the saturated cut edges.
|
|
41107
|
+
*/
|
|
41108
|
+
type FlowAlgorithm = {
|
|
41109
|
+
kind: 'max_flow';
|
|
41110
|
+
} | {
|
|
41111
|
+
kind: 'min_cost_max_flow';
|
|
41112
|
+
} | {
|
|
41113
|
+
kind: 'classify_edges';
|
|
41114
|
+
} | {
|
|
41115
|
+
kind: 'classify_edges_optimal';
|
|
41116
|
+
} | {
|
|
41117
|
+
kind: 'min_cut';
|
|
41118
|
+
};
|
|
41119
|
+
/**
|
|
41120
|
+
* A single directed edge in the flow network.
|
|
41121
|
+
*/
|
|
41122
|
+
interface EdgeSpec {
|
|
41123
|
+
/** Source node name. Must appear in the network's node list. */
|
|
41124
|
+
from: string;
|
|
41125
|
+
/** Destination node name. Must appear in the network's node list. */
|
|
41126
|
+
to: string;
|
|
41127
|
+
/** Capacity (must be ≥ 0). */
|
|
41128
|
+
capacity: number;
|
|
41129
|
+
/**
|
|
41130
|
+
* Optional per-unit-flow cost. Defaults to zero — pure max-flow
|
|
41131
|
+
* algorithms ignore this field.
|
|
41132
|
+
*/
|
|
41133
|
+
cost?: number | null;
|
|
41134
|
+
/**
|
|
41135
|
+
* Optional caller-supplied label. Must be unique across the
|
|
41136
|
+
* network when present. Used to reference the edge in commit
|
|
41137
|
+
* requests and to identify it in solver output.
|
|
41138
|
+
*/
|
|
41139
|
+
label?: string | null;
|
|
41140
|
+
}
|
|
41141
|
+
/**
|
|
41142
|
+
* Input to {@link FlowNetworksClient.create}.
|
|
41143
|
+
*/
|
|
41144
|
+
interface CreateFlowNetworkRequest {
|
|
41145
|
+
/** Node names. Must be unique. */
|
|
41146
|
+
nodes: string[];
|
|
41147
|
+
/** Source node name. Must appear in `nodes`. */
|
|
41148
|
+
source: string;
|
|
41149
|
+
/** Sink node name. Must appear in `nodes`, distinct from `source`. */
|
|
41150
|
+
sink: string;
|
|
41151
|
+
/** Initial edges. Order is preserved in inspection responses. */
|
|
41152
|
+
edges: EdgeSpec[];
|
|
41153
|
+
/**
|
|
41154
|
+
* Optional human-readable description. Stored only as part of the
|
|
41155
|
+
* response for inspection convenience.
|
|
41156
|
+
*/
|
|
41157
|
+
description?: string | null;
|
|
41158
|
+
}
|
|
41159
|
+
/**
|
|
41160
|
+
* Status snapshot returned by every endpoint that does not solve
|
|
41161
|
+
* (create, get, clone, commit).
|
|
41162
|
+
*/
|
|
41163
|
+
interface FlowNetworkResponse {
|
|
41164
|
+
/** Stable identifier assigned at creation; clones receive a new id. */
|
|
41165
|
+
id: string;
|
|
41166
|
+
/** Source node name. */
|
|
41167
|
+
source: string;
|
|
41168
|
+
/** Sink node name. */
|
|
41169
|
+
sink: string;
|
|
41170
|
+
/** Number of declared nodes. */
|
|
41171
|
+
nodeCount: number;
|
|
41172
|
+
/** Number of declared forward edges. */
|
|
41173
|
+
edgeCount: number;
|
|
41174
|
+
/** Optional description echoed from the create request. */
|
|
41175
|
+
description?: string | null;
|
|
41176
|
+
}
|
|
41177
|
+
/**
|
|
41178
|
+
* Replace the capacity of a labelled edge.
|
|
41179
|
+
*/
|
|
41180
|
+
interface EdgeCapacityUpdate {
|
|
41181
|
+
/** Edge label declared at construction or via a prior commit. */
|
|
41182
|
+
label: string;
|
|
41183
|
+
/** New capacity (must be ≥ 0). */
|
|
41184
|
+
capacity: number;
|
|
41185
|
+
}
|
|
41186
|
+
/**
|
|
41187
|
+
* Input to {@link FlowNetworksClient.commit}.
|
|
41188
|
+
*
|
|
41189
|
+
* @remarks
|
|
41190
|
+
* Both fields are optional and may be supplied together. Capacity
|
|
41191
|
+
* updates apply before new edges are appended.
|
|
41192
|
+
*/
|
|
41193
|
+
interface CommitFlowNetworkRequest {
|
|
41194
|
+
/** Capacity updates keyed by edge label. */
|
|
41195
|
+
updateCapacities?: EdgeCapacityUpdate[];
|
|
41196
|
+
/**
|
|
41197
|
+
* Edges to append. Source/destination must reference declared
|
|
41198
|
+
* nodes.
|
|
41199
|
+
*/
|
|
41200
|
+
addEdges?: EdgeSpec[];
|
|
41201
|
+
}
|
|
41202
|
+
/**
|
|
41203
|
+
* Input to {@link FlowNetworksClient.solve}.
|
|
41204
|
+
*/
|
|
41205
|
+
interface SolveFlowNetworkRequest {
|
|
41206
|
+
/** Algorithm to dispatch. */
|
|
41207
|
+
algorithm: FlowAlgorithm;
|
|
41208
|
+
}
|
|
41209
|
+
/**
|
|
41210
|
+
* Flow snapshot for a single forward edge.
|
|
41211
|
+
*/
|
|
41212
|
+
interface EdgeFlow {
|
|
41213
|
+
/** Source node name. */
|
|
41214
|
+
from: string;
|
|
41215
|
+
/** Destination node name. */
|
|
41216
|
+
to: string;
|
|
41217
|
+
/** Caller-supplied label, if any. */
|
|
41218
|
+
label?: string | null;
|
|
41219
|
+
/** Original capacity. */
|
|
41220
|
+
capacity: number;
|
|
41221
|
+
/** Flow currently routed through this edge in the solver's output. */
|
|
41222
|
+
flow: number;
|
|
41223
|
+
}
|
|
41224
|
+
/** Edge feasibility class. */
|
|
41225
|
+
type EdgeClass = 'always_used' | 'never_used' | 'sometimes_used';
|
|
41226
|
+
/**
|
|
41227
|
+
* Per-edge classification produced by the `classify_edges` /
|
|
41228
|
+
* `classify_edges_optimal` algorithms.
|
|
41229
|
+
*/
|
|
41230
|
+
interface EdgeClassification {
|
|
41231
|
+
from: string;
|
|
41232
|
+
to: string;
|
|
41233
|
+
label?: string | null;
|
|
41234
|
+
/** Class string: `"always_used"`, `"never_used"`, `"sometimes_used"`. */
|
|
41235
|
+
class: EdgeClass;
|
|
41236
|
+
}
|
|
41237
|
+
/**
|
|
41238
|
+
* Min-cut partition output (only populated when `algorithm.kind`
|
|
41239
|
+
* is `"min_cut"`).
|
|
41240
|
+
*/
|
|
41241
|
+
interface MinCutReport {
|
|
41242
|
+
/** Names of nodes on the source side of the cut. */
|
|
41243
|
+
sourceSide: string[];
|
|
41244
|
+
/** Names of nodes on the sink side of the cut. */
|
|
41245
|
+
sinkSide: string[];
|
|
41246
|
+
/**
|
|
41247
|
+
* Cut edges (saturated forward edges crossing source-side →
|
|
41248
|
+
* sink-side). Their summed `capacity` equals the max flow value.
|
|
41249
|
+
*/
|
|
41250
|
+
cutEdges: EdgeFlow[];
|
|
41251
|
+
}
|
|
41252
|
+
/**
|
|
41253
|
+
* Solver output. Fields irrelevant to the chosen algorithm are
|
|
41254
|
+
* undefined (the backend omits them via `skip_serializing_if`).
|
|
41255
|
+
*/
|
|
41256
|
+
interface SolveFlowNetworkResponse {
|
|
41257
|
+
/** Echo of the algorithm dispatched. */
|
|
41258
|
+
algorithm: FlowAlgorithm;
|
|
41259
|
+
/** Per-edge flow snapshot. */
|
|
41260
|
+
edgeFlows: EdgeFlow[];
|
|
41261
|
+
/** Total flow source → sink (max-flow / mcmf / min-cut). */
|
|
41262
|
+
totalFlow?: number | null;
|
|
41263
|
+
/** Total cost of the realised flow (mcmf only). */
|
|
41264
|
+
totalCost?: number | null;
|
|
41265
|
+
/** Per-edge classification (classify_* algorithms only). */
|
|
41266
|
+
classifications?: EdgeClassification[] | null;
|
|
41267
|
+
/** Min-cut partition (min_cut algorithm only). */
|
|
41268
|
+
minCut?: MinCutReport | null;
|
|
41269
|
+
}
|
|
41270
|
+
|
|
41271
|
+
type flowNetworks_CommitFlowNetworkRequest = CommitFlowNetworkRequest;
|
|
41272
|
+
type flowNetworks_CreateFlowNetworkRequest = CreateFlowNetworkRequest;
|
|
41273
|
+
type flowNetworks_EdgeCapacityUpdate = EdgeCapacityUpdate;
|
|
41274
|
+
type flowNetworks_EdgeClass = EdgeClass;
|
|
41275
|
+
type flowNetworks_EdgeClassification = EdgeClassification;
|
|
41276
|
+
type flowNetworks_EdgeFlow = EdgeFlow;
|
|
41277
|
+
type flowNetworks_EdgeSpec = EdgeSpec;
|
|
41278
|
+
type flowNetworks_FlowAlgorithm = FlowAlgorithm;
|
|
41279
|
+
type flowNetworks_FlowNetworkResponse = FlowNetworkResponse;
|
|
41280
|
+
type flowNetworks_MinCutReport = MinCutReport;
|
|
41281
|
+
type flowNetworks_SolveFlowNetworkRequest = SolveFlowNetworkRequest;
|
|
41282
|
+
type flowNetworks_SolveFlowNetworkResponse = SolveFlowNetworkResponse;
|
|
41283
|
+
declare namespace flowNetworks {
|
|
41284
|
+
export type { flowNetworks_CommitFlowNetworkRequest as CommitFlowNetworkRequest, flowNetworks_CreateFlowNetworkRequest as CreateFlowNetworkRequest, flowNetworks_EdgeCapacityUpdate as EdgeCapacityUpdate, flowNetworks_EdgeClass as EdgeClass, flowNetworks_EdgeClassification as EdgeClassification, flowNetworks_EdgeFlow as EdgeFlow, flowNetworks_EdgeSpec as EdgeSpec, flowNetworks_FlowAlgorithm as FlowAlgorithm, flowNetworks_FlowNetworkResponse as FlowNetworkResponse, flowNetworks_MinCutReport as MinCutReport, flowNetworks_SolveFlowNetworkRequest as SolveFlowNetworkRequest, flowNetworks_SolveFlowNetworkResponse as SolveFlowNetworkResponse };
|
|
41285
|
+
}
|
|
41286
|
+
|
|
41287
|
+
/**
|
|
41288
|
+
* Resource client for the generic flow-network engine.
|
|
41289
|
+
*
|
|
41290
|
+
* @remarks
|
|
41291
|
+
* The engine persists a directed capacitated graph under a stable id
|
|
41292
|
+
* and dispatches a chosen algorithm (max-flow, min-cost max-flow,
|
|
41293
|
+
* edge-classification, min-cut) over it. Domain shapes (scheduling,
|
|
41294
|
+
* transportation, …) become translators that build a
|
|
41295
|
+
* {@link CreateFlowNetworkRequest}; the engine itself knows nothing
|
|
41296
|
+
* about agents, days, or shifts.
|
|
41297
|
+
*
|
|
41298
|
+
* Lifecycle mirrors the `/spaces` resource: `create` → optional
|
|
41299
|
+
* `clone` (for what-if branches) → optional `commit` (capacity tweaks
|
|
41300
|
+
* / edge appends) → `solve`.
|
|
41301
|
+
*
|
|
41302
|
+
* @example Solve max-flow on a tiny network
|
|
41303
|
+
* ```typescript
|
|
41304
|
+
* const network = await client.flowNetworks.create({
|
|
41305
|
+
* nodes: ['s', 'a', 'b', 't'],
|
|
41306
|
+
* source: 's',
|
|
41307
|
+
* sink: 't',
|
|
41308
|
+
* edges: [
|
|
41309
|
+
* { from: 's', to: 'a', capacity: 3 },
|
|
41310
|
+
* { from: 's', to: 'b', capacity: 2 },
|
|
41311
|
+
* { from: 'a', to: 't', capacity: 2 },
|
|
41312
|
+
* { from: 'b', to: 't', capacity: 3 },
|
|
41313
|
+
* ],
|
|
41314
|
+
* });
|
|
41315
|
+
*
|
|
41316
|
+
* const result = await client.flowNetworks.solve(network.id, {
|
|
41317
|
+
* algorithm: { kind: 'max_flow' },
|
|
41318
|
+
* });
|
|
41319
|
+
*
|
|
41320
|
+
* console.log(result.totalFlow); // 4
|
|
41321
|
+
* ```
|
|
41322
|
+
*
|
|
41323
|
+
* @example What-if branch via clone + commit
|
|
41324
|
+
* ```typescript
|
|
41325
|
+
* const branch = await client.flowNetworks.clone(network.id);
|
|
41326
|
+
* await client.flowNetworks.commit(branch.id, {
|
|
41327
|
+
* updateCapacities: [{ label: 'edge-a-t', capacity: 5 }],
|
|
41328
|
+
* });
|
|
41329
|
+
* const result = await client.flowNetworks.solve(branch.id, {
|
|
41330
|
+
* algorithm: { kind: 'max_flow' },
|
|
41331
|
+
* });
|
|
41332
|
+
* ```
|
|
41333
|
+
*/
|
|
41334
|
+
declare class FlowNetworksClient {
|
|
41335
|
+
/** @internal */
|
|
41336
|
+
private readonly api;
|
|
41337
|
+
/** @internal */
|
|
41338
|
+
constructor(api: FlowNetworks);
|
|
41339
|
+
/**
|
|
41340
|
+
* Create and persist a new flow network.
|
|
41341
|
+
*
|
|
41342
|
+
* @param request - graph shape, source/sink, and initial edges.
|
|
41343
|
+
* @returns metadata for the new network (including its id).
|
|
41344
|
+
* @throws HTTP 400 if the input is malformed (duplicate node names,
|
|
41345
|
+
* source/sink not in `nodes`, edges referencing unknown nodes,
|
|
41346
|
+
* negative capacities, duplicate edge labels).
|
|
41347
|
+
*/
|
|
41348
|
+
create(request: CreateFlowNetworkRequest): Promise<FlowNetworkResponse>;
|
|
41349
|
+
/**
|
|
41350
|
+
* Fetch the current status snapshot of a flow network.
|
|
41351
|
+
*
|
|
41352
|
+
* @throws HTTP 404 if the id is unknown.
|
|
41353
|
+
*/
|
|
41354
|
+
get(networkId: string): Promise<FlowNetworkResponse>;
|
|
41355
|
+
/**
|
|
41356
|
+
* Clone an existing flow network for what-if analysis. The clone
|
|
41357
|
+
* receives a new id and its own mutable graph; the original is
|
|
41358
|
+
* unaffected.
|
|
41359
|
+
*
|
|
41360
|
+
* @throws HTTP 404 if the id is unknown.
|
|
41361
|
+
*/
|
|
41362
|
+
clone(networkId: string): Promise<FlowNetworkResponse>;
|
|
41363
|
+
/**
|
|
41364
|
+
* Apply structural mutations to an existing network: replace
|
|
41365
|
+
* capacities of labelled edges and/or append new edges. Both
|
|
41366
|
+
* fields on the request are optional; capacity updates apply
|
|
41367
|
+
* before new edges are added.
|
|
41368
|
+
*
|
|
41369
|
+
* @throws HTTP 400 if a referenced label is unknown, an appended
|
|
41370
|
+
* edge references undeclared nodes, or capacities are negative.
|
|
41371
|
+
* @throws HTTP 404 if the id is unknown.
|
|
41372
|
+
*/
|
|
41373
|
+
commit(networkId: string, request: CommitFlowNetworkRequest): Promise<FlowNetworkResponse>;
|
|
41374
|
+
/**
|
|
41375
|
+
* Run the chosen algorithm against the persisted network.
|
|
41376
|
+
*
|
|
41377
|
+
* @remarks
|
|
41378
|
+
* The response shape narrows per algorithm:
|
|
41379
|
+
*
|
|
41380
|
+
* - `max_flow` — `totalFlow` + `edgeFlows`.
|
|
41381
|
+
* - `min_cost_max_flow` — `totalFlow`, `totalCost`, `edgeFlows`.
|
|
41382
|
+
* - `classify_edges` / `classify_edges_optimal` — `classifications`.
|
|
41383
|
+
* - `min_cut` — `totalFlow`, `edgeFlows`, `minCut`.
|
|
41384
|
+
*
|
|
41385
|
+
* Fields irrelevant to the chosen algorithm are `undefined`.
|
|
41386
|
+
*
|
|
41387
|
+
* @throws HTTP 404 if the id is unknown.
|
|
41388
|
+
*/
|
|
41389
|
+
solve(networkId: string, request: SolveFlowNetworkRequest): Promise<SolveFlowNetworkResponse>;
|
|
41390
|
+
}
|
|
41391
|
+
|
|
39822
41392
|
declare class Osfql<SecurityDataType = unknown> {
|
|
39823
41393
|
http: HttpClient<SecurityDataType>;
|
|
39824
41394
|
constructor(http: HttpClient<SecurityDataType>);
|
|
@@ -41392,6 +42962,442 @@ declare class UiClient {
|
|
|
41392
42962
|
catalog(): Promise<UICatalogResponse>;
|
|
41393
42963
|
}
|
|
41394
42964
|
|
|
42965
|
+
declare class Compliance<SecurityDataType = unknown> {
|
|
42966
|
+
http: HttpClient<SecurityDataType>;
|
|
42967
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
42968
|
+
/**
|
|
42969
|
+
* No description
|
|
42970
|
+
*
|
|
42971
|
+
* @tags compliance
|
|
42972
|
+
* @name Append
|
|
42973
|
+
* @summary `POST /api/v1/compliance/audit/append`
|
|
42974
|
+
* @request POST:/api/v1/compliance/audit/append
|
|
42975
|
+
* @secure
|
|
42976
|
+
*/
|
|
42977
|
+
append: (data: AppendRequest$1, params?: RequestParams) => Promise<HttpResponse<AuditRecord$1, any>>;
|
|
42978
|
+
/**
|
|
42979
|
+
* No description
|
|
42980
|
+
*
|
|
42981
|
+
* @tags compliance
|
|
42982
|
+
* @name CaptureSnapshot
|
|
42983
|
+
* @summary `POST /api/v1/predictions/snapshot`
|
|
42984
|
+
* @request POST:/api/v1/predictions/snapshot
|
|
42985
|
+
* @secure
|
|
42986
|
+
*/
|
|
42987
|
+
captureSnapshot: (data: CaptureSnapshotRequest$1, params?: RequestParams) => Promise<HttpResponse<PredictionSnapshot$1, any>>;
|
|
42988
|
+
/**
|
|
42989
|
+
* No description
|
|
42990
|
+
*
|
|
42991
|
+
* @tags compliance
|
|
42992
|
+
* @name GetSnapshot
|
|
42993
|
+
* @summary `GET /api/v1/predictions/snapshot/{id}`
|
|
42994
|
+
* @request GET:/api/v1/predictions/snapshot/{id}
|
|
42995
|
+
* @secure
|
|
42996
|
+
*/
|
|
42997
|
+
getSnapshot: (id: string, params?: RequestParams) => Promise<HttpResponse<PredictionSnapshot$1, any>>;
|
|
42998
|
+
/**
|
|
42999
|
+
* No description
|
|
43000
|
+
*
|
|
43001
|
+
* @tags compliance
|
|
43002
|
+
* @name List
|
|
43003
|
+
* @summary `GET /api/v1/compliance/audit/list`
|
|
43004
|
+
* @request GET:/api/v1/compliance/audit/list
|
|
43005
|
+
* @secure
|
|
43006
|
+
*/
|
|
43007
|
+
list: (query?: {
|
|
43008
|
+
/**
|
|
43009
|
+
* @format int32
|
|
43010
|
+
* @min 0
|
|
43011
|
+
*/
|
|
43012
|
+
limit?: number | null;
|
|
43013
|
+
request_path_pattern?: string | null;
|
|
43014
|
+
}, params?: RequestParams) => Promise<HttpResponse<AuditRecord$1[], any>>;
|
|
43015
|
+
/**
|
|
43016
|
+
* No description
|
|
43017
|
+
*
|
|
43018
|
+
* @tags compliance
|
|
43019
|
+
* @name Summary
|
|
43020
|
+
* @summary `GET /api/v1/compliance/audit/summary`
|
|
43021
|
+
* @request GET:/api/v1/compliance/audit/summary
|
|
43022
|
+
* @secure
|
|
43023
|
+
*/
|
|
43024
|
+
summary: (params?: RequestParams) => Promise<HttpResponse<SummaryResponse$1, any>>;
|
|
43025
|
+
/**
|
|
43026
|
+
* @description Runs validation with a built-in stub provider that returns `Pending` for every entry. Real consumers wire their own `GroundTruthProviderPort` implementation and call `PredictionLedgerPort::validate` from a service.
|
|
43027
|
+
*
|
|
43028
|
+
* @tags compliance
|
|
43029
|
+
* @name ValidateStub
|
|
43030
|
+
* @summary `POST /api/v1/predictions/snapshot/{id}/validate-stub`
|
|
43031
|
+
* @request POST:/api/v1/predictions/snapshot/{id}/validate-stub
|
|
43032
|
+
* @secure
|
|
43033
|
+
*/
|
|
43034
|
+
validateStub: (id: string, params?: RequestParams) => Promise<HttpResponse<ValidationReportDto$1, any>>;
|
|
43035
|
+
/**
|
|
43036
|
+
* No description
|
|
43037
|
+
*
|
|
43038
|
+
* @tags compliance
|
|
43039
|
+
* @name Verify
|
|
43040
|
+
* @summary `GET /api/v1/compliance/audit/verify`
|
|
43041
|
+
* @request GET:/api/v1/compliance/audit/verify
|
|
43042
|
+
* @secure
|
|
43043
|
+
*/
|
|
43044
|
+
verify: (params?: RequestParams) => Promise<HttpResponse<VerifyResponse$1, void>>;
|
|
43045
|
+
}
|
|
43046
|
+
|
|
43047
|
+
/**
|
|
43048
|
+
* Hash-chained audit ledger and prediction-snapshot validation —
|
|
43049
|
+
* `/api/v1/compliance/*` and `/api/v1/predictions/*`.
|
|
43050
|
+
*
|
|
43051
|
+
* Every API call (or any explicitly logged event) becomes an append-
|
|
43052
|
+
* only `AuditRecord` whose `record_hash` chains into the previous
|
|
43053
|
+
* record's `prev_hash`. Snapshots freeze a slice of the ledger
|
|
43054
|
+
* matching a request-path glob and let an external validator
|
|
43055
|
+
* mark each prediction `Validated` / `Refuted` / `Unknown`.
|
|
43056
|
+
*
|
|
43057
|
+
* @module
|
|
43058
|
+
*/
|
|
43059
|
+
/** Verdict of a prediction snapshot entry against ground truth. */
|
|
43060
|
+
type GroundTruthStatus = 'Pending' | 'Validated' | 'Refuted' | 'Unknown';
|
|
43061
|
+
/**
|
|
43062
|
+
* Body for `POST /api/v1/compliance/audit/append` — record one event
|
|
43063
|
+
* in the tenant's audit ledger.
|
|
43064
|
+
*/
|
|
43065
|
+
interface AppendRequest {
|
|
43066
|
+
/** Hash of the request body (caller chooses the hashing scheme). */
|
|
43067
|
+
requestHash: string;
|
|
43068
|
+
/** Path of the request being audited (e.g. `/api/v1/inference/backward-chain`). */
|
|
43069
|
+
requestPath: string;
|
|
43070
|
+
/** Hash of the response body. */
|
|
43071
|
+
responseHash: string;
|
|
43072
|
+
/** Optional map of input-data versions in effect at request time. */
|
|
43073
|
+
dataVersions?: Record<string, string>;
|
|
43074
|
+
/** Optional bag of caller-defined metadata. */
|
|
43075
|
+
extra?: Record<string, unknown>;
|
|
43076
|
+
}
|
|
43077
|
+
/** A single record in the tenant's hash-chained audit ledger. */
|
|
43078
|
+
interface AuditRecord {
|
|
43079
|
+
/** Stable id of this record. */
|
|
43080
|
+
id: string;
|
|
43081
|
+
/** Tenant the record belongs to. */
|
|
43082
|
+
tenantId: string;
|
|
43083
|
+
/** Optional actor (user id) who triggered the request. */
|
|
43084
|
+
actor?: string | null;
|
|
43085
|
+
/** ISO-8601 timestamp at which the record was appended. */
|
|
43086
|
+
timestamp: string;
|
|
43087
|
+
/** Path of the audited request. */
|
|
43088
|
+
requestPath: string;
|
|
43089
|
+
/** Hash of the audited request body. */
|
|
43090
|
+
requestHash: string;
|
|
43091
|
+
/** Hash of the audited response body. */
|
|
43092
|
+
responseHash: string;
|
|
43093
|
+
/** Hash of the previous record (forms the chain). */
|
|
43094
|
+
prevHash: string;
|
|
43095
|
+
/** Hash of this record (computed from all other fields). */
|
|
43096
|
+
recordHash: string;
|
|
43097
|
+
/** Git revision of the engine that wrote this record. */
|
|
43098
|
+
gitRevision: string;
|
|
43099
|
+
/** Map of input-data versions in effect when the record was written. */
|
|
43100
|
+
dataVersions: Record<string, string>;
|
|
43101
|
+
/** Caller-defined metadata. */
|
|
43102
|
+
extra: Record<string, unknown>;
|
|
43103
|
+
}
|
|
43104
|
+
/** Filter for `GET /api/v1/compliance/audit/list`. */
|
|
43105
|
+
interface ListAuditOptions {
|
|
43106
|
+
/** Limit on the number of records returned. */
|
|
43107
|
+
limit?: number;
|
|
43108
|
+
/** Glob-style filter on `requestPath`. */
|
|
43109
|
+
requestPathPattern?: string;
|
|
43110
|
+
}
|
|
43111
|
+
/**
|
|
43112
|
+
* Response of `GET /api/v1/compliance/audit/summary` — top-line
|
|
43113
|
+
* counts over the tenant's full ledger.
|
|
43114
|
+
*/
|
|
43115
|
+
interface SummaryResponse {
|
|
43116
|
+
/** Number of records in the ledger. */
|
|
43117
|
+
nRecords: number;
|
|
43118
|
+
/** Counts grouped by actor id. */
|
|
43119
|
+
perActor: Record<string, number>;
|
|
43120
|
+
/** Counts grouped by request path. */
|
|
43121
|
+
perRequestPath: Record<string, number>;
|
|
43122
|
+
/** Tenant id (echoed back). */
|
|
43123
|
+
tenantId: string;
|
|
43124
|
+
/** ISO-8601 timestamp of the first record in the ledger. */
|
|
43125
|
+
tsFirst?: string;
|
|
43126
|
+
/** ISO-8601 timestamp of the last record. */
|
|
43127
|
+
tsLast?: string;
|
|
43128
|
+
}
|
|
43129
|
+
/**
|
|
43130
|
+
* Response of `GET /api/v1/compliance/audit/verify` — re-walks the
|
|
43131
|
+
* hash chain and reports any breaks.
|
|
43132
|
+
*/
|
|
43133
|
+
interface VerifyResponse {
|
|
43134
|
+
/** True iff the chain is intact. */
|
|
43135
|
+
ok: boolean;
|
|
43136
|
+
/** Number of detected violations. */
|
|
43137
|
+
nViolations: number;
|
|
43138
|
+
/** Raw violation entries (engine-defined shape). */
|
|
43139
|
+
violations: unknown[];
|
|
43140
|
+
}
|
|
43141
|
+
/**
|
|
43142
|
+
* Filter description that is persisted on each snapshot — mirrors the
|
|
43143
|
+
* `CaptureSnapshotRequest` minus the request-side optionality
|
|
43144
|
+
* (capture always records the resolved filter that was applied).
|
|
43145
|
+
*/
|
|
43146
|
+
interface SnapshotFilter {
|
|
43147
|
+
/** Glob-style pattern on `AuditRecord.requestPath`. */
|
|
43148
|
+
requestPathPattern: string;
|
|
43149
|
+
/** Lower bound on `AuditRecord.timestamp`. */
|
|
43150
|
+
capturedAfter?: string | null;
|
|
43151
|
+
/** Optional cap on the number of entries. */
|
|
43152
|
+
maxEntries?: number | null;
|
|
43153
|
+
}
|
|
43154
|
+
/** Body of `POST /api/v1/predictions/snapshot`. */
|
|
43155
|
+
interface CaptureSnapshotRequest {
|
|
43156
|
+
/** Glob-style pattern that selects which audit records to freeze. */
|
|
43157
|
+
requestPathPattern: string;
|
|
43158
|
+
/** Lower bound on `AuditRecord.timestamp` (ISO-8601). */
|
|
43159
|
+
capturedAfter?: string;
|
|
43160
|
+
/** Cap on the number of frozen entries. */
|
|
43161
|
+
maxEntries?: number;
|
|
43162
|
+
}
|
|
43163
|
+
/** A single prediction frozen into a snapshot, awaiting validation. */
|
|
43164
|
+
interface PredictionEntry {
|
|
43165
|
+
/** Stable id of this entry within the snapshot. */
|
|
43166
|
+
id: string;
|
|
43167
|
+
/** Hash of the audited request body that produced the prediction. */
|
|
43168
|
+
requestHash: string;
|
|
43169
|
+
/** Domain-shaped opaque payload — the engine never interprets it. */
|
|
43170
|
+
responseSummary: unknown;
|
|
43171
|
+
/** Back-pointer to the audit record this entry was derived from. */
|
|
43172
|
+
sourceRecordId: string;
|
|
43173
|
+
/** Verdict at capture time — always `Pending`. */
|
|
43174
|
+
capturedStatus: GroundTruthStatus;
|
|
43175
|
+
/** Verdict after the most recent validation pass; `null` until run. */
|
|
43176
|
+
validatedStatus?: GroundTruthStatus | null;
|
|
43177
|
+
/** ISO-8601 timestamp of the most recent validation pass. */
|
|
43178
|
+
validatedAt?: string | null;
|
|
43179
|
+
}
|
|
43180
|
+
/** A frozen slice of the audit ledger — the unit of validation. */
|
|
43181
|
+
interface PredictionSnapshot {
|
|
43182
|
+
/** Stable id of the snapshot. */
|
|
43183
|
+
id: string;
|
|
43184
|
+
/** Tenant the snapshot belongs to. */
|
|
43185
|
+
tenantId: string;
|
|
43186
|
+
/** ISO-8601 timestamp at which the snapshot was captured. */
|
|
43187
|
+
capturedAt: string;
|
|
43188
|
+
/** Filter that defined which audit records made it in. */
|
|
43189
|
+
filter: SnapshotFilter;
|
|
43190
|
+
/** Prediction entries the snapshot froze. */
|
|
43191
|
+
entries: PredictionEntry[];
|
|
43192
|
+
}
|
|
43193
|
+
/** Result of a `validate-stub` pass over a snapshot. */
|
|
43194
|
+
interface ValidationReportDto {
|
|
43195
|
+
/** Snapshot the report applies to. */
|
|
43196
|
+
snapshotId: string;
|
|
43197
|
+
/** ISO-8601 timestamp of the validation pass. */
|
|
43198
|
+
completedAt: string;
|
|
43199
|
+
/** Total entries considered. */
|
|
43200
|
+
nTotal: number;
|
|
43201
|
+
/** Entries verdict-`Pending`. */
|
|
43202
|
+
nPending: number;
|
|
43203
|
+
/** Entries verdict-`Validated`. */
|
|
43204
|
+
nValidated: number;
|
|
43205
|
+
/** Entries verdict-`Refuted`. */
|
|
43206
|
+
nRefuted: number;
|
|
43207
|
+
/** Entries whose ground truth couldn't be resolved. */
|
|
43208
|
+
nUnknown: number;
|
|
43209
|
+
/** Validated / non-pending ratio (null when no non-pending entries). */
|
|
43210
|
+
validationRate?: number | null;
|
|
43211
|
+
}
|
|
43212
|
+
|
|
43213
|
+
type compliance_AppendRequest = AppendRequest;
|
|
43214
|
+
type compliance_AuditRecord = AuditRecord;
|
|
43215
|
+
type compliance_CaptureSnapshotRequest = CaptureSnapshotRequest;
|
|
43216
|
+
type compliance_GroundTruthStatus = GroundTruthStatus;
|
|
43217
|
+
type compliance_ListAuditOptions = ListAuditOptions;
|
|
43218
|
+
type compliance_PredictionEntry = PredictionEntry;
|
|
43219
|
+
type compliance_PredictionSnapshot = PredictionSnapshot;
|
|
43220
|
+
type compliance_SnapshotFilter = SnapshotFilter;
|
|
43221
|
+
type compliance_SummaryResponse = SummaryResponse;
|
|
43222
|
+
type compliance_ValidationReportDto = ValidationReportDto;
|
|
43223
|
+
type compliance_VerifyResponse = VerifyResponse;
|
|
43224
|
+
declare namespace compliance {
|
|
43225
|
+
export type { compliance_AppendRequest as AppendRequest, compliance_AuditRecord as AuditRecord, compliance_CaptureSnapshotRequest as CaptureSnapshotRequest, compliance_GroundTruthStatus as GroundTruthStatus, compliance_ListAuditOptions as ListAuditOptions, compliance_PredictionEntry as PredictionEntry, compliance_PredictionSnapshot as PredictionSnapshot, compliance_SnapshotFilter as SnapshotFilter, compliance_SummaryResponse as SummaryResponse, compliance_ValidationReportDto as ValidationReportDto, compliance_VerifyResponse as VerifyResponse };
|
|
43226
|
+
}
|
|
43227
|
+
|
|
43228
|
+
/**
|
|
43229
|
+
* Resource client for the hash-chained audit ledger and prediction-
|
|
43230
|
+
* snapshot validation pipeline (`/api/v1/compliance/*` and
|
|
43231
|
+
* `/api/v1/predictions/*`).
|
|
43232
|
+
*
|
|
43233
|
+
* @remarks
|
|
43234
|
+
* Two cooperating mechanisms:
|
|
43235
|
+
*
|
|
43236
|
+
* - **Audit ledger** — every API call (or anything explicitly
|
|
43237
|
+
* appended via {@link append}) becomes an immutable
|
|
43238
|
+
* `AuditRecord` whose `recordHash` chains into the previous
|
|
43239
|
+
* record's `prevHash`. {@link verify} re-walks the chain and
|
|
43240
|
+
* reports breaks; {@link summary} returns top-line counts.
|
|
43241
|
+
*
|
|
43242
|
+
* - **Prediction snapshots** — {@link captureSnapshot} freezes a
|
|
43243
|
+
* slice of the ledger matching a request-path glob, producing a
|
|
43244
|
+
* `PredictionSnapshot` with one `PredictionEntry` per audited
|
|
43245
|
+
* prediction. Each entry starts `Pending`; an external validator
|
|
43246
|
+
* (against ground truth) flips them to `Validated` / `Refuted` /
|
|
43247
|
+
* `Unknown` and {@link validateStub} surfaces a ratio report.
|
|
43248
|
+
*
|
|
43249
|
+
* Delegates to the generated `Compliance` route class for type-safe
|
|
43250
|
+
* HTTP calls.
|
|
43251
|
+
*/
|
|
43252
|
+
declare class ComplianceClient {
|
|
43253
|
+
/** @internal */
|
|
43254
|
+
private readonly api;
|
|
43255
|
+
/** @internal */
|
|
43256
|
+
constructor(api: Compliance);
|
|
43257
|
+
/**
|
|
43258
|
+
* Append one record to the tenant's audit ledger.
|
|
43259
|
+
*
|
|
43260
|
+
* @param request - Hashes + path + optional metadata.
|
|
43261
|
+
* @returns The freshly appended record (with `recordHash` /
|
|
43262
|
+
* `prevHash` populated by the engine).
|
|
43263
|
+
*/
|
|
43264
|
+
append(request: AppendRequest): Promise<AuditRecord>;
|
|
43265
|
+
/**
|
|
43266
|
+
* List audit records for this tenant, optionally filtered.
|
|
43267
|
+
*
|
|
43268
|
+
* @param options - Limit / glob filter on `requestPath`.
|
|
43269
|
+
*/
|
|
43270
|
+
list(options?: ListAuditOptions): Promise<AuditRecord[]>;
|
|
43271
|
+
/**
|
|
43272
|
+
* Top-line counts over the tenant's full ledger — useful for
|
|
43273
|
+
* dashboards and quick health checks.
|
|
43274
|
+
*/
|
|
43275
|
+
summary(): Promise<SummaryResponse>;
|
|
43276
|
+
/**
|
|
43277
|
+
* Re-walk the hash chain end-to-end and report any breaks.
|
|
43278
|
+
*
|
|
43279
|
+
* @returns `ok: true` when the chain is intact. `violations` is
|
|
43280
|
+
* an engine-defined opaque list when it isn't.
|
|
43281
|
+
*/
|
|
43282
|
+
verify(): Promise<VerifyResponse>;
|
|
43283
|
+
/**
|
|
43284
|
+
* Capture a frozen slice of the audit ledger for later validation.
|
|
43285
|
+
*
|
|
43286
|
+
* @param request - Glob-style path filter + optional time / count
|
|
43287
|
+
* bounds.
|
|
43288
|
+
* @returns The freshly persisted snapshot, including every
|
|
43289
|
+
* captured `PredictionEntry`.
|
|
43290
|
+
*
|
|
43291
|
+
* @remarks
|
|
43292
|
+
* The `requestPathPattern` is mandatory. Without it the snapshot
|
|
43293
|
+
* would freeze the entire ledger, which is rarely useful.
|
|
43294
|
+
*/
|
|
43295
|
+
captureSnapshot(request: CaptureSnapshotRequest): Promise<PredictionSnapshot>;
|
|
43296
|
+
/**
|
|
43297
|
+
* Fetch a previously-captured snapshot by id.
|
|
43298
|
+
*/
|
|
43299
|
+
getSnapshot(id: string): Promise<PredictionSnapshot>;
|
|
43300
|
+
/**
|
|
43301
|
+
* Run the stub validator over a snapshot and return a
|
|
43302
|
+
* pending/validated/refuted/unknown report.
|
|
43303
|
+
*
|
|
43304
|
+
* @param id - Snapshot id.
|
|
43305
|
+
*
|
|
43306
|
+
* @remarks
|
|
43307
|
+
* "Stub" is the in-engine validator that defers the actual
|
|
43308
|
+
* ground-truth resolution to a `GroundTruthProviderPort` registered
|
|
43309
|
+
* on the backend. Without a registered provider every entry stays
|
|
43310
|
+
* `Pending`.
|
|
43311
|
+
*/
|
|
43312
|
+
validateStub(id: string): Promise<ValidationReportDto>;
|
|
43313
|
+
}
|
|
43314
|
+
|
|
43315
|
+
declare class Operations<SecurityDataType = unknown> {
|
|
43316
|
+
http: HttpClient<SecurityDataType>;
|
|
43317
|
+
constructor(http: HttpClient<SecurityDataType>);
|
|
43318
|
+
/**
|
|
43319
|
+
* @description `POST /api/v1/operations/anti-unify` Accepts two Ψ-term ids and returns the LGG term computed by the engine's [`AntiUnificationEngine`](osfkb_domain::operations::ilp::AntiUnificationEngine). The LGG is persisted in the tenant's term store; the response carries both its id and an enriched view (sort name + display name + referenced-term summaries).
|
|
43320
|
+
*
|
|
43321
|
+
* @tags operations
|
|
43322
|
+
* @name AntiUnify
|
|
43323
|
+
* @summary Anti-unify two Ψ-terms (Least General Generalisation).
|
|
43324
|
+
* @request POST:/api/v1/operations/anti-unify
|
|
43325
|
+
*/
|
|
43326
|
+
antiUnify: (data: AntiUnifyRequest$1, params?: RequestParams) => Promise<HttpResponse<AntiUnifyResponse$1, void>>;
|
|
43327
|
+
}
|
|
43328
|
+
|
|
43329
|
+
/**
|
|
43330
|
+
* Anti-unify two Ψ-terms — request body for
|
|
43331
|
+
* `POST /api/v1/operations/anti-unify`.
|
|
43332
|
+
*
|
|
43333
|
+
* The two referenced terms must already exist in the tenant's term
|
|
43334
|
+
* store. The engine computes their Least General Generalisation (LGG)
|
|
43335
|
+
* using `osfkb_domain::operations::ilp::AntiUnificationEngine` and
|
|
43336
|
+
* persists the resulting Ψ-term.
|
|
43337
|
+
*/
|
|
43338
|
+
interface AntiUnifyRequest {
|
|
43339
|
+
/** First Ψ-term id (must already be registered in the tenant). */
|
|
43340
|
+
term1Id: string;
|
|
43341
|
+
/** Second Ψ-term id (must already be registered in the tenant). */
|
|
43342
|
+
term2Id: string;
|
|
43343
|
+
}
|
|
43344
|
+
/**
|
|
43345
|
+
* Result of an anti-unification call.
|
|
43346
|
+
*
|
|
43347
|
+
* Carries the newly-created LGG term's id plus an enriched view
|
|
43348
|
+
* (sort name, display name, referenced-term summaries) so callers
|
|
43349
|
+
* don't need a follow-up `getTerm` round-trip.
|
|
43350
|
+
*/
|
|
43351
|
+
interface AntiUnifyResponse {
|
|
43352
|
+
/** Id of the newly-created LGG term. */
|
|
43353
|
+
lggTermId: string;
|
|
43354
|
+
/** Enriched view of the LGG term. */
|
|
43355
|
+
lgg: TermDto;
|
|
43356
|
+
/** Engine + lock-acquisition time, in milliseconds. */
|
|
43357
|
+
computationTimeMs: number;
|
|
43358
|
+
}
|
|
43359
|
+
|
|
43360
|
+
type operations_AntiUnifyRequest = AntiUnifyRequest;
|
|
43361
|
+
type operations_AntiUnifyResponse = AntiUnifyResponse;
|
|
43362
|
+
declare namespace operations {
|
|
43363
|
+
export type { operations_AntiUnifyRequest as AntiUnifyRequest, operations_AntiUnifyResponse as AntiUnifyResponse };
|
|
43364
|
+
}
|
|
43365
|
+
|
|
43366
|
+
/**
|
|
43367
|
+
* Resource client for low-level term-graph operations.
|
|
43368
|
+
*
|
|
43369
|
+
* @remarks
|
|
43370
|
+
* Currently exposes anti-unification — the Inductive Logic
|
|
43371
|
+
* Programming building block that computes the Least General
|
|
43372
|
+
* Generalisation (LGG) of two Ψ-terms. More operations may surface
|
|
43373
|
+
* here over time; the namespace is reserved for engine-internal
|
|
43374
|
+
* primitives that are useful to expose as standalone calls rather
|
|
43375
|
+
* than as part of a larger pipeline.
|
|
43376
|
+
*
|
|
43377
|
+
* Delegates to the generated `Operations` route class for type-safe
|
|
43378
|
+
* HTTP calls.
|
|
43379
|
+
*/
|
|
43380
|
+
declare class OperationsClient {
|
|
43381
|
+
/** @internal */
|
|
43382
|
+
private readonly api;
|
|
43383
|
+
/** @internal */
|
|
43384
|
+
constructor(api: Operations);
|
|
43385
|
+
/**
|
|
43386
|
+
* Compute the anti-unification (Least General Generalisation) of
|
|
43387
|
+
* two Ψ-terms.
|
|
43388
|
+
*
|
|
43389
|
+
* @param request - The two term ids to generalise.
|
|
43390
|
+
* @returns The newly-created LGG term + enriched view + timing.
|
|
43391
|
+
*
|
|
43392
|
+
* @remarks
|
|
43393
|
+
* Both ids must already be registered in the tenant's term store.
|
|
43394
|
+
* The LGG is persisted; subsequent calls with the same operands
|
|
43395
|
+
* still produce a fresh LGG term (idempotency is not guaranteed at
|
|
43396
|
+
* this layer — wrap in your own cache if you need it).
|
|
43397
|
+
*/
|
|
43398
|
+
antiUnify(request: AntiUnifyRequest): Promise<AntiUnifyResponse>;
|
|
43399
|
+
}
|
|
43400
|
+
|
|
41395
43401
|
/** Core knowledge base operations — types, records, rules, functions, constraints, and queries. */
|
|
41396
43402
|
interface CoreGroup {
|
|
41397
43403
|
readonly types: SortsClient;
|
|
@@ -41413,10 +43419,11 @@ interface AiGroup {
|
|
|
41413
43419
|
readonly context: ContextClient;
|
|
41414
43420
|
readonly rlTraining: RlTrainingClient;
|
|
41415
43421
|
}
|
|
41416
|
-
/** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery, scheduling. */
|
|
43422
|
+
/** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery, scheduling, flow networks. */
|
|
41417
43423
|
interface ReasoningGroup {
|
|
41418
43424
|
readonly optimize: OptimizeClient;
|
|
41419
43425
|
readonly scheduling: SchedulingClient;
|
|
43426
|
+
readonly flowNetworks: FlowNetworksClient;
|
|
41420
43427
|
readonly ilp: IlpClient;
|
|
41421
43428
|
readonly cdl: CdlClient;
|
|
41422
43429
|
readonly execution: ExecutionClient;
|
|
@@ -41566,6 +43573,8 @@ declare class ReasoningLayerClient {
|
|
|
41566
43573
|
readonly optimize: OptimizeClient;
|
|
41567
43574
|
/** Scheduling feasibility via capacitated bipartite b-matching (staff rostering, assignment problems). */
|
|
41568
43575
|
readonly scheduling: SchedulingClient;
|
|
43576
|
+
/** Generic flow-network resource: max-flow, min-cost max-flow, edge classification, min-cut over a persisted graph. */
|
|
43577
|
+
readonly flowNetworks: FlowNetworksClient;
|
|
41569
43578
|
/** OSFQL execution operations. */
|
|
41570
43579
|
readonly osfql: OsfqlClient;
|
|
41571
43580
|
/** Conversational AI operations (NL → OSFQL with self-correction). */
|
|
@@ -41578,6 +43587,10 @@ declare class ReasoningLayerClient {
|
|
|
41578
43587
|
readonly rlTraining: RlTrainingClient;
|
|
41579
43588
|
/** Sort-driven UI descriptor operations (describe, action, catalog). */
|
|
41580
43589
|
readonly ui: UiClient;
|
|
43590
|
+
/** Hash-chained audit ledger and prediction-snapshot validation. */
|
|
43591
|
+
readonly compliance: ComplianceClient;
|
|
43592
|
+
/** Low-level term-graph operations (anti-unification / LGG). */
|
|
43593
|
+
readonly operations: OperationsClient;
|
|
41581
43594
|
private _core?;
|
|
41582
43595
|
private _ai?;
|
|
41583
43596
|
private _reasoning?;
|
|
@@ -41609,7 +43622,7 @@ declare class ReasoningLayerClient {
|
|
|
41609
43622
|
get core(): CoreGroup;
|
|
41610
43623
|
/** AI and machine learning operations — agents, oversight, neuro-symbolic, RAG, generation, context, RL training. */
|
|
41611
43624
|
get ai(): AiGroup;
|
|
41612
|
-
/** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery, scheduling. */
|
|
43625
|
+
/** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery, scheduling, flow networks. */
|
|
41613
43626
|
get reasoningOps(): ReasoningGroup;
|
|
41614
43627
|
/** Analysis operations — causal, statistical, fuzzy, scenarios, communities, visualization. */
|
|
41615
43628
|
get analysisOps(): AnalysisGroup;
|
|
@@ -42683,4 +44696,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
|
|
|
42683
44696
|
*/
|
|
42684
44697
|
declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
|
|
42685
44698
|
|
|
42686
|
-
export { ANY_ROLE, actionReviews as ActionReviews, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, collections as Collections, communities as Communities, type ConstrainedPlainVar, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, type FeatureInputValueDto, type FeatureValueDto, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, 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 Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, optimize as Optimize, 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, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
|
|
44699
|
+
export { ANY_ROLE, actionReviews as ActionReviews, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, type AuthConfig, AuthenticationError, type BackwardChainRequest, type BackwardChainResponse, BadRequestError, type BulkAddTermsRequest, type BulkAddTermsResponse, type BulkCreateSortsRequest, type BulkCreateSortsResponse, cdl as CDL, causal as Causal, type ClearTermsResponse, type ClientConfig, cognitive as Cognitive, collections as Collections, communities as Communities, compliance as Compliance, type ConstrainedPlainVar, ConstraintViolationError, constraints as Constraints, control as Control, conversation as Conversation, type ConversationMessageRequest, type ConversationMessageResponse, type ConversationSummaryDto, type ConversationTurnsResponse, type CoreGroup, type CreateResearchSessionRequest, type CreateResearchSessionResponse, type CreateSortRequest, type CreateTermRequest, type DataGroup, discovery as Discovery, type ErrorResponse$1 as ErrorResponse, execution as Execution, extract as Extract, type FeatureInputValueDto, type FeatureValueDto, flowNetworks as FlowNetworks, ForbiddenError, type ForwardChainRequest, type ForwardChainResponse, functions as Functions, fuzzy as Fuzzy, FuzzyShape, type FuzzyShapeDto, generation as Generation, type GlbRequest, type GlbResponse, 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 Interceptor, InternalServerError, type JsonValue$1 as JsonValue, LP, type ListConversationsResponse, type LubRequest, type LubResponse, namespaces as Namespaces, NetworkError, neuroSymbolic as NeuroSymbolic, NotFoundError, ontology as Ontology, operations as Operations, optimize as Optimize, 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, preferences as Preferences, proofEngine as ProofEngine, type PsiTermDto, type PsiTermInput, query as Query, rag as RAG, RateLimitError, type RateLimitInfo, reasoning as Reasoning, type ReasoningGroup, ReasoningLayerClient, ReasoningLayerError, type RequestOptions, research as Research, type ResearchContradictionsResponse, type ResearchCycleResponse, type ResearchFindingsResponse, type ResearchGapsResponse, type ResearchReportResponse, type ResearchSessionResponse, reviews as Reviews, row as Row, SDK_VERSION, scenarios as Scenarios, scheduling as Scheduling, type SearchPapersRequest, type SearchPapersResponse, SortBuilder, type SortDto, type SortInfoDto, sorts as Sorts, sources as Sources, spaces as Spaces, statistical as Statistical, synthetic as Synthetic, type SystemGroup, type TermDto, type TermInputArg, type TermInputDto, type TermListResponse, type TermPatternDto, type TermResponse, terms as Terms, TimeoutError, type TurnDto, type UpdateTermRequest, utilities as Utilities, ValidationError, Value, type ValueDto, values as Values, type VerifyClaimRequest, type VerifyClaimResponse, visualization as Visualization, WebSocketClient, WebSocketConnection, webhookActions as WebhookActions, type WorkflowGroup, allen, constrained, discriminateFeatureValue, guard, isConstrainedPlainVar, isPsiTermInput, isTaggedValueDto, isUuid, psi, toTaggedFeatures, toTaggedValue, toTermInputDto, toUntaggedFeatures, toUntaggedValue };
|