@thirdfy/agent-cli 0.1.43 → 0.1.45
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 +20 -0
- package/README.md +2 -1
- package/bin/thirdfy-agent.mjs +109 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.45] - 2026-05-22
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Polymarket operator commands: `polymarket status` (wraps `get_polymarket_setup_status` with balance/geoblock flags), `polymarket setup` (onboarding plan + next-step guide), and `polymarket dry-run` (preflight for `place_polymarket_order`). Pairs with thirdfy-api-v2 **v3.4.35** EU egress readiness fields.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- [`docs/command-reference.md`](./docs/command-reference.md) documents the new Polymarket commands and agent-scoped setup status params.
|
|
16
|
+
- Polymarket commands default `--run-mode` via `flags.runMode` (`agent_wallet` when omitted) and use `parseBooleanFlag` for `--include-balance` / `--include-geoblock`.
|
|
17
|
+
- `polymarket setup --json` emits a single JSON envelope by embedding setup guidance in the preflight payload.
|
|
18
|
+
- Polymarket provider hints list `get_polymarket_onboarding_plan` in read/setup actions so `actions --provider polymarket --json` discovers the setup command's underlying action.
|
|
19
|
+
|
|
20
|
+
## [0.1.44] - 2026-05-20
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Aegis AgentKit provider hints for `get_aegis_pools`, pool/vault reads, and gated Engine writes on Base `8453` and Unichain `130` (fail-closed until partner Engine addresses/ABIs). Pairs with thirdfy-api-v2 **v3.4.28**.
|
|
25
|
+
- Hyperliquid provider hints list `search_hyperliquid_markets` for joined perps meta + mids discovery (pairs with API **v3.4.28**).
|
|
26
|
+
|
|
7
27
|
## [0.1.43] - 2026-05-19
|
|
8
28
|
|
|
9
29
|
### Changed
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ npx @thirdfy/agent-cli --help
|
|
|
42
42
|
|
|
43
43
|
## Release notes
|
|
44
44
|
|
|
45
|
-
Version history and highlights: [CHANGELOG.md](./CHANGELOG.md). **v0.1.43** injects Hyperliquid `userAddress` from the managed execution wallet for solo `agent_wallet` reads when omitted (pairs with API **v3.4.27**). **v0.1.42** persists API `executionWallets` from email login, updates `doctor auth` / onboarding help for agent execution wallet funding vs owner embedded auth wallet, and documents Bridge2 `FUND_AGENT_EXECUTION_WALLET` remediation (pairs with API **v3.4.25**). **v0.1.41** documents Hyperliquid `get_hyperliquid_funding_status` as setup step 0, Bridge2 sender custody, and `deposit_hyperliquid_bridge --estimated-amount-usd` (pairs with API **v3.4.24**). **v0.1.40** fixes email/bootstrap credential persistence when the API returns nested registration payloads, so owner-session onboarding can save the hidden execution identity without exposing a raw agent API key. **v0.1.39** makes `agent_wallet` the fresh solo default, adds framework guidance for Hermes/OpenClaw/Claude Managed Agents, clarifies Gator/ERC-7710 delegation flows, and keeps BYOW/self plus hybrid/thirdfy mode switching explicit. **v0.1.38** is a **documentation and metadata patch**: it republishes to npm so the package homepage matches the updated `README.md` on `main`, and aligns root `package-lock.json` version fields with `package.json`. **v0.1.37** adds **email OTP** `thirdfy-agent login email` (send code, then complete with `--code --accept-terms`), **`help onboarding`**, **`doctor auth`**, **`wallet list`**, and **masked `whoami`** output so agents and operators get first-run guidance without dumping secrets. Earlier releases added provider discovery parity, portfolio analytics, managed-wallet swap normalization, and **self/build-tx** swap human-decimal `amountIn` parity when using `amountInHuman` + `tokenInDecimals`.
|
|
45
|
+
Version history and highlights: [CHANGELOG.md](./CHANGELOG.md). **v0.1.45** adds `polymarket status`, `polymarket setup`, and `polymarket dry-run` for agent-scoped setup/geoblock preflight (pairs with API **v3.4.35**). **v0.1.44** adds Aegis provider hints for Base and Unichain earn reads and fail-closed Engine writes (pairs with API **v3.4.28**). **v0.1.43** injects Hyperliquid `userAddress` from the managed execution wallet for solo `agent_wallet` reads when omitted (pairs with API **v3.4.27**). **v0.1.42** persists API `executionWallets` from email login, updates `doctor auth` / onboarding help for agent execution wallet funding vs owner embedded auth wallet, and documents Bridge2 `FUND_AGENT_EXECUTION_WALLET` remediation (pairs with API **v3.4.25**). **v0.1.41** documents Hyperliquid `get_hyperliquid_funding_status` as setup step 0, Bridge2 sender custody, and `deposit_hyperliquid_bridge --estimated-amount-usd` (pairs with API **v3.4.24**). **v0.1.40** fixes email/bootstrap credential persistence when the API returns nested registration payloads, so owner-session onboarding can save the hidden execution identity without exposing a raw agent API key. **v0.1.39** makes `agent_wallet` the fresh solo default, adds framework guidance for Hermes/OpenClaw/Claude Managed Agents, clarifies Gator/ERC-7710 delegation flows, and keeps BYOW/self plus hybrid/thirdfy mode switching explicit. **v0.1.38** is a **documentation and metadata patch**: it republishes to npm so the package homepage matches the updated `README.md` on `main`, and aligns root `package-lock.json` version fields with `package.json`. **v0.1.37** adds **email OTP** `thirdfy-agent login email` (send code, then complete with `--code --accept-terms`), **`help onboarding`**, **`doctor auth`**, **`wallet list`**, and **masked `whoami`** output so agents and operators get first-run guidance without dumping secrets. Earlier releases added provider discovery parity, portfolio analytics, managed-wallet swap normalization, and **self/build-tx** swap human-decimal `amountIn` parity when using `amountInHuman` + `tokenInDecimals`.
|
|
46
46
|
|
|
47
47
|
**Maintainers — npm:** follow [docs/releasing.md](./docs/releasing.md). From a clone with gitignored `.env`, use `npm run publish:npm:local -- --dry-run` then `npm run publish:npm:local`. Or run `npm run release:npm` after exporting tokens in the shell. Never commit npm tokens — use [.env.example](./.env.example) as a template only.
|
|
48
48
|
|
|
@@ -294,6 +294,7 @@ Provider and venue guides are kept outside `README` so this page stays stable as
|
|
|
294
294
|
|
|
295
295
|
- Discovery: `catalogs list`, `actions` (optional `--provider`, `--chain-id`; see [`docs/command-reference.md`](./docs/command-reference.md) for trading vs earn vs prediction providers and case-insensitive matching)
|
|
296
296
|
- Execution: `preflight`, `run`, `intent-status`, `jeff preflight`, `jeff trade`, `jeff status`
|
|
297
|
+
- Polymarket: `polymarket status`, `polymarket setup`, `polymarket dry-run`
|
|
297
298
|
- Managed signer execution: `wallet execute`, `wallet sign`, `wallet submit`, `agent run`
|
|
298
299
|
- Profiles: `profile init`, `profile use`, `profile show`, `whoami`
|
|
299
300
|
- Onboarding: `login email`, `help onboarding`, `doctor auth`, `wallet list`, `bootstrap begin`, `bootstrap complete`, `onboarding begin`, `onboarding complete`, `agent auth challenge`, `agent auth verify`, `agent register`, `agent key rotate`, `agent key revoke`, `developer bootstrap`
|
package/bin/thirdfy-agent.mjs
CHANGED
|
@@ -219,6 +219,15 @@ async function main() {
|
|
|
219
219
|
case 'wallet list':
|
|
220
220
|
await commandWalletList(context, subFlags);
|
|
221
221
|
return;
|
|
222
|
+
case 'polymarket status':
|
|
223
|
+
await commandPolymarketStatus(context, subFlags);
|
|
224
|
+
return;
|
|
225
|
+
case 'polymarket setup':
|
|
226
|
+
await commandPolymarketSetup(context, subFlags);
|
|
227
|
+
return;
|
|
228
|
+
case 'polymarket dry-run':
|
|
229
|
+
await commandPolymarketDryRun(context, subFlags);
|
|
230
|
+
return;
|
|
222
231
|
default:
|
|
223
232
|
break;
|
|
224
233
|
}
|
|
@@ -479,6 +488,7 @@ function getTradingProviderHint(providerId) {
|
|
|
479
488
|
readActions: [
|
|
480
489
|
'get_hyperliquid_perps_meta',
|
|
481
490
|
'get_hyperliquid_all_mids',
|
|
491
|
+
'search_hyperliquid_markets',
|
|
482
492
|
'get_hyperliquid_l2_book',
|
|
483
493
|
'get_hyperliquid_candles',
|
|
484
494
|
'get_hyperliquid_user_state',
|
|
@@ -540,7 +550,7 @@ function getTradingProviderHint(providerId) {
|
|
|
540
550
|
laneCompatibility:
|
|
541
551
|
'Use self only for setup signatures or Arbitrum funding transactions. Perps orders should use thirdfy, hybrid, or agent_wallet.',
|
|
542
552
|
setupExample:
|
|
543
|
-
'actions --provider hyperliquid -> get_hyperliquid_funding_status -> get_hyperliquid_onboarding_plan -> prepare_hyperliquid_onboarding -> get_bridge_quote/execute_bridge if source is Base -> deposit_hyperliquid_bridge on 42161 -> approve_hyperliquid_agent -> approve_hyperliquid_builder_fee if required -> get_hyperliquid_setup_status',
|
|
553
|
+
'actions --provider hyperliquid -> search_hyperliquid_markets (or get_hyperliquid_perps_meta + get_hyperliquid_all_mids) -> get_hyperliquid_funding_status -> get_hyperliquid_onboarding_plan -> prepare_hyperliquid_onboarding -> get_bridge_quote/execute_bridge if source is Base -> deposit_hyperliquid_bridge on 42161 -> approve_hyperliquid_agent -> approve_hyperliquid_builder_fee if required -> get_hyperliquid_setup_status',
|
|
544
554
|
example:
|
|
545
555
|
'thirdfy-agent actions --provider hyperliquid && thirdfy-agent preflight --action place_hyperliquid_perps_order --params \'{"coin":"ETH","isBuy":true,"size":0.01,"limitPx":3500,"orderType":"market"}\'',
|
|
546
556
|
};
|
|
@@ -593,6 +603,7 @@ function getTradingProviderHint(providerId) {
|
|
|
593
603
|
'get_polymarket_prices',
|
|
594
604
|
'get_polymarket_price_history',
|
|
595
605
|
'get_polymarket_setup_status',
|
|
606
|
+
'get_polymarket_onboarding_plan',
|
|
596
607
|
'get_polymarket_order',
|
|
597
608
|
'get_polymarket_user_orders',
|
|
598
609
|
],
|
|
@@ -602,7 +613,7 @@ function getTradingProviderHint(providerId) {
|
|
|
602
613
|
'get_polymarket_market or get_polymarket_markets',
|
|
603
614
|
'get_polymarket_order_book',
|
|
604
615
|
'get_polymarket_prices or get_polymarket_price_history',
|
|
605
|
-
'get_polymarket_setup_status before place_polymarket_order',
|
|
616
|
+
'get_polymarket_setup_status and get_polymarket_onboarding_plan before place_polymarket_order',
|
|
606
617
|
],
|
|
607
618
|
orderManagementActions: [
|
|
608
619
|
'place_polymarket_order',
|
|
@@ -612,6 +623,7 @@ function getTradingProviderHint(providerId) {
|
|
|
612
623
|
],
|
|
613
624
|
setupActions: [
|
|
614
625
|
'get_polymarket_setup_status',
|
|
626
|
+
'get_polymarket_onboarding_plan',
|
|
615
627
|
'agent_wallet_setup:ensure_agent_wallet_deposit_wallet',
|
|
616
628
|
'agent_wallet_setup:deploy_deposit_wallet_and_set_approvals',
|
|
617
629
|
'agent_wallet_setup:create_or_derive_clob_credentials',
|
|
@@ -669,6 +681,9 @@ function getTradingProviderHint(providerId) {
|
|
|
669
681
|
'get_earn_provider',
|
|
670
682
|
'get_earn_position',
|
|
671
683
|
'get_morpho_vaults',
|
|
684
|
+
'get_aegis_pools',
|
|
685
|
+
'get_aegis_pool_state',
|
|
686
|
+
'get_aegis_vault_state',
|
|
672
687
|
'get_curve_pools',
|
|
673
688
|
'get_vaults_fyi_vaults',
|
|
674
689
|
'get_yield_xyz_opportunities',
|
|
@@ -692,6 +707,27 @@ function getTradingProviderHint(providerId) {
|
|
|
692
707
|
'thirdfy-agent actions --provider morpho && thirdfy-agent run --action deposit_earn_position --params \'{"providerId":"morpho","vaultAddress":"0x...","tokenAddress":"0x...","amount":"10","chainId":8453}\'',
|
|
693
708
|
};
|
|
694
709
|
}
|
|
710
|
+
if (provider === 'aegis') {
|
|
711
|
+
return {
|
|
712
|
+
provider,
|
|
713
|
+
category: 'earn',
|
|
714
|
+
canonicalReadAction: 'get_aegis_pools',
|
|
715
|
+
canonicalWriteAction: 'deposit_aegis_lender',
|
|
716
|
+
readActions: ['get_earn_opportunities', 'get_aegis_pools', 'get_aegis_pool_state', 'get_aegis_vault_state', 'get_earn_provider'],
|
|
717
|
+
orderManagementActions: [
|
|
718
|
+
'deposit_aegis_lender',
|
|
719
|
+
'redeem_aegis_lender',
|
|
720
|
+
'open_aegis_vault_and_borrow',
|
|
721
|
+
'repay_aegis_vault',
|
|
722
|
+
'stabilize_aegis_vault',
|
|
723
|
+
],
|
|
724
|
+
supportedChains: [8453, 130],
|
|
725
|
+
laneCompatibility:
|
|
726
|
+
'Aegis reads are live on Base allowlisted pools and Unichain DFM defaults. Engine writes use AegisRouterV1 with router-only approvals and eth_call simulation; writes stay fail-closed until partner addresses, PoolKeys, Engine ABI/opcodes, and audit sign-off. Use agent_wallet / walletExecute for solo Hermes — not execute-intent.',
|
|
727
|
+
example:
|
|
728
|
+
'thirdfy-agent actions --provider aegis --chain-id 8453 --json && thirdfy-agent run --action get_aegis_pool_state --run-mode agent_wallet --params \'{"pool":"tfy-usdc","chainId":8453}\'',
|
|
729
|
+
};
|
|
730
|
+
}
|
|
695
731
|
if (provider === 'curve') {
|
|
696
732
|
return {
|
|
697
733
|
provider,
|
|
@@ -751,6 +787,7 @@ function getCachedProviderHintFromCapabilities(provider) {
|
|
|
751
787
|
prediction: 'place_prediction_order',
|
|
752
788
|
earn: 'deposit_earn_position',
|
|
753
789
|
morpho: 'deposit_earn_position',
|
|
790
|
+
aegis: 'deposit_aegis_lender',
|
|
754
791
|
curve: 'deposit_earn_position',
|
|
755
792
|
'vaults-fyi': 'deposit_earn_position',
|
|
756
793
|
'yield-xyz': 'deposit_earn_position',
|
|
@@ -758,6 +795,7 @@ function getCachedProviderHintFromCapabilities(provider) {
|
|
|
758
795
|
const canonicalReadActions = {
|
|
759
796
|
earn: 'get_earn_opportunities',
|
|
760
797
|
morpho: 'get_morpho_vaults',
|
|
798
|
+
aegis: 'get_aegis_pools',
|
|
761
799
|
curve: 'get_curve_pools',
|
|
762
800
|
'vaults-fyi': 'get_vaults_fyi_vaults',
|
|
763
801
|
'yield-xyz': 'get_yield_xyz_opportunities',
|
|
@@ -1240,12 +1278,25 @@ async function commandPreflight(ctx, flags, capabilities) {
|
|
|
1240
1278
|
runMode,
|
|
1241
1279
|
resolvedAction: resolved.resolvedAction,
|
|
1242
1280
|
});
|
|
1281
|
+
const data = flags.__polymarketSetupGuide
|
|
1282
|
+
? {
|
|
1283
|
+
...normalized,
|
|
1284
|
+
setupGuide: {
|
|
1285
|
+
message:
|
|
1286
|
+
'Review onboarding plan output above. Run agent-wallet setup via API when liveOrderReady is false. Fund pUSD on deposit wallet before live orders.',
|
|
1287
|
+
nextCommands: [
|
|
1288
|
+
'thirdfy-agent polymarket status --agent-key <key> --json',
|
|
1289
|
+
'thirdfy-agent preflight --action get_polymarket_setup_status --params \'{"agentKey":"<key>","includeGeoblock":true}\' --json',
|
|
1290
|
+
],
|
|
1291
|
+
},
|
|
1292
|
+
}
|
|
1293
|
+
: normalized;
|
|
1243
1294
|
const preflightBlocked = !normalized.success && Boolean(normalized.preflightBlocked);
|
|
1244
1295
|
printEnvelope({
|
|
1245
1296
|
success: normalized.success,
|
|
1246
1297
|
code: normalized.success ? 'PREFLIGHT_OK' : preflightBlocked ? 'PREFLIGHT_BLOCKED' : 'PREFLIGHT_FAILED',
|
|
1247
1298
|
message: backendResult.message,
|
|
1248
|
-
data
|
|
1299
|
+
data,
|
|
1249
1300
|
meta: {
|
|
1250
1301
|
apiBase: ctx.apiBase,
|
|
1251
1302
|
catalog: flags.catalog || null,
|
|
@@ -4085,6 +4136,7 @@ function inferActionProvider(action) {
|
|
|
4085
4136
|
'get-governance-v2-breakdowns': 'governance-v2',
|
|
4086
4137
|
'get-hyperliquid-perps-meta': 'hyperliquid',
|
|
4087
4138
|
'get-hyperliquid-all-mids': 'hyperliquid',
|
|
4139
|
+
'search-hyperliquid-markets': 'hyperliquid',
|
|
4088
4140
|
'get-hyperliquid-l2-book': 'hyperliquid',
|
|
4089
4141
|
'get-hyperliquid-candles': 'hyperliquid',
|
|
4090
4142
|
'get-hyperliquid-user-state': 'hyperliquid',
|
|
@@ -4121,6 +4173,14 @@ function inferActionProvider(action) {
|
|
|
4121
4173
|
'get-curve-pool-details': 'curve',
|
|
4122
4174
|
'deposit-curve-pool': 'curve',
|
|
4123
4175
|
'withdraw-curve-pool': 'curve',
|
|
4176
|
+
'get-aegis-pools': 'aegis',
|
|
4177
|
+
'get-aegis-pool-state': 'aegis',
|
|
4178
|
+
'get-aegis-vault-state': 'aegis',
|
|
4179
|
+
'deposit-aegis-lender': 'aegis',
|
|
4180
|
+
'redeem-aegis-lender': 'aegis',
|
|
4181
|
+
'open-aegis-vault-and-borrow': 'aegis',
|
|
4182
|
+
'repay-aegis-vault': 'aegis',
|
|
4183
|
+
'stabilize-aegis-vault': 'aegis',
|
|
4124
4184
|
'get-vaults-fyi-vaults': 'vaults-fyi',
|
|
4125
4185
|
'get-vaults-fyi-opportunities': 'vaults-fyi',
|
|
4126
4186
|
'get-yield-xyz-opportunities': 'yield-xyz',
|
|
@@ -4155,6 +4215,7 @@ function inferActionProvider(action) {
|
|
|
4155
4215
|
if (key.includes('vaults-fyi')) return 'vaults-fyi';
|
|
4156
4216
|
if (key.includes('yield-xyz')) return 'yield-xyz';
|
|
4157
4217
|
if (key.includes('morpho')) return 'morpho';
|
|
4218
|
+
if (key.includes('aegis')) return 'aegis';
|
|
4158
4219
|
if (key.includes('curve')) return 'curve';
|
|
4159
4220
|
if (key.includes('earn') || key.includes('yield') || key.includes('vault')) return 'earn';
|
|
4160
4221
|
if (key.includes('bridge')) return 'bridge';
|
|
@@ -4205,9 +4266,9 @@ function actionMatchesProvider(action, requestedProvider, allActions) {
|
|
|
4205
4266
|
if (requestedProvider === 'bridge') return isProviderActionKey(action, 'bridge');
|
|
4206
4267
|
if (requestedProvider.startsWith('dogeos')) return isProviderActionKey(action, requestedProvider);
|
|
4207
4268
|
if (requestedProvider === 'earn') {
|
|
4208
|
-
return provider === 'earn' || provider === 'morpho' || provider === 'curve' || provider === 'vaults-fyi' || provider === 'yield-xyz' || isEarnCatalogAction(action);
|
|
4269
|
+
return provider === 'earn' || provider === 'morpho' || provider === 'aegis' || provider === 'curve' || provider === 'vaults-fyi' || provider === 'yield-xyz' || isEarnCatalogAction(action);
|
|
4209
4270
|
}
|
|
4210
|
-
if (requestedProvider === 'morpho' || requestedProvider === 'curve' || requestedProvider === 'vaults-fyi' || requestedProvider === 'yield-xyz') {
|
|
4271
|
+
if (requestedProvider === 'morpho' || requestedProvider === 'aegis' || requestedProvider === 'curve' || requestedProvider === 'vaults-fyi' || requestedProvider === 'yield-xyz') {
|
|
4211
4272
|
const hasProtocolSpecificEarnRows = allActions.some((candidate) => getActionProviderWithInference(candidate) === requestedProvider);
|
|
4212
4273
|
return isProviderActionKey(action, requestedProvider) || (!hasProtocolSpecificEarnRows && isEarnCatalogAction(action));
|
|
4213
4274
|
}
|
|
@@ -4826,6 +4887,46 @@ function printEnvelope(payload) {
|
|
|
4826
4887
|
process.stdout.write(`${JSON.stringify(payload.data || {}, null, 2)}\n`);
|
|
4827
4888
|
}
|
|
4828
4889
|
|
|
4890
|
+
async function commandPolymarketStatus(ctx, flags) {
|
|
4891
|
+
const params = {
|
|
4892
|
+
includeBalance: parseBooleanFlag(flags.includeBalance, true),
|
|
4893
|
+
includeGeoblock: parseBooleanFlag(flags.includeGeoblock, true),
|
|
4894
|
+
};
|
|
4895
|
+
if (flags.agentKey) params.agentKey = String(flags.agentKey);
|
|
4896
|
+
if (flags.amountPusd) params.amountPusd = String(flags.amountPusd);
|
|
4897
|
+
const capabilities = await negotiateCapabilities(ctx);
|
|
4898
|
+
flags.action = 'get_polymarket_setup_status';
|
|
4899
|
+
flags.params = JSON.stringify(params);
|
|
4900
|
+
if (!flags.runMode) flags.runMode = 'agent_wallet';
|
|
4901
|
+
await commandPreflight(ctx, flags, capabilities);
|
|
4902
|
+
}
|
|
4903
|
+
|
|
4904
|
+
async function commandPolymarketSetup(ctx, flags) {
|
|
4905
|
+
const capabilities = await negotiateCapabilities(ctx);
|
|
4906
|
+
flags.action = 'get_polymarket_onboarding_plan';
|
|
4907
|
+
flags.params = flags.params || JSON.stringify({ agentKey: flags.agentKey || undefined });
|
|
4908
|
+
if (!flags.runMode) flags.runMode = 'agent_wallet';
|
|
4909
|
+
flags.__polymarketSetupGuide = true;
|
|
4910
|
+
await commandPreflight(ctx, flags, capabilities);
|
|
4911
|
+
}
|
|
4912
|
+
|
|
4913
|
+
async function commandPolymarketDryRun(ctx, flags) {
|
|
4914
|
+
if (!flags.action) flags.action = 'place_polymarket_order';
|
|
4915
|
+
if (!flags.params) {
|
|
4916
|
+
printEnvelope({
|
|
4917
|
+
success: false,
|
|
4918
|
+
code: 'MISSING_PARAMS',
|
|
4919
|
+
message: 'Provide --params for place_polymarket_order dry-run (tokenID, price, size, side)',
|
|
4920
|
+
data: {},
|
|
4921
|
+
meta: { apiBase: ctx.apiBase },
|
|
4922
|
+
});
|
|
4923
|
+
process.exit(1);
|
|
4924
|
+
}
|
|
4925
|
+
const capabilities = await negotiateCapabilities(ctx);
|
|
4926
|
+
if (!flags.runMode) flags.runMode = 'agent_wallet';
|
|
4927
|
+
await commandPreflight(ctx, flags, capabilities);
|
|
4928
|
+
}
|
|
4929
|
+
|
|
4829
4930
|
function printHelp() {
|
|
4830
4931
|
const help = `
|
|
4831
4932
|
thirdfy-agent ${CLI_VERSION}
|
|
@@ -4863,6 +4964,9 @@ Core commands:
|
|
|
4863
4964
|
thirdfy-agent managed setup [--auth-token <token> | --owner-session-token <token>] --agent-key <key> [--run-mode thirdfy|hybrid|agent_wallet] [--token-address <addr>] [--max-usd-per-day <usd>] [--chain-id <id>] [--json]
|
|
4864
4965
|
thirdfy-agent wallet execute --agent-api-key <key> --user-did <did> --action <id> --params <json> [--chain-id <id>] [--idempotency-key <key>] [--wallet-address <expected>] [--allow-wallet-mismatch] [--json]
|
|
4865
4966
|
thirdfy-agent wallet list [--json]
|
|
4967
|
+
thirdfy-agent polymarket status [--agent-key <key>] [--amount-pusd <n>] [--json]
|
|
4968
|
+
thirdfy-agent polymarket setup [--agent-key <key>] [--params <json>] [--json]
|
|
4969
|
+
thirdfy-agent polymarket dry-run --params <json> [--action place_polymarket_order] [--json]
|
|
4866
4970
|
thirdfy-agent wallet sign --agent-api-key <key> --action <id> --params <json> [--chain-id <id>] [--json]
|
|
4867
4971
|
thirdfy-agent wallet submit --signed-tx-hex <hex> [--chain-id <id>] [--rpc-url <url>] [--json]
|
|
4868
4972
|
thirdfy-agent agent run --agent-api-key <key> --action <id> --params <json> [--signer-method managed_wallet_server|byow|fanout_intent] [--strategy-intent single_wallet|fanout] [--run-mode <mode>] [--user-did <did>] [--json]
|