keyring-agent-core 0.2.14 → 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
@@ -1220,9 +1220,9 @@ interface AgentConfig {
1220
1220
  subgraph?: {
1221
1221
  /** The Graph gateway API key. Falls back to a public demo key. */
1222
1222
  theGraphApiKey?: string;
1223
- /** CoinPool pair-list base url (`<base>/pair/pure-list?chainId=…`). */
1223
+ /** CoinPool pair API base url (`<base>/pair/v2?chainId=…`). */
1224
1224
  coinPoolBaseUrl?: string;
1225
- /** Keyring pool API base url (`<base>/user/positions-details/v3?…`). */
1225
+ /** @deprecated No longer used CoinPool `/pair/v2` returns APR + ranges directly. */
1226
1226
  keyringPoolBaseUrl?: string;
1227
1227
  /** Override subgraph URLs per hex chain id. */
1228
1228
  subgraphUrls?: Record<string, string>;
@@ -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;
@@ -5074,9 +5087,9 @@ declare class EstimatePoolYieldTool extends BaseTool {
5074
5087
  interface SubgraphServiceConfig {
5075
5088
  /** The Graph API key. Falls back to a public demo key. */
5076
5089
  theGraphApiKey?: string;
5077
- /** CoinPool pair list base url (`/pair/pure-list`). */
5090
+ /** CoinPool pair API base url (`/pair/v2`). */
5078
5091
  coinPoolBaseUrl?: string;
5079
- /** Keyring pool API base url (`/user/positions-details/v3`). */
5092
+ /** @deprecated No longer used CoinPool `/pair/v2` returns APR + ranges directly. */
5080
5093
  keyringPoolBaseUrl?: string;
5081
5094
  /** Override a subgraph URL by chain hex id. */
5082
5095
  subgraphUrls?: Record<string, string>;
@@ -5483,8 +5496,8 @@ type SubgraphCoinPoolPairsToolConfig = SubgraphServiceConfig;
5483
5496
  * user asks about price ranges, "which range to pick", or "best range"
5484
5497
  * for a known token pair.
5485
5498
  *
5486
- * Requires both `coinPoolBaseUrl` and `keyringPoolBaseUrl` to be set in
5487
- * SubgraphServiceConfig otherwise the tool returns an empty list.
5499
+ * Backed by the CoinPool `/pair/v2` endpoint (`coinPoolBaseUrl`). Returns an
5500
+ * empty list when that base url is unset or the chain is unsupported.
5488
5501
  */
5489
5502
  declare class SubgraphCoinPoolPairsTool extends BaseTool {
5490
5503
  name: string;
@@ -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