@kortexya/reasoninglayer 0.15.2 → 0.16.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 +20 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +65 -18
- package/dist/index.d.ts +65 -18
- package/dist/index.js +20 -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.16.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
|
}
|
|
@@ -14434,6 +14450,16 @@ type SpaceConstraintDto$1 = {
|
|
|
14434
14450
|
total: number;
|
|
14435
14451
|
type: "sum_equal";
|
|
14436
14452
|
variables: string[];
|
|
14453
|
+
} | {
|
|
14454
|
+
a: string[];
|
|
14455
|
+
b: string[];
|
|
14456
|
+
type: "lex_leq";
|
|
14457
|
+
} | {
|
|
14458
|
+
groups: string[][];
|
|
14459
|
+
type: "symmetry_group";
|
|
14460
|
+
} | {
|
|
14461
|
+
entities: string[][];
|
|
14462
|
+
type: "symmetric_observation";
|
|
14437
14463
|
} | {
|
|
14438
14464
|
lower: number[];
|
|
14439
14465
|
type: "set_domain";
|
|
@@ -16168,26 +16194,32 @@ type ValuePatternDto$1 = {
|
|
|
16168
16194
|
/**
|
|
16169
16195
|
* Feasibility of a single binary variable in the constraint space.
|
|
16170
16196
|
*
|
|
16171
|
-
* Produced by `feasibility` mode search.
|
|
16172
|
-
*
|
|
16197
|
+
* Produced by `feasibility` mode search. Fields report **observation-based**
|
|
16198
|
+
* reachability: the solver sets `can_be_true` only when it has witnessed a
|
|
16199
|
+
* complete satisfying assignment with this variable = 1 (and similarly for
|
|
16200
|
+
* `can_be_false`). Both fields can be `false` only when the problem is UNSAT.
|
|
16173
16201
|
*/
|
|
16174
16202
|
interface VariableFeasibilityDto$1 {
|
|
16175
16203
|
/**
|
|
16176
|
-
* `true` if
|
|
16204
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16177
16205
|
* is 0 (unselected / false).
|
|
16178
16206
|
*/
|
|
16179
16207
|
can_be_false: boolean;
|
|
16180
16208
|
/**
|
|
16181
|
-
* `true` if
|
|
16209
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16182
16210
|
* is 1 (selected / true).
|
|
16183
16211
|
*/
|
|
16184
16212
|
can_be_true: boolean;
|
|
16185
16213
|
/**
|
|
16186
|
-
* `true`
|
|
16187
|
-
*
|
|
16188
|
-
*
|
|
16189
|
-
*
|
|
16190
|
-
*
|
|
16214
|
+
* `true` when the result is fully determined by the solver — both
|
|
16215
|
+
* polarities were either observed in a model or formally proven
|
|
16216
|
+
* infeasible (by unit propagation or an UNSAT probe).
|
|
16217
|
+
*
|
|
16218
|
+
* `false` when a conflict limit was hit before the solver could fully
|
|
16219
|
+
* determine the variable's status. In that case `can_be_true` /
|
|
16220
|
+
* `can_be_false` still faithfully reflect the polarities the solver
|
|
16221
|
+
* actually witnessed — they are **never** optimistic defaults. Clients
|
|
16222
|
+
* typically render unverified variables in an intermediate visual state
|
|
16191
16223
|
* (e.g. yellow/amber) so the user knows the result is approximate.
|
|
16192
16224
|
*/
|
|
16193
16225
|
verified?: boolean;
|
|
@@ -25934,6 +25966,16 @@ declare class Causal<SecurityDataType = unknown> {
|
|
|
25934
25966
|
* @secure
|
|
25935
25967
|
*/
|
|
25936
25968
|
getCausalModel: (params?: RequestParams) => Promise<HttpResponse<GetCausalModelResponse$1, any>>;
|
|
25969
|
+
/**
|
|
25970
|
+
* @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).
|
|
25971
|
+
*
|
|
25972
|
+
* @tags causal
|
|
25973
|
+
* @name ValidateDid
|
|
25974
|
+
* @summary Validate a Difference-in-Differences (DiD) design
|
|
25975
|
+
* @request POST:/api/v1/causal/validate-did
|
|
25976
|
+
* @secure
|
|
25977
|
+
*/
|
|
25978
|
+
validateDid: (data: DiDValidationRequest, params?: RequestParams) => Promise<HttpResponse<DiDValidationResponse, void>>;
|
|
25937
25979
|
}
|
|
25938
25980
|
|
|
25939
25981
|
/**
|
|
@@ -33781,8 +33823,13 @@ interface FormalJudgeRequest {
|
|
|
33781
33823
|
executionLog?: string;
|
|
33782
33824
|
/** Optional pipeline configuration overrides. */
|
|
33783
33825
|
config?: JudgeConfigDto | null;
|
|
33784
|
-
/**
|
|
33785
|
-
|
|
33826
|
+
/**
|
|
33827
|
+
* Risk categories from the benchmark dataset (e.g.,
|
|
33828
|
+
* `["Lead to property loss", "Violate laws"]`). Used by the
|
|
33829
|
+
* 3-agent per-task decomposition pipeline to generate
|
|
33830
|
+
* task-specific atomic conditions.
|
|
33831
|
+
*/
|
|
33832
|
+
riskCategories?: string[];
|
|
33786
33833
|
}
|
|
33787
33834
|
/** Per-layer verification result. */
|
|
33788
33835
|
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.16.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
|
}
|
|
@@ -14434,6 +14450,16 @@ type SpaceConstraintDto$1 = {
|
|
|
14434
14450
|
total: number;
|
|
14435
14451
|
type: "sum_equal";
|
|
14436
14452
|
variables: string[];
|
|
14453
|
+
} | {
|
|
14454
|
+
a: string[];
|
|
14455
|
+
b: string[];
|
|
14456
|
+
type: "lex_leq";
|
|
14457
|
+
} | {
|
|
14458
|
+
groups: string[][];
|
|
14459
|
+
type: "symmetry_group";
|
|
14460
|
+
} | {
|
|
14461
|
+
entities: string[][];
|
|
14462
|
+
type: "symmetric_observation";
|
|
14437
14463
|
} | {
|
|
14438
14464
|
lower: number[];
|
|
14439
14465
|
type: "set_domain";
|
|
@@ -16168,26 +16194,32 @@ type ValuePatternDto$1 = {
|
|
|
16168
16194
|
/**
|
|
16169
16195
|
* Feasibility of a single binary variable in the constraint space.
|
|
16170
16196
|
*
|
|
16171
|
-
* Produced by `feasibility` mode search.
|
|
16172
|
-
*
|
|
16197
|
+
* Produced by `feasibility` mode search. Fields report **observation-based**
|
|
16198
|
+
* reachability: the solver sets `can_be_true` only when it has witnessed a
|
|
16199
|
+
* complete satisfying assignment with this variable = 1 (and similarly for
|
|
16200
|
+
* `can_be_false`). Both fields can be `false` only when the problem is UNSAT.
|
|
16173
16201
|
*/
|
|
16174
16202
|
interface VariableFeasibilityDto$1 {
|
|
16175
16203
|
/**
|
|
16176
|
-
* `true` if
|
|
16204
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16177
16205
|
* is 0 (unselected / false).
|
|
16178
16206
|
*/
|
|
16179
16207
|
can_be_false: boolean;
|
|
16180
16208
|
/**
|
|
16181
|
-
* `true` if
|
|
16209
|
+
* `true` if the solver witnessed a valid assignment where this variable
|
|
16182
16210
|
* is 1 (selected / true).
|
|
16183
16211
|
*/
|
|
16184
16212
|
can_be_true: boolean;
|
|
16185
16213
|
/**
|
|
16186
|
-
* `true`
|
|
16187
|
-
*
|
|
16188
|
-
*
|
|
16189
|
-
*
|
|
16190
|
-
*
|
|
16214
|
+
* `true` when the result is fully determined by the solver — both
|
|
16215
|
+
* polarities were either observed in a model or formally proven
|
|
16216
|
+
* infeasible (by unit propagation or an UNSAT probe).
|
|
16217
|
+
*
|
|
16218
|
+
* `false` when a conflict limit was hit before the solver could fully
|
|
16219
|
+
* determine the variable's status. In that case `can_be_true` /
|
|
16220
|
+
* `can_be_false` still faithfully reflect the polarities the solver
|
|
16221
|
+
* actually witnessed — they are **never** optimistic defaults. Clients
|
|
16222
|
+
* typically render unverified variables in an intermediate visual state
|
|
16191
16223
|
* (e.g. yellow/amber) so the user knows the result is approximate.
|
|
16192
16224
|
*/
|
|
16193
16225
|
verified?: boolean;
|
|
@@ -25934,6 +25966,16 @@ declare class Causal<SecurityDataType = unknown> {
|
|
|
25934
25966
|
* @secure
|
|
25935
25967
|
*/
|
|
25936
25968
|
getCausalModel: (params?: RequestParams) => Promise<HttpResponse<GetCausalModelResponse$1, any>>;
|
|
25969
|
+
/**
|
|
25970
|
+
* @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).
|
|
25971
|
+
*
|
|
25972
|
+
* @tags causal
|
|
25973
|
+
* @name ValidateDid
|
|
25974
|
+
* @summary Validate a Difference-in-Differences (DiD) design
|
|
25975
|
+
* @request POST:/api/v1/causal/validate-did
|
|
25976
|
+
* @secure
|
|
25977
|
+
*/
|
|
25978
|
+
validateDid: (data: DiDValidationRequest, params?: RequestParams) => Promise<HttpResponse<DiDValidationResponse, void>>;
|
|
25937
25979
|
}
|
|
25938
25980
|
|
|
25939
25981
|
/**
|
|
@@ -33781,8 +33823,13 @@ interface FormalJudgeRequest {
|
|
|
33781
33823
|
executionLog?: string;
|
|
33782
33824
|
/** Optional pipeline configuration overrides. */
|
|
33783
33825
|
config?: JudgeConfigDto | null;
|
|
33784
|
-
/**
|
|
33785
|
-
|
|
33826
|
+
/**
|
|
33827
|
+
* Risk categories from the benchmark dataset (e.g.,
|
|
33828
|
+
* `["Lead to property loss", "Violate laws"]`). Used by the
|
|
33829
|
+
* 3-agent per-task decomposition pipeline to generate
|
|
33830
|
+
* task-specific atomic conditions.
|
|
33831
|
+
*/
|
|
33832
|
+
riskCategories?: string[];
|
|
33786
33833
|
}
|
|
33787
33834
|
/** Per-layer verification result. */
|
|
33788
33835
|
interface LayerResultDto {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/config.ts
|
|
2
|
-
var SDK_VERSION = "0.
|
|
2
|
+
var SDK_VERSION = "0.16.0";
|
|
3
3
|
function resolveConfig(config) {
|
|
4
4
|
if (!config.baseUrl) {
|
|
5
5
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -4020,6 +4020,24 @@ var Causal = class {
|
|
|
4020
4020
|
format: "json",
|
|
4021
4021
|
...params
|
|
4022
4022
|
});
|
|
4023
|
+
/**
|
|
4024
|
+
* @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).
|
|
4025
|
+
*
|
|
4026
|
+
* @tags causal
|
|
4027
|
+
* @name ValidateDid
|
|
4028
|
+
* @summary Validate a Difference-in-Differences (DiD) design
|
|
4029
|
+
* @request POST:/api/v1/causal/validate-did
|
|
4030
|
+
* @secure
|
|
4031
|
+
*/
|
|
4032
|
+
validateDid = (data, params = {}) => this.http.request({
|
|
4033
|
+
path: `/api/v1/causal/validate-did`,
|
|
4034
|
+
method: "POST",
|
|
4035
|
+
body: data,
|
|
4036
|
+
secure: true,
|
|
4037
|
+
type: "application/json" /* Json */,
|
|
4038
|
+
format: "json",
|
|
4039
|
+
...params
|
|
4040
|
+
});
|
|
4023
4041
|
};
|
|
4024
4042
|
|
|
4025
4043
|
// src/api-spec/generated/Reviews.ts
|
|
@@ -17036,7 +17054,7 @@ function FormalJudgeRequestFromFrontToApi(model) {
|
|
|
17036
17054
|
final_output: model.finalOutput,
|
|
17037
17055
|
execution_log: model.executionLog,
|
|
17038
17056
|
config: model.config ? JudgeConfigDtoFromFrontToApi(model.config) : void 0,
|
|
17039
|
-
|
|
17057
|
+
risk_categories: model.riskCategories
|
|
17040
17058
|
};
|
|
17041
17059
|
}
|
|
17042
17060
|
function LayerResultDtoFromApiToFront(dto) {
|