@kortexya/reasoninglayer 0.6.0 → 0.8.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.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.6.0";
112
+ declare const SDK_VERSION = "0.8.0";
113
113
  /**
114
114
  * Configuration for the Reasoning Layer client.
115
115
  *
@@ -16953,7 +16953,7 @@ interface ToolCallInfo {
16953
16953
  confidence: number;
16954
16954
  }
16955
16955
  /**
16956
- * A query pattern with sort and features for OSF search.
16956
+ * A query pattern with sort and features for structured search.
16957
16957
  */
16958
16958
  interface TermPatternDto {
16959
16959
  /** Sort ID of the pattern. */
@@ -16962,10 +16962,10 @@ interface TermPatternDto {
16962
16962
  features: Record<string, ValueDto>;
16963
16963
  }
16964
16964
  /**
16965
- * Request for pure OSF (Order-Sorted Feature) search.
16965
+ * Request for pure structured (order-sorted feature) search.
16966
16966
  *
16967
16967
  * @remarks
16968
- * The OSF search endpoint supports the full power of the OSF/LIFE query language,
16968
+ * The structured search endpoint supports the full power of the query language,
16969
16969
  * including residuation (suspension when the query is too vague).
16970
16970
  */
16971
16971
  interface OsfSearchRequest {
@@ -16985,7 +16985,7 @@ interface OsfSearchRequest {
16985
16985
  termIds?: string[];
16986
16986
  }
16987
16987
  /**
16988
- * A matched entity in an OSF search result.
16988
+ * A matched entity in a structured search result.
16989
16989
  */
16990
16990
  interface MatchedEntityDto {
16991
16991
  /** Term ID. */
@@ -17004,7 +17004,7 @@ interface MatchedEntityDto {
17004
17004
  matchReason?: string | null;
17005
17005
  }
17006
17006
  /**
17007
- * A discovered relation between entities in an OSF search result.
17007
+ * A discovered relation between entities in a structured search result.
17008
17008
  */
17009
17009
  interface DiscoveredRelationDto {
17010
17010
  /** Relation/feature name. */
@@ -17045,7 +17045,7 @@ interface ResumptionOptionDto {
17045
17045
  /**
17046
17046
  * Information about a suspended (residuated) query.
17047
17047
  *
17048
- * When the OSF search engine cannot fully resolve a query due to missing information,
17048
+ * When the search engine cannot fully resolve a query due to missing information,
17049
17049
  * it returns this structure indicating what is needed and how to refine the query.
17050
17050
  */
17051
17051
  interface SuspendedQueryDto {
@@ -17056,7 +17056,7 @@ interface SuspendedQueryDto {
17056
17056
  /** Suggested refinements. */
17057
17057
  resumptionOptions: ResumptionOptionDto[];
17058
17058
  }
17059
- /** Execution statistics for an OSF search. */
17059
+ /** Execution statistics for a structured search. */
17060
17060
  interface OsfSearchStatsDto {
17061
17061
  /** Processing time in microseconds. */
17062
17062
  durationUs: number;
@@ -17070,12 +17070,12 @@ interface OsfSearchStatsDto {
17070
17070
  inferenceSteps: number;
17071
17071
  }
17072
17072
  /**
17073
- * Response from OSF search.
17073
+ * Response from structured search.
17074
17074
  *
17075
17075
  * @remarks
17076
17076
  * When the query is too vague, the response includes `suspended` with information
17077
17077
  * about what is missing and how to refine the query. This models residuation at the
17078
- * query level — a unique OSFKB feature.
17078
+ * query level.
17079
17079
  */
17080
17080
  interface OsfSearchResponse {
17081
17081
  /** Matched entities with provenance. */
@@ -17205,7 +17205,7 @@ interface NlQueryResponse {
17205
17205
  results: NlQueryResultItem[];
17206
17206
  /** Explanation from LLM/model. */
17207
17207
  explanation?: string | null;
17208
- /** Generated OSF query (for debugging, llm mode). */
17208
+ /** Generated query (for debugging, llm mode). */
17209
17209
  generatedOsf?: string | null;
17210
17210
  /** Error message if failed. */
17211
17211
  error?: string | null;
@@ -18948,7 +18948,7 @@ declare class QueryClient {
18948
18948
  /**
18949
18949
  * Execute an Order-Sorted Feature search.
18950
18950
  *
18951
- * @param request - OSF search request with pattern. Features can be plain JS values.
18951
+ * @param request - Structured search request with pattern. Features can be plain JS values.
18952
18952
  * @returns Structured search results including entities, relations, and suspended query information.
18953
18953
  *
18954
18954
  * @remarks
@@ -19001,7 +19001,7 @@ declare class QueryClient {
19001
19001
  * Search for records matching a pattern with type-aware matching.
19002
19002
  * Alias for {@link osfSearch} using friendlier naming.
19003
19003
  *
19004
- * @param request - OSF search request with pattern.
19004
+ * @param request - Structured search request with pattern.
19005
19005
  * @returns Structured search results including entities, relations, and suspended query information.
19006
19006
  *
19007
19007
  * @see osfSearch
@@ -21823,7 +21823,7 @@ interface SortSummaryDto {
21823
21823
  name: string;
21824
21824
  }
21825
21825
  /**
21826
- * Request for OSF term hypergraph visualization.
21826
+ * Request for term hypergraph visualization.
21827
21827
  */
21828
21828
  interface HypergraphRequest {
21829
21829
  /** Whether to generate DOT output. */
@@ -25175,11 +25175,11 @@ interface PipelineQualityStatsDto {
25175
25175
  inferenceRulesInvalidScopeSort: number;
25176
25176
  /** Total inference rules extracted across all chunks. */
25177
25177
  inferenceRulesTotal: number;
25178
- /** Entities rejected by OSF validation. */
25178
+ /** Entities rejected by validation. */
25179
25179
  osfEntitiesRejected: number;
25180
25180
  /** Entities auto-corrected to a better sort. */
25181
25181
  osfEntitiesSortCorrected: number;
25182
- /** Entities that passed OSF validation. */
25182
+ /** Entities that passed validation. */
25183
25183
  osfEntitiesValidated: number;
25184
25184
  /** Total quality issues from forward chaining. */
25185
25185
  osfForwardChainingIssues: number;
@@ -26029,7 +26029,7 @@ declare class VisualizationClient {
26029
26029
  */
26030
26030
  constraintGraph(request: ConstraintGraphRequest): Promise<ConstraintGraphResponse>;
26031
26031
  /**
26032
- * Generate a hypergraph visualization of OSF terms.
26032
+ * Generate a hypergraph visualization of Psi-terms.
26033
26033
  *
26034
26034
  * @param request - Hypergraph request with root term and traversal options.
26035
26035
  * @returns Hypergraph with graph, stats, components, and degree distribution.
@@ -28386,7 +28386,7 @@ declare class Spaces<SecurityDataType = unknown> {
28386
28386
  *
28387
28387
  * @remarks
28388
28388
  * Re-exported from generated types. Discriminated union with `type` field.
28389
- * Supports unification, arithmetic, all_different, set constraints, and OSF set constraints.
28389
+ * Supports unification, arithmetic, all_different, and set constraints.
28390
28390
  */
28391
28391
  type SpaceConstraintDto = SpaceConstraintDto$1;
28392
28392
  /**
@@ -32054,11 +32054,11 @@ declare namespace cdl {
32054
32054
  * Resource client for Categorical Deep Learning (CDL) operations.
32055
32055
  *
32056
32056
  * @remarks
32057
- * CDL combines differentiable neural layers with symbolic OSF inference.
32057
+ * CDL combines differentiable neural layers with symbolic inference.
32058
32058
  * All 6 CDL phases are exposed:
32059
32059
  * - Phase 1: Tagged forward chaining (provenance semirings)
32060
32060
  * - Phase 2: Differentiable forward chaining + soft unification
32061
- * - Phase 3: Monadic fixpoint (OSF monad iteration)
32061
+ * - Phase 3: Monadic fixpoint iteration
32062
32062
  * - Phase 4: Derived inference (composed CDL neural layer)
32063
32063
  * - Phase 5: Safety classification (CDL fact grounding)
32064
32064
  * - Phase 6: Dynamic sort addition (self-modifying architecture)
@@ -34153,7 +34153,7 @@ interface VerifyFaithfulnessResponse {
34153
34153
  score: number;
34154
34154
  }
34155
34155
  /**
34156
- * Request for OSF-aware round-trip faithfulness verification.
34156
+ * Request for ontology-aware round-trip faithfulness verification.
34157
34157
  *
34158
34158
  * @remarks
34159
34159
  * Compares ground truth Psi-terms against extracted Psi-terms using Wu-Palmer
@@ -34466,7 +34466,7 @@ declare class SyntheticClient {
34466
34466
  * @throws {ApiError} If the request fails.
34467
34467
  *
34468
34468
  * @remarks
34469
- * Uses OSF-aware verification with Wu-Palmer sort similarity, feature-level comparison
34469
+ * Uses ontology-aware verification with Wu-Palmer sort similarity, feature-level comparison
34470
34470
  * with type-aware value similarity, and Hungarian algorithm for optimal entity matching.
34471
34471
  *
34472
34472
  * Requires X-Tenant-Id header (set via client configuration).
@@ -34714,7 +34714,7 @@ type RuleConstraintDto = {
34714
34714
  type: 'equal';
34715
34715
  };
34716
34716
  /**
34717
- * An OSF clause used as a rule head or body element.
34717
+ * A clause used as a rule head or body element.
34718
34718
  *
34719
34719
  * @remarks
34720
34720
  * Constraints define the variables and their bindings within the clause.
@@ -36118,7 +36118,7 @@ declare class OntologyClient {
36118
36118
  /** @internal */
36119
36119
  constructor(api: Ontology);
36120
36120
  /**
36121
- * Generate an OSFKB scenario from a natural language task description.
36121
+ * Generate a scenario from a natural language task description.
36122
36122
  *
36123
36123
  * @param request - Generation parameters including the prompt and optional clarification answers.
36124
36124
  * @returns Either clarification questions (status `"needs_clarification"`) or the generated scenario (status `"complete"`).
@@ -36484,7 +36484,7 @@ interface FeatureConfigDto {
36484
36484
  * Request body for the Ontology RAG endpoint.
36485
36485
  *
36486
36486
  * @remarks
36487
- * Performs True Ontology RAG combining embedding search with OSF/LIFE
36487
+ * Performs True Ontology RAG combining embedding search with
36488
36488
  * feature unification. The caller provides feature names via `feature_config`
36489
36489
  * and is responsible for interpreting the results in a domain-specific context.
36490
36490
  */
@@ -36550,7 +36550,7 @@ declare namespace rag {
36550
36550
  * Resource client for Ontology RAG (Retrieval-Augmented Generation) operations.
36551
36551
  *
36552
36552
  * @remarks
36553
- * Performs True Ontology RAG combining embedding search with OSF/LIFE
36553
+ * Performs True Ontology RAG combining embedding search with
36554
36554
  * feature unification:
36555
36555
  *
36556
36556
  * 1. Embedding search -- find matching Psi-terms via multilingual embeddings.
@@ -37056,7 +37056,7 @@ declare namespace osfql {
37056
37056
  }
37057
37057
 
37058
37058
  /**
37059
- * Resource client for OSFQL (OSF Query Language) operations.
37059
+ * Resource client for OSFQL operations.
37060
37060
  *
37061
37061
  * @remarks
37062
37062
  * Provides access to the OSFQL execution endpoint, which parses, compiles,
@@ -37393,7 +37393,7 @@ declare class ReasoningLayerClient {
37393
37393
  readonly terms: TermsClient;
37394
37394
  /** Inference engine operations (backward/forward chaining, fuzzy, Bayesian, NAF). */
37395
37395
  readonly inference: InferenceClient;
37396
- /** Query operations (unification, OSF search, validation). */
37396
+ /** Query operations (unification, structured search, validation). */
37397
37397
  readonly query: QueryClient;
37398
37398
  /** Cognitive agent operations (BDI cycle, beliefs, goals, messaging). */
37399
37399
  readonly cognitive: CognitiveClient;
@@ -37473,7 +37473,7 @@ declare class ReasoningLayerClient {
37473
37473
  readonly rag: RagClient;
37474
37474
  /** Linear program optimization (CLP(Q) simplex solver via backward chaining). */
37475
37475
  readonly optimize: OptimizeClient;
37476
- /** OSFQL (OSF Query Language) execution operations. */
37476
+ /** OSFQL execution operations. */
37477
37477
  readonly osfql: OsfqlClient;
37478
37478
  /** Conversational AI operations (NL → OSFQL with self-correction). */
37479
37479
  readonly conversation: ConversationClient;
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.6.0";
112
+ declare const SDK_VERSION = "0.8.0";
113
113
  /**
114
114
  * Configuration for the Reasoning Layer client.
115
115
  *
@@ -16953,7 +16953,7 @@ interface ToolCallInfo {
16953
16953
  confidence: number;
16954
16954
  }
16955
16955
  /**
16956
- * A query pattern with sort and features for OSF search.
16956
+ * A query pattern with sort and features for structured search.
16957
16957
  */
16958
16958
  interface TermPatternDto {
16959
16959
  /** Sort ID of the pattern. */
@@ -16962,10 +16962,10 @@ interface TermPatternDto {
16962
16962
  features: Record<string, ValueDto>;
16963
16963
  }
16964
16964
  /**
16965
- * Request for pure OSF (Order-Sorted Feature) search.
16965
+ * Request for pure structured (order-sorted feature) search.
16966
16966
  *
16967
16967
  * @remarks
16968
- * The OSF search endpoint supports the full power of the OSF/LIFE query language,
16968
+ * The structured search endpoint supports the full power of the query language,
16969
16969
  * including residuation (suspension when the query is too vague).
16970
16970
  */
16971
16971
  interface OsfSearchRequest {
@@ -16985,7 +16985,7 @@ interface OsfSearchRequest {
16985
16985
  termIds?: string[];
16986
16986
  }
16987
16987
  /**
16988
- * A matched entity in an OSF search result.
16988
+ * A matched entity in a structured search result.
16989
16989
  */
16990
16990
  interface MatchedEntityDto {
16991
16991
  /** Term ID. */
@@ -17004,7 +17004,7 @@ interface MatchedEntityDto {
17004
17004
  matchReason?: string | null;
17005
17005
  }
17006
17006
  /**
17007
- * A discovered relation between entities in an OSF search result.
17007
+ * A discovered relation between entities in a structured search result.
17008
17008
  */
17009
17009
  interface DiscoveredRelationDto {
17010
17010
  /** Relation/feature name. */
@@ -17045,7 +17045,7 @@ interface ResumptionOptionDto {
17045
17045
  /**
17046
17046
  * Information about a suspended (residuated) query.
17047
17047
  *
17048
- * When the OSF search engine cannot fully resolve a query due to missing information,
17048
+ * When the search engine cannot fully resolve a query due to missing information,
17049
17049
  * it returns this structure indicating what is needed and how to refine the query.
17050
17050
  */
17051
17051
  interface SuspendedQueryDto {
@@ -17056,7 +17056,7 @@ interface SuspendedQueryDto {
17056
17056
  /** Suggested refinements. */
17057
17057
  resumptionOptions: ResumptionOptionDto[];
17058
17058
  }
17059
- /** Execution statistics for an OSF search. */
17059
+ /** Execution statistics for a structured search. */
17060
17060
  interface OsfSearchStatsDto {
17061
17061
  /** Processing time in microseconds. */
17062
17062
  durationUs: number;
@@ -17070,12 +17070,12 @@ interface OsfSearchStatsDto {
17070
17070
  inferenceSteps: number;
17071
17071
  }
17072
17072
  /**
17073
- * Response from OSF search.
17073
+ * Response from structured search.
17074
17074
  *
17075
17075
  * @remarks
17076
17076
  * When the query is too vague, the response includes `suspended` with information
17077
17077
  * about what is missing and how to refine the query. This models residuation at the
17078
- * query level — a unique OSFKB feature.
17078
+ * query level.
17079
17079
  */
17080
17080
  interface OsfSearchResponse {
17081
17081
  /** Matched entities with provenance. */
@@ -17205,7 +17205,7 @@ interface NlQueryResponse {
17205
17205
  results: NlQueryResultItem[];
17206
17206
  /** Explanation from LLM/model. */
17207
17207
  explanation?: string | null;
17208
- /** Generated OSF query (for debugging, llm mode). */
17208
+ /** Generated query (for debugging, llm mode). */
17209
17209
  generatedOsf?: string | null;
17210
17210
  /** Error message if failed. */
17211
17211
  error?: string | null;
@@ -18948,7 +18948,7 @@ declare class QueryClient {
18948
18948
  /**
18949
18949
  * Execute an Order-Sorted Feature search.
18950
18950
  *
18951
- * @param request - OSF search request with pattern. Features can be plain JS values.
18951
+ * @param request - Structured search request with pattern. Features can be plain JS values.
18952
18952
  * @returns Structured search results including entities, relations, and suspended query information.
18953
18953
  *
18954
18954
  * @remarks
@@ -19001,7 +19001,7 @@ declare class QueryClient {
19001
19001
  * Search for records matching a pattern with type-aware matching.
19002
19002
  * Alias for {@link osfSearch} using friendlier naming.
19003
19003
  *
19004
- * @param request - OSF search request with pattern.
19004
+ * @param request - Structured search request with pattern.
19005
19005
  * @returns Structured search results including entities, relations, and suspended query information.
19006
19006
  *
19007
19007
  * @see osfSearch
@@ -21823,7 +21823,7 @@ interface SortSummaryDto {
21823
21823
  name: string;
21824
21824
  }
21825
21825
  /**
21826
- * Request for OSF term hypergraph visualization.
21826
+ * Request for term hypergraph visualization.
21827
21827
  */
21828
21828
  interface HypergraphRequest {
21829
21829
  /** Whether to generate DOT output. */
@@ -25175,11 +25175,11 @@ interface PipelineQualityStatsDto {
25175
25175
  inferenceRulesInvalidScopeSort: number;
25176
25176
  /** Total inference rules extracted across all chunks. */
25177
25177
  inferenceRulesTotal: number;
25178
- /** Entities rejected by OSF validation. */
25178
+ /** Entities rejected by validation. */
25179
25179
  osfEntitiesRejected: number;
25180
25180
  /** Entities auto-corrected to a better sort. */
25181
25181
  osfEntitiesSortCorrected: number;
25182
- /** Entities that passed OSF validation. */
25182
+ /** Entities that passed validation. */
25183
25183
  osfEntitiesValidated: number;
25184
25184
  /** Total quality issues from forward chaining. */
25185
25185
  osfForwardChainingIssues: number;
@@ -26029,7 +26029,7 @@ declare class VisualizationClient {
26029
26029
  */
26030
26030
  constraintGraph(request: ConstraintGraphRequest): Promise<ConstraintGraphResponse>;
26031
26031
  /**
26032
- * Generate a hypergraph visualization of OSF terms.
26032
+ * Generate a hypergraph visualization of Psi-terms.
26033
26033
  *
26034
26034
  * @param request - Hypergraph request with root term and traversal options.
26035
26035
  * @returns Hypergraph with graph, stats, components, and degree distribution.
@@ -28386,7 +28386,7 @@ declare class Spaces<SecurityDataType = unknown> {
28386
28386
  *
28387
28387
  * @remarks
28388
28388
  * Re-exported from generated types. Discriminated union with `type` field.
28389
- * Supports unification, arithmetic, all_different, set constraints, and OSF set constraints.
28389
+ * Supports unification, arithmetic, all_different, and set constraints.
28390
28390
  */
28391
28391
  type SpaceConstraintDto = SpaceConstraintDto$1;
28392
28392
  /**
@@ -32054,11 +32054,11 @@ declare namespace cdl {
32054
32054
  * Resource client for Categorical Deep Learning (CDL) operations.
32055
32055
  *
32056
32056
  * @remarks
32057
- * CDL combines differentiable neural layers with symbolic OSF inference.
32057
+ * CDL combines differentiable neural layers with symbolic inference.
32058
32058
  * All 6 CDL phases are exposed:
32059
32059
  * - Phase 1: Tagged forward chaining (provenance semirings)
32060
32060
  * - Phase 2: Differentiable forward chaining + soft unification
32061
- * - Phase 3: Monadic fixpoint (OSF monad iteration)
32061
+ * - Phase 3: Monadic fixpoint iteration
32062
32062
  * - Phase 4: Derived inference (composed CDL neural layer)
32063
32063
  * - Phase 5: Safety classification (CDL fact grounding)
32064
32064
  * - Phase 6: Dynamic sort addition (self-modifying architecture)
@@ -34153,7 +34153,7 @@ interface VerifyFaithfulnessResponse {
34153
34153
  score: number;
34154
34154
  }
34155
34155
  /**
34156
- * Request for OSF-aware round-trip faithfulness verification.
34156
+ * Request for ontology-aware round-trip faithfulness verification.
34157
34157
  *
34158
34158
  * @remarks
34159
34159
  * Compares ground truth Psi-terms against extracted Psi-terms using Wu-Palmer
@@ -34466,7 +34466,7 @@ declare class SyntheticClient {
34466
34466
  * @throws {ApiError} If the request fails.
34467
34467
  *
34468
34468
  * @remarks
34469
- * Uses OSF-aware verification with Wu-Palmer sort similarity, feature-level comparison
34469
+ * Uses ontology-aware verification with Wu-Palmer sort similarity, feature-level comparison
34470
34470
  * with type-aware value similarity, and Hungarian algorithm for optimal entity matching.
34471
34471
  *
34472
34472
  * Requires X-Tenant-Id header (set via client configuration).
@@ -34714,7 +34714,7 @@ type RuleConstraintDto = {
34714
34714
  type: 'equal';
34715
34715
  };
34716
34716
  /**
34717
- * An OSF clause used as a rule head or body element.
34717
+ * A clause used as a rule head or body element.
34718
34718
  *
34719
34719
  * @remarks
34720
34720
  * Constraints define the variables and their bindings within the clause.
@@ -36118,7 +36118,7 @@ declare class OntologyClient {
36118
36118
  /** @internal */
36119
36119
  constructor(api: Ontology);
36120
36120
  /**
36121
- * Generate an OSFKB scenario from a natural language task description.
36121
+ * Generate a scenario from a natural language task description.
36122
36122
  *
36123
36123
  * @param request - Generation parameters including the prompt and optional clarification answers.
36124
36124
  * @returns Either clarification questions (status `"needs_clarification"`) or the generated scenario (status `"complete"`).
@@ -36484,7 +36484,7 @@ interface FeatureConfigDto {
36484
36484
  * Request body for the Ontology RAG endpoint.
36485
36485
  *
36486
36486
  * @remarks
36487
- * Performs True Ontology RAG combining embedding search with OSF/LIFE
36487
+ * Performs True Ontology RAG combining embedding search with
36488
36488
  * feature unification. The caller provides feature names via `feature_config`
36489
36489
  * and is responsible for interpreting the results in a domain-specific context.
36490
36490
  */
@@ -36550,7 +36550,7 @@ declare namespace rag {
36550
36550
  * Resource client for Ontology RAG (Retrieval-Augmented Generation) operations.
36551
36551
  *
36552
36552
  * @remarks
36553
- * Performs True Ontology RAG combining embedding search with OSF/LIFE
36553
+ * Performs True Ontology RAG combining embedding search with
36554
36554
  * feature unification:
36555
36555
  *
36556
36556
  * 1. Embedding search -- find matching Psi-terms via multilingual embeddings.
@@ -37056,7 +37056,7 @@ declare namespace osfql {
37056
37056
  }
37057
37057
 
37058
37058
  /**
37059
- * Resource client for OSFQL (OSF Query Language) operations.
37059
+ * Resource client for OSFQL operations.
37060
37060
  *
37061
37061
  * @remarks
37062
37062
  * Provides access to the OSFQL execution endpoint, which parses, compiles,
@@ -37393,7 +37393,7 @@ declare class ReasoningLayerClient {
37393
37393
  readonly terms: TermsClient;
37394
37394
  /** Inference engine operations (backward/forward chaining, fuzzy, Bayesian, NAF). */
37395
37395
  readonly inference: InferenceClient;
37396
- /** Query operations (unification, OSF search, validation). */
37396
+ /** Query operations (unification, structured search, validation). */
37397
37397
  readonly query: QueryClient;
37398
37398
  /** Cognitive agent operations (BDI cycle, beliefs, goals, messaging). */
37399
37399
  readonly cognitive: CognitiveClient;
@@ -37473,7 +37473,7 @@ declare class ReasoningLayerClient {
37473
37473
  readonly rag: RagClient;
37474
37474
  /** Linear program optimization (CLP(Q) simplex solver via backward chaining). */
37475
37475
  readonly optimize: OptimizeClient;
37476
- /** OSFQL (OSF Query Language) execution operations. */
37476
+ /** OSFQL execution operations. */
37477
37477
  readonly osfql: OsfqlClient;
37478
37478
  /** Conversational AI operations (NL → OSFQL with self-correction). */
37479
37479
  readonly conversation: ConversationClient;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/config.ts
2
- var SDK_VERSION = "0.6.0";
2
+ var SDK_VERSION = "0.8.0";
3
3
  function resolveConfig(config) {
4
4
  if (!config.baseUrl) {
5
5
  throw new Error("ClientConfig.baseUrl is required");
@@ -528,6 +528,28 @@ var HttpClient = class {
528
528
  };
529
529
 
530
530
  // src/serialization.ts
531
+ var USER_DATA_FIELDS = /* @__PURE__ */ new Set([
532
+ // features — term/query feature maps (Record<string, ValueDto>)
533
+ "features",
534
+ // bindings — variable binding maps
535
+ "bindings",
536
+ // evidence — causal evidence maps
537
+ "evidence",
538
+ // exogenous values — causal intervention values
539
+ "exogenous_values",
540
+ "exogenousValues",
541
+ // modified/suggested params — action review params
542
+ "modified_params",
543
+ "modifiedParams",
544
+ "suggested_params",
545
+ "suggestedParams",
546
+ // match key — row matching keys
547
+ "match_key",
548
+ "matchKey",
549
+ // concept values — RAG concept values
550
+ "concept_values",
551
+ "conceptValues"
552
+ ]);
531
553
  function camelToSnake(str) {
532
554
  return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
533
555
  }
@@ -539,6 +561,19 @@ function isPlainObject(value) {
539
561
  const proto = Object.getPrototypeOf(value);
540
562
  return proto === Object.prototype || proto === null;
541
563
  }
564
+ function transformUserDataRecord(input, transformFn) {
565
+ if (Array.isArray(input)) {
566
+ return input.map((item) => transformFn(item));
567
+ }
568
+ if (!isPlainObject(input)) {
569
+ return input;
570
+ }
571
+ const result = {};
572
+ for (const key of Object.keys(input)) {
573
+ result[key] = transformFn(input[key]);
574
+ }
575
+ return result;
576
+ }
542
577
  function toSnakeCase(input) {
543
578
  if (Array.isArray(input)) {
544
579
  return input.map((item) => toSnakeCase(item));
@@ -548,7 +583,12 @@ function toSnakeCase(input) {
548
583
  }
549
584
  const result = {};
550
585
  for (const key of Object.keys(input)) {
551
- result[camelToSnake(key)] = toSnakeCase(input[key]);
586
+ const snakeKey = camelToSnake(key);
587
+ if (USER_DATA_FIELDS.has(key)) {
588
+ result[snakeKey] = transformUserDataRecord(input[key], toSnakeCase);
589
+ } else {
590
+ result[snakeKey] = toSnakeCase(input[key]);
591
+ }
552
592
  }
553
593
  return result;
554
594
  }
@@ -561,7 +601,12 @@ function toCamelCase(input) {
561
601
  }
562
602
  const result = {};
563
603
  for (const key of Object.keys(input)) {
564
- result[snakeToCamel(key)] = toCamelCase(input[key]);
604
+ const camelKey = snakeToCamel(key);
605
+ if (USER_DATA_FIELDS.has(key)) {
606
+ result[camelKey] = transformUserDataRecord(input[key], toCamelCase);
607
+ } else {
608
+ result[camelKey] = toCamelCase(input[key]);
609
+ }
565
610
  }
566
611
  return result;
567
612
  }
@@ -8482,7 +8527,7 @@ var QueryClient = class {
8482
8527
  /**
8483
8528
  * Execute an Order-Sorted Feature search.
8484
8529
  *
8485
- * @param request - OSF search request with pattern. Features can be plain JS values.
8530
+ * @param request - Structured search request with pattern. Features can be plain JS values.
8486
8531
  * @returns Structured search results including entities, relations, and suspended query information.
8487
8532
  *
8488
8533
  * @remarks
@@ -8558,7 +8603,7 @@ var QueryClient = class {
8558
8603
  * Search for records matching a pattern with type-aware matching.
8559
8604
  * Alias for {@link osfSearch} using friendlier naming.
8560
8605
  *
8561
- * @param request - OSF search request with pattern.
8606
+ * @param request - Structured search request with pattern.
8562
8607
  * @returns Structured search results including entities, relations, and suspended query information.
8563
8608
  *
8564
8609
  * @see osfSearch
@@ -10228,7 +10273,7 @@ var VisualizationClient = class {
10228
10273
  return response.data;
10229
10274
  }
10230
10275
  /**
10231
- * Generate a hypergraph visualization of OSF terms.
10276
+ * Generate a hypergraph visualization of Psi-terms.
10232
10277
  *
10233
10278
  * @param request - Hypergraph request with root term and traversal options.
10234
10279
  * @returns Hypergraph with graph, stats, components, and degree distribution.
@@ -12237,7 +12282,7 @@ var SyntheticClient = class {
12237
12282
  * @throws {ApiError} If the request fails.
12238
12283
  *
12239
12284
  * @remarks
12240
- * Uses OSF-aware verification with Wu-Palmer sort similarity, feature-level comparison
12285
+ * Uses ontology-aware verification with Wu-Palmer sort similarity, feature-level comparison
12241
12286
  * with type-aware value similarity, and Hungarian algorithm for optimal entity matching.
12242
12287
  *
12243
12288
  * Requires X-Tenant-Id header (set via client configuration).
@@ -12906,7 +12951,7 @@ var OntologyClient = class {
12906
12951
  this.api = api;
12907
12952
  }
12908
12953
  /**
12909
- * Generate an OSFKB scenario from a natural language task description.
12954
+ * Generate a scenario from a natural language task description.
12910
12955
  *
12911
12956
  * @param request - Generation parameters including the prompt and optional clarification answers.
12912
12957
  * @returns Either clarification questions (status `"needs_clarification"`) or the generated scenario (status `"complete"`).
@@ -13753,7 +13798,7 @@ var ReasoningLayerClient = class {
13753
13798
  terms;
13754
13799
  /** Inference engine operations (backward/forward chaining, fuzzy, Bayesian, NAF). */
13755
13800
  inference;
13756
- /** Query operations (unification, OSF search, validation). */
13801
+ /** Query operations (unification, structured search, validation). */
13757
13802
  query;
13758
13803
  /** Cognitive agent operations (BDI cycle, beliefs, goals, messaging). */
13759
13804
  cognitive;
@@ -13833,7 +13878,7 @@ var ReasoningLayerClient = class {
13833
13878
  rag;
13834
13879
  /** Linear program optimization (CLP(Q) simplex solver via backward chaining). */
13835
13880
  optimize;
13836
- /** OSFQL (OSF Query Language) execution operations. */
13881
+ /** OSFQL execution operations. */
13837
13882
  osfql;
13838
13883
  /** Conversational AI operations (NL → OSFQL with self-correction). */
13839
13884
  conversation;