@kortexya/reasoninglayer 0.16.0 → 0.18.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.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.16.0";
112
+ declare const SDK_VERSION = "0.18.0";
113
113
  /**
114
114
  * Configuration for the Reasoning Layer client.
115
115
  *
@@ -674,6 +674,31 @@ interface AgentGoalDto$1 {
674
674
  */
675
675
  term_id: string;
676
676
  }
677
+ /** A single agent's static properties. */
678
+ interface AgentInput {
679
+ /** Caller-chosen identifier. Must be unique within the request. */
680
+ id: string;
681
+ /**
682
+ * Maximum number of slots this agent may be assigned across the
683
+ * full horizon.
684
+ * @format int32
685
+ * @min 0
686
+ */
687
+ max_assignments: number;
688
+ /**
689
+ * When present, the agent may only be assigned to this shift
690
+ * index (all other shifts become unavailable).
691
+ * @min 0
692
+ */
693
+ restricted_to_shift?: number | null;
694
+ /**
695
+ * Role tags this agent carries (e.g. `"icu"`, `"senior"`). Used
696
+ * to satisfy per-role minimum-demand constraints.
697
+ */
698
+ roles?: string[];
699
+ /** Day indices on which the agent is unavailable for any shift. */
700
+ unavailable_days?: number[];
701
+ }
677
702
  /** Agent state DTO. */
678
703
  interface AgentStateDto$1 {
679
704
  /**
@@ -1012,6 +1037,27 @@ type AssignValueDto$1 = {
1012
1037
  term_id: string;
1013
1038
  type: "term_ref";
1014
1039
  };
1040
+ /** One entry per `(agent_id, day, shift)` in the input grid. */
1041
+ interface AssignmentDto {
1042
+ /** Echoes the `id` from [`AgentInput`]. */
1043
+ agent_id: string;
1044
+ /** @min 0 */
1045
+ day: number;
1046
+ /** @min 0 */
1047
+ shift: number;
1048
+ /**
1049
+ * Per-cell feasibility classification.
1050
+ *
1051
+ * Every cell in the input grid is classified as exactly one of these.
1052
+ */
1053
+ status: AssignmentStatusDto;
1054
+ }
1055
+ /**
1056
+ * Per-cell feasibility classification.
1057
+ *
1058
+ * Every cell in the input grid is classified as exactly one of these.
1059
+ */
1060
+ type AssignmentStatusDto = "confirmed_true" | "confirmed_false" | "free";
1015
1061
  /** Attention target DTO. */
1016
1062
  type AttentionTargetDto$1 = {
1017
1063
  /** @format uuid */
@@ -11427,6 +11473,14 @@ interface PendingReviewEntityDto {
11427
11473
  /** Original text span that was extracted */
11428
11474
  source_text?: string | null;
11429
11475
  }
11476
+ /** A pre-assigned `(agent, day, shift)` triple. */
11477
+ interface PinInput {
11478
+ agent_id: string;
11479
+ /** @min 0 */
11480
+ day: number;
11481
+ /** @min 0 */
11482
+ shift: number;
11483
+ }
11430
11484
  /** Pipeline quality statistics from validation gates and feedback loop */
11431
11485
  interface PipelineQualityStatsDto$1 {
11432
11486
  /**
@@ -13613,6 +13667,49 @@ interface ScenarioSummaryDto$1 {
13613
13667
  */
13614
13668
  sorts_created: number;
13615
13669
  }
13670
+ /**
13671
+ * A scheduling feasibility request.
13672
+ *
13673
+ * Agents are identified by opaque caller-chosen string IDs so the
13674
+ * response can be joined back to whatever identity the caller
13675
+ * maintains (e.g. employee numbers, user IDs, UUIDs).
13676
+ */
13677
+ interface SchedulingFeasibilityRequest$1 {
13678
+ /** All agents that may be assigned to slots. */
13679
+ agents: AgentInput[];
13680
+ /**
13681
+ * Number of days in the scheduling horizon. Valid day indices
13682
+ * are `0..days`.
13683
+ * @min 0
13684
+ */
13685
+ days: number;
13686
+ /** Per-slot demand. At most one entry per `(day, shift)` pair. */
13687
+ demands: ShiftDemandInput[];
13688
+ /**
13689
+ * Pre-assigned `(agent_id, day, shift)` triples the caller has
13690
+ * fixed; the engine treats each as confirmed-true and reduces
13691
+ * the remaining demand accordingly.
13692
+ */
13693
+ pins?: PinInput[];
13694
+ /**
13695
+ * Number of shifts per day. Valid shift indices are
13696
+ * `0..shifts_per_day`.
13697
+ * @min 0
13698
+ */
13699
+ shifts_per_day: number;
13700
+ }
13701
+ /** Response to [`SchedulingFeasibilityRequest`]. */
13702
+ interface SchedulingFeasibilityResponse$1 {
13703
+ /**
13704
+ * Empty when `status` is `infeasible`; otherwise contains one
13705
+ * entry per `(agent, day, shift)` triple in the input grid.
13706
+ */
13707
+ assignments: AssignmentDto[];
13708
+ /** Top-level request status. */
13709
+ status: SchedulingStatusDto;
13710
+ }
13711
+ /** Top-level request status. */
13712
+ type SchedulingStatusDto = "feasible" | "infeasible";
13616
13713
  /** Request to search communities */
13617
13714
  interface SearchCommunitiesRequest$1 {
13618
13715
  /**
@@ -13904,6 +14001,25 @@ interface SetSortSimilarityResponse$1 {
13904
14001
  /** Whether the operation succeeded */
13905
14002
  success: boolean;
13906
14003
  }
14004
+ /** Demand for a single `(day, shift)` slot. */
14005
+ interface ShiftDemandInput {
14006
+ /** @min 0 */
14007
+ day: number;
14008
+ /**
14009
+ * Minimum count per role. The remainder of `total` may be filled
14010
+ * by any eligible agent. Role names must match tags used in
14011
+ * [`AgentInput::roles`].
14012
+ */
14013
+ role_minimums?: Record<string, number>;
14014
+ /** @min 0 */
14015
+ shift: number;
14016
+ /**
14017
+ * Total number of agents required for this slot.
14018
+ * @format int32
14019
+ * @min 0
14020
+ */
14021
+ total: number;
14022
+ }
13907
14023
  /** A single similarity entry for bulk operations */
13908
14024
  interface SimilarityEntry {
13909
14025
  /**
@@ -14254,12 +14370,27 @@ interface SortInfoDto$1 {
14254
14370
  /** Response for sort list operations */
14255
14371
  interface SortListResponse$1 {
14256
14372
  /**
14257
- * Total count
14373
+ * Number of sorts in **this response** — not the tenant total
14374
+ * when pagination is active.
14258
14375
  * @min 0
14259
14376
  */
14260
14377
  count: number;
14261
- /** List of sorts */
14378
+ /**
14379
+ * Offset of the first sort in this response.
14380
+ * @min 0
14381
+ */
14382
+ offset?: number;
14383
+ /**
14384
+ * Sorts in this page (or all sorts when no ``limit`` query
14385
+ * parameter was supplied).
14386
+ */
14262
14387
  sorts: SortDto$1[];
14388
+ /**
14389
+ * Total number of sorts the tenant owns after filters, across
14390
+ * all pages. Lets the client know when to stop paginating.
14391
+ * @min 0
14392
+ */
14393
+ total?: number;
14263
14394
  }
14264
14395
  /** API representation of sort origin/provenance */
14265
14396
  type SortOriginDto$1 = {
@@ -15566,6 +15697,73 @@ interface TriggerDependencyResponse$1 {
15566
15697
  /** The visualization graph */
15567
15698
  graph: VisualizationGraphDto$1;
15568
15699
  }
15700
+ /**
15701
+ * Request body for `POST /api/v1/triz/invent` — the structured-input,
15702
+ * no-LLM path into the TRIZ invention engine.
15703
+ */
15704
+ interface TrizInventRequest {
15705
+ /**
15706
+ * Human-readable context (e.g. "drug_discovery", "kinase_program_279").
15707
+ * The engine uses this in explanations but not in the reasoning.
15708
+ */
15709
+ domain_context?: string;
15710
+ /**
15711
+ * Sort names the caller has pre-seeded under this tenant. Required:
15712
+ * without them the KB-matching step (`query_kb_for_triz_data`) has
15713
+ * no domain hints and falls through to the LLM-synthetic path —
15714
+ * defeating the purpose of this endpoint.
15715
+ */
15716
+ domains?: string[];
15717
+ improving_parameter: string;
15718
+ /** @format uuid */
15719
+ tenant_id: string;
15720
+ worsening_parameter: string;
15721
+ }
15722
+ /** Request body for `POST /api/v1/triz/record-outcome`. */
15723
+ interface TrizRecordOutcomeRequest {
15724
+ /**
15725
+ * UUID of the ``triz_inventive_proposal`` term the engine emitted.
15726
+ * @format uuid
15727
+ */
15728
+ invention_term_id: string;
15729
+ /**
15730
+ * Measured performance ratio (e.g. potency fold, selectivity
15731
+ * fold). ``0.0`` if unmeasured — the engine still records the
15732
+ * success/failure signal.
15733
+ * @format double
15734
+ */
15735
+ measured_ratio?: number;
15736
+ /** Free-text notes on the outcome for downstream audit. */
15737
+ notes?: string;
15738
+ /**
15739
+ * Whether the invention succeeded in downstream validation /
15740
+ * experimental testing.
15741
+ */
15742
+ success: boolean;
15743
+ /** @format uuid */
15744
+ tenant_id: string;
15745
+ }
15746
+ /** Response payload for outcome recording. */
15747
+ interface TrizRecordOutcomeResponse {
15748
+ error?: string | null;
15749
+ /**
15750
+ * Number of learned-mapping terms whose confidence was adjusted.
15751
+ * @min 0
15752
+ */
15753
+ mappings_updated: number;
15754
+ /**
15755
+ * UUID of the newly-created ``triz_invention_outcome`` audit term.
15756
+ * @format uuid
15757
+ */
15758
+ outcome_term_id?: string | null;
15759
+ recorded: boolean;
15760
+ success: boolean;
15761
+ /**
15762
+ * New post-update average confidence across the adjusted mappings.
15763
+ * @format double
15764
+ */
15765
+ updated_confidence: number;
15766
+ }
15569
15767
  /** DTO for UIAction — all actions reference OSFQL execution */
15570
15768
  type UIActionDto$1 = {
15571
15769
  field_types: Record<string, string>;
@@ -16748,10 +16946,26 @@ declare class Sorts<SecurityDataType = unknown> {
16748
16946
  * Defaults to false (system sorts are excluded by default).
16749
16947
  */
16750
16948
  include_system?: boolean;
16949
+ /**
16950
+ * Maximum number of sorts to return. When omitted, no cap is
16951
+ * applied (legacy behaviour). Recommended page size for
16952
+ * production tenants: 50_000.
16953
+ * @min 0
16954
+ */
16955
+ limit?: number | null;
16751
16956
  /** Filter to only show LLM-extracted sorts */
16752
16957
  llm_extracted?: boolean | null;
16753
16958
  /** Filter to only show sorts needing review */
16754
16959
  needs_review?: boolean | null;
16960
+ /**
16961
+ * Zero-indexed pagination offset. Combined with ``limit`` this
16962
+ * lets clients stream a production tenant (1 M+ sorts, ~500 MB
16963
+ * uncompressed) as a sequence of small responses, avoiding the
16964
+ * ``IncompleteRead`` a single-response transfer reliably hits
16965
+ * above ~30 MB.
16966
+ * @min 0
16967
+ */
16968
+ offset?: number | null;
16755
16969
  }, params?: RequestParams) => Promise<HttpResponse<SortListResponse$1, any>>;
16756
16970
  /**
16757
16971
  * @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.
@@ -20551,6 +20765,26 @@ declare class Query<SecurityDataType = unknown> {
20551
20765
  * @secure
20552
20766
  */
20553
20767
  osfSearch: (data: OsfSearchRequest$1, params?: RequestParams) => Promise<HttpResponse<OsfSearchResponse$1, any>>;
20768
+ /**
20769
+ * @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.
20770
+ *
20771
+ * @tags query
20772
+ * @name TrizInvent
20773
+ * @summary Handle `POST /api/v1/triz/invent` — deterministic TRIZ invention.
20774
+ * @request POST:/api/v1/triz/invent
20775
+ * @secure
20776
+ */
20777
+ trizInvent: (data: TrizInventRequest, params?: RequestParams) => Promise<HttpResponse<NlQueryResponse$1, any>>;
20778
+ /**
20779
+ * No description
20780
+ *
20781
+ * @tags query
20782
+ * @name TrizRecordOutcome
20783
+ * @summary Handle `POST /api/v1/triz/record-outcome` — persist a measured outcome for a previously-emitted TRIZ proposal and learn from it.
20784
+ * @request POST:/api/v1/triz/record-outcome
20785
+ * @secure
20786
+ */
20787
+ trizRecordOutcome: (data: TrizRecordOutcomeRequest, params?: RequestParams) => Promise<HttpResponse<TrizRecordOutcomeResponse, any>>;
20554
20788
  /**
20555
20789
  * @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
20556
20790
  *
@@ -30924,6 +31158,14 @@ interface CommitRequest {
30924
31158
  * - `"solutions"`: enumerate complete, valid assignments (default — backward compatible).
30925
31159
  * - `"feasibility"`: run 2×N per-variable SAT queries and return reachability info.
30926
31160
  * Much faster than full enumeration for large spaces.
31161
+ *
31162
+ * For scheduling-shaped problems (staff rostering, vehicle-to-route
31163
+ * assignment, task-to-worker matching, etc.) use the dedicated
31164
+ * {@link SchedulingClient.feasibility | `client.scheduling.feasibility()`}
31165
+ * endpoint instead of routing through `ComputationSpace`. It accepts a
31166
+ * native scheduling problem definition and returns structured per-cell
31167
+ * feasibility classifications — no string-encoded variable names on the
31168
+ * wire, and it preserves real role names end-to-end.
30927
31169
  */
30928
31170
  type SearchModeDto = 'solutions' | 'feasibility';
30929
31171
  /**
@@ -39011,6 +39253,223 @@ declare class OptimizeClient {
39011
39253
  private cleanupArtifacts;
39012
39254
  }
39013
39255
 
39256
+ declare class Scheduling<SecurityDataType = unknown> {
39257
+ http: HttpClient<SecurityDataType>;
39258
+ constructor(http: HttpClient<SecurityDataType>);
39259
+ /**
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.
39261
+ *
39262
+ * @tags scheduling
39263
+ * @name Feasibility
39264
+ * @summary `POST /api/v1/scheduling/feasibility`
39265
+ * @request POST:/api/v1/scheduling/feasibility
39266
+ */
39267
+ feasibility: (data: SchedulingFeasibilityRequest$1, params?: RequestParams) => Promise<HttpResponse<SchedulingFeasibilityResponse$1, void>>;
39268
+ }
39269
+
39270
+ /**
39271
+ * Per-cell feasibility classification produced by the scheduling engine.
39272
+ *
39273
+ * @remarks
39274
+ * Every `(agent, day, shift)` cell in the input grid is classified as
39275
+ * exactly one of these values. The flow engine is exact — there is no
39276
+ * "unverified" outcome.
39277
+ *
39278
+ * - `"confirmed_true"` — the agent MUST work this slot in every valid schedule.
39279
+ * - `"confirmed_false"` — the agent CANNOT work this slot in any valid schedule.
39280
+ * - `"free"` — the agent's assignment to this slot varies across valid schedules.
39281
+ */
39282
+ type AssignmentStatus = 'confirmed_true' | 'confirmed_false' | 'free';
39283
+ /**
39284
+ * Top-level scheduling request status.
39285
+ *
39286
+ * @remarks
39287
+ * - `"feasible"` — a valid schedule exists; `assignments` contains per-cell
39288
+ * classifications.
39289
+ * - `"infeasible"` — no valid schedule exists; `assignments` is empty.
39290
+ */
39291
+ type SchedulingStatus = 'feasible' | 'infeasible';
39292
+ /**
39293
+ * A single agent that may be assigned to slots.
39294
+ */
39295
+ interface AgentSpec {
39296
+ /** Caller-chosen identifier. Must be unique within the request. */
39297
+ id: string;
39298
+ /**
39299
+ * Role tags this agent carries (e.g. `"icu"`, `"senior"`). Used to
39300
+ * satisfy per-role minimum-demand constraints. Defaults to an empty
39301
+ * array if omitted.
39302
+ */
39303
+ roles?: string[];
39304
+ /**
39305
+ * Maximum number of slots this agent may be assigned across the full
39306
+ * horizon.
39307
+ */
39308
+ maxAssignments: number;
39309
+ /**
39310
+ * Day indices on which the agent is unavailable for any shift.
39311
+ * Defaults to an empty array if omitted.
39312
+ */
39313
+ unavailableDays?: number[];
39314
+ /**
39315
+ * When present, the agent may only be assigned to this shift index
39316
+ * (all other shifts become unavailable).
39317
+ */
39318
+ restrictedToShift?: number | null;
39319
+ }
39320
+ /**
39321
+ * Demand for a single `(day, shift)` slot.
39322
+ */
39323
+ interface ShiftDemand {
39324
+ /** Day index (0..days). */
39325
+ day: number;
39326
+ /** Shift index (0..shiftsPerDay). */
39327
+ shift: number;
39328
+ /** Total number of agents required for this slot. */
39329
+ total: number;
39330
+ /**
39331
+ * Minimum count per role. The remainder of `total` may be filled by
39332
+ * any eligible agent. Role names must match tags used in
39333
+ * {@link AgentSpec.roles}.
39334
+ */
39335
+ roleMinimums?: Record<string, number>;
39336
+ }
39337
+ /**
39338
+ * A pre-assigned `(agent, day, shift)` triple. The engine treats the
39339
+ * pin as confirmed-true and reduces the slot's remaining demand.
39340
+ */
39341
+ interface Pin {
39342
+ agentId: string;
39343
+ day: number;
39344
+ shift: number;
39345
+ }
39346
+ /**
39347
+ * Input to {@link SchedulingClient.feasibility}.
39348
+ *
39349
+ * @remarks
39350
+ * Agents are identified by opaque caller-chosen string IDs so the
39351
+ * response can be joined back to whatever identity the caller maintains
39352
+ * (employee numbers, user IDs, UUIDs, display names, …).
39353
+ */
39354
+ interface SchedulingFeasibilityRequest {
39355
+ /** All agents that may be assigned to slots. */
39356
+ agents: AgentSpec[];
39357
+ /** Number of days in the scheduling horizon. Valid day indices are `0..days`. */
39358
+ days: number;
39359
+ /** Number of shifts per day. Valid shift indices are `0..shiftsPerDay`. */
39360
+ shiftsPerDay: number;
39361
+ /** Per-slot demand. At most one entry per `(day, shift)` pair. */
39362
+ demands: ShiftDemand[];
39363
+ /** Pre-assigned `(agent, day, shift)` triples. Defaults to empty. */
39364
+ pins?: Pin[];
39365
+ }
39366
+ /**
39367
+ * One classified cell in the input grid.
39368
+ */
39369
+ interface Assignment {
39370
+ /** Echoes the `id` from {@link AgentSpec}. */
39371
+ agentId: string;
39372
+ day: number;
39373
+ shift: number;
39374
+ status: AssignmentStatus;
39375
+ }
39376
+ /**
39377
+ * Response from {@link SchedulingClient.feasibility}.
39378
+ *
39379
+ * @remarks
39380
+ * - When `status === "feasible"`: `assignments` contains one entry per
39381
+ * `(agent, day, shift)` triple in the input grid, sorted by
39382
+ * `(agentId, day, shift)`.
39383
+ * - When `status === "infeasible"`: `assignments` is empty.
39384
+ */
39385
+ interface SchedulingFeasibilityResponse {
39386
+ status: SchedulingStatus;
39387
+ assignments: Assignment[];
39388
+ }
39389
+
39390
+ type scheduling_AgentSpec = AgentSpec;
39391
+ type scheduling_Assignment = Assignment;
39392
+ type scheduling_AssignmentStatus = AssignmentStatus;
39393
+ type scheduling_Pin = Pin;
39394
+ type scheduling_SchedulingFeasibilityRequest = SchedulingFeasibilityRequest;
39395
+ type scheduling_SchedulingFeasibilityResponse = SchedulingFeasibilityResponse;
39396
+ type scheduling_SchedulingStatus = SchedulingStatus;
39397
+ type scheduling_ShiftDemand = ShiftDemand;
39398
+ declare namespace scheduling {
39399
+ export type { scheduling_AgentSpec as AgentSpec, scheduling_Assignment as Assignment, scheduling_AssignmentStatus as AssignmentStatus, scheduling_Pin as Pin, scheduling_SchedulingFeasibilityRequest as SchedulingFeasibilityRequest, scheduling_SchedulingFeasibilityResponse as SchedulingFeasibilityResponse, scheduling_SchedulingStatus as SchedulingStatus, scheduling_ShiftDemand as ShiftDemand };
39400
+ }
39401
+
39402
+ /**
39403
+ * Resource client for the scheduling feasibility engine.
39404
+ *
39405
+ * @remarks
39406
+ * The engine classifies every `(agent, day, shift)` cell in a rostering
39407
+ * problem as **confirmed-true**, **confirmed-false**, or **free** using a
39408
+ * capacitated bipartite b-matching (Dinic max-flow + Dulmage–Mendelsohn
39409
+ * residual decomposition). The structure fits staff rostering
39410
+ * (hospital nurses, call-centre agents, field crews), vehicle-to-route
39411
+ * assignment, and any "cover demand with capacity-limited resources"
39412
+ * problem.
39413
+ *
39414
+ * All agent identities are caller-chosen opaque strings — the SDK round-
39415
+ * trips whatever IDs you pass in, so you can plug employee numbers,
39416
+ * UUIDs, or display names directly into the request.
39417
+ *
39418
+ * @example Basic feasibility query
39419
+ * ```typescript
39420
+ * const report = await client.scheduling.feasibility({
39421
+ * agents: [
39422
+ * { id: 'alice', roles: ['icu'], maxAssignments: 3 },
39423
+ * { id: 'bob', roles: ['general'], maxAssignments: 3 },
39424
+ * ],
39425
+ * days: 7,
39426
+ * shiftsPerDay: 3,
39427
+ * demands: [
39428
+ * { day: 0, shift: 0, total: 2, roleMinimums: { icu: 1 } },
39429
+ * // ... one demand per (day, shift) slot you care about
39430
+ * ],
39431
+ * });
39432
+ *
39433
+ * if (report.status === 'feasible') {
39434
+ * for (const cell of report.assignments) {
39435
+ * console.log(cell.agentId, cell.day, cell.shift, '→', cell.status);
39436
+ * }
39437
+ * }
39438
+ * ```
39439
+ *
39440
+ * @example Pinning pre-decided assignments
39441
+ * ```typescript
39442
+ * const report = await client.scheduling.feasibility({
39443
+ * ...problem,
39444
+ * pins: [
39445
+ * { agentId: 'alice', day: 0, shift: 0 }, // Alice WILL work this slot
39446
+ * ],
39447
+ * });
39448
+ * ```
39449
+ */
39450
+ declare class SchedulingClient {
39451
+ /** @internal */
39452
+ private readonly api;
39453
+ /** @internal */
39454
+ constructor(api: Scheduling);
39455
+ /**
39456
+ * Classify every `(agent, day, shift)` cell in the input grid as
39457
+ * `confirmed_true`, `confirmed_false`, or `free`.
39458
+ *
39459
+ * @param request - the scheduling problem to analyse.
39460
+ * @returns a {@link SchedulingFeasibilityResponse} with per-cell classifications.
39461
+ * @throws If the backend rejects the input (HTTP 400): duplicate agent
39462
+ * IDs, pins referencing unknown agents, role minima exceeding total
39463
+ * demand, out-of-range day/shift indices, etc.
39464
+ *
39465
+ * @remarks
39466
+ * Infeasibility of a well-formed problem is a **valid answer** (HTTP 200
39467
+ * with `status === "infeasible"`), not an error. Only malformed input
39468
+ * raises.
39469
+ */
39470
+ feasibility(request: SchedulingFeasibilityRequest): Promise<SchedulingFeasibilityResponse>;
39471
+ }
39472
+
39014
39473
  declare class Osfql<SecurityDataType = unknown> {
39015
39474
  http: HttpClient<SecurityDataType>;
39016
39475
  constructor(http: HttpClient<SecurityDataType>);
@@ -40605,9 +41064,10 @@ interface AiGroup {
40605
41064
  readonly context: ContextClient;
40606
41065
  readonly rlTraining: RlTrainingClient;
40607
41066
  }
40608
- /** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery. */
41067
+ /** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery, scheduling. */
40609
41068
  interface ReasoningGroup {
40610
41069
  readonly optimize: OptimizeClient;
41070
+ readonly scheduling: SchedulingClient;
40611
41071
  readonly ilp: IlpClient;
40612
41072
  readonly cdl: CdlClient;
40613
41073
  readonly execution: ExecutionClient;
@@ -40755,6 +41215,8 @@ declare class ReasoningLayerClient {
40755
41215
  readonly rag: RagClient;
40756
41216
  /** Linear program optimization (CLP(Q) simplex solver via backward chaining). */
40757
41217
  readonly optimize: OptimizeClient;
41218
+ /** Scheduling feasibility via capacitated bipartite b-matching (staff rostering, assignment problems). */
41219
+ readonly scheduling: SchedulingClient;
40758
41220
  /** OSFQL execution operations. */
40759
41221
  readonly osfql: OsfqlClient;
40760
41222
  /** Conversational AI operations (NL → OSFQL with self-correction). */
@@ -40798,7 +41260,7 @@ declare class ReasoningLayerClient {
40798
41260
  get core(): CoreGroup;
40799
41261
  /** AI and machine learning operations — agents, oversight, neuro-symbolic, RAG, generation, context, RL training. */
40800
41262
  get ai(): AiGroup;
40801
- /** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery. */
41263
+ /** Advanced reasoning operations — optimization, ILP, CDL, execution, preferences, discovery, scheduling. */
40802
41264
  get reasoningOps(): ReasoningGroup;
40803
41265
  /** Analysis operations — causal, statistical, fuzzy, scenarios, communities, visualization. */
40804
41266
  get analysisOps(): AnalysisGroup;
@@ -41872,4 +42334,4 @@ declare function toUntaggedFeatures(features: PlainFeatureMap): Record<string, F
41872
42334
  */
41873
42335
  declare function toTermInputDto(input: PsiTermInput | TermInputDto): TermInputDto;
41874
42336
 
41875
- 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, 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 };
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 };