@thirdfy/agent-cli 0.2.37 → 0.2.38
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 +12 -0
- package/README.md +4 -3
- package/package.json +1 -1
- package/src/core/envelope.mjs +8 -7
- package/src/runtime/actions/selection.mjs +1 -0
- package/src/runtime/providerHints.mjs +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.38] - 2026-07-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- JSON `--json` envelopes use sync stdout writes so `process.exit` after print no longer truncates piped output (offline doctor certify tests).
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Earn provider hints: canonical discovery `get_earning_opportunities` / `get-earning-opportunities`; `get_earn_opportunities` / `get-earn-opportunities` remain aliases. Pairs with Thirdfy API develop + `thirdfy-mcp` Unreleased.
|
|
16
|
+
- Lighter command reference: `complete_lighter_onboarding` example uses `--chain-id 8453` and `preferredSourceChainId: 8453` (not Arbitrum 42161).
|
|
17
|
+
- Lighter provider hints and command reference: repeat `complete_lighter_onboarding` on Base (chainId 8453) until `get_lighter_setup_status.ready`; API auto-orchestrates Ethereum registration. Pairs with Thirdfy API develop + `thirdfy-mcp` Unreleased.
|
|
18
|
+
|
|
7
19
|
## [0.2.37] - 2026-07-25
|
|
8
20
|
|
|
9
21
|
### Added
|
package/README.md
CHANGED
|
@@ -40,10 +40,11 @@ Run without global install:
|
|
|
40
40
|
npx @thirdfy/agent-cli --help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## What's new in v0.2.
|
|
43
|
+
## What's new in v0.2.38
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Earn discovery prefers `get_earning_opportunities` / `get-earning-opportunities` (legacy `get_earn_opportunities` aliases remain).
|
|
46
|
+
- Lighter onboarding hints: repeat `complete_lighter_onboarding` on Base (`8453`) until setup is ready.
|
|
47
|
+
- Pairs with MCP **0.0.81** and Thirdfy API **v3.13.26**.
|
|
47
48
|
|
|
48
49
|
Older versions: see [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
|
|
49
50
|
|
package/package.json
CHANGED
package/src/core/envelope.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { writeSync } from 'node:fs';
|
|
2
|
+
|
|
1
3
|
export function createCliError(code, message, payload = {}) {
|
|
2
4
|
const error = new Error(message);
|
|
3
5
|
error.payload = {
|
|
@@ -10,11 +12,10 @@ export function createCliError(code, message, payload = {}) {
|
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export function printEnvelope(payload, { jsonMode = false } = {}) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
process.stdout.write(`${JSON.stringify(payload.data || {}, null, 2)}\n`);
|
|
15
|
+
// writeSync: callers often process.exit() immediately after print. Async
|
|
16
|
+
// process.stdout.write can truncate JSON when stdout is a pipe (tests/CI).
|
|
17
|
+
const text = jsonMode
|
|
18
|
+
? `${JSON.stringify(payload, null, 2)}\n`
|
|
19
|
+
: `[${payload.success ? 'OK' : 'ERROR'}] ${payload.code}: ${payload.message}\n${JSON.stringify(payload.data || {}, null, 2)}\n`;
|
|
20
|
+
writeSync(1, text);
|
|
20
21
|
}
|
|
@@ -109,6 +109,7 @@ function inferActionProvider(action) {
|
|
|
109
109
|
'place-lighter-perps-order': 'lighter',
|
|
110
110
|
'cancel-lighter-perps-order': 'lighter',
|
|
111
111
|
'update-lighter-leverage': 'lighter',
|
|
112
|
+
'get-earning-opportunities': 'earn',
|
|
112
113
|
'get-earn-opportunities': 'earn',
|
|
113
114
|
'get-earn-provider': 'earn',
|
|
114
115
|
'get-earn-position': 'earn',
|
|
@@ -187,11 +187,11 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
187
187
|
],
|
|
188
188
|
sourceBridgeProvider: 'lifi',
|
|
189
189
|
funding:
|
|
190
|
-
'Run complete_lighter_onboarding on Base (chainId 8453) for
|
|
190
|
+
'Run complete_lighter_onboarding on Base (chainId 8453) for Li.Fi, CCTP intent, and USDC transfer. When margin is credited, the API auto-switches to Ethereum API key registration on the next complete_lighter_onboarding call. Minimum CCTP deposit is 5 USDC.',
|
|
191
191
|
laneCompatibility:
|
|
192
|
-
'Use agent_wallet
|
|
192
|
+
'Use agent_wallet and repeat complete_lighter_onboarding on chainId 8453 until get_lighter_setup_status.ready is true. Perps writes use thirdfy, hybrid, or agent_wallet with a stored lighter_api_key credential. Gator covers EVM funding and setup only, not L2 orders.',
|
|
193
193
|
setupExample:
|
|
194
|
-
'actions --provider lighter -> complete_lighter_onboarding (chainId 8453, agent_wallet) ->
|
|
194
|
+
'actions --provider lighter -> complete_lighter_onboarding (chainId 8453, agent_wallet) -> repeat until get_lighter_setup_status.ready -> place_lighter_perps_order',
|
|
195
195
|
example:
|
|
196
196
|
'thirdfy-agent actions --provider lighter && thirdfy-agent preflight --action place_lighter_perps_order --params \'{"accountIndex":1,"apiKeyIndex":4,"marketId":0,"baseAmount":100,"price":310000,"isAsk":false,"orderType":"limit"}\'',
|
|
197
197
|
};
|
|
@@ -339,9 +339,10 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
339
339
|
return {
|
|
340
340
|
provider,
|
|
341
341
|
category: 'earn',
|
|
342
|
-
canonicalReadAction: '
|
|
342
|
+
canonicalReadAction: 'get_earning_opportunities',
|
|
343
343
|
canonicalWriteAction: 'deposit_earn_position',
|
|
344
344
|
readActions: [
|
|
345
|
+
'get_earning_opportunities',
|
|
345
346
|
'get_earn_opportunities',
|
|
346
347
|
'get_earn_provider',
|
|
347
348
|
'get_earn_position',
|
|
@@ -364,7 +365,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
364
365
|
category: 'earn',
|
|
365
366
|
canonicalReadAction: 'get_capyfi_markets',
|
|
366
367
|
canonicalWriteAction: 'deposit_earn_position',
|
|
367
|
-
readActions: ['get_capyfi_markets', 'get_earn_opportunities', 'get_earn_position'],
|
|
368
|
+
readActions: ['get_capyfi_markets', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_position'],
|
|
368
369
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
369
370
|
supportedChains: [1, 480],
|
|
370
371
|
laneCompatibility: 'CapyFi Compound-v2 supply on Ethereum and World Chain; Gnosis pending deployment addresses.',
|
|
@@ -403,7 +404,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
403
404
|
category: 'earn',
|
|
404
405
|
canonicalReadAction: 'get_aegis_pools',
|
|
405
406
|
canonicalWriteAction: 'deposit_aegis_lender',
|
|
406
|
-
readActions: ['get_earn_opportunities', 'get_aegis_pools', 'get_aegis_pool_state', 'get_aegis_vault_state', 'get_earn_provider'],
|
|
407
|
+
readActions: ['get_earning_opportunities', 'get_earn_opportunities', 'get_aegis_pools', 'get_aegis_pool_state', 'get_aegis_vault_state', 'get_earn_provider'],
|
|
407
408
|
orderManagementActions: [
|
|
408
409
|
'deposit_aegis_lender',
|
|
409
410
|
'redeem_aegis_lender',
|
|
@@ -424,7 +425,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
424
425
|
category: 'earn',
|
|
425
426
|
canonicalReadAction: 'get_curve_pools',
|
|
426
427
|
canonicalWriteAction: 'deposit_earn_position',
|
|
427
|
-
readActions: ['get_curve_pools', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
428
|
+
readActions: ['get_curve_pools', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
428
429
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
429
430
|
supportedChains: [8453],
|
|
430
431
|
laneCompatibility:
|
|
@@ -437,7 +438,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
437
438
|
category: 'earn',
|
|
438
439
|
canonicalReadAction: 'get-vaults-fyi-vaults',
|
|
439
440
|
canonicalWriteAction: 'deposit_earn_position',
|
|
440
|
-
readActions: ['get-vaults-fyi-vaults', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
441
|
+
readActions: ['get-vaults-fyi-vaults', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
441
442
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
442
443
|
laneCompatibility:
|
|
443
444
|
'Vaults.fyi writes are transaction-prep first. Thirdfy validates partner payloads, chain/user context, and allowed targets before returning or submitting prepared calls.',
|
|
@@ -451,7 +452,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
451
452
|
category: 'earn',
|
|
452
453
|
canonicalReadAction: 'get_yield_xyz_opportunities',
|
|
453
454
|
canonicalWriteAction: 'deposit_earn_position',
|
|
454
|
-
readActions: ['get_yield_xyz_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
455
|
+
readActions: ['get_yield_xyz_opportunities', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
455
456
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
456
457
|
laneCompatibility:
|
|
457
458
|
'Yield.xyz writes are transaction-prep first. Thirdfy calls Yield.xyz directly and validates returned unsigned transactions with @yieldxyz/shield before signing or returning prepared calls.',
|
|
@@ -500,7 +501,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
500
501
|
'yield-xyz': 'deposit_earn_position',
|
|
501
502
|
};
|
|
502
503
|
const canonicalReadActions = {
|
|
503
|
-
earn: '
|
|
504
|
+
earn: 'get_earning_opportunities',
|
|
504
505
|
morpho: 'get_morpho_vaults',
|
|
505
506
|
aegis: 'get_aegis_pools',
|
|
506
507
|
curve: 'get_curve_pools',
|