keyring-agent-core 0.4.15 → 0.4.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/CHANGELOG.md CHANGED
@@ -6,9 +6,86 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ### Fixed
10
+
11
+ - **Add liquidity (`preview-add-liquidity`):** the mint reverted with `Price slippage check` whenever
12
+ the pool's price was far from the market (e.g. a thin pool ~50% off): the native input was split at
13
+ the pool price, the swap legs filled at the market, and `amount0Min`/`amount1Min` (80% of each leg's
14
+ min-out) exceeded what the mint could use from the over-filled side. Now the input is re-split with
15
+ the quoted rates (`PoolService.rebalanceSplitForRates`, priced on each leg's expected out — `fetchSwapLeg`
16
+ now also returns `amountOut` — and re-quoted when it moves > 0.5%) and the mins
17
+ are 80% of what the mint actually uses. `summary.ratio` is the native share per leg; the result
18
+ carries `marketDeviationPct` and the agent warns above 5%.
19
+
20
+ - **Gemini:** every tool loop failed with 400 once Google moved `gemini-2.5-flash` requests onto
21
+ `gemini-3.5-flash-lite` (router / direct answers kept working, so it looked intermittent):
22
+ - Tool results were sent with `role: 'function'` → `Role 'function' is not supported`. They are now
23
+ a `user` turn, all responses of one step in one content.
24
+ - Function-call turns were rebuilt from `toolCalls`, dropping their `thoughtSignature` →
25
+ `Function call is missing a thought_signature`. The model turn's raw parts are now kept
26
+ (`LLMResponse.modelParts` → `ChatMessage.modelParts`, stored by `Subagent`) and replayed verbatim,
27
+ so each signature stays on its original part. History saved without them is rebuilt with the
28
+ documented `skip_thought_signature_validator` on the first call.
29
+ See https://ai.google.dev/gemini-api/docs/thought-signatures
30
+
31
+ - **Swap/Buy (Relay):** `trackTransaction` now maps v3's `refund` status to `COMPLETED`; it used to
32
+ stay `PENDING` forever (only the pre-v3 spelling `refunded` was recognised).
33
+
34
+ ### Changed
35
+
36
+ - **Breaking — model:** only `gemini-3.5-flash-lite` is supported; it is the default (was
37
+ `gemini-2.5-flash`).
38
+ - **Breaking — thinking:** `thinkingBudget` (tokens) is replaced by `thinkingLevel`
39
+ (`'minimal' | 'low' | 'medium' | 'high' | null`) on `LLMProviderConfig` and `ChatOptions`, sent as
40
+ `thinkingConfig.thinkingLevel`. Default `'minimal'` (near-off). `WebsiteTrustKeyringAgent`'s
41
+ investigation call uses `'low'` (was a 2048-token budget).
42
+ - **Breaking — sampling:** `LLMProviderConfig.temperature` is removed and no temperature is sent:
43
+ deprecated and ignored on `gemini-3.5-flash-lite`, a 400 on later models.
44
+ - **Request:** `systemInstruction` is sent without a role; trailing model turns are dropped (a
45
+ request ending with a model turn is a 400); a `functionResponse` only echoes an `id` its call
46
+ carried.
47
+ - **Response:** thought parts are left out of `text`; an empty turn is retried only for transient
48
+ finish reasons (`STOP`, `MAX_TOKENS`, `MALFORMED_FUNCTION_CALL`, `MALFORMED_RESPONSE`, `OTHER`),
49
+ others (e.g. `SAFETY`, `MISSING_THOUGHT_SIGNATURE`, `UNEXPECTED_TOOL_CALL`) return at once; a
50
+ blocked prompt returns its `promptFeedback.blockReason` as `finishReason`.
51
+ - Default proxy is now `https://nft.keyring.app/api/gemini-stable-v2`, a plain pass-through. The old
52
+ `gemini-stable` proxy keeps rewriting requests from clients `<= 0.4.15`.
53
+
54
+ - **Breaking — Swap/Buy (Relay):** quotes now go to `/quote/v3` (`/quote/v2` is deprecated since
55
+ 2026-11-25). v3 requires an API key, so `AgentConfig.swapProviders.relay.apiKey` is now
56
+ **required**: without it every Relay quote and request lookup fails with
57
+ `Unauthorized: Check API Key or API session`. deBridge is unaffected.
58
+ - **Swap/Buy (Relay):** quote parsing follows the v3 shape — tx payload read from the flat
59
+ `step.data` (approve and swap/deposit steps), `requestId` from the top level, and a v3 `errorCode`
60
+ is returned as `error` (with `message` as `errorMessage`). Quotes persisted in chat history in the
61
+ v2 shape (`step.items[0].data`, step-level `requestId`) still read. `raw.warnings` now carries
62
+ Relay's quote warnings. Affiliate `appFees[].fee` is sent as a string of basis points, as v3
63
+ expects.
64
+
65
+ ### Added
66
+
67
+ - `LLMResponse.modelParts`, `ChatMessage.modelParts`, `ModelPart`, `ThinkingLevel`.
68
+ - **Swap/Buy (Relay):** `RelayProvider.getRequestDetail({ requestId?, txHash? })` reads a request
69
+ from `/requests/v3` (`/requests/v2` was retired on 2026-11-24): looks up by `requestId`, falls back
70
+ to any of its tx hashes, and returns the tracker `status`, Relay's own `relayStatus`, `failReason`
71
+ and — only once Relay reports `success` — what the user actually received (`amountOut`,
72
+ `amountOutFormatted`, `amountOutUsd`, `currencyOut`, from `route.actual`, not the quote). Never
73
+ throws. Types `RelayRequestDetail`, `RelayRequestDetailParams` are exported.
74
+
75
+ ## [0.4.15] - 2026-11-20
76
+
77
+ _Generated from commit messages._
78
+
79
+ ### Changed
80
+
81
+ - Add translation capabilities with TranslateKeyringAgent and integrate into prediction tools
82
+ - Add evaluation scripts for translation and website trust agents
83
+ - Enhance prediction tools with localization and summarization capabilities
84
+
9
85
  ## [0.4.14] - 2026-11-19
10
86
 
11
87
  ### Fixed
88
+
12
89
  - **Prediction:** a Max BUY still failed with "not enough balance / allowance" (0.4.13 did not cover
13
90
  it): Keyring's builder code charges a 1% taker fee on top, which the core priced at 0. The SDK's own
14
91
  `maxSpend` cut adds it but prices both fees at the limit, so a fill below the limit overran the cash
@@ -18,12 +95,14 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
18
95
  platform fee at the costlier of fill and limit, the builder fee at the limit — $3.95 there.
19
96
 
20
97
  ### Added
98
+
21
99
  - **Prediction:** `MarketOrder` (BUY with `maxSpend`) carries `minFillPrice` and `fee`, set by
22
100
  `prepareMarketOrder`, for the cap above. Orders built elsewhere without them fall back to the limit.
23
101
 
24
102
  ## [0.4.13] - 2026-11-19
25
103
 
26
104
  ### Fixed
105
+
27
106
  - **Prediction:** a Max BUY (the amount = the whole cash) on a market with fees failed ("The
28
107
  transaction failed"). `prepareMarketOrder` cut the notional to fit the cash with the fee reserved at
29
108
  the LIMIT price, but the fee is charged at each fill's price, and a fill below the limit buys more
@@ -35,6 +114,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
35
114
  ## [0.4.12] - 2026-11-18
36
115
 
37
116
  ### Changed
117
+
38
118
  - **Prediction (breaking for consumers of `stable` / the symbol lists):** stablecoins are no
39
119
  longer a separate tier — every token is handled alike, only native vs ERC-20 differ.
40
120
  `WalletDepositOption.stable`, `EvmDepositAsset.stable` (and the `stable` of the deposit card's
@@ -48,6 +128,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
48
128
  ## [0.4.11] - 2026-11-18
49
129
 
50
130
  ### Changed
131
+
51
132
  - **Prediction:** `open-prediction-withdraw` description no longer says withdrawals arrive "as USDC or
52
133
  USDT": any token the bridge serves on an EVM chain (native coin included) is a destination, as
53
134
  `withdrawDestinations` already returns.
@@ -55,6 +136,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
55
136
  ## [0.4.10] - 2026-11-18
56
137
 
57
138
  ### Changed
139
+
58
140
  - **Prediction:** deposits "From this wallet" offer every token the bridge accepts on an EVM
59
141
  chain that the wallet holds (native coin = zero address, read with `getBalance`), not only
60
142
  USD stablecoins. `WalletDepositOption` gains `stable`; stablecoins are listed first.
@@ -64,6 +146,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
64
146
  is left out of wallet deposit options and withdraw destinations (`POLYGON_NATIVE_PRECOMPILE`).
65
147
 
66
148
  ### Fixed
149
+
67
150
  - **Prediction:** the deposit tool's reply quoted the bridge's bare minimum ("deposits below about $2…")
68
151
  while the apps enforce it + a $1 buffer ($3): `minimumDepositUsd` and the reply now use
69
152
  `bridgeMinUsd` (new exports `BRIDGE_MIN_BUFFER_USD`, `bridgeMinUsd`). Card `options[].minUsd`
@@ -75,12 +158,14 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
75
158
  ## [0.4.8] - 2026-11-17
76
159
 
77
160
  ### Fixed
161
+
78
162
  - **Prediction:** NegRiskAdapter approval checks corrected so neg-risk market trades detect
79
163
  missing approvals accurately.
80
164
 
81
165
  ## [0.4.7] - 2026-11-17
82
166
 
83
167
  ### Added
168
+
84
169
  - **Prediction:** `getShareBalances(wallet, tokenIds)` export and
85
170
  `PolymarketService.getShares()` — on-chain outcome-token share balances, current as soon as a
86
171
  fill settles (unlike `getPositions`), never cached.
@@ -91,6 +176,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
91
176
  ## [0.4.6] - 2026-11-17
92
177
 
93
178
  ### Changed
179
+
94
180
  - **Prediction:** withdrawals can pay out to any token the bridge serves on an EVM chain
95
181
  (native = zero address), not only USD stablecoins. Stablecoins are still listed first.
96
182
  - **Lending:** Compound links now point to `compound.xyz` (was `compound.finance`).
@@ -98,6 +184,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
98
184
  ## [0.4.5] - 2026-11-11
99
185
 
100
186
  ### Changed
187
+
101
188
  - **Prediction:** the Polymarket SDK's Polygon RPC is now chosen by probing endpoints with a
102
189
  full-size JSON-RPC batch; order is host override → built-in list → remote catalogue, so a
103
190
  batch-capped or rate-limited endpoint is no longer picked.
@@ -105,6 +192,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
105
192
  ## [0.4.4] - 2026-11-11
106
193
 
107
194
  ### Changed
195
+
108
196
  - **Core:** the restricted-topics blocklist (weather, sports, politics, …) was removed; the
109
197
  identity guard remains. Non-crypto questions are answered normally again.
110
198
  - **Core:** "who will win / will X happen" follow-ups inside a prediction-market conversation
@@ -113,6 +201,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
113
201
  ## [0.4.3] - 2026-11-09
114
202
 
115
203
  ### Changed
204
+
116
205
  - **Pool:** `PoolByAddressTool` resolves an address as pool or token in a single search call,
117
206
  with clearer errors when neither matches.
118
207
  - **Pool:** token safety checks in pool analysis gained extra risk flags and verdicts.
@@ -120,18 +209,21 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
120
209
  ## [0.4.2] - 2026-11-09
121
210
 
122
211
  ### Added
212
+
123
213
  - **Prediction:** minimum withdrawal per bridge destination — `minUsd` on withdraw targets,
124
214
  `isBelowWithdrawMinimum()` and the `WithdrawTarget` type are exported.
125
215
 
126
216
  ## [0.4.1] - 2026-11-06
127
217
 
128
218
  ### Changed
219
+
129
220
  - **Prediction:** event card detail buttons now submit the event title (no slug); the core
130
221
  remembers the card's slug and resolves the event by title.
131
222
 
132
223
  ## [0.4.0] - 2026-11-04
133
224
 
134
225
  ### Changed
226
+
135
227
  - **Chains/RPC:** multi-endpoint clients use a `fallbackHttp` transport that fails over instead
136
228
  of waiting out a long `Retry-After` (new `maxRetryAfterMs` transport option).
137
229
  - **Core:** lower turn latency — the router runs in parallel with the query rewrite (its
@@ -143,6 +235,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
143
235
  ## [0.3.25] - 2026-11-03
144
236
 
145
237
  ### Added
238
+
146
239
  - **Website trust:** results are cached in memory and optionally in storage. New
147
240
  `WebsiteTrustKeyringAgent` options: `officialCacheTtlMs` (default 7 days),
148
241
  `assessCacheTtlMs` (default 1 day), `cacheStorage`, `cacheStorageKey`.
@@ -150,23 +243,27 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
150
243
  ## [0.3.24] - 2026-10-28
151
244
 
152
245
  ### Changed
246
+
153
247
  - **Build/RN:** dependency bumps (`@langchain/langgraph` ^1.5.3, `axios` ^1.21.0) and security
154
248
  `resolutions` for transitive packages. No API change.
155
249
 
156
250
  ## [0.3.23] - 2026-10-28
157
251
 
158
252
  ### Changed
253
+
159
254
  - **Prediction:** builder authentication reworked for Polymarket's updated API; builder code
160
255
  updated to the latest version.
161
256
 
162
257
  ## [0.3.22] - 2026-10-14
163
258
 
164
259
  ### Added
260
+
165
261
  - **Prediction:** builder code management for Polymarket order attribution.
166
262
 
167
263
  ## [0.3.21] - 2026-10-14
168
264
 
169
265
  ### Fixed
266
+
170
267
  - **Prediction:** fee handling and market-order logic so trades show the amounts actually
171
268
  charged.
172
269
 
@@ -175,6 +272,7 @@ version. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versi
175
272
  Prediction markets (Polymarket) land.
176
273
 
177
274
  ### Added
275
+
178
276
  - **Prediction:** Polymarket tools — event lookup and cards, market detail, account lookup,
179
277
  `PredictionSetupTool` (account setup + relayer wallet deployment), `PredictionDepositTool`
180
278
  (EVM deposits, direct send or deposit address), `PredictionTradeTool`, and
@@ -188,6 +286,7 @@ Prediction markets (Polymarket) land.
188
286
  ## [0.3.19] - 2026-09-30
189
287
 
190
288
  ### Fixed
289
+
191
290
  - **Wallet:** amounts are floored to token decimals (`floorToTokenDecimals`) so percentage /
192
291
  max amounts never round above the balance.
193
292
  - **Wallet:** dust positions are filtered out of DeFi positions.
@@ -199,55 +298,66 @@ _No functional changes (republish)._
199
298
  ## [0.3.17] - 2026-09-30
200
299
 
201
300
  ### Changed
301
+
202
302
  - **Token:** trending tokens use on-chain symbols and richer data enrichment.
203
303
 
204
304
  ## [0.3.16] - 2026-09-29
205
305
 
206
306
  ### Added
307
+
207
308
  - **Core:** `finishReason` on `LLMResponse`.
208
309
  - **Token:** improved research handling in `TokenInfoTool`.
209
310
 
210
311
  ## [0.3.15] - 2026-09-29
211
312
 
212
313
  ### Changed
314
+
213
315
  - **Core:** default model is now `gemini-2.5-flash` (was `gemini-2.5-flash-lite`).
214
316
 
215
317
  ## [0.3.14] - 2026-09-28
216
318
 
217
319
  ### Added
320
+
218
321
  - **Lending:** yield identity resolution and underlying price fetching for yield tokens.
219
322
 
220
323
  ## [0.3.13] - 2026-09-22
221
324
 
222
325
  ### Changed
326
+
223
327
  - Documentation for lending protocols and deep links. No code change.
224
328
 
225
329
  ## [0.3.12] - 2026-09-17
226
330
 
227
331
  ### Added
332
+
228
333
  - **Lending:** dynamic per-protocol chain lists for Morpho and Compound.
229
334
 
230
335
  ### Fixed
336
+
231
337
  - **Lending:** Spark protocol URLs use the correct domain.
232
338
 
233
339
  ## [0.3.11] - 2026-09-16
234
340
 
235
341
  ### Fixed
342
+
236
343
  - **Chains/RPC:** chain normalisation checks across services reject unsupported chains.
237
344
 
238
345
  ## [0.3.10] - 2026-09-16
239
346
 
240
347
  ### Added
348
+
241
349
  - **Chains/RPC:** `getNativeCurrency()` and `getChainName()` helpers.
242
350
 
243
351
  ## [0.3.9] - 2026-09-11
244
352
 
245
353
  ### Changed
354
+
246
355
  - **Wallet:** wallet actions accept user-named networks and handle chain selection better.
247
356
 
248
357
  ## [0.3.8] - 2026-09-10
249
358
 
250
359
  ### Added
360
+
251
361
  - **Swap/Buy:** USD prices for tokens in `BuyTokenTool` and `SwapTokenTool`; same-token trades
252
362
  are detected (`isSameToken`).
253
363
  - **Swap/Buy:** cross-chain parameters and refusal logic for wallet actions.
@@ -255,6 +365,7 @@ _No functional changes (republish)._
255
365
  ## [0.3.7] - 2026-09-10
256
366
 
257
367
  ### Added
368
+
258
369
  - **Pool:** new Uniswap pool tool set (`TopPoolsTool`, `PoolDetailTool`, `PoolSearchTool`, …)
259
370
  sharing one pool-analysis rubric, a pool candidate resolver for add-liquidity, and a unified
260
371
  pool detail shape.
@@ -264,20 +375,24 @@ _No functional changes (republish)._
264
375
  - **Core:** token caps for subagent and synthesizer replies to cut latency.
265
376
 
266
377
  ### Changed
378
+
267
379
  - **Token:** Pantograph token requests are batched.
268
380
 
269
381
  ### Deprecated
382
+
270
383
  - **Pool:** old `pool-defillama` agent config aliases.
271
384
 
272
385
  ## [0.3.6] - 2026-09-09
273
386
 
274
387
  ### ⚠️ Breaking
388
+
275
389
  - **Swap/Buy:** swap services rebuilt around `SwapProviderFactory`, `SwapRouter`
276
390
  (`PoolSwapRouter`, `UserSwapRouter`) and `SwapRouterRegistry`; the old `SwapServiceFactory`
277
391
  and its address/affiliate modules were removed.
278
392
  - **Swap/Buy:** default swap provider is now `relay` (was `debridge`).
279
393
 
280
394
  ### Changed
395
+
281
396
  - **Swap/Buy:** `SwapTokenTool` uses one editable amount form (replaces the amount picker),
282
397
  keeps the destination token while the source is chosen, and checks gas affordability.
283
398
  `BuyTokenTool` and `SwapTokenTool` share one spendable-balance calculation.
@@ -285,33 +400,39 @@ _No functional changes (republish)._
285
400
  ## [0.3.5] - 2026-09-07
286
401
 
287
402
  ### Added
403
+
288
404
  - **Core:** `selfContained` flag on `RewriteResult`.
289
405
 
290
406
  ## [0.3.4] - 2026-09-07
291
407
 
292
408
  ### Added
409
+
293
410
  - **Lending:** Maple (Syrup pools) — live APY/TVL from Maple GraphQL plus history from the
294
411
  lending rates API; read-only (deposits are permissioned).
295
412
  - **Pool:** `OpenAddLiquidityFormTool` accepts exact pool addresses and V4 pool identifiers.
296
413
  - **Pool:** token safety flags and transfer-tax warnings in pool analysis.
297
414
 
298
415
  ### Changed
416
+
299
417
  - **Pool:** pool detail mapping centralised; APR shown is net of protocol fees. Pool data
300
418
  fetching merges search and list requests.
301
419
 
302
420
  ## [0.3.3] - 2026-08-27
303
421
 
304
422
  ### Added
423
+
305
424
  - **Pool:** `searchBaseUrl` option for `UniswapService`; API endpoints updated.
306
425
 
307
426
  ## [0.3.2] - 2026-08-26
308
427
 
309
428
  ### Fixed
429
+
310
430
  - **Lending:** `SPARK_SHARE_TYPES` excludes invalid contract types.
311
431
 
312
432
  ## [0.3.1] - 2026-08-26
313
433
 
314
434
  ### Changed
435
+
315
436
  - **Lending:** protocol adapters split into modules (Aave, Compound, Morpho, Spark, Spark L2
316
437
  sUSDS) with a registry and shared helpers.
317
438
  - **Core:** assistant-invocation detection in the query rewriter.
@@ -319,69 +440,83 @@ _No functional changes (republish)._
319
440
  ## [0.3.0] - 2026-08-25
320
441
 
321
442
  ### Added
443
+
322
444
  - **Lending:** Compound V3 reward APR included in APY.
323
445
 
324
446
  ## [0.2.65] - 2026-08-24
325
447
 
326
448
  ### Added
449
+
327
450
  - **Lending:** `avgOverride` for Morpho's weekly average APY.
328
451
 
329
452
  ## [0.2.64] - 2026-08-24
330
453
 
331
454
  ### Added
455
+
332
456
  - **Lending:** fixed-price handling for yield tokens in yield value calculations.
333
457
 
334
458
  ## [0.2.63] - 2026-08-24
335
459
 
336
460
  ### Changed
461
+
337
462
  - **Lending:** APY change is measured over 1h (was 24h).
338
463
 
339
464
  ## [0.2.62] - 2026-08-21
340
465
 
341
466
  ### Added
467
+
342
468
  - **Lending:** market angle computation for market analysis.
343
469
 
344
470
  ### Changed
471
+
345
472
  - **Lending:** more precise live-rate decoding.
346
473
 
347
474
  ## [0.2.61] - 2026-08-20
348
475
 
349
476
  ### Added
477
+
350
478
  - **Lending:** `LendingMarketDetailTool`; shared market buttons and market reference
351
479
  resolution across lending tools.
352
480
 
353
481
  ### Removed
482
+
354
483
  - **Lending:** `supplySuggestions` module (replaced by market buttons).
355
484
 
356
485
  ## [0.2.60] - 2026-08-20
357
486
 
358
487
  ### Changed
488
+
359
489
  - **Lending:** reward conditions taken into account in APY and its display.
360
490
 
361
491
  ## [0.2.59] - 2026-08-19
362
492
 
363
493
  ### Changed
494
+
364
495
  - **Lending:** APY includes reward incentives; hourly APY samples kept; APR vs APY corrected
365
496
  for Aave and Comet (no double compounding); consistent number display.
366
497
 
367
498
  ## [0.2.58] - 2026-08-18
368
499
 
369
500
  ### Changed
501
+
370
502
  - **Lending:** faster chain support checks in lending tools.
371
503
 
372
504
  ## [0.2.57] - 2026-08-18
373
505
 
374
506
  ### Added
507
+
375
508
  - **Lending:** `lendingRatesBaseUrl` on `ApyEndpoints` / `LendingServiceConfig`.
376
509
 
377
510
  ## [0.2.56] - 2026-08-18
378
511
 
379
512
  ### Added
513
+
380
514
  - **Lending:** `convertSusdsShares` export.
381
515
 
382
516
  ## [0.2.55] - 2026-08-18
383
517
 
384
518
  ### Added
519
+
385
520
  - **Lending:** markets lend their real asset (not assumed USDC); Spark PSM3 cross-chain sUSDS
386
521
  (`spark-l2-susds`), Spark Vaults V2, Morpho vault naming, protocol labels, asset logos, market
387
522
  deep links, yield token pricing.
@@ -389,39 +524,47 @@ _No functional changes (republish)._
389
524
  chains not defined in core are synthesised from available RPC URLs.
390
525
 
391
526
  ### Changed
527
+
392
528
  - **Lending:** markets without a resolvable asset are reported unresolved (USDC fallback
393
529
  removed); supported chains are fetched dynamically.
394
530
 
395
531
  ## [0.2.54] - 2026-08-11
396
532
 
397
533
  ### Added
534
+
398
535
  - **Lending:** Compound v3 Comet and Spark savings vault support (two-step rate reads).
399
536
  - **Pool:** LP fee share via `poolFees.ts`; zero/missing APR is omitted rather than shown as
400
537
  0% (`positiveApr`, `toAprPercent`).
401
538
 
402
539
  ### Changed
540
+
403
541
  - **Chains/RPC:** RPC goes through a public client with fallback transport; endpoint resolution
404
542
  moved into the chain registry; new `BaseError`.
405
543
 
406
544
  ### Deprecated
545
+
407
546
  - **Chains/RPC:** raw JSON-RPC helpers.
408
547
 
409
548
  ## [0.2.53] - 2026-08-07
410
549
 
411
550
  ### Changed
551
+
412
552
  - **Pool:** clearer pool analysis instructions in `TopPoolsTool`.
413
553
 
414
554
  ## [0.2.52] - 2026-08-05
415
555
 
416
556
  ### Changed
557
+
417
558
  - **Lending:** share-based protocol conversion logic.
418
559
 
419
560
  ## [0.2.50] - 2026-08-04
420
561
 
421
562
  ### Added
563
+
422
564
  - **Lending:** yield token valuation for share-based protocols.
423
565
 
424
566
  ### Changed
567
+
425
568
  - **Wallet:** DeFi position tool descriptions.
426
569
 
427
570
  ## [0.2.49] - 2026-07-31
@@ -429,99 +572,118 @@ _No functional changes (republish)._
429
572
  Lending lands.
430
573
 
431
574
  ### Added
575
+
432
576
  - **Lending:** `LendingMarketsTool` (USDC markets with APY and supply), `WalletLendingPositionsTool`,
433
577
  `OpenSupplyFormTool` (`open-supply-usdc-form`) with balance validation, protocol resolution and
434
578
  market links.
435
579
  - **NFT:** `SendNftTool` picker mode with gallery selection.
436
580
 
437
581
  ### Removed
582
+
438
583
  - **Wallet:** `WalletDefiSummaryTool`.
439
584
 
440
585
  ## [0.2.48] - 2026-07-30
441
586
 
442
587
  ### Changed
588
+
443
589
  - **Core:** license key validation in agent configuration.
444
590
 
445
591
  ## [0.2.47] - 2026-07-27
446
592
 
447
593
  ### Added
594
+
448
595
  - **Wallet:** spendable USD value on wallet action forms.
449
596
 
450
597
  ## [0.2.46] - 2026-07-27
451
598
 
452
599
  ### Added
600
+
453
601
  - **Wallet:** native coin symbol for form labels.
454
602
 
455
603
  ## [0.2.45] - 2026-07-24
456
604
 
457
605
  ### Changed
606
+
458
607
  - **x402:** client supports both protocol versions and shows ERC-20 metadata in payment details.
459
608
  - **Core:** license key handling supports `SECRET_KEY_HASH`.
460
609
 
461
610
  ## [0.2.44] - 2026-07-22
462
611
 
463
612
  ### ⚠️ Breaking
613
+
464
614
  - **Core:** `noSuggestions` removed from tools and related interfaces.
465
615
  - **Wallet:** `wallet-action-app` subagent removed; redirect-only actions use `NoFormTool`.
466
616
  - **NFT:** NFT website link removed from `SendNftTool` props.
467
617
 
468
618
  ### Added
619
+
469
620
  - **Core:** LLM config accepts a direct API key (proxy optional).
470
621
  - **NFT:** NFT collections retrieval, images resolved from on-chain tokenURIs, NFT gallery props,
471
622
  sidecar lifting in `BaseTool`.
472
623
  - **Wallet:** human-readable chain name on `WalletActionProps`.
473
624
 
474
625
  ### Fixed
626
+
475
627
  - **Wallet:** token balances include spam/unverified contracts.
476
628
 
477
629
  ## [0.2.43] - 2026-07-09
478
630
 
479
631
  ### Added
632
+
480
633
  - **Core:** `thinkingBudget` option for Gemini reasoning tokens.
481
634
 
482
635
  ### Fixed
636
+
483
637
  - **Pool:** `PreviewAddLiquidityTool` prefers GoPlus audit data for token symbols.
484
638
 
485
639
  ## [0.2.42] - 2026-07-01
486
640
 
487
641
  ### Added
642
+
488
643
  - **Core:** `maxOutputTokens` option on `askJson`.
489
644
 
490
645
  ## [0.2.41] - 2026-06-30
491
646
 
492
647
  ### Added
648
+
493
649
  - **Core:** ambient request signal cancels tool execution; per-call token cap for LLM requests;
494
650
  abort handling for direct tool runs.
495
651
 
496
652
  ## [0.2.40] - 2026-06-29
497
653
 
498
654
  ### Added
655
+
499
656
  - **Core:** `AgentCore.runTool()` for direct tool execution (with `signal`), `Subagent.ownsTool()`.
500
657
  - **Token:** chain-agnostic research fallback in `TokenInfoTool` for unsupported chains.
501
658
 
502
659
  ## [0.2.39] - 2026-06-26
503
660
 
504
661
  ### Fixed
662
+
505
663
  - **Token:** Pantograph API base URL points to the new production endpoint.
506
664
 
507
665
  ## [0.2.38] - 2026-06-26
508
666
 
509
667
  ### Fixed
668
+
510
669
  - **Swap/Buy:** `SwapTokenTool` slippage set to 1 (was `auto`).
511
670
 
512
671
  ## [0.2.37] - 2026-06-22
513
672
 
514
673
  ### Added
674
+
515
675
  - **x402:** generic pay-per-call support — 402 responses from any `ApiClient` call are signed and
516
676
  paid transparently (`X402Client`).
517
677
  - **Chains/RPC:** more EVM chains in query rewriting and routing.
518
678
 
519
679
  ### Changed
680
+
520
681
  - **Core:** identity and off-topic guards; restricted subjects never route to subagents.
521
682
 
522
683
  ## [0.2.36] - 2026-06-16
523
684
 
524
685
  ### Changed
686
+
525
687
  - **NFC:** buy links resolve to country-specific marketplaces.
526
688
  - **Pool:** chain validation via `gatePoolChain` / `resolvePoolChain`.
527
689
  - **Core:** brand mentions are linkified deterministically (Amazon links survive dropped markdown).
@@ -530,65 +692,78 @@ Lending lands.
530
692
  ## [0.2.35] - 2026-06-15
531
693
 
532
694
  ### Added
695
+
533
696
  - **Chains/RPC:** Gnosis, HyperEVM, Mantle and Monad support.
534
697
  - **Pool:** `pool-subgraph` deployment in routing; localized add-liquidity suggestion buttons.
535
698
  - **Core:** `supportedLabel` for localized unsupported-chain replies.
536
699
 
537
700
  ### Changed
701
+
538
702
  - **Token:** Pantograph endpoints moved to `/token-list/all`.
539
703
 
540
704
  ### Removed
705
+
541
706
  - **Token:** buy button parameters from `TrendingTokensTool`.
542
707
 
543
708
  ## [0.2.34] - 2026-06-12
544
709
 
545
710
  ### Changed
711
+
546
712
  - **Pool:** liquidity prompts include the chain.
547
713
 
548
714
  ## [0.2.33] - 2026-06-12
549
715
 
550
716
  ### Removed
717
+
551
718
  - **Token:** buy button parameters from `TokenInfoTool`.
552
719
 
553
720
  ## [0.2.32] - 2026-06-12
554
721
 
555
722
  ### Added
723
+
556
724
  - **NFC:** NFC agent with `nfc-info` and `nfc-buy-link` tools (localized Amazon storefronts).
557
725
 
558
726
  ## [0.2.31] - 2026-06-11
559
727
 
560
728
  ### Added
729
+
561
730
  - **Pool:** add-liquidity suggestion buttons in `PoolAgent`, `OpenAddLiquidityFormTool`,
562
731
  `PoolSearchTool`, `TopPoolsTool`.
563
732
 
564
733
  ## [0.2.30] - 2026-06-11
565
734
 
566
735
  ### Changed
736
+
567
737
  - **Core:** query rewriting keeps intent when the user picks from an offered list.
568
738
  - **Website trust:** ecosystem context, affiliated-domain filtering and verdict presentation.
569
739
 
570
740
  ## [0.2.29] - 2026-06-10
571
741
 
572
742
  ### Changed
743
+
573
744
  - **Website trust:** `currentSite` handling and new `officialUrl`.
574
745
 
575
746
  ## [0.2.28] - 2026-06-10
576
747
 
577
748
  ### ⚠️ Breaking
749
+
578
750
  - **Website trust:** `WebsiteTrustKeyringAgent` replaces `WebsiteTrustAgent` (types updated).
579
751
 
580
752
  ### Changed
753
+
581
754
  - **Core:** plain-text reply and list formatting rules in subagents and synthesizer.
582
755
 
583
756
  ## [0.2.27] - 2026-06-10
584
757
 
585
758
  ### Added
759
+
586
760
  - **Website trust:** `WebsiteTrustAgent` for standalone website trust and phishing analysis.
587
761
  - **Pool:** prices rounded to 8 significant digits (`roundToSignificant`).
588
762
 
589
763
  ## [0.2.26] - 2026-06-09
590
764
 
591
765
  ### Added
766
+
592
767
  - **Core:** cancellation of chat turns via `AbortSignal`; web sources cited in tool replies.
593
768
  - **Pool:** CoinPool price-range suggestions in `OpenAddLiquidityFormTool`, price ranges accepted
594
769
  in either orientation, `ManageLiquidityRedirectTool`, clickable Uniswap links, AI fallback for
@@ -600,20 +775,24 @@ Lending lands.
600
775
  ## [0.2.25] - 2026-06-05
601
776
 
602
777
  ### Added
778
+
603
779
  - **Wallet:** block-explorer URLs for transactions; balance queries span all supported chains
604
780
  when none is named.
605
781
 
606
782
  ### Removed
783
+
607
784
  - **Wallet:** `WalletNetWorthTool`.
608
785
 
609
786
  ## [0.2.24] - 2026-06-04
610
787
 
611
788
  ### Fixed
789
+
612
790
  - **Build/RN:** missing `AbortSignal` methods and async symbols polyfilled for React Native.
613
791
 
614
792
  ## [0.2.23] - 2026-06-04
615
793
 
616
794
  ### Added
795
+
617
796
  - **Build/RN:** `web-streams-polyfill` dependency and React Native polyfills.
618
797
 
619
798
  ## [0.2.22] - 2026-06-04
@@ -623,107 +802,129 @@ _No functional changes (republish)._
623
802
  ## [0.2.21] - 2026-06-04
624
803
 
625
804
  ### ⚠️ Breaking
805
+
626
806
  - **Build/RN:** `react-native` entry is now `dist/index.native.js`.
627
807
 
628
808
  ### Added
809
+
629
810
  - **Chains/RPC:** `getActiveChains()`; `WalletTokenBalancesTool` covers all supported chains when
630
811
  none is named.
631
812
 
632
813
  ## [0.2.20] - 2026-06-04
633
814
 
634
815
  ### Fixed
816
+
635
817
  - **Swap/Buy:** `BuyTokenTool` no longer invents a payment token or amount.
636
818
 
637
819
  ## [0.2.19] - 2026-06-03
638
820
 
639
821
  ### Changed
822
+
640
823
  - **Pool:** "pool" and "pair" treated as equivalent for add-liquidity.
641
824
 
642
825
  ## [0.2.18] - 2026-06-03
643
826
 
644
827
  ### Changed
828
+
645
829
  - **NFT:** error message handling of website links in NFT tools.
646
830
 
647
831
  ## [0.2.17] - 2026-06-03
648
832
 
649
833
  ### Added
834
+
650
835
  - **NFT:** NFT data tools using live web data.
651
836
  - **Core:** capabilities summary and identity guard; assistant questions answered directly.
652
837
  - **Pool:** how-to queries for adding liquidity.
653
838
 
654
839
  ### Fixed
840
+
655
841
  - Production base URLs for the Gemini proxy and other services.
656
842
 
657
843
  ## [0.2.16] - 2026-06-03
658
844
 
659
845
  ### Changed
846
+
660
847
  - **Core:** knowledge base search can bypass `minScore`.
661
848
 
662
849
  ## [0.2.15] - 2026-06-02
663
850
 
664
851
  ### Changed
852
+
665
853
  - **Pool:** CoinPool integration uses `/pair/v2`; deprecated keyring pool API dropped.
666
854
 
667
855
  ## [0.2.14] - 2026-06-02
668
856
 
669
857
  ### Added
858
+
670
859
  - **Core:** in-flight turn management in `AgentCore`.
671
860
 
672
861
  ### Fixed
862
+
673
863
  - **Wallet:** USD values truncated (not rounded) in `WalletTokenBalancesTool`.
674
864
 
675
865
  ## [0.2.13] - 2026-06-02
676
866
 
677
867
  ### Changed
868
+
678
869
  - **Core:** intent classification matches against multiple FAQ questions.
679
870
 
680
871
  ## [0.2.12] - 2026-06-02
681
872
 
682
873
  ### Added
874
+
683
875
  - **Pool:** `SubgraphAddPoolTool`, `PoolFallbackAiTool`, CoinPool price-range candidates in
684
876
  subgraph tools, yield and earnings projections.
685
877
  - **Chains/RPC:** more chain aliases.
686
878
 
687
879
  ### Changed
880
+
688
881
  - **Swap/Buy:** precise amount and decimal handling; deBridge retries transient errors.
689
882
  - **Core:** supported chains shown by name only.
690
883
 
691
884
  ## [0.2.11] - 2026-06-01
692
885
 
693
886
  ### Added
887
+
694
888
  - **Pool:** AI fallback in `PoolSubgraphAgent` for broad DeFi questions.
695
889
 
696
890
  ## [0.2.10] - 2026-06-01
697
891
 
698
892
  ### Changed
893
+
699
894
  - **Wallet:** token amount validation ensures gas coverage.
700
895
 
701
896
  ## [0.2.9] - 2026-06-01
702
897
 
703
898
  ### Changed
899
+
704
900
  - **Core:** more accurate amount parsing; action button prompts capitalised.
705
901
 
706
902
  ## [0.2.8] - 2026-06-01
707
903
 
708
904
  ### Changed
905
+
709
906
  - **Core:** axios-based `ApiClient` for all services; `chainResolver` everywhere; error messages
710
907
  name the chain.
711
908
 
712
909
  ## [0.2.7] - 2026-05-29
713
910
 
714
911
  ### ⚠️ Breaking
912
+
715
913
  - **Wallet:** `WrapNativeTool` and `UnwrapNativeTool` removed.
716
914
 
717
915
  ### Changed
916
+
718
917
  - **NFT:** NFT sending moved to the `open-send-nft-form` flow.
719
918
  - **Wallet:** wallet tools use `requireUserChain`.
720
919
 
721
920
  ### Fixed
921
+
722
922
  - **Token:** Pantograph top-gainers requests retry.
723
923
 
724
924
  ## [0.2.6] - 2026-05-27
725
925
 
726
926
  ### Changed
927
+
727
928
  - **Core:** multi-language handling in router and subagents.
728
929
 
729
930
  ## [0.2.5] - 2026-05-27
@@ -733,16 +934,19 @@ _No functional changes (republish)._
733
934
  ## [0.2.4] - 2026-05-27
734
935
 
735
936
  ### Added
937
+
736
938
  - **Token:** buy button and prompt templates in `TrendingTokensTool`.
737
939
 
738
940
  ## [0.2.3] - 2026-05-27
739
941
 
740
942
  ### Added
943
+
741
944
  - **Build/RN:** `zod` dependency.
742
945
 
743
946
  ## [0.2.2] - 2026-05-27
744
947
 
745
948
  ### Added
949
+
746
950
  - **Core:** license key validation in `AgentCore`.
747
951
 
748
952
  ## [0.2.1] - 2026-05-27
@@ -750,6 +954,7 @@ _No functional changes (republish)._
750
954
  Wallet actions land.
751
955
 
752
956
  ### Added
957
+
753
958
  - **Wallet:** wallet action tools — `BuyTokenTool`, `SwapTokenTool`, `SendNativeTool`,
754
959
  `SendTokenTool`, approve — with plain / percent / USD / "max" amounts, spendable-balance and
755
960
  gas reserve checks, chain mismatch prompts and action buttons.
@@ -764,6 +969,7 @@ Wallet actions land.
764
969
  - **Build/RN:** `scripts/release.sh`.
765
970
 
766
971
  ### Removed
972
+
767
973
  - Moralis and Solana Cortex tools (replaced by Gemini Search AI); `TopLosersTool`.
768
974
 
769
975
  ## [0.1.1] - 2026-05-18
@@ -771,6 +977,7 @@ Wallet actions land.
771
977
  Initial release.
772
978
 
773
979
  ### Added
980
+
774
981
  - **Core:** `AgentCore` with Router + domain subagents, query rewriter, synthesizer,
775
982
  conversation history with storage abstraction, Upstash-backed knowledge base, suggested
776
983
  follow-up prompts, Gemini provider.