@kortexya/reasoninglayer 0.19.0 → 0.21.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 +131 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +314 -7
- package/dist/index.d.ts +314 -7
- package/dist/index.js +131 -7
- 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.21.0";
|
|
113
113
|
/**
|
|
114
114
|
* Configuration for the Reasoning Layer client.
|
|
115
115
|
*
|
|
@@ -1043,6 +1043,20 @@ interface AssignmentDto {
|
|
|
1043
1043
|
agent_id: string;
|
|
1044
1044
|
/** @min 0 */
|
|
1045
1045
|
day: number;
|
|
1046
|
+
/**
|
|
1047
|
+
* Roles the agent can or must fill at this cell.
|
|
1048
|
+
*
|
|
1049
|
+
* - When `status = confirmed_true`: the role(s) the agent
|
|
1050
|
+
* must fill at this cell. Usually a single entry.
|
|
1051
|
+
* - When `status = free`: the set of roles the agent could
|
|
1052
|
+
* fill across valid schedules that place them here.
|
|
1053
|
+
* - When `status = confirmed_false`: always empty.
|
|
1054
|
+
*
|
|
1055
|
+
* The reserved string `"any"` denotes routing through the
|
|
1056
|
+
* unroled sub-slot pool (i.e. the agent is "just there",
|
|
1057
|
+
* not counting toward any role minimum at this slot).
|
|
1058
|
+
*/
|
|
1059
|
+
roles: string[];
|
|
1046
1060
|
/** @min 0 */
|
|
1047
1061
|
shift: number;
|
|
1048
1062
|
/**
|
|
@@ -11473,11 +11487,30 @@ interface PendingReviewEntityDto {
|
|
|
11473
11487
|
/** Original text span that was extracted */
|
|
11474
11488
|
source_text?: string | null;
|
|
11475
11489
|
}
|
|
11476
|
-
/**
|
|
11490
|
+
/**
|
|
11491
|
+
* A pre-assigned `(agent, day, shift)` triple, optionally naming
|
|
11492
|
+
* which role the pin covers.
|
|
11493
|
+
*
|
|
11494
|
+
* When the agent has **multiple roles that each match a role
|
|
11495
|
+
* minimum** at the target slot, the caller MUST set [`PinInput::role`]
|
|
11496
|
+
* to disambiguate. Otherwise the engine returns HTTP 400 — the
|
|
11497
|
+
* silent greedy-match that used to happen here could pick the
|
|
11498
|
+
* "wrong" role and produce spurious infeasibility.
|
|
11499
|
+
*
|
|
11500
|
+
* Role semantics:
|
|
11501
|
+
* * `None` — caller hasn't chosen. Valid only if the agent has at
|
|
11502
|
+
* most one role matching this slot's role_mins.
|
|
11503
|
+
* * `Some("any")` — explicit request to route through the
|
|
11504
|
+
* unroled pool; no role minimum is decremented.
|
|
11505
|
+
* * `Some(role)` — force the pin to cover this role. Must be a
|
|
11506
|
+
* role the agent possesses (HTTP 400 otherwise).
|
|
11507
|
+
*/
|
|
11477
11508
|
interface PinInput {
|
|
11478
11509
|
agent_id: string;
|
|
11479
11510
|
/** @min 0 */
|
|
11480
11511
|
day: number;
|
|
11512
|
+
/** Role the pin covers. See struct-level docs for the cases. */
|
|
11513
|
+
role?: string | null;
|
|
11481
11514
|
/** @min 0 */
|
|
11482
11515
|
shift: number;
|
|
11483
11516
|
}
|
|
@@ -11779,6 +11812,31 @@ interface PreferenceDto$1 {
|
|
|
11779
11812
|
/** Preference value. */
|
|
11780
11813
|
value: string;
|
|
11781
11814
|
}
|
|
11815
|
+
/**
|
|
11816
|
+
* A soft preference: bias the optimizer toward (or against) assigning
|
|
11817
|
+
* `agent_id` to cell `(day, shift)`.
|
|
11818
|
+
*
|
|
11819
|
+
* `score` contributes to the objective when the cell is assigned in
|
|
11820
|
+
* the chosen schedule. Positive values pull the optimizer toward
|
|
11821
|
+
* the cell; negative values push it away. Preferences targeting a
|
|
11822
|
+
* pinned cell, an agent with a day-off on `day`, or an agent
|
|
11823
|
+
* otherwise blocked from the slot are silently ignored — the
|
|
11824
|
+
* corresponding decision edge does not exist in the reduced flow
|
|
11825
|
+
* graph.
|
|
11826
|
+
*/
|
|
11827
|
+
interface PreferenceInput {
|
|
11828
|
+
agent_id: string;
|
|
11829
|
+
/** @min 0 */
|
|
11830
|
+
day: number;
|
|
11831
|
+
/**
|
|
11832
|
+
* Score contributed by this assignment to the optimizer's
|
|
11833
|
+
* objective. Positive = preferred, negative = avoided.
|
|
11834
|
+
* @format int64
|
|
11835
|
+
*/
|
|
11836
|
+
score: number;
|
|
11837
|
+
/** @min 0 */
|
|
11838
|
+
shift: number;
|
|
11839
|
+
}
|
|
11782
11840
|
/** Prediction result for a single term */
|
|
11783
11841
|
interface PreferencePrediction$1 {
|
|
11784
11842
|
/** @format double */
|
|
@@ -13708,6 +13766,56 @@ interface SchedulingFeasibilityResponse$1 {
|
|
|
13708
13766
|
/** Top-level request status. */
|
|
13709
13767
|
status: SchedulingStatusDto;
|
|
13710
13768
|
}
|
|
13769
|
+
/**
|
|
13770
|
+
* Request body for `POST /api/v1/scheduling/optimize`.
|
|
13771
|
+
*
|
|
13772
|
+
* Same hard-constraint shape as
|
|
13773
|
+
* [`SchedulingFeasibilityRequest`], plus a list of soft
|
|
13774
|
+
* `preferences`. The engine returns the per-cell envelope across
|
|
13775
|
+
* the space of **optimal** schedules under the supplied
|
|
13776
|
+
* preferences.
|
|
13777
|
+
*/
|
|
13778
|
+
interface SchedulingOptimizeRequest$1 {
|
|
13779
|
+
agents: AgentInput[];
|
|
13780
|
+
/** @min 0 */
|
|
13781
|
+
days: number;
|
|
13782
|
+
demands: ShiftDemandInput[];
|
|
13783
|
+
pins?: PinInput[];
|
|
13784
|
+
/**
|
|
13785
|
+
* Soft preferences applied to the objective. Empty = unweighted
|
|
13786
|
+
* (every feasible schedule is "optimal").
|
|
13787
|
+
*/
|
|
13788
|
+
preferences?: PreferenceInput[];
|
|
13789
|
+
/** @min 0 */
|
|
13790
|
+
shifts_per_day: number;
|
|
13791
|
+
}
|
|
13792
|
+
/**
|
|
13793
|
+
* Response to [`SchedulingOptimizeRequest`].
|
|
13794
|
+
*
|
|
13795
|
+
* The per-cell `assignments` trichotomy classifies each cell over
|
|
13796
|
+
* the space of **optimal** schedules — strictly stronger than the
|
|
13797
|
+
* feasibility-only trichotomy returned by
|
|
13798
|
+
* `/api/v1/scheduling/feasibility`. When the un-pinned reduced
|
|
13799
|
+
* problem is infeasible, `status = "infeasible"`, `assignments` is
|
|
13800
|
+
* empty, and `total_score` is `0`.
|
|
13801
|
+
*/
|
|
13802
|
+
interface SchedulingOptimizeResponse$1 {
|
|
13803
|
+
/**
|
|
13804
|
+
* Empty when `status` is `infeasible`; otherwise one entry per
|
|
13805
|
+
* `(agent, day, shift)` triple in the input grid, with
|
|
13806
|
+
* trichotomy taken across the space of optimal schedules.
|
|
13807
|
+
*/
|
|
13808
|
+
assignments: AssignmentDto[];
|
|
13809
|
+
/** Top-level request status. */
|
|
13810
|
+
status: SchedulingStatusDto;
|
|
13811
|
+
/**
|
|
13812
|
+
* Sum of [`PreferenceInput::score`] over assigned cells in the
|
|
13813
|
+
* optimum. `0` when no preferences were supplied or the
|
|
13814
|
+
* problem is infeasible.
|
|
13815
|
+
* @format int64
|
|
13816
|
+
*/
|
|
13817
|
+
total_score: number;
|
|
13818
|
+
}
|
|
13711
13819
|
/** Top-level request status. */
|
|
13712
13820
|
type SchedulingStatusDto = "feasible" | "infeasible";
|
|
13713
13821
|
/** Request to search communities */
|
|
@@ -16894,11 +17002,10 @@ declare class Sorts<SecurityDataType = unknown> {
|
|
|
16894
17002
|
*/
|
|
16895
17003
|
getSortSimilarity: (data: GetSortSimilarityRequest$1, params?: RequestParams) => Promise<HttpResponse<GetSortSimilarityResponse$1, any>>;
|
|
16896
17004
|
/**
|
|
16897
|
-
*
|
|
17005
|
+
* No description
|
|
16898
17006
|
*
|
|
16899
17007
|
* @tags sorts
|
|
16900
17008
|
* @name IndexSorts
|
|
16901
|
-
* @summary Index all sorts for a tenant into the vector store (Qdrant).
|
|
16902
17009
|
* @request POST:/api/v1/sorts/index
|
|
16903
17010
|
* @secure
|
|
16904
17011
|
*/
|
|
@@ -16955,6 +17062,12 @@ declare class Sorts<SecurityDataType = unknown> {
|
|
|
16955
17062
|
limit?: number | null;
|
|
16956
17063
|
/** Filter to only show LLM-extracted sorts */
|
|
16957
17064
|
llm_extracted?: boolean | null;
|
|
17065
|
+
/**
|
|
17066
|
+
* Filter to sorts whose name starts with this prefix.
|
|
17067
|
+
* Supports comma-separated multiple prefixes (e.g. "drug_,target_,pathway_,disease_").
|
|
17068
|
+
* Server-side filtering avoids transferring millions of irrelevant sorts.
|
|
17069
|
+
*/
|
|
17070
|
+
name_prefix?: string | null;
|
|
16958
17071
|
/** Filter to only show sorts needing review */
|
|
16959
17072
|
needs_review?: boolean | null;
|
|
16960
17073
|
/**
|
|
@@ -39257,7 +39370,7 @@ declare class Scheduling<SecurityDataType = unknown> {
|
|
|
39257
39370
|
http: HttpClient<SecurityDataType>;
|
|
39258
39371
|
constructor(http: HttpClient<SecurityDataType>);
|
|
39259
39372
|
/**
|
|
39260
|
-
* @description Classify every `(agent, day, shift)` cell in the input grid as confirmed-true, confirmed-false, or free. Input validation errors (duplicate agent IDs, out-of-range pins, role minima exceeding total demand, etc.) return HTTP 400. Infeasibility of a well-formed problem is a valid answer and returns HTTP 200 with `status = "infeasible"` and an empty `assignments` list.
|
|
39373
|
+
* @description Classify every `(agent, day, shift)` cell in the input grid as confirmed-true, confirmed-false, or free, and list the role(s) each cell could cover. Input validation errors (duplicate agent IDs, out-of-range pins, role minima exceeding total demand, pin role the agent doesn't have, pin on a multi-role agent where the role is ambiguous, etc.) return HTTP 400. Infeasibility of a well-formed problem is a valid answer and returns HTTP 200 with `status = "infeasible"` and an empty `assignments` list.
|
|
39261
39374
|
*
|
|
39262
39375
|
* @tags scheduling
|
|
39263
39376
|
* @name Feasibility
|
|
@@ -39265,6 +39378,15 @@ declare class Scheduling<SecurityDataType = unknown> {
|
|
|
39265
39378
|
* @request POST:/api/v1/scheduling/feasibility
|
|
39266
39379
|
*/
|
|
39267
39380
|
feasibility: (data: SchedulingFeasibilityRequest$1, params?: RequestParams) => Promise<HttpResponse<SchedulingFeasibilityResponse$1, void>>;
|
|
39381
|
+
/**
|
|
39382
|
+
* @description Same hard constraints as `/scheduling/feasibility` plus a list of soft `preferences` (each a per-cell score added to the optimizer's objective). Returns the per-cell trichotomy across the space of **optimal** schedules, plus `total_score` (sum of preference scores at chosen cells in the optimum). `confirmed_true` / `confirmed_false` here are stronger than in `/feasibility`: they hold across every optimum, not every feasible schedule. Cells with status `free` indicate ties — multiple optima exist and the cell varies between them. Preferences targeting cells that are already pinned, blocked by a day-off, restricted-to-shift, or otherwise structurally fixed are silently ignored — those cells are not the optimizer's choice to make.
|
|
39383
|
+
*
|
|
39384
|
+
* @tags scheduling
|
|
39385
|
+
* @name Optimize
|
|
39386
|
+
* @summary `POST /api/v1/scheduling/optimize`
|
|
39387
|
+
* @request POST:/api/v1/scheduling/optimize
|
|
39388
|
+
*/
|
|
39389
|
+
optimize: (data: SchedulingOptimizeRequest$1, params?: RequestParams) => Promise<HttpResponse<SchedulingOptimizeResponse$1, void>>;
|
|
39268
39390
|
}
|
|
39269
39391
|
|
|
39270
39392
|
/**
|
|
@@ -39334,14 +39456,38 @@ interface ShiftDemand {
|
|
|
39334
39456
|
*/
|
|
39335
39457
|
roleMinimums?: Record<string, number>;
|
|
39336
39458
|
}
|
|
39459
|
+
/**
|
|
39460
|
+
* Reserved role-name for the unroled ("any") sub-slot pool.
|
|
39461
|
+
*
|
|
39462
|
+
* Use this value for {@link Pin.role} when you want the pin to NOT
|
|
39463
|
+
* decrement any role minimum (agent fills the "any" slack). Also
|
|
39464
|
+
* appears in {@link Assignment.roles} when the agent routes through
|
|
39465
|
+
* that pool.
|
|
39466
|
+
*/
|
|
39467
|
+
declare const ANY_ROLE = "any";
|
|
39337
39468
|
/**
|
|
39338
39469
|
* A pre-assigned `(agent, day, shift)` triple. The engine treats the
|
|
39339
39470
|
* pin as confirmed-true and reduces the slot's remaining demand.
|
|
39471
|
+
*
|
|
39472
|
+
* When the agent has **multiple roles that each match a role
|
|
39473
|
+
* minimum** at the target slot, the caller MUST set {@link Pin.role}
|
|
39474
|
+
* to disambiguate. Otherwise the backend returns HTTP 400 with an
|
|
39475
|
+
* "ambiguous pin role" error listing the candidate roles.
|
|
39476
|
+
*
|
|
39477
|
+
* Role semantics:
|
|
39478
|
+
* - `undefined` — no role specified. Valid only when the agent has
|
|
39479
|
+
* at most one role matching this slot's role minimums.
|
|
39480
|
+
* - `"any"` (see {@link ANY_ROLE}) — route through the unroled pool;
|
|
39481
|
+
* no role minimum is decremented.
|
|
39482
|
+
* - `"<role>"` — force the pin to cover this role. Must be a role
|
|
39483
|
+
* the agent possesses (HTTP 400 otherwise).
|
|
39340
39484
|
*/
|
|
39341
39485
|
interface Pin {
|
|
39342
39486
|
agentId: string;
|
|
39343
39487
|
day: number;
|
|
39344
39488
|
shift: number;
|
|
39489
|
+
/** Role the pin covers. See docs above for the cases. */
|
|
39490
|
+
role?: string;
|
|
39345
39491
|
}
|
|
39346
39492
|
/**
|
|
39347
39493
|
* Input to {@link SchedulingClient.feasibility}.
|
|
@@ -39372,6 +39518,19 @@ interface Assignment {
|
|
|
39372
39518
|
day: number;
|
|
39373
39519
|
shift: number;
|
|
39374
39520
|
status: AssignmentStatus;
|
|
39521
|
+
/**
|
|
39522
|
+
* Roles the agent can or must fill at this cell.
|
|
39523
|
+
*
|
|
39524
|
+
* - When `status === 'confirmed_true'`: the role(s) the agent must
|
|
39525
|
+
* fill at this cell. Usually a single entry.
|
|
39526
|
+
* - When `status === 'free'`: the set of roles the agent could fill
|
|
39527
|
+
* across valid schedules that place them here.
|
|
39528
|
+
* - When `status === 'confirmed_false'`: always empty.
|
|
39529
|
+
*
|
|
39530
|
+
* The reserved string {@link ANY_ROLE} (`"any"`) denotes routing
|
|
39531
|
+
* through the unroled sub-slot pool.
|
|
39532
|
+
*/
|
|
39533
|
+
roles: string[];
|
|
39375
39534
|
}
|
|
39376
39535
|
/**
|
|
39377
39536
|
* Response from {@link SchedulingClient.feasibility}.
|
|
@@ -39386,17 +39545,106 @@ interface SchedulingFeasibilityResponse {
|
|
|
39386
39545
|
status: SchedulingStatus;
|
|
39387
39546
|
assignments: Assignment[];
|
|
39388
39547
|
}
|
|
39548
|
+
/**
|
|
39549
|
+
* A soft preference: bias the optimizer toward (or against) assigning
|
|
39550
|
+
* `agentId` to cell `(day, shift)`.
|
|
39551
|
+
*
|
|
39552
|
+
* @remarks
|
|
39553
|
+
* `score` contributes to the optimizer's objective when the cell is
|
|
39554
|
+
* assigned in the chosen schedule. Positive values pull the optimizer
|
|
39555
|
+
* toward the cell; negative values push it away.
|
|
39556
|
+
*
|
|
39557
|
+
* Preferences targeting a cell that is already pinned, blocked by a
|
|
39558
|
+
* day-off, restricted-to-shift, or otherwise structurally fixed are
|
|
39559
|
+
* silently ignored — those cells are not the optimizer's choice to
|
|
39560
|
+
* make.
|
|
39561
|
+
*
|
|
39562
|
+
* Common encodings:
|
|
39563
|
+
* - "Aisha prefers morning shifts" → `score = +5` on every
|
|
39564
|
+
* `(aisha, day, morning)` pair
|
|
39565
|
+
* - "Avoid weekend assignments" → `score = -3` on every
|
|
39566
|
+
* `(*, sat|sun, *)` pair
|
|
39567
|
+
* - "Honor day-off requests" → `score = -100` on
|
|
39568
|
+
* `(agent, requested_off_day, *)` (large negative penalty —
|
|
39569
|
+
* respects the request when feasible, lets the engine decide
|
|
39570
|
+
* when not)
|
|
39571
|
+
*/
|
|
39572
|
+
interface Preference {
|
|
39573
|
+
agentId: string;
|
|
39574
|
+
day: number;
|
|
39575
|
+
shift: number;
|
|
39576
|
+
/**
|
|
39577
|
+
* Score added to the objective when this cell is assigned in the
|
|
39578
|
+
* chosen schedule. Positive = preferred, negative = avoided.
|
|
39579
|
+
*/
|
|
39580
|
+
score: number;
|
|
39581
|
+
}
|
|
39582
|
+
/**
|
|
39583
|
+
* Input to {@link SchedulingClient.optimize}.
|
|
39584
|
+
*
|
|
39585
|
+
* @remarks
|
|
39586
|
+
* Same hard-constraint shape as {@link SchedulingFeasibilityRequest}
|
|
39587
|
+
* plus a list of soft `preferences`. The engine returns the per-cell
|
|
39588
|
+
* envelope across the space of **optimal** schedules under the
|
|
39589
|
+
* supplied preferences.
|
|
39590
|
+
*/
|
|
39591
|
+
interface SchedulingOptimizeRequest {
|
|
39592
|
+
agents: AgentSpec[];
|
|
39593
|
+
days: number;
|
|
39594
|
+
shiftsPerDay: number;
|
|
39595
|
+
demands: ShiftDemand[];
|
|
39596
|
+
/** Pre-assigned `(agent, day, shift)` triples. Defaults to empty. */
|
|
39597
|
+
pins?: Pin[];
|
|
39598
|
+
/**
|
|
39599
|
+
* Soft preferences applied to the objective. Empty (or omitted) =
|
|
39600
|
+
* unweighted: every feasible schedule is "optimal" and the result
|
|
39601
|
+
* coincides with {@link SchedulingClient.feasibility}.
|
|
39602
|
+
*/
|
|
39603
|
+
preferences?: Preference[];
|
|
39604
|
+
}
|
|
39605
|
+
/**
|
|
39606
|
+
* Response from {@link SchedulingClient.optimize}.
|
|
39607
|
+
*
|
|
39608
|
+
* @remarks
|
|
39609
|
+
* The per-cell `assignments` trichotomy classifies each cell over the
|
|
39610
|
+
* space of **optimal** schedules — strictly stronger than the
|
|
39611
|
+
* feasibility-only trichotomy from
|
|
39612
|
+
* {@link SchedulingClient.feasibility}:
|
|
39613
|
+
*
|
|
39614
|
+
* - `"confirmed_true"` — assigned in *every* optimal schedule.
|
|
39615
|
+
* - `"confirmed_false"` — assigned in *no* optimal schedule.
|
|
39616
|
+
* - `"free"` — varies across the (possibly multiple) optimal
|
|
39617
|
+
* schedules; the optimizer is indifferent.
|
|
39618
|
+
*
|
|
39619
|
+
* `totalScore` is the sum of {@link Preference.score} over assigned
|
|
39620
|
+
* cells in the optimum. It is `0` when no preferences were supplied
|
|
39621
|
+
* or the problem is infeasible.
|
|
39622
|
+
*/
|
|
39623
|
+
interface SchedulingOptimizeResponse {
|
|
39624
|
+
status: SchedulingStatus;
|
|
39625
|
+
/** Sum of preference scores at chosen cells in the optimum. */
|
|
39626
|
+
totalScore: number;
|
|
39627
|
+
/**
|
|
39628
|
+
* Empty when `status === "infeasible"`; otherwise one entry per
|
|
39629
|
+
* `(agent, day, shift)` triple in the input grid.
|
|
39630
|
+
*/
|
|
39631
|
+
assignments: Assignment[];
|
|
39632
|
+
}
|
|
39389
39633
|
|
|
39634
|
+
declare const scheduling_ANY_ROLE: typeof ANY_ROLE;
|
|
39390
39635
|
type scheduling_AgentSpec = AgentSpec;
|
|
39391
39636
|
type scheduling_Assignment = Assignment;
|
|
39392
39637
|
type scheduling_AssignmentStatus = AssignmentStatus;
|
|
39393
39638
|
type scheduling_Pin = Pin;
|
|
39639
|
+
type scheduling_Preference = Preference;
|
|
39394
39640
|
type scheduling_SchedulingFeasibilityRequest = SchedulingFeasibilityRequest;
|
|
39395
39641
|
type scheduling_SchedulingFeasibilityResponse = SchedulingFeasibilityResponse;
|
|
39642
|
+
type scheduling_SchedulingOptimizeRequest = SchedulingOptimizeRequest;
|
|
39643
|
+
type scheduling_SchedulingOptimizeResponse = SchedulingOptimizeResponse;
|
|
39396
39644
|
type scheduling_SchedulingStatus = SchedulingStatus;
|
|
39397
39645
|
type scheduling_ShiftDemand = ShiftDemand;
|
|
39398
39646
|
declare namespace scheduling {
|
|
39399
|
-
export type
|
|
39647
|
+
export { scheduling_ANY_ROLE as ANY_ROLE, type scheduling_AgentSpec as AgentSpec, type scheduling_Assignment as Assignment, type scheduling_AssignmentStatus as AssignmentStatus, type scheduling_Pin as Pin, type scheduling_Preference as Preference, type scheduling_SchedulingFeasibilityRequest as SchedulingFeasibilityRequest, type scheduling_SchedulingFeasibilityResponse as SchedulingFeasibilityResponse, type scheduling_SchedulingOptimizeRequest as SchedulingOptimizeRequest, type scheduling_SchedulingOptimizeResponse as SchedulingOptimizeResponse, type scheduling_SchedulingStatus as SchedulingStatus, type scheduling_ShiftDemand as ShiftDemand };
|
|
39400
39648
|
}
|
|
39401
39649
|
|
|
39402
39650
|
/**
|
|
@@ -39468,6 +39716,65 @@ declare class SchedulingClient {
|
|
|
39468
39716
|
* raises.
|
|
39469
39717
|
*/
|
|
39470
39718
|
feasibility(request: SchedulingFeasibilityRequest): Promise<SchedulingFeasibilityResponse>;
|
|
39719
|
+
/**
|
|
39720
|
+
* Solve the scheduling problem with **soft preferences** and
|
|
39721
|
+
* return the per-cell envelope across the space of *optimal*
|
|
39722
|
+
* schedules.
|
|
39723
|
+
*
|
|
39724
|
+
* @param request - the scheduling problem plus optional
|
|
39725
|
+
* `preferences` (per-cell scores added to the optimizer's
|
|
39726
|
+
* objective). Same hard-constraint shape as
|
|
39727
|
+
* {@link SchedulingClient.feasibility}.
|
|
39728
|
+
* @returns a {@link SchedulingOptimizeResponse} with `totalScore`
|
|
39729
|
+
* and per-cell trichotomy across optimal schedules.
|
|
39730
|
+
*
|
|
39731
|
+
* @throws HTTP 400 errors are surfaced when the input is malformed
|
|
39732
|
+
* (duplicate agent IDs, pins or preferences referencing unknown
|
|
39733
|
+
* agents, ambiguous pin role on multi-role agents, role minima
|
|
39734
|
+
* exceeding total demand, etc.).
|
|
39735
|
+
*
|
|
39736
|
+
* @remarks
|
|
39737
|
+
* The trichotomy returned here is **strictly stronger** than the
|
|
39738
|
+
* one from {@link SchedulingClient.feasibility}:
|
|
39739
|
+
*
|
|
39740
|
+
* - `"confirmed_true"` — assigned in *every* optimum.
|
|
39741
|
+
* - `"confirmed_false"` — assigned in *no* optimum.
|
|
39742
|
+
* - `"free"` — varies across the optima; the optimizer is indifferent
|
|
39743
|
+
* between equally-good choices.
|
|
39744
|
+
*
|
|
39745
|
+
* `totalScore` is the sum of {@link Preference.score} over assigned
|
|
39746
|
+
* cells in the optimum (`0` when no preferences are supplied or
|
|
39747
|
+
* the problem is infeasible).
|
|
39748
|
+
*
|
|
39749
|
+
* Preferences targeting structurally-fixed cells (pinned cells,
|
|
39750
|
+
* day-off / shift-only restricted cells, agents not in the grid)
|
|
39751
|
+
* are silently ignored — the optimizer has no choice to make there.
|
|
39752
|
+
*
|
|
39753
|
+
* Empty `preferences` is equivalent to calling
|
|
39754
|
+
* {@link SchedulingClient.feasibility} (every feasible schedule
|
|
39755
|
+
* is optimal under a zero objective), but slower; prefer
|
|
39756
|
+
* `feasibility()` when you only need the feasibility envelope.
|
|
39757
|
+
*
|
|
39758
|
+
* @example Score Aisha as a strong preference for emergency cover
|
|
39759
|
+
* ```typescript
|
|
39760
|
+
* const report = await client.scheduling.optimize({
|
|
39761
|
+
* agents: [
|
|
39762
|
+
* { id: 'aisha', roles: ['icu', 'emergency'], maxAssignments: 5 },
|
|
39763
|
+
* { id: 'bob', roles: ['general'], maxAssignments: 5 },
|
|
39764
|
+
* ],
|
|
39765
|
+
* days: 7,
|
|
39766
|
+
* shiftsPerDay: 3,
|
|
39767
|
+
* demands: [{ day: 0, shift: 0, total: 2, roleMinimums: { icu: 1 } }],
|
|
39768
|
+
* preferences: [
|
|
39769
|
+
* { agentId: 'aisha', day: 0, shift: 0, score: 10 },
|
|
39770
|
+
* ],
|
|
39771
|
+
* });
|
|
39772
|
+
*
|
|
39773
|
+
* console.log(report.totalScore); // 10 if Aisha is in the optimum
|
|
39774
|
+
* console.log(report.status); // 'feasible' | 'infeasible'
|
|
39775
|
+
* ```
|
|
39776
|
+
*/
|
|
39777
|
+
optimize(request: SchedulingOptimizeRequest): Promise<SchedulingOptimizeResponse>;
|
|
39471
39778
|
}
|
|
39472
39779
|
|
|
39473
39780
|
declare class Osfql<SecurityDataType = unknown> {
|
|
@@ -42334,4 +42641,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
|
|
|
42334
42641
|
*/
|
|
42335
42642
|
declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
|
|
42336
42643
|
|
|
42337
|
-
export { actionReviews as ActionReviews, type AddFactRequest, type AddFactResponse, type AddRuleRequest, type AddRuleResponse, admin as Admin, type AiGroup, analysis as Analysis, type AnalysisGroup, ApiError, type ApiResponse, 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 };
|
|
42644
|
+
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, 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 };
|