@kortexya/reasoninglayer 0.15.2 → 0.17.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 +56 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +194 -22
- package/dist/index.d.ts +194 -22
- package/dist/index.js +56 -2
- 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 = "0.
|
|
112
|
+
declare const SDK_VERSION = "0.17.0";
|
|
113
113
|
/**
|
|
114
114
|
* Configuration for the Reasoning Layer client.
|
|
115
115
|
*
|
|
@@ -3898,6 +3898,28 @@ interface DetectMissingAttributesRequest$1 {
|
|
|
3898
3898
|
call_attributes: string[];
|
|
3899
3899
|
definition_attributes: string[];
|
|
3900
3900
|
}
|
|
3901
|
+
/** Request to validate a Difference-in-Differences design */
|
|
3902
|
+
interface DiDValidationRequest {
|
|
3903
|
+
/** Conditioning set (covariates) */
|
|
3904
|
+
covariates?: string[];
|
|
3905
|
+
/** Post-treatment outcome variable */
|
|
3906
|
+
outcome_post: string;
|
|
3907
|
+
/** Pre-treatment outcome variable */
|
|
3908
|
+
outcome_pre: string;
|
|
3909
|
+
/** The treatment variable */
|
|
3910
|
+
treatment: string;
|
|
3911
|
+
}
|
|
3912
|
+
/** Response for DiD validation */
|
|
3913
|
+
interface DiDValidationResponse {
|
|
3914
|
+
/** Identified "bad controls" (nodes that induce bias if conditioned on) */
|
|
3915
|
+
bad_controls: string[];
|
|
3916
|
+
/** Explanation of the result */
|
|
3917
|
+
explanation: string;
|
|
3918
|
+
/** The framework used for validation */
|
|
3919
|
+
framework: string;
|
|
3920
|
+
/** Whether the design is valid */
|
|
3921
|
+
is_valid: boolean;
|
|
3922
|
+
}
|
|
3901
3923
|
/** A pipeline diagnostic message. */
|
|
3902
3924
|
interface DiagnosticDto$1 {
|
|
3903
3925
|
/** Severity level: "info", "warning", or "error". */
|
|
@@ -6387,12 +6409,6 @@ interface FormalJudgeRequest$1 {
|
|
|
6387
6409
|
* Paper Table 5: `trajectory.tool_calls`
|
|
6388
6410
|
*/
|
|
6389
6411
|
trajectory: TrajectoryStepDto$1[];
|
|
6390
|
-
/**
|
|
6391
|
-
* Use the OSFKB-native safety engine instead of the LLM-based adapter.
|
|
6392
|
-
* When true, uses sort hierarchy + neural sort grounding + homoiconic rules.
|
|
6393
|
-
* When false (default), uses the LLM-based OversightExtractionAdapter.
|
|
6394
|
-
*/
|
|
6395
|
-
use_osfkb_engine?: boolean;
|
|
6396
6412
|
/** User instruction (what the agent was asked to do) */
|
|
6397
6413
|
user_intent: string;
|
|
6398
6414
|
}
|
|
@@ -13630,7 +13646,7 @@ interface SearchCommunitiesResponse$1 {
|
|
|
13630
13646
|
* Defaults to `solutions` for full backward compatibility with existing clients
|
|
13631
13647
|
* that do not send a `mode` field.
|
|
13632
13648
|
*/
|
|
13633
|
-
type SearchModeDto$1 = "solutions" | "feasibility";
|
|
13649
|
+
type SearchModeDto$1 = "solutions" | "feasibility" | "scheduling";
|
|
13634
13650
|
/** Request to search for solutions */
|
|
13635
13651
|
interface SearchRequest {
|
|
13636
13652
|
/**
|
|
@@ -14238,12 +14254,27 @@ interface SortInfoDto$1 {
|
|
|
14238
14254
|
/** Response for sort list operations */
|
|
14239
14255
|
interface SortListResponse$1 {
|
|
14240
14256
|
/**
|
|
14241
|
-
*
|
|
14257
|
+
* Number of sorts in **this response** — not the tenant total
|
|
14258
|
+
* when pagination is active.
|
|
14242
14259
|
* @min 0
|
|
14243
14260
|
*/
|
|
14244
14261
|
count: number;
|
|
14245
|
-
/**
|
|
14262
|
+
/**
|
|
14263
|
+
* Offset of the first sort in this response.
|
|
14264
|
+
* @min 0
|
|
14265
|
+
*/
|
|
14266
|
+
offset?: number;
|
|
14267
|
+
/**
|
|
14268
|
+
* Sorts in this page (or all sorts when no ``limit`` query
|
|
14269
|
+
* parameter was supplied).
|
|
14270
|
+
*/
|
|
14246
14271
|
sorts: SortDto$1[];
|
|
14272
|
+
/**
|
|
14273
|
+
* Total number of sorts the tenant owns after filters, across
|
|
14274
|
+
* all pages. Lets the client know when to stop paginating.
|
|
14275
|
+
* @min 0
|
|
14276
|
+
*/
|
|
14277
|
+
total?: number;
|
|
14247
14278
|
}
|
|
14248
14279
|
/** API representation of sort origin/provenance */
|
|
14249
14280
|
type SortOriginDto$1 = {
|
|
@@ -14434,6 +14465,16 @@ type SpaceConstraintDto$1 = {
|
|
|
14434
14465
|
total: number;
|
|
14435
14466
|
type: "sum_equal";
|
|
14436
14467
|
variables: string[];
|
|
14468
|
+
} | {
|
|
14469
|
+
a: string[];
|
|
14470
|
+
b: string[];
|
|
14471
|
+
type: "lex_leq";
|
|
14472
|
+
} | {
|
|
14473
|
+
groups: string[][];
|
|
14474
|
+
type: "symmetry_group";
|
|
14475
|
+
} | {
|
|
14476
|
+
entities: string[][];
|
|
14477
|
+
type: "symmetric_observation";
|
|
14437
14478
|
} | {
|
|
14438
14479
|
lower: number[];
|
|
14439
14480
|
type: "set_domain";
|
|
@@ -15540,6 +15581,73 @@ interface TriggerDependencyResponse$1 {
|
|
|
15540
15581
|
/** The visualization graph */
|
|
15541
15582
|
graph: VisualizationGraphDto$1;
|
|
15542
15583
|
}
|
|
15584
|
+
/**
|
|
15585
|
+
* Request body for `POST /api/v1/triz/invent` — the structured-input,
|
|
15586
|
+
* no-LLM path into the TRIZ invention engine.
|
|
15587
|
+
*/
|
|
15588
|
+
interface TrizInventRequest {
|
|
15589
|
+
/**
|
|
15590
|
+
* Human-readable context (e.g. "drug_discovery", "kinase_program_279").
|
|
15591
|
+
* The engine uses this in explanations but not in the reasoning.
|
|
15592
|
+
*/
|
|
15593
|
+
domain_context?: string;
|
|
15594
|
+
/**
|
|
15595
|
+
* Sort names the caller has pre-seeded under this tenant. Required:
|
|
15596
|
+
* without them the KB-matching step (`query_kb_for_triz_data`) has
|
|
15597
|
+
* no domain hints and falls through to the LLM-synthetic path —
|
|
15598
|
+
* defeating the purpose of this endpoint.
|
|
15599
|
+
*/
|
|
15600
|
+
domains?: string[];
|
|
15601
|
+
improving_parameter: string;
|
|
15602
|
+
/** @format uuid */
|
|
15603
|
+
tenant_id: string;
|
|
15604
|
+
worsening_parameter: string;
|
|
15605
|
+
}
|
|
15606
|
+
/** Request body for `POST /api/v1/triz/record-outcome`. */
|
|
15607
|
+
interface TrizRecordOutcomeRequest {
|
|
15608
|
+
/**
|
|
15609
|
+
* UUID of the ``triz_inventive_proposal`` term the engine emitted.
|
|
15610
|
+
* @format uuid
|
|
15611
|
+
*/
|
|
15612
|
+
invention_term_id: string;
|
|
15613
|
+
/**
|
|
15614
|
+
* Measured performance ratio (e.g. potency fold, selectivity
|
|
15615
|
+
* fold). ``0.0`` if unmeasured — the engine still records the
|
|
15616
|
+
* success/failure signal.
|
|
15617
|
+
* @format double
|
|
15618
|
+
*/
|
|
15619
|
+
measured_ratio?: number;
|
|
15620
|
+
/** Free-text notes on the outcome for downstream audit. */
|
|
15621
|
+
notes?: string;
|
|
15622
|
+
/**
|
|
15623
|
+
* Whether the invention succeeded in downstream validation /
|
|
15624
|
+
* experimental testing.
|
|
15625
|
+
*/
|
|
15626
|
+
success: boolean;
|
|
15627
|
+
/** @format uuid */
|
|
15628
|
+
tenant_id: string;
|
|
15629
|
+
}
|
|
15630
|
+
/** Response payload for outcome recording. */
|
|
15631
|
+
interface TrizRecordOutcomeResponse {
|
|
15632
|
+
error?: string | null;
|
|
15633
|
+
/**
|
|
15634
|
+
* Number of learned-mapping terms whose confidence was adjusted.
|
|
15635
|
+
* @min 0
|
|
15636
|
+
*/
|
|
15637
|
+
mappings_updated: number;
|
|
15638
|
+
/**
|
|
15639
|
+
* UUID of the newly-created ``triz_invention_outcome`` audit term.
|
|
15640
|
+
* @format uuid
|
|
15641
|
+
*/
|
|
15642
|
+
outcome_term_id?: string | null;
|
|
15643
|
+
recorded: boolean;
|
|
15644
|
+
success: boolean;
|
|
15645
|
+
/**
|
|
15646
|
+
* New post-update average confidence across the adjusted mappings.
|
|
15647
|
+
* @format double
|
|
15648
|
+
*/
|
|
15649
|
+
updated_confidence: number;
|
|
15650
|
+
}
|
|
15543
15651
|
/** DTO for UIAction — all actions reference OSFQL execution */
|
|
15544
15652
|
type UIActionDto$1 = {
|
|
15545
15653
|
field_types: Record<string, string>;
|
|
@@ -16168,26 +16276,32 @@ type ValuePatternDto$1 = {
|
|
|
16168
16276
|
/**
|
|
16169
16277
|
* Feasibility of a single binary variable in the constraint space.
|
|
16170
16278
|
*
|
|
16171
|
-
* Produced by `feasibility` mode search.
|
|
16172
|
-
*
|
|
16279
|
+
* Produced by `feasibility` mode search. Fields report **observation-based**
|
|
16280
|
+
* reachability: the solver sets `can_be_true` only when it has witnessed a
|
|
16281
|
+
* complete satisfying assignment with this variable = 1 (and similarly for
|
|
16282
|
+
* `can_be_false`). Both fields can be `false` only when the problem is UNSAT.
|
|
16173
16283
|
*/
|
|
16174
16284
|
interface VariableFeasibilityDto$1 {
|
|
16175
16285
|
/**
|
|
16176
|
-
* `true` if
|
|
16286
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16177
16287
|
* is 0 (unselected / false).
|
|
16178
16288
|
*/
|
|
16179
16289
|
can_be_false: boolean;
|
|
16180
16290
|
/**
|
|
16181
|
-
* `true` if
|
|
16291
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16182
16292
|
* is 1 (selected / true).
|
|
16183
16293
|
*/
|
|
16184
16294
|
can_be_true: boolean;
|
|
16185
16295
|
/**
|
|
16186
|
-
* `true`
|
|
16187
|
-
*
|
|
16188
|
-
*
|
|
16189
|
-
*
|
|
16190
|
-
*
|
|
16296
|
+
* `true` when the result is fully determined by the solver — both
|
|
16297
|
+
* polarities were either observed in a model or formally proven
|
|
16298
|
+
* infeasible (by unit propagation or an UNSAT probe).
|
|
16299
|
+
*
|
|
16300
|
+
* `false` when a conflict limit was hit before the solver could fully
|
|
16301
|
+
* determine the variable's status. In that case `can_be_true` /
|
|
16302
|
+
* `can_be_false` still faithfully reflect the polarities the solver
|
|
16303
|
+
* actually witnessed — they are **never** optimistic defaults. Clients
|
|
16304
|
+
* typically render unverified variables in an intermediate visual state
|
|
16191
16305
|
* (e.g. yellow/amber) so the user knows the result is approximate.
|
|
16192
16306
|
*/
|
|
16193
16307
|
verified?: boolean;
|
|
@@ -16716,10 +16830,26 @@ declare class Sorts<SecurityDataType = unknown> {
|
|
|
16716
16830
|
* Defaults to false (system sorts are excluded by default).
|
|
16717
16831
|
*/
|
|
16718
16832
|
include_system?: boolean;
|
|
16833
|
+
/**
|
|
16834
|
+
* Maximum number of sorts to return. When omitted, no cap is
|
|
16835
|
+
* applied (legacy behaviour). Recommended page size for
|
|
16836
|
+
* production tenants: 50_000.
|
|
16837
|
+
* @min 0
|
|
16838
|
+
*/
|
|
16839
|
+
limit?: number | null;
|
|
16719
16840
|
/** Filter to only show LLM-extracted sorts */
|
|
16720
16841
|
llm_extracted?: boolean | null;
|
|
16721
16842
|
/** Filter to only show sorts needing review */
|
|
16722
16843
|
needs_review?: boolean | null;
|
|
16844
|
+
/**
|
|
16845
|
+
* Zero-indexed pagination offset. Combined with ``limit`` this
|
|
16846
|
+
* lets clients stream a production tenant (1 M+ sorts, ~500 MB
|
|
16847
|
+
* uncompressed) as a sequence of small responses, avoiding the
|
|
16848
|
+
* ``IncompleteRead`` a single-response transfer reliably hits
|
|
16849
|
+
* above ~30 MB.
|
|
16850
|
+
* @min 0
|
|
16851
|
+
*/
|
|
16852
|
+
offset?: number | null;
|
|
16723
16853
|
}, params?: RequestParams) => Promise<HttpResponse<SortListResponse$1, any>>;
|
|
16724
16854
|
/**
|
|
16725
16855
|
* @description POST /api/v1/sorts/learned-similarities/reject Rejects a proposed or conflicted learned similarity with a reason. Rejected similarities are not used in reasoning.
|
|
@@ -20519,6 +20649,26 @@ declare class Query<SecurityDataType = unknown> {
|
|
|
20519
20649
|
* @secure
|
|
20520
20650
|
*/
|
|
20521
20651
|
osfSearch: (data: OsfSearchRequest$1, params?: RequestParams) => Promise<HttpResponse<OsfSearchResponse$1, any>>;
|
|
20652
|
+
/**
|
|
20653
|
+
* @description Skips the NL → structured-problem LLM hop entirely. Caller must have seeded the tenant KB with ≥ 3 successful + ≥ 2 limited Ψ-terms per domain (`/api/v1/terms/bulk` or `/api/v1/inference/facts/bulk`). Returns the same `NlQueryResponse` shape as the NL route so the UI can render either output uniformly.
|
|
20654
|
+
*
|
|
20655
|
+
* @tags query
|
|
20656
|
+
* @name TrizInvent
|
|
20657
|
+
* @summary Handle `POST /api/v1/triz/invent` — deterministic TRIZ invention.
|
|
20658
|
+
* @request POST:/api/v1/triz/invent
|
|
20659
|
+
* @secure
|
|
20660
|
+
*/
|
|
20661
|
+
trizInvent: (data: TrizInventRequest, params?: RequestParams) => Promise<HttpResponse<NlQueryResponse$1, any>>;
|
|
20662
|
+
/**
|
|
20663
|
+
* No description
|
|
20664
|
+
*
|
|
20665
|
+
* @tags query
|
|
20666
|
+
* @name TrizRecordOutcome
|
|
20667
|
+
* @summary Handle `POST /api/v1/triz/record-outcome` — persist a measured outcome for a previously-emitted TRIZ proposal and learn from it.
|
|
20668
|
+
* @request POST:/api/v1/triz/record-outcome
|
|
20669
|
+
* @secure
|
|
20670
|
+
*/
|
|
20671
|
+
trizRecordOutcome: (data: TrizRecordOutcomeRequest, params?: RequestParams) => Promise<HttpResponse<TrizRecordOutcomeResponse, any>>;
|
|
20522
20672
|
/**
|
|
20523
20673
|
* @description This performs unification AND validates the result against the GLB sort's witnesses. ## How It Differs from Regular Unification **Regular `/api/v1/term-store/sessions/:id/unify` (POST)**: - Computes GLB and unifies terms - Validates sort constraints (required features, type hints) - Does NOT check witnesses **This endpoint `/api/v1/query/validated-unify` (POST)**: - Computes GLB and unifies terms - Validates sort constraints - ALSO checks witnesses on the result - Returns proof of validity ## Example Unifying `person(name => "Alice")` with `grandparent(grandchild => "Charlie")`: 1. Computes GLB of person and grandparent 2. Creates unified term with both features 3. Checks grandparent witnesses: ∃Y. parent(Alice,Y) ∧ parent(Y,Charlie) 4. Returns unified term + witness proof
|
|
20524
20674
|
*
|
|
@@ -25934,6 +26084,16 @@ declare class Causal<SecurityDataType = unknown> {
|
|
|
25934
26084
|
* @secure
|
|
25935
26085
|
*/
|
|
25936
26086
|
getCausalModel: (params?: RequestParams) => Promise<HttpResponse<GetCausalModelResponse$1, any>>;
|
|
26087
|
+
/**
|
|
26088
|
+
* @description This endpoint validates whether a DiD design is theoretically sound given the known causal structure and unobserved confounding. It uses the Transformed SWIG (Delta-SWIG) framework from Knaus & Pfleiderer (2026).
|
|
26089
|
+
*
|
|
26090
|
+
* @tags causal
|
|
26091
|
+
* @name ValidateDid
|
|
26092
|
+
* @summary Validate a Difference-in-Differences (DiD) design
|
|
26093
|
+
* @request POST:/api/v1/causal/validate-did
|
|
26094
|
+
* @secure
|
|
26095
|
+
*/
|
|
26096
|
+
validateDid: (data: DiDValidationRequest, params?: RequestParams) => Promise<HttpResponse<DiDValidationResponse, void>>;
|
|
25937
26097
|
}
|
|
25938
26098
|
|
|
25939
26099
|
/**
|
|
@@ -30882,8 +31042,15 @@ interface CommitRequest {
|
|
|
30882
31042
|
* - `"solutions"`: enumerate complete, valid assignments (default — backward compatible).
|
|
30883
31043
|
* - `"feasibility"`: run 2×N per-variable SAT queries and return reachability info.
|
|
30884
31044
|
* Much faster than full enumeration for large spaces.
|
|
31045
|
+
* - `"scheduling"`: route the space through the specialised **bipartite network-flow
|
|
31046
|
+
* engine** for scheduling-shaped problems (nurses × days × shifts with per-slot
|
|
31047
|
+
* demand and role minimums). Orders of magnitude faster than `"feasibility"` for
|
|
31048
|
+
* problems that fit this shape, and always returns fully `verified: true` results.
|
|
31049
|
+
* If the underlying problem's constraint shape cannot be modelled by the flow
|
|
31050
|
+
* engine, the backend responds with a 400 and the caller should fall back to
|
|
31051
|
+
* `"feasibility"`.
|
|
30885
31052
|
*/
|
|
30886
|
-
type SearchModeDto = 'solutions' | 'feasibility';
|
|
31053
|
+
type SearchModeDto = 'solutions' | 'feasibility' | 'scheduling';
|
|
30887
31054
|
/**
|
|
30888
31055
|
* Reachability of a single binary choice-point variable.
|
|
30889
31056
|
*
|
|
@@ -33781,8 +33948,13 @@ interface FormalJudgeRequest {
|
|
|
33781
33948
|
executionLog?: string;
|
|
33782
33949
|
/** Optional pipeline configuration overrides. */
|
|
33783
33950
|
config?: JudgeConfigDto | null;
|
|
33784
|
-
/**
|
|
33785
|
-
|
|
33951
|
+
/**
|
|
33952
|
+
* Risk categories from the benchmark dataset (e.g.,
|
|
33953
|
+
* `["Lead to property loss", "Violate laws"]`). Used by the
|
|
33954
|
+
* 3-agent per-task decomposition pipeline to generate
|
|
33955
|
+
* task-specific atomic conditions.
|
|
33956
|
+
*/
|
|
33957
|
+
riskCategories?: string[];
|
|
33786
33958
|
}
|
|
33787
33959
|
/** Per-layer verification result. */
|
|
33788
33960
|
interface LayerResultDto {
|
package/dist/index.d.ts
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 = "0.
|
|
112
|
+
declare const SDK_VERSION = "0.17.0";
|
|
113
113
|
/**
|
|
114
114
|
* Configuration for the Reasoning Layer client.
|
|
115
115
|
*
|
|
@@ -3898,6 +3898,28 @@ interface DetectMissingAttributesRequest$1 {
|
|
|
3898
3898
|
call_attributes: string[];
|
|
3899
3899
|
definition_attributes: string[];
|
|
3900
3900
|
}
|
|
3901
|
+
/** Request to validate a Difference-in-Differences design */
|
|
3902
|
+
interface DiDValidationRequest {
|
|
3903
|
+
/** Conditioning set (covariates) */
|
|
3904
|
+
covariates?: string[];
|
|
3905
|
+
/** Post-treatment outcome variable */
|
|
3906
|
+
outcome_post: string;
|
|
3907
|
+
/** Pre-treatment outcome variable */
|
|
3908
|
+
outcome_pre: string;
|
|
3909
|
+
/** The treatment variable */
|
|
3910
|
+
treatment: string;
|
|
3911
|
+
}
|
|
3912
|
+
/** Response for DiD validation */
|
|
3913
|
+
interface DiDValidationResponse {
|
|
3914
|
+
/** Identified "bad controls" (nodes that induce bias if conditioned on) */
|
|
3915
|
+
bad_controls: string[];
|
|
3916
|
+
/** Explanation of the result */
|
|
3917
|
+
explanation: string;
|
|
3918
|
+
/** The framework used for validation */
|
|
3919
|
+
framework: string;
|
|
3920
|
+
/** Whether the design is valid */
|
|
3921
|
+
is_valid: boolean;
|
|
3922
|
+
}
|
|
3901
3923
|
/** A pipeline diagnostic message. */
|
|
3902
3924
|
interface DiagnosticDto$1 {
|
|
3903
3925
|
/** Severity level: "info", "warning", or "error". */
|
|
@@ -6387,12 +6409,6 @@ interface FormalJudgeRequest$1 {
|
|
|
6387
6409
|
* Paper Table 5: `trajectory.tool_calls`
|
|
6388
6410
|
*/
|
|
6389
6411
|
trajectory: TrajectoryStepDto$1[];
|
|
6390
|
-
/**
|
|
6391
|
-
* Use the OSFKB-native safety engine instead of the LLM-based adapter.
|
|
6392
|
-
* When true, uses sort hierarchy + neural sort grounding + homoiconic rules.
|
|
6393
|
-
* When false (default), uses the LLM-based OversightExtractionAdapter.
|
|
6394
|
-
*/
|
|
6395
|
-
use_osfkb_engine?: boolean;
|
|
6396
6412
|
/** User instruction (what the agent was asked to do) */
|
|
6397
6413
|
user_intent: string;
|
|
6398
6414
|
}
|
|
@@ -13630,7 +13646,7 @@ interface SearchCommunitiesResponse$1 {
|
|
|
13630
13646
|
* Defaults to `solutions` for full backward compatibility with existing clients
|
|
13631
13647
|
* that do not send a `mode` field.
|
|
13632
13648
|
*/
|
|
13633
|
-
type SearchModeDto$1 = "solutions" | "feasibility";
|
|
13649
|
+
type SearchModeDto$1 = "solutions" | "feasibility" | "scheduling";
|
|
13634
13650
|
/** Request to search for solutions */
|
|
13635
13651
|
interface SearchRequest {
|
|
13636
13652
|
/**
|
|
@@ -14238,12 +14254,27 @@ interface SortInfoDto$1 {
|
|
|
14238
14254
|
/** Response for sort list operations */
|
|
14239
14255
|
interface SortListResponse$1 {
|
|
14240
14256
|
/**
|
|
14241
|
-
*
|
|
14257
|
+
* Number of sorts in **this response** — not the tenant total
|
|
14258
|
+
* when pagination is active.
|
|
14242
14259
|
* @min 0
|
|
14243
14260
|
*/
|
|
14244
14261
|
count: number;
|
|
14245
|
-
/**
|
|
14262
|
+
/**
|
|
14263
|
+
* Offset of the first sort in this response.
|
|
14264
|
+
* @min 0
|
|
14265
|
+
*/
|
|
14266
|
+
offset?: number;
|
|
14267
|
+
/**
|
|
14268
|
+
* Sorts in this page (or all sorts when no ``limit`` query
|
|
14269
|
+
* parameter was supplied).
|
|
14270
|
+
*/
|
|
14246
14271
|
sorts: SortDto$1[];
|
|
14272
|
+
/**
|
|
14273
|
+
* Total number of sorts the tenant owns after filters, across
|
|
14274
|
+
* all pages. Lets the client know when to stop paginating.
|
|
14275
|
+
* @min 0
|
|
14276
|
+
*/
|
|
14277
|
+
total?: number;
|
|
14247
14278
|
}
|
|
14248
14279
|
/** API representation of sort origin/provenance */
|
|
14249
14280
|
type SortOriginDto$1 = {
|
|
@@ -14434,6 +14465,16 @@ type SpaceConstraintDto$1 = {
|
|
|
14434
14465
|
total: number;
|
|
14435
14466
|
type: "sum_equal";
|
|
14436
14467
|
variables: string[];
|
|
14468
|
+
} | {
|
|
14469
|
+
a: string[];
|
|
14470
|
+
b: string[];
|
|
14471
|
+
type: "lex_leq";
|
|
14472
|
+
} | {
|
|
14473
|
+
groups: string[][];
|
|
14474
|
+
type: "symmetry_group";
|
|
14475
|
+
} | {
|
|
14476
|
+
entities: string[][];
|
|
14477
|
+
type: "symmetric_observation";
|
|
14437
14478
|
} | {
|
|
14438
14479
|
lower: number[];
|
|
14439
14480
|
type: "set_domain";
|
|
@@ -15540,6 +15581,73 @@ interface TriggerDependencyResponse$1 {
|
|
|
15540
15581
|
/** The visualization graph */
|
|
15541
15582
|
graph: VisualizationGraphDto$1;
|
|
15542
15583
|
}
|
|
15584
|
+
/**
|
|
15585
|
+
* Request body for `POST /api/v1/triz/invent` — the structured-input,
|
|
15586
|
+
* no-LLM path into the TRIZ invention engine.
|
|
15587
|
+
*/
|
|
15588
|
+
interface TrizInventRequest {
|
|
15589
|
+
/**
|
|
15590
|
+
* Human-readable context (e.g. "drug_discovery", "kinase_program_279").
|
|
15591
|
+
* The engine uses this in explanations but not in the reasoning.
|
|
15592
|
+
*/
|
|
15593
|
+
domain_context?: string;
|
|
15594
|
+
/**
|
|
15595
|
+
* Sort names the caller has pre-seeded under this tenant. Required:
|
|
15596
|
+
* without them the KB-matching step (`query_kb_for_triz_data`) has
|
|
15597
|
+
* no domain hints and falls through to the LLM-synthetic path —
|
|
15598
|
+
* defeating the purpose of this endpoint.
|
|
15599
|
+
*/
|
|
15600
|
+
domains?: string[];
|
|
15601
|
+
improving_parameter: string;
|
|
15602
|
+
/** @format uuid */
|
|
15603
|
+
tenant_id: string;
|
|
15604
|
+
worsening_parameter: string;
|
|
15605
|
+
}
|
|
15606
|
+
/** Request body for `POST /api/v1/triz/record-outcome`. */
|
|
15607
|
+
interface TrizRecordOutcomeRequest {
|
|
15608
|
+
/**
|
|
15609
|
+
* UUID of the ``triz_inventive_proposal`` term the engine emitted.
|
|
15610
|
+
* @format uuid
|
|
15611
|
+
*/
|
|
15612
|
+
invention_term_id: string;
|
|
15613
|
+
/**
|
|
15614
|
+
* Measured performance ratio (e.g. potency fold, selectivity
|
|
15615
|
+
* fold). ``0.0`` if unmeasured — the engine still records the
|
|
15616
|
+
* success/failure signal.
|
|
15617
|
+
* @format double
|
|
15618
|
+
*/
|
|
15619
|
+
measured_ratio?: number;
|
|
15620
|
+
/** Free-text notes on the outcome for downstream audit. */
|
|
15621
|
+
notes?: string;
|
|
15622
|
+
/**
|
|
15623
|
+
* Whether the invention succeeded in downstream validation /
|
|
15624
|
+
* experimental testing.
|
|
15625
|
+
*/
|
|
15626
|
+
success: boolean;
|
|
15627
|
+
/** @format uuid */
|
|
15628
|
+
tenant_id: string;
|
|
15629
|
+
}
|
|
15630
|
+
/** Response payload for outcome recording. */
|
|
15631
|
+
interface TrizRecordOutcomeResponse {
|
|
15632
|
+
error?: string | null;
|
|
15633
|
+
/**
|
|
15634
|
+
* Number of learned-mapping terms whose confidence was adjusted.
|
|
15635
|
+
* @min 0
|
|
15636
|
+
*/
|
|
15637
|
+
mappings_updated: number;
|
|
15638
|
+
/**
|
|
15639
|
+
* UUID of the newly-created ``triz_invention_outcome`` audit term.
|
|
15640
|
+
* @format uuid
|
|
15641
|
+
*/
|
|
15642
|
+
outcome_term_id?: string | null;
|
|
15643
|
+
recorded: boolean;
|
|
15644
|
+
success: boolean;
|
|
15645
|
+
/**
|
|
15646
|
+
* New post-update average confidence across the adjusted mappings.
|
|
15647
|
+
* @format double
|
|
15648
|
+
*/
|
|
15649
|
+
updated_confidence: number;
|
|
15650
|
+
}
|
|
15543
15651
|
/** DTO for UIAction — all actions reference OSFQL execution */
|
|
15544
15652
|
type UIActionDto$1 = {
|
|
15545
15653
|
field_types: Record<string, string>;
|
|
@@ -16168,26 +16276,32 @@ type ValuePatternDto$1 = {
|
|
|
16168
16276
|
/**
|
|
16169
16277
|
* Feasibility of a single binary variable in the constraint space.
|
|
16170
16278
|
*
|
|
16171
|
-
* Produced by `feasibility` mode search.
|
|
16172
|
-
*
|
|
16279
|
+
* Produced by `feasibility` mode search. Fields report **observation-based**
|
|
16280
|
+
* reachability: the solver sets `can_be_true` only when it has witnessed a
|
|
16281
|
+
* complete satisfying assignment with this variable = 1 (and similarly for
|
|
16282
|
+
* `can_be_false`). Both fields can be `false` only when the problem is UNSAT.
|
|
16173
16283
|
*/
|
|
16174
16284
|
interface VariableFeasibilityDto$1 {
|
|
16175
16285
|
/**
|
|
16176
|
-
* `true` if
|
|
16286
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16177
16287
|
* is 0 (unselected / false).
|
|
16178
16288
|
*/
|
|
16179
16289
|
can_be_false: boolean;
|
|
16180
16290
|
/**
|
|
16181
|
-
* `true` if
|
|
16291
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16182
16292
|
* is 1 (selected / true).
|
|
16183
16293
|
*/
|
|
16184
16294
|
can_be_true: boolean;
|
|
16185
16295
|
/**
|
|
16186
|
-
* `true`
|
|
16187
|
-
*
|
|
16188
|
-
*
|
|
16189
|
-
*
|
|
16190
|
-
*
|
|
16296
|
+
* `true` when the result is fully determined by the solver — both
|
|
16297
|
+
* polarities were either observed in a model or formally proven
|
|
16298
|
+
* infeasible (by unit propagation or an UNSAT probe).
|
|
16299
|
+
*
|
|
16300
|
+
* `false` when a conflict limit was hit before the solver could fully
|
|
16301
|
+
* determine the variable's status. In that case `can_be_true` /
|
|
16302
|
+
* `can_be_false` still faithfully reflect the polarities the solver
|
|
16303
|
+
* actually witnessed — they are **never** optimistic defaults. Clients
|
|
16304
|
+
* typically render unverified variables in an intermediate visual state
|
|
16191
16305
|
* (e.g. yellow/amber) so the user knows the result is approximate.
|
|
16192
16306
|
*/
|
|
16193
16307
|
verified?: boolean;
|
|
@@ -16716,10 +16830,26 @@ declare class Sorts<SecurityDataType = unknown> {
|
|
|
16716
16830
|
* Defaults to false (system sorts are excluded by default).
|
|
16717
16831
|
*/
|
|
16718
16832
|
include_system?: boolean;
|
|
16833
|
+
/**
|
|
16834
|
+
* Maximum number of sorts to return. When omitted, no cap is
|
|
16835
|
+
* applied (legacy behaviour). Recommended page size for
|
|
16836
|
+
* production tenants: 50_000.
|
|
16837
|
+
* @min 0
|
|
16838
|
+
*/
|
|
16839
|
+
limit?: number | null;
|
|
16719
16840
|
/** Filter to only show LLM-extracted sorts */
|
|
16720
16841
|
llm_extracted?: boolean | null;
|
|
16721
16842
|
/** Filter to only show sorts needing review */
|
|
16722
16843
|
needs_review?: boolean | null;
|
|
16844
|
+
/**
|
|
16845
|
+
* Zero-indexed pagination offset. Combined with ``limit`` this
|
|
16846
|
+
* lets clients stream a production tenant (1 M+ sorts, ~500 MB
|
|
16847
|
+
* uncompressed) as a sequence of small responses, avoiding the
|
|
16848
|
+
* ``IncompleteRead`` a single-response transfer reliably hits
|
|
16849
|
+
* above ~30 MB.
|
|
16850
|
+
* @min 0
|
|
16851
|
+
*/
|
|
16852
|
+
offset?: number | null;
|
|
16723
16853
|
}, params?: RequestParams) => Promise<HttpResponse<SortListResponse$1, any>>;
|
|
16724
16854
|
/**
|
|
16725
16855
|
* @description POST /api/v1/sorts/learned-similarities/reject Rejects a proposed or conflicted learned similarity with a reason. Rejected similarities are not used in reasoning.
|
|
@@ -20519,6 +20649,26 @@ declare class Query<SecurityDataType = unknown> {
|
|
|
20519
20649
|
* @secure
|
|
20520
20650
|
*/
|
|
20521
20651
|
osfSearch: (data: OsfSearchRequest$1, params?: RequestParams) => Promise<HttpResponse<OsfSearchResponse$1, any>>;
|
|
20652
|
+
/**
|
|
20653
|
+
* @description Skips the NL → structured-problem LLM hop entirely. Caller must have seeded the tenant KB with ≥ 3 successful + ≥ 2 limited Ψ-terms per domain (`/api/v1/terms/bulk` or `/api/v1/inference/facts/bulk`). Returns the same `NlQueryResponse` shape as the NL route so the UI can render either output uniformly.
|
|
20654
|
+
*
|
|
20655
|
+
* @tags query
|
|
20656
|
+
* @name TrizInvent
|
|
20657
|
+
* @summary Handle `POST /api/v1/triz/invent` — deterministic TRIZ invention.
|
|
20658
|
+
* @request POST:/api/v1/triz/invent
|
|
20659
|
+
* @secure
|
|
20660
|
+
*/
|
|
20661
|
+
trizInvent: (data: TrizInventRequest, params?: RequestParams) => Promise<HttpResponse<NlQueryResponse$1, any>>;
|
|
20662
|
+
/**
|
|
20663
|
+
* No description
|
|
20664
|
+
*
|
|
20665
|
+
* @tags query
|
|
20666
|
+
* @name TrizRecordOutcome
|
|
20667
|
+
* @summary Handle `POST /api/v1/triz/record-outcome` — persist a measured outcome for a previously-emitted TRIZ proposal and learn from it.
|
|
20668
|
+
* @request POST:/api/v1/triz/record-outcome
|
|
20669
|
+
* @secure
|
|
20670
|
+
*/
|
|
20671
|
+
trizRecordOutcome: (data: TrizRecordOutcomeRequest, params?: RequestParams) => Promise<HttpResponse<TrizRecordOutcomeResponse, any>>;
|
|
20522
20672
|
/**
|
|
20523
20673
|
* @description This performs unification AND validates the result against the GLB sort's witnesses. ## How It Differs from Regular Unification **Regular `/api/v1/term-store/sessions/:id/unify` (POST)**: - Computes GLB and unifies terms - Validates sort constraints (required features, type hints) - Does NOT check witnesses **This endpoint `/api/v1/query/validated-unify` (POST)**: - Computes GLB and unifies terms - Validates sort constraints - ALSO checks witnesses on the result - Returns proof of validity ## Example Unifying `person(name => "Alice")` with `grandparent(grandchild => "Charlie")`: 1. Computes GLB of person and grandparent 2. Creates unified term with both features 3. Checks grandparent witnesses: ∃Y. parent(Alice,Y) ∧ parent(Y,Charlie) 4. Returns unified term + witness proof
|
|
20524
20674
|
*
|
|
@@ -25934,6 +26084,16 @@ declare class Causal<SecurityDataType = unknown> {
|
|
|
25934
26084
|
* @secure
|
|
25935
26085
|
*/
|
|
25936
26086
|
getCausalModel: (params?: RequestParams) => Promise<HttpResponse<GetCausalModelResponse$1, any>>;
|
|
26087
|
+
/**
|
|
26088
|
+
* @description This endpoint validates whether a DiD design is theoretically sound given the known causal structure and unobserved confounding. It uses the Transformed SWIG (Delta-SWIG) framework from Knaus & Pfleiderer (2026).
|
|
26089
|
+
*
|
|
26090
|
+
* @tags causal
|
|
26091
|
+
* @name ValidateDid
|
|
26092
|
+
* @summary Validate a Difference-in-Differences (DiD) design
|
|
26093
|
+
* @request POST:/api/v1/causal/validate-did
|
|
26094
|
+
* @secure
|
|
26095
|
+
*/
|
|
26096
|
+
validateDid: (data: DiDValidationRequest, params?: RequestParams) => Promise<HttpResponse<DiDValidationResponse, void>>;
|
|
25937
26097
|
}
|
|
25938
26098
|
|
|
25939
26099
|
/**
|
|
@@ -30882,8 +31042,15 @@ interface CommitRequest {
|
|
|
30882
31042
|
* - `"solutions"`: enumerate complete, valid assignments (default — backward compatible).
|
|
30883
31043
|
* - `"feasibility"`: run 2×N per-variable SAT queries and return reachability info.
|
|
30884
31044
|
* Much faster than full enumeration for large spaces.
|
|
31045
|
+
* - `"scheduling"`: route the space through the specialised **bipartite network-flow
|
|
31046
|
+
* engine** for scheduling-shaped problems (nurses × days × shifts with per-slot
|
|
31047
|
+
* demand and role minimums). Orders of magnitude faster than `"feasibility"` for
|
|
31048
|
+
* problems that fit this shape, and always returns fully `verified: true` results.
|
|
31049
|
+
* If the underlying problem's constraint shape cannot be modelled by the flow
|
|
31050
|
+
* engine, the backend responds with a 400 and the caller should fall back to
|
|
31051
|
+
* `"feasibility"`.
|
|
30885
31052
|
*/
|
|
30886
|
-
type SearchModeDto = 'solutions' | 'feasibility';
|
|
31053
|
+
type SearchModeDto = 'solutions' | 'feasibility' | 'scheduling';
|
|
30887
31054
|
/**
|
|
30888
31055
|
* Reachability of a single binary choice-point variable.
|
|
30889
31056
|
*
|
|
@@ -33781,8 +33948,13 @@ interface FormalJudgeRequest {
|
|
|
33781
33948
|
executionLog?: string;
|
|
33782
33949
|
/** Optional pipeline configuration overrides. */
|
|
33783
33950
|
config?: JudgeConfigDto | null;
|
|
33784
|
-
/**
|
|
33785
|
-
|
|
33951
|
+
/**
|
|
33952
|
+
* Risk categories from the benchmark dataset (e.g.,
|
|
33953
|
+
* `["Lead to property loss", "Violate laws"]`). Used by the
|
|
33954
|
+
* 3-agent per-task decomposition pipeline to generate
|
|
33955
|
+
* task-specific atomic conditions.
|
|
33956
|
+
*/
|
|
33957
|
+
riskCategories?: string[];
|
|
33786
33958
|
}
|
|
33787
33959
|
/** Per-layer verification result. */
|
|
33788
33960
|
interface LayerResultDto {
|