@thirdfy/agent-cli 0.2.37 → 0.2.39
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 +18 -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 +15 -13
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.39] - 2026-07-27
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Morpho provider hints: `supportedChains` `[8453, 4663]`; Base MetaMorpho V1 writable, Robinhood Vault V2 read-only until deposit capacity opens. Updated `docs/providers/earn-morpho.md`. Pairs with Thirdfy API develop + `thirdfy-mcp` **0.0.82**.
|
|
12
|
+
|
|
13
|
+
## [0.2.38] - 2026-07-25
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- JSON `--json` envelopes use sync stdout writes so `process.exit` after print no longer truncates piped output (offline doctor certify tests).
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- 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.
|
|
22
|
+
- Lighter command reference: `complete_lighter_onboarding` example uses `--chain-id 8453` and `preferredSourceChainId: 8453` (not Arbitrum 42161).
|
|
23
|
+
- 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.
|
|
24
|
+
|
|
7
25
|
## [0.2.37] - 2026-07-25
|
|
8
26
|
|
|
9
27
|
### 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.39
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Morpho hints: Base MetaMorpho V1 writes on `8453`; Robinhood Vault V2 on `4663` is discoverable read-only until `maxDeposit > 0`. Prefer `depositPlan` from `get_earn_opportunities`.
|
|
46
|
+
- Updated [`docs/providers/earn-morpho.md`](./docs/providers/earn-morpho.md) for GraphQL discovery and V1 vs V2 behavior.
|
|
47
|
+
- Pairs with `thirdfy-mcp` **0.0.82** and Thirdfy API develop (Morpho GraphQL integration).
|
|
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.',
|
|
@@ -391,10 +392,11 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
391
392
|
canonicalWriteAction: 'deposit_earn_position',
|
|
392
393
|
readActions: ['get_morpho_vaults', 'get_earn_provider', 'get_earn_position'],
|
|
393
394
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
394
|
-
supportedChains: [8453,
|
|
395
|
-
laneCompatibility:
|
|
395
|
+
supportedChains: [8453, 4663],
|
|
396
|
+
laneCompatibility:
|
|
397
|
+
'Base MetaMorpho V1 vaults are writable (use depositPlan from discovery). Robinhood Vault V2 on 4663 is discoverable read-only until maxDeposit > 0. Deposits require ERC-20 approval before deposit_earn_position.',
|
|
396
398
|
example:
|
|
397
|
-
'thirdfy-agent
|
|
399
|
+
'thirdfy-agent run --action get_earn_opportunities --params \'{"providerId":"morpho","chainId":8453,"asset":"USDC"}\' && thirdfy-agent run --action deposit_earn_position --params \'{"providerId":"morpho","chainId":8453,"vaultAddress":"0x...","tokenAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"0.1","tokenDecimals":6}\'',
|
|
398
400
|
};
|
|
399
401
|
}
|
|
400
402
|
if (provider === 'aegis') {
|
|
@@ -403,7 +405,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
403
405
|
category: 'earn',
|
|
404
406
|
canonicalReadAction: 'get_aegis_pools',
|
|
405
407
|
canonicalWriteAction: 'deposit_aegis_lender',
|
|
406
|
-
readActions: ['get_earn_opportunities', 'get_aegis_pools', 'get_aegis_pool_state', 'get_aegis_vault_state', 'get_earn_provider'],
|
|
408
|
+
readActions: ['get_earning_opportunities', 'get_earn_opportunities', 'get_aegis_pools', 'get_aegis_pool_state', 'get_aegis_vault_state', 'get_earn_provider'],
|
|
407
409
|
orderManagementActions: [
|
|
408
410
|
'deposit_aegis_lender',
|
|
409
411
|
'redeem_aegis_lender',
|
|
@@ -424,7 +426,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
424
426
|
category: 'earn',
|
|
425
427
|
canonicalReadAction: 'get_curve_pools',
|
|
426
428
|
canonicalWriteAction: 'deposit_earn_position',
|
|
427
|
-
readActions: ['get_curve_pools', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
429
|
+
readActions: ['get_curve_pools', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
428
430
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
429
431
|
supportedChains: [8453],
|
|
430
432
|
laneCompatibility:
|
|
@@ -437,7 +439,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
437
439
|
category: 'earn',
|
|
438
440
|
canonicalReadAction: 'get-vaults-fyi-vaults',
|
|
439
441
|
canonicalWriteAction: 'deposit_earn_position',
|
|
440
|
-
readActions: ['get-vaults-fyi-vaults', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
442
|
+
readActions: ['get-vaults-fyi-vaults', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
441
443
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
442
444
|
laneCompatibility:
|
|
443
445
|
'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 +453,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
451
453
|
category: 'earn',
|
|
452
454
|
canonicalReadAction: 'get_yield_xyz_opportunities',
|
|
453
455
|
canonicalWriteAction: 'deposit_earn_position',
|
|
454
|
-
readActions: ['get_yield_xyz_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
456
|
+
readActions: ['get_yield_xyz_opportunities', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_provider', 'get_earn_position'],
|
|
455
457
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
456
458
|
laneCompatibility:
|
|
457
459
|
'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 +502,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
500
502
|
'yield-xyz': 'deposit_earn_position',
|
|
501
503
|
};
|
|
502
504
|
const canonicalReadActions = {
|
|
503
|
-
earn: '
|
|
505
|
+
earn: 'get_earning_opportunities',
|
|
504
506
|
morpho: 'get_morpho_vaults',
|
|
505
507
|
aegis: 'get_aegis_pools',
|
|
506
508
|
curve: 'get_curve_pools',
|