keyring-agent-core 0.2.18 → 0.2.20
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 +35 -6
- package/dist/index.js +61 -47
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1445,12 +1445,15 @@ interface RewriteResult {
|
|
|
1445
1445
|
*/
|
|
1446
1446
|
mentionedChain: string;
|
|
1447
1447
|
/**
|
|
1448
|
-
* True when answering THIS message
|
|
1449
|
-
* data (current prices, recent news, latest
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1452
|
-
*
|
|
1453
|
-
*
|
|
1448
|
+
* True when answering THIS message benefits from live/EXTERNAL web data —
|
|
1449
|
+
* covering BOTH time-sensitive data (current prices, recent news, latest
|
|
1450
|
+
* events, "today/now/latest", market comparisons) AND research / information-
|
|
1451
|
+
* seeking questions about a specific external subject (a project, token,
|
|
1452
|
+
* protocol, company, person, event, or technology — "what is X?", "tell me
|
|
1453
|
+
* about Y", "explain how Z works"). False only for greetings, chit-chat,
|
|
1454
|
+
* references to the conversation itself, the assistant's own identity, and
|
|
1455
|
+
* requests another subagent handles. Only consumed on the direct-answer path
|
|
1456
|
+
* (no subagent assignment) to decide whether to enable Google Search grounding.
|
|
1454
1457
|
*/
|
|
1455
1458
|
needsWebSearch: boolean;
|
|
1456
1459
|
/**
|
|
@@ -6200,6 +6203,32 @@ declare class BuyTokenTool extends BaseTool {
|
|
|
6200
6203
|
* leaves the LLM's assignment untouched, so a correct call is never worsened.
|
|
6201
6204
|
*/
|
|
6202
6205
|
private correctAmountSide;
|
|
6206
|
+
/**
|
|
6207
|
+
* Drop a PAY token the LLM invented. The model sometimes defaults the payment
|
|
6208
|
+
* side to the native coin — filling `pay_with_symbol` "ETH" / `pay_with_address`
|
|
6209
|
+
* "native" — even when the user only named the token to BUY ("buy A"). That
|
|
6210
|
+
* silently skips the pay-token picker (Branch 1) and spends a token the user
|
|
6211
|
+
* never chose. When a dest token IS named, a pay token IS set, and the raw
|
|
6212
|
+
* query contains NO standalone reference to that pay token (its symbol, its
|
|
6213
|
+
* address, the literal word "native", or the chain's native symbol), clear the
|
|
6214
|
+
* pay side so the picker runs. Conservative: only acts when the query is
|
|
6215
|
+
* available and the pay token is verifiably absent, so a genuinely-named pay
|
|
6216
|
+
* token is never lost.
|
|
6217
|
+
*/
|
|
6218
|
+
private dropUnmentionedPayToken;
|
|
6219
|
+
/**
|
|
6220
|
+
* Drop an AMOUNT the LLM invented. The user may give NO amount ("buy A", "buy
|
|
6221
|
+
* A with USDC") yet the model sometimes fills `buy_amount` / `pay_with_amount`
|
|
6222
|
+
* with a number the user never said — skipping the amount picker and seeding a
|
|
6223
|
+
* quote for a made-up size. When an amount carries DIGITS (a plain number,
|
|
6224
|
+
* "50%", or "5$") and NO number of the same value appears anywhere in the raw
|
|
6225
|
+
* query, it was invented → clear it so the amount picker runs. A digit-less
|
|
6226
|
+
* "max"/"all" intent is left untouched: the LLM normalizes those words across
|
|
6227
|
+
* languages, so the literal can't be matched against the query (and a random
|
|
6228
|
+
* "max" is an unlikely fabrication anyway). Only acts when the raw query is
|
|
6229
|
+
* available; value-based matching tolerates formatting drift ("0.5" vs ".5").
|
|
6230
|
+
*/
|
|
6231
|
+
private dropInventedAmounts;
|
|
6203
6232
|
/**
|
|
6204
6233
|
* Decide which named token an amount sits next to in the raw query by text
|
|
6205
6234
|
* proximity. Returns 'buy' / 'pay' for the closer symbol, or `null` when the
|