@fenglimg/fabric-server 2.3.0-rc.10 → 2.3.0-rc.12

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
@@ -995,25 +995,35 @@ type RecallInput = PlanContextInput & {
995
995
  * (W1-3 / KT-DEC-0031: surface the related id, do not fetch its body).
996
996
  */
997
997
  include_related?: boolean;
998
+ /**
999
+ * TASK-006 (KT-PIT-0036 observability opt-in): when true, populate
1000
+ * `entry.score_breakdown` with the numbers-only signal decomposition
1001
+ * (bm25/vector/salience/recency/locality/proximity/credibility → final).
1002
+ * Off by default for wire efficiency. Enable when debugging ranking or tuning
1003
+ * scoring weights. The final===score invariant is enforced at the plan-context
1004
+ * service layer (candidate_scores Map) regardless of this flag.
1005
+ */
1006
+ include_score_breakdown?: boolean;
998
1007
  };
999
1008
  type FullRuleDescription = PlanContextResult["candidates"][number]["description"];
1000
- type RecallEntryDescription = Pick<FullRuleDescription, "summary" | "must_read_if" | "intent_clues"> & Partial<Pick<FullRuleDescription, "knowledge_type">>;
1009
+ type RecallEntryDescription = Pick<FullRuleDescription, "summary"> & Partial<Pick<FullRuleDescription, "must_read_if" | "impact" | "knowledge_type">>;
1001
1010
  type RecallEntry = {
1002
1011
  stable_id: string;
1003
- rank: number;
1004
1012
  description: RecallEntryDescription;
1005
1013
  read_path?: string;
1006
- store?: {
1007
- alias: string;
1008
- };
1014
+ store_alias?: string;
1009
1015
  body_in_context?: boolean;
1010
- score?: number;
1011
1016
  score_breakdown?: RecallScoreBreakdown;
1012
1017
  };
1013
- type RecallResult = Omit<PlanContextResult, "selection_token" | "payload_trimmed" | "payload_over_budget" | "entries" | "candidates" | "candidate_scores"> & {
1018
+ type RecallResult = Omit<PlanContextResult, "selection_token" | "payload_trimmed" | "payload_over_budget" | "entries" | "candidates" | "candidate_scores" | "stale" | "intent" | "dropped" | "preflight_diagnostics"> & {
1014
1019
  entries: RecallEntry[];
1015
- directive: string;
1016
1020
  next_steps?: string[];
1021
+ dropped_ids?: string[];
1022
+ dropped_reasons?: {
1023
+ retrieval_budget?: number;
1024
+ payload_budget?: number;
1025
+ };
1026
+ preflight_diagnostics?: PreflightDiagnostic[];
1017
1027
  };
1018
1028
  declare function recall(projectRoot: string, input: RecallInput): Promise<RecallResult>;
1019
1029