@thirdfy/agent-cli 0.1.45 → 0.1.46

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 CHANGED
@@ -4,6 +4,13 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.46] - 2026-05-22
8
+
9
+ ### Changed
10
+
11
+ - `polymarket status` uses `get_polymarket_funding_status` with `agentKey` from flags or `~/.thirdfy/config.json` so operators see the agent-owned deposit wallet and nested setup readiness (not the legacy server setup path).
12
+ - `polymarket dry-run` defaults to `place-polymarket-order` for preflight. Pairs with thirdfy-api-v2 **v3.4.37** CLOB derive-miss → create fallback.
13
+
7
14
  ## [0.1.45] - 2026-05-22
8
15
 
9
16
  ### Added
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.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`.
45
+ Version history and highlights: [CHANGELOG.md](./CHANGELOG.md). **v0.1.46** routes `polymarket status` through `get_polymarket_funding_status` with config `agentKey` and defaults dry-run to `place-polymarket-order` (pairs with API **v3.4.37**). **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
 
@@ -4887,31 +4887,53 @@ function printEnvelope(payload) {
4887
4887
  process.stdout.write(`${JSON.stringify(payload.data || {}, null, 2)}\n`);
4888
4888
  }
4889
4889
 
4890
+ function resolveConfigAgentKey(flags) {
4891
+ const fromFlags = String(flags.agentKey || flags.agentApiKey || '').trim();
4892
+ if (fromFlags) return fromFlags;
4893
+ const config = loadProfileConfig();
4894
+ const fromAgent = String(config?.agent?.agentKey || '').trim();
4895
+ if (fromAgent) return fromAgent;
4896
+ return extractAgentKey(config);
4897
+ }
4898
+
4890
4899
  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);
4900
+ const agentKey = resolveConfigAgentKey(flags);
4897
4901
  const capabilities = await negotiateCapabilities(ctx);
4898
- flags.action = 'get_polymarket_setup_status';
4899
- flags.params = JSON.stringify(params);
4900
4902
  if (!flags.runMode) flags.runMode = 'agent_wallet';
4903
+ if (agentKey) {
4904
+ flags.action = 'get_polymarket_funding_status';
4905
+ flags.params = JSON.stringify({
4906
+ agentKey,
4907
+ amountPusd: flags.amountPusd ? String(flags.amountPusd) : '5',
4908
+ includeSetupStatus: true,
4909
+ });
4910
+ } else {
4911
+ const params = {
4912
+ includeBalance: parseBooleanFlag(flags.includeBalance, true),
4913
+ includeGeoblock: parseBooleanFlag(flags.includeGeoblock, true),
4914
+ };
4915
+ flags.action = 'get_polymarket_setup_status';
4916
+ flags.params = JSON.stringify(params);
4917
+ }
4901
4918
  await commandPreflight(ctx, flags, capabilities);
4902
4919
  }
4903
4920
 
4904
4921
  async function commandPolymarketSetup(ctx, flags) {
4905
4922
  const capabilities = await negotiateCapabilities(ctx);
4906
4923
  flags.action = 'get_polymarket_onboarding_plan';
4907
- flags.params = flags.params || JSON.stringify({ agentKey: flags.agentKey || undefined });
4924
+ const agentKey = resolveConfigAgentKey(flags);
4925
+ flags.params =
4926
+ flags.params ||
4927
+ JSON.stringify({
4928
+ ...(agentKey ? { agentKey } : {}),
4929
+ });
4908
4930
  if (!flags.runMode) flags.runMode = 'agent_wallet';
4909
4931
  flags.__polymarketSetupGuide = true;
4910
4932
  await commandPreflight(ctx, flags, capabilities);
4911
4933
  }
4912
4934
 
4913
4935
  async function commandPolymarketDryRun(ctx, flags) {
4914
- if (!flags.action) flags.action = 'place_polymarket_order';
4936
+ if (!flags.action) flags.action = 'place-polymarket-order';
4915
4937
  if (!flags.params) {
4916
4938
  printEnvelope({
4917
4939
  success: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdfy/agent-cli",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Thirdfy Agent CLI for onboarding, governance preflight, execute-intent, and status polling.",
5
5
  "type": "module",
6
6
  "bin": {