@thirdfy/agent-cli 0.2.36 → 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 +18 -0
- package/README.md +4 -4
- 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 +13 -10
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.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
|
+
|
|
19
|
+
## [0.2.37] - 2026-07-25
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Polymarket provider hints list `get_polymarket_user_positions` under read and order-management actions (Data API open positions; pairs with Thirdfy API action and MCP **0.0.80**).
|
|
24
|
+
|
|
7
25
|
## [0.2.36] - 2026-07-25
|
|
8
26
|
|
|
9
27
|
### Fixed
|
package/README.md
CHANGED
|
@@ -40,11 +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
|
-
-
|
|
47
|
-
-
|
|
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**.
|
|
48
48
|
|
|
49
49
|
Older versions: see [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
|
|
50
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
|
};
|
|
@@ -247,6 +247,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
247
247
|
'get_polymarket_onboarding_plan',
|
|
248
248
|
'get_polymarket_order',
|
|
249
249
|
'get_polymarket_user_orders',
|
|
250
|
+
'get_polymarket_user_positions',
|
|
250
251
|
],
|
|
251
252
|
discoveryFlow: [
|
|
252
253
|
'get_polymarket_tags or search_polymarket',
|
|
@@ -260,6 +261,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
260
261
|
'place_polymarket_order',
|
|
261
262
|
'get_polymarket_order',
|
|
262
263
|
'get_polymarket_user_orders',
|
|
264
|
+
'get_polymarket_user_positions',
|
|
263
265
|
'cancel_polymarket_order',
|
|
264
266
|
],
|
|
265
267
|
setupActions: [
|
|
@@ -337,9 +339,10 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
337
339
|
return {
|
|
338
340
|
provider,
|
|
339
341
|
category: 'earn',
|
|
340
|
-
canonicalReadAction: '
|
|
342
|
+
canonicalReadAction: 'get_earning_opportunities',
|
|
341
343
|
canonicalWriteAction: 'deposit_earn_position',
|
|
342
344
|
readActions: [
|
|
345
|
+
'get_earning_opportunities',
|
|
343
346
|
'get_earn_opportunities',
|
|
344
347
|
'get_earn_provider',
|
|
345
348
|
'get_earn_position',
|
|
@@ -362,7 +365,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
362
365
|
category: 'earn',
|
|
363
366
|
canonicalReadAction: 'get_capyfi_markets',
|
|
364
367
|
canonicalWriteAction: 'deposit_earn_position',
|
|
365
|
-
readActions: ['get_capyfi_markets', 'get_earn_opportunities', 'get_earn_position'],
|
|
368
|
+
readActions: ['get_capyfi_markets', 'get_earning_opportunities', 'get_earn_opportunities', 'get_earn_position'],
|
|
366
369
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
367
370
|
supportedChains: [1, 480],
|
|
368
371
|
laneCompatibility: 'CapyFi Compound-v2 supply on Ethereum and World Chain; Gnosis pending deployment addresses.',
|
|
@@ -401,7 +404,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
401
404
|
category: 'earn',
|
|
402
405
|
canonicalReadAction: 'get_aegis_pools',
|
|
403
406
|
canonicalWriteAction: 'deposit_aegis_lender',
|
|
404
|
-
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'],
|
|
405
408
|
orderManagementActions: [
|
|
406
409
|
'deposit_aegis_lender',
|
|
407
410
|
'redeem_aegis_lender',
|
|
@@ -422,7 +425,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
422
425
|
category: 'earn',
|
|
423
426
|
canonicalReadAction: 'get_curve_pools',
|
|
424
427
|
canonicalWriteAction: 'deposit_earn_position',
|
|
425
|
-
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'],
|
|
426
429
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
427
430
|
supportedChains: [8453],
|
|
428
431
|
laneCompatibility:
|
|
@@ -435,7 +438,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
435
438
|
category: 'earn',
|
|
436
439
|
canonicalReadAction: 'get-vaults-fyi-vaults',
|
|
437
440
|
canonicalWriteAction: 'deposit_earn_position',
|
|
438
|
-
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'],
|
|
439
442
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
440
443
|
laneCompatibility:
|
|
441
444
|
'Vaults.fyi writes are transaction-prep first. Thirdfy validates partner payloads, chain/user context, and allowed targets before returning or submitting prepared calls.',
|
|
@@ -449,7 +452,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
449
452
|
category: 'earn',
|
|
450
453
|
canonicalReadAction: 'get_yield_xyz_opportunities',
|
|
451
454
|
canonicalWriteAction: 'deposit_earn_position',
|
|
452
|
-
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'],
|
|
453
456
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position'],
|
|
454
457
|
laneCompatibility:
|
|
455
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.',
|
|
@@ -498,7 +501,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
498
501
|
'yield-xyz': 'deposit_earn_position',
|
|
499
502
|
};
|
|
500
503
|
const canonicalReadActions = {
|
|
501
|
-
earn: '
|
|
504
|
+
earn: 'get_earning_opportunities',
|
|
502
505
|
morpho: 'get_morpho_vaults',
|
|
503
506
|
aegis: 'get_aegis_pools',
|
|
504
507
|
curve: 'get_curve_pools',
|