keyring-agent-core 0.2.15 → 0.2.16

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
@@ -1653,10 +1653,23 @@ declare class AgentCore {
1653
1653
  */
1654
1654
  private stampLanguage;
1655
1655
  private addUserMessage;
1656
- /** Single KB lookup — callers reuse the result for both context + short-circuit. */
1656
+ /**
1657
+ * Single KB lookup — callers reuse the result for both context + short-circuit.
1658
+ *
1659
+ * We fetch the FULL candidate set (minScore floor bypassed) in ONE query. The
1660
+ * minScore gating is then applied locally by the consumers: `formatKBContext`
1661
+ * keeps only above-threshold hits as reference material, while the intent
1662
+ * guard in `tryAnswerFromKB` widens to every candidate (so a truly-equivalent
1663
+ * FAQ the embedding underscored below minScore is still considered, provided
1664
+ * at least one hit cleared the threshold).
1665
+ */
1657
1666
  private searchKB;
1658
1667
  private snippet;
1659
- /** Format KB hits as a reference-block string for LLM consumption. */
1668
+ /**
1669
+ * Format KB hits as a reference-block string for LLM consumption. Only hits
1670
+ * that clear `kbAnswerThreshold` become reference material — `searchKB`
1671
+ * returns the unfiltered candidate set, so the score floor is enforced here.
1672
+ */
1660
1673
  private formatKBContext;
1661
1674
  private tryAnswerFromKB;
1662
1675
  private answerDirectly;
@@ -6912,7 +6925,14 @@ declare class UpstashKnowledgeBase implements KnowledgeBaseProvider {
6912
6925
  private readonly fusionAlgorithm;
6913
6926
  private readonly debug;
6914
6927
  constructor(config?: UpstashKnowledgeBaseConfig);
6915
- search(query: string, maxResults?: number): Promise<KBSearchResult[]>;
6928
+ /**
6929
+ * @param opts.applyMinScore When `false`, every retrieved candidate is
6930
+ * returned regardless of the `minScore` floor (callers do their own
6931
+ * gating). Defaults to `true` — drop hits below `minScore`.
6932
+ */
6933
+ search(query: string, maxResults?: number, opts?: {
6934
+ applyMinScore?: boolean;
6935
+ }): Promise<KBSearchResult[]>;
6916
6936
  /**
6917
6937
  * Upsert one or more entries. Idempotent — same `id` overwrites the
6918
6938
  * existing record. When `id` is omitted, a stable hash of the question