@kortexya/reasoninglayer 1.6.0 → 1.7.1

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 = "1.6.0";
112
+ declare const SDK_VERSION = "1.7.1";
113
113
  /**
114
114
  * Authentication mode for the SDK.
115
115
  *
@@ -13754,6 +13754,10 @@ interface ProofDto$1 {
13754
13754
  certainty: number;
13755
13755
  /** @format uuid */
13756
13756
  goal_term_id: string;
13757
+ /** Human-readable rendering of the proven goal (the conclusion). */
13758
+ goal_display?: string;
13759
+ /** Human-readable rendering of the rule applied (None for a fact). */
13760
+ rule_label?: string;
13757
13761
  /** @format uuid */
13758
13762
  rule_term_id?: string;
13759
13763
  /** Child proof nodes (recursive) */
@@ -22636,6 +22640,17 @@ interface ProofDto {
22636
22640
  goalTermId: string;
22637
22641
  /** The rule term ID used to prove this goal. */
22638
22642
  ruleTermId?: string;
22643
+ /**
22644
+ * Human-readable rendering of the goal proven at this step — the conclusion,
22645
+ * e.g. `iam_permission(action: "view_file", object: "design.pdf", subject: "alice")`.
22646
+ * Lets a client render a readable proof tree without resolving term IDs.
22647
+ */
22648
+ goalDisplay?: string;
22649
+ /**
22650
+ * Human-readable rendering of the rule applied at this step (its head Ψ-term).
22651
+ * Absent for a stored fact / axiom (no rule was applied).
22652
+ */
22653
+ ruleLabel?: string;
22639
22654
  /** The substitution applied at this proof step. */
22640
22655
  substitution: HomoiconicSubstitutionDto;
22641
22656
  /** Sub-proofs for intermediate goals. */
@@ -43606,15 +43621,28 @@ interface DerivationSummaryDto {
43606
43621
  rootSourceIds: string[];
43607
43622
  }
43608
43623
  /**
43609
- * A source text excerpt from the knowledge base.
43624
+ * A KB record excerpt grounding a claim.
43625
+ *
43626
+ * @remarks
43627
+ * This is the conversation-route excerpt (term/feature/value grounding from
43628
+ * `crates/api/src/dto/conversation.rs`), distinct from the context-assembly
43629
+ * excerpt (`concept`/`text`/`document`) that shares the same wire name.
43610
43630
  */
43611
43631
  interface SourceExcerptDto$1 {
43612
- /** Concept name. */
43613
- concept: string;
43614
- /** Source text. */
43615
- text: string;
43632
+ /** ID of the KB term this excerpt comes from. */
43633
+ termId: string;
43634
+ /** Sort (type) of the term. */
43635
+ sortName: string;
43636
+ /** Feature (attribute) name. */
43637
+ featureName: string;
43638
+ /** Feature value. */
43639
+ value: string;
43640
+ /** Provenance of the grounding record (e.g. "document", "manual"). */
43641
+ provenanceType?: string | null;
43642
+ /** Quality score of the source record (0.0–1.0). */
43643
+ qualityScore?: number | null;
43616
43644
  /** Source document, if applicable. */
43617
- document?: string | null;
43645
+ sourceDocument?: string | null;
43618
43646
  }
43619
43647
  /**
43620
43648
  * A claim annotation with provenance information.
@@ -43715,6 +43743,8 @@ interface TurnDto {
43715
43743
  intent?: string | null;
43716
43744
  /** OSFQL generated (assistant turns only). */
43717
43745
  osfql?: string | null;
43746
+ /** Per-claim provenance annotations (assistant turns only). */
43747
+ claimAnnotations?: ClaimAnnotationDto[] | null;
43718
43748
  }
43719
43749
  /**
43720
43750
  * A conversation summary.
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 = "1.6.0";
112
+ declare const SDK_VERSION = "1.7.1";
113
113
  /**
114
114
  * Authentication mode for the SDK.
115
115
  *
@@ -13754,6 +13754,10 @@ interface ProofDto$1 {
13754
13754
  certainty: number;
13755
13755
  /** @format uuid */
13756
13756
  goal_term_id: string;
13757
+ /** Human-readable rendering of the proven goal (the conclusion). */
13758
+ goal_display?: string;
13759
+ /** Human-readable rendering of the rule applied (None for a fact). */
13760
+ rule_label?: string;
13757
13761
  /** @format uuid */
13758
13762
  rule_term_id?: string;
13759
13763
  /** Child proof nodes (recursive) */
@@ -22636,6 +22640,17 @@ interface ProofDto {
22636
22640
  goalTermId: string;
22637
22641
  /** The rule term ID used to prove this goal. */
22638
22642
  ruleTermId?: string;
22643
+ /**
22644
+ * Human-readable rendering of the goal proven at this step — the conclusion,
22645
+ * e.g. `iam_permission(action: "view_file", object: "design.pdf", subject: "alice")`.
22646
+ * Lets a client render a readable proof tree without resolving term IDs.
22647
+ */
22648
+ goalDisplay?: string;
22649
+ /**
22650
+ * Human-readable rendering of the rule applied at this step (its head Ψ-term).
22651
+ * Absent for a stored fact / axiom (no rule was applied).
22652
+ */
22653
+ ruleLabel?: string;
22639
22654
  /** The substitution applied at this proof step. */
22640
22655
  substitution: HomoiconicSubstitutionDto;
22641
22656
  /** Sub-proofs for intermediate goals. */
@@ -43606,15 +43621,28 @@ interface DerivationSummaryDto {
43606
43621
  rootSourceIds: string[];
43607
43622
  }
43608
43623
  /**
43609
- * A source text excerpt from the knowledge base.
43624
+ * A KB record excerpt grounding a claim.
43625
+ *
43626
+ * @remarks
43627
+ * This is the conversation-route excerpt (term/feature/value grounding from
43628
+ * `crates/api/src/dto/conversation.rs`), distinct from the context-assembly
43629
+ * excerpt (`concept`/`text`/`document`) that shares the same wire name.
43610
43630
  */
43611
43631
  interface SourceExcerptDto$1 {
43612
- /** Concept name. */
43613
- concept: string;
43614
- /** Source text. */
43615
- text: string;
43632
+ /** ID of the KB term this excerpt comes from. */
43633
+ termId: string;
43634
+ /** Sort (type) of the term. */
43635
+ sortName: string;
43636
+ /** Feature (attribute) name. */
43637
+ featureName: string;
43638
+ /** Feature value. */
43639
+ value: string;
43640
+ /** Provenance of the grounding record (e.g. "document", "manual"). */
43641
+ provenanceType?: string | null;
43642
+ /** Quality score of the source record (0.0–1.0). */
43643
+ qualityScore?: number | null;
43616
43644
  /** Source document, if applicable. */
43617
- document?: string | null;
43645
+ sourceDocument?: string | null;
43618
43646
  }
43619
43647
  /**
43620
43648
  * A claim annotation with provenance information.
@@ -43715,6 +43743,8 @@ interface TurnDto {
43715
43743
  intent?: string | null;
43716
43744
  /** OSFQL generated (assistant turns only). */
43717
43745
  osfql?: string | null;
43746
+ /** Per-claim provenance annotations (assistant turns only). */
43747
+ claimAnnotations?: ClaimAnnotationDto[] | null;
43718
43748
  }
43719
43749
  /**
43720
43750
  * A conversation summary.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/config.ts
8
- var SDK_VERSION = "1.6.0";
8
+ var SDK_VERSION = "1.7.1";
9
9
  function resolveConfig(config) {
10
10
  if (!config.baseUrl) {
11
11
  throw new Error("ClientConfig.baseUrl is required");
@@ -10245,6 +10245,8 @@ function ProofDtoFromApiToFront(dto) {
10245
10245
  return {
10246
10246
  goalTermId: dto.goal_term_id,
10247
10247
  ruleTermId: dto.rule_term_id,
10248
+ goalDisplay: dto.goal_display,
10249
+ ruleLabel: dto.rule_label,
10248
10250
  substitution: HomoiconicSubstitutionDtoFromApiToFront(dto.substitution),
10249
10251
  subproofs: dto.subproofs?.map(ProofDtoFromApiToFront),
10250
10252
  certainty: dto.certainty
@@ -22323,10 +22325,15 @@ function DerivationSummaryDtoFromApiToFront(dto) {
22323
22325
  };
22324
22326
  }
22325
22327
  function SourceExcerptDtoFromApiToFront(dto) {
22328
+ const wire = dto;
22326
22329
  return {
22327
- concept: dto.concept,
22328
- text: dto.text,
22329
- document: dto.document ?? void 0
22330
+ termId: wire.term_id,
22331
+ sortName: wire.sort_name,
22332
+ featureName: wire.feature_name,
22333
+ value: wire.value,
22334
+ provenanceType: wire.provenance_type ?? void 0,
22335
+ qualityScore: wire.quality_score ?? void 0,
22336
+ sourceDocument: wire.source_document ?? void 0
22330
22337
  };
22331
22338
  }
22332
22339
  function ClaimAnnotationDtoFromApiToFront(dto) {
@@ -22387,7 +22394,11 @@ function TurnDtoFromApiToFront(dto) {
22387
22394
  content: dto.content,
22388
22395
  timestamp: dto.timestamp,
22389
22396
  intent: dto.intent ?? void 0,
22390
- osfql: dto.osfql ?? void 0
22397
+ osfql: dto.osfql ?? void 0,
22398
+ // Generated contract types this as `any[]` — the wire shape is ClaimAnnotationDto.
22399
+ claimAnnotations: dto.claim_annotations?.map(
22400
+ ClaimAnnotationDtoFromApiToFront
22401
+ )
22391
22402
  };
22392
22403
  }
22393
22404
  function ConversationSummaryDtoFromApiToFront(dto) {