@thirdfy/agent-cli 0.2.83 → 0.2.84
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 +10 -0
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/core/fundingTokenIn.mjs +11 -1
- package/src/runtime/providerHints.mjs +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## [0.2.84] - 2026-10-10
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Bermuda private actions and `private: true`.** Provider hints list `bermuda_stealth_exit`, `bermuda_stealth_swap` and `bermuda_sweep_burners`, the trading hint documents `private: true` on `swap`, and the earn hint documents `private: true` on `deposit_earn_position` / `withdraw_earn_position` (Thirdfy API: private swap on a fresh burner where a Bermuda pool exists; refused rather than run publicly elsewhere). `docs/providers/bermuda.md` covers the private writes.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **Private writes no longer fail the public balance check.** `run` checked the execution wallet's `tokenIn` balance before a write, so `swap` with `private: true` and `bermuda_stealth_swap` stopped with `INSUFFICIENT_FUNDS` although they spend the shielded balance. Funding checks now skip `private: true` and every Bermuda write except `bermuda_deposit`. Pin: `test/funding-token-in.test.cjs`.
|
|
16
|
+
|
|
7
17
|
## [0.2.83] - 2026-10-08
|
|
8
18
|
|
|
9
19
|
### Fixed
|
package/README.md
CHANGED
|
@@ -40,10 +40,10 @@ 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.84
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
- **`
|
|
45
|
+
- **Private actions (Bermuda, Base Sepolia).** Hints cover `bermuda_stealth_exit`, `bermuda_stealth_swap` and `bermuda_sweep_burners`, plus `private: true` on `swap`, `deposit_earn_position` and `withdraw_earn_position` (Thirdfy API: the action runs from the shielded balance on a fresh burner where a Bermuda pool exists, or is refused; it never falls back to a public action). See [docs/providers/bermuda.md](./docs/providers/bermuda.md).
|
|
46
|
+
- **`run` no longer blocks private writes on the public balance check.** `private: true` and Bermuda writes (except `bermuda_deposit`) spend the shielded balance, so the execution wallet's `tokenIn` balance is not checked.
|
|
47
47
|
- See [CHANGELOG.md](./CHANGELOG.md) and GitHub Releases for older versions.
|
|
48
48
|
|
|
49
49
|
## Quick start
|
package/package.json
CHANGED
|
@@ -24,11 +24,21 @@ const POSITION_EXIT_ACTIONS = new Set([
|
|
|
24
24
|
'dogeos_laika_claim',
|
|
25
25
|
]);
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Shielded spends pay from the Bermuda pool, not the execution wallet: `private: true` on any action,
|
|
29
|
+
* and every Bermuda write except the public deposit into the pool.
|
|
30
|
+
*/
|
|
31
|
+
function spendsShieldedFunds(params, actionId) {
|
|
32
|
+
if (params.private === true) return true;
|
|
33
|
+
return actionId.startsWith('bermuda_') && actionId !== 'bermuda_deposit';
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
export function resolveTokenInForFunding(params, action) {
|
|
28
37
|
if (!params || typeof params !== 'object') return '';
|
|
38
|
+
const actionId = normalizeActionKey(action);
|
|
39
|
+
if (spendsShieldedFunds(params, actionId)) return '';
|
|
29
40
|
const explicit = String(params.tokenIn || '').trim();
|
|
30
41
|
if (explicit) return explicit;
|
|
31
|
-
const actionId = normalizeActionKey(action);
|
|
32
42
|
if (NATIVE_ETH_SPEND_ACTIONS.has(actionId)) return '';
|
|
33
43
|
if (POSITION_EXIT_ACTIONS.has(actionId)) return '';
|
|
34
44
|
if (params.amountEth != null && String(params.amountEth).trim() !== '') return '';
|
|
@@ -127,7 +127,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
127
127
|
canonicalWriteAction: 'swap',
|
|
128
128
|
supportedChains: [1, 10, 130, 137, 8453, 84532, 42161, 4663],
|
|
129
129
|
laneCompatibility:
|
|
130
|
-
'Kyber quote/build is live on Ethereum, Optimism, Unichain, Polygon, Base, and Arbitrum; sponsored Kyber execution is validated on Base only. Robinhood Chain (4663) uses Li.Fi Intents for spot swaps with user-pays gas. Gnosis FX uses the fx provider via CoW.',
|
|
130
|
+
'Kyber quote/build is live on Ethereum, Optimism, Unichain, Polygon, Base, and Arbitrum; sponsored Kyber execution is validated on Base only. Robinhood Chain (4663) uses Li.Fi Intents for spot swaps with user-pays gas. Gnosis FX uses the fx provider via CoW. Pass private: true to swap from the shielded (Bermuda) balance on a fresh burner where a Bermuda pool exists (Base Sepolia 84532 today); it fails instead of falling back to a public swap.',
|
|
131
131
|
credentialUx: 'Use normal Thirdfy login/delegation; do not use this provider for Hyperliquid, Lighter, or Polymarket.',
|
|
132
132
|
};
|
|
133
133
|
}
|
|
@@ -512,7 +512,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
512
512
|
],
|
|
513
513
|
orderManagementActions: ['deposit_earn_position', 'withdraw_earn_position', 'claim_earn_rewards'],
|
|
514
514
|
laneCompatibility:
|
|
515
|
-
'Generic earn writes use deposit_earn_position / withdraw_earn_position on normal Thirdfy policy/delegation rails; Yield.xyz incentive claims use claim_earn_rewards (no amount; optional passthrough from get_earn_position.claimableRewards). Routing selects Morpho, Aave, Curve, Vaults.fyi, or Yield.xyz adapters per provider/opportunity.',
|
|
515
|
+
'Generic earn writes use deposit_earn_position / withdraw_earn_position on normal Thirdfy policy/delegation rails; Yield.xyz incentive claims use claim_earn_rewards (no amount; optional passthrough from get_earn_position.claimableRewards). Routing selects Morpho, Aave, Curve, Vaults.fyi, or Yield.xyz adapters per provider/opportunity. With private: true (deposit_earn_position / withdraw_earn_position) the position is entered or exited from the shielded (Bermuda) USDC balance on allowlisted vaults where a Bermuda pool exists (Base Sepolia MetaMorpho today); a private withdraw without amount exits everything; otherwise it is refused, never run publicly.',
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
if (provider === 'capyfi') {
|
|
@@ -817,10 +817,13 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
817
817
|
'bermuda_transfer',
|
|
818
818
|
'bermuda_withdraw',
|
|
819
819
|
'bermuda_stealth_earn',
|
|
820
|
+
'bermuda_stealth_exit',
|
|
821
|
+
'bermuda_stealth_swap',
|
|
822
|
+
'bermuda_sweep_burners',
|
|
820
823
|
],
|
|
821
824
|
supportedChains: [84532],
|
|
822
825
|
laneCompatibility:
|
|
823
|
-
'Base Sepolia shielded USDC
|
|
826
|
+
'Base Sepolia shielded accounts (USDC, WETH, MetaMorpho vault shares). Catalog is flag-gated on the API host. Deposit is sent from the execution wallet; every other write is proven and relayed, so the execution wallet never appears: transfer, withdraw, private vault entry/exit (stealth earn/exit), private swap (stealth swap, best of Thirdfy routes and Uniswap v3, fresh burner per trade) and burner sweep. The regular swap takes private: true for the same private swap. Writes are capped at 5 USD; the sweep has no cap. Private writes bill the write_private tier and private swaps carry a privacy fee. Responses include privacyNotes.',
|
|
824
827
|
example:
|
|
825
828
|
'thirdfy-agent run --action get_bermuda_setup_status --params \'{"chainId":84532}\' --provider bermuda --json',
|
|
826
829
|
};
|