@thirdfy/agent-cli 0.2.1 → 0.2.3

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,24 +4,19 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.2.3] - 2026-05-26
8
+
7
9
  ### Added
8
10
 
9
- - `src/runtime/` organized CLI runtime layer: `main.mjs` (orchestration), `errors.mjs`, `onboardingHints.mjs`, `execution/*`, `actions/selection.mjs`, plus command factories under `src/commands/` (`discovery`, `telemetry`, `credentials`, `agent`, `doctor`, `prompt`). `bin/thirdfy-agent.mjs` remains a thin entrypoint.
10
- - Maintainer-only operator docs (provider platform audit, Hermes post-publish smoke) moved out of npm-facing `docs/` paths.
11
- - `npm run validate:provider-parity` — CI guard for earn/capyfi/fx/bridge/trading/hyperliquid/polymarket/bitfinex hints (reads `src/runtime/providerHints.mjs`).
12
- - `npm run validate:cli-manifest-handlers` and `npm run validate:runtime-boundaries` — manifest handler coverage and import-boundary checks.
13
- - `npm run validate:release-preflight` — full publish gate (lint, validators, tests, npm pack, smoke); `prepublishOnly` runs it.
14
- - `npm run validate:live-api-capabilities` — optional post-deploy check when `THIRDFY_API_BASE` is set (`profileDefaults`, DogeOS chain routing).
15
- - Provider parity script also asserts DogeOS provider ids (`dogeos-barkswap`, `dogeos-laika`, `dogeos-ecosystem`) in CLI selection + MCP.
11
+ - Hyperliquid and Polymarket `recoveryActions` and `decommissionExample` in `providerHints` for fund recovery before runtime delete (pairs with Thirdfy API v3.4.42+).
16
12
 
17
- ### Changed
13
+ ## [0.2.2] - 2026-05-23
18
14
 
19
- - Thirdfy API `GET /api/v1/agent/cli/capabilities` `profileDefaults.personal` aligned to `agent_wallet` (matches CLI `PROFILE_DEFAULTS`).
20
-
21
- ### Fixed
15
+ ### Changed
22
16
 
23
- - `-V` / `--version` no longer print the full Commander help tree before the version string (early argv handling before `parseAsync`).
24
- - Commander regression tests for clean `-V` / `--version` output.
17
+ - **npm README** — replaced the multi-version release wall with `## What's new in vX.Y.Z` (current semver only) and a CHANGELOG link; removed maintainer publish instructions from the npm homepage.
18
+ - **`validate:public-docs`** enforces README/npm surface rules (current version heading, CHANGELOG link, no maintainer publish strings, max inline version highlights).
19
+ - **Cursor rules** — `npm-readme-surface.mdc` plus updates to public-docs and release flow rules; maintainer publish detail stays in `docs/releasing.md` / `docs-dev/publishing.md`.
25
20
 
26
21
  ## [0.2.1] - 2026-05-23
27
22
 
@@ -30,11 +25,19 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
30
25
  - **Commander.js is now the active router**: `program.parseAsync()` registers all commands via `src/cli/manifest.mjs`, shared option bundles under `src/cli/options/`, and JSON-aware `exitOverride` handling. Handlers and envelopes remain 1:1 with 0.2.0.
31
26
  - Removed `dispatch.mjs` and the hybrid `parseArgs()` + `mergeCommanderGlobals()` entry path.
32
27
  - Unknown CLI flags now error via Commander (previously ignored by the hand-rolled parser).
28
+ - Thirdfy API `GET /api/v1/agent/cli/capabilities` `profileDefaults.personal` aligned to `agent_wallet` (matches CLI `PROFILE_DEFAULTS`).
33
29
 
34
30
  ### Added
35
31
 
32
+ - `src/runtime/` — organized CLI runtime layer: `main.mjs` (orchestration), `errors.mjs`, `onboardingHints.mjs`, `execution/*`, `actions/selection.mjs`, plus command factories under `src/commands/` (`discovery`, `telemetry`, `credentials`, `agent`, `doctor`, `prompt`). `bin/thirdfy-agent.mjs` remains a thin entrypoint.
33
+ - `npm run validate:provider-parity`, `validate:cli-manifest-handlers`, `validate:runtime-boundaries`, `validate:release-preflight` (also `prepublishOnly`), and optional `validate:live-api-capabilities` when `THIRDFY_API_BASE` is set.
34
+ - Provider parity also asserts DogeOS provider ids (`dogeos-barkswap`, `dogeos-laika`, `dogeos-ecosystem`) in CLI selection + MCP.
36
35
  - `test/commander-routing.test.cjs` — `-V`, `--version --json`, unknown command/option envelopes, `help onboarding`.
37
36
 
37
+ ### Fixed
38
+
39
+ - `-V` / `--version` no longer print the full Commander help tree before the version string (early argv handling before `parseAsync`).
40
+
38
41
  ### Agent / operator notes
39
42
 
40
43
  - **No argv path or JSON envelope changes** for documented commands; Hermes/OpenClaw/cron scripts need no changes.
package/README.md CHANGED
@@ -40,11 +40,14 @@ Run without global install:
40
40
  npx @thirdfy/agent-cli --help
41
41
  ```
42
42
 
43
- ## Release notes
43
+ ## What's new in v0.2.3
44
44
 
45
- Version history and highlights: [CHANGELOG.md](./CHANGELOG.md). **v0.2.1** ships full [Commander.js](https://github.com/tj/commander.js) routing (`parseAsync`, manifest-registered subcommands, JSON-aware errors) with **1:1 argv/envelope behavior** vs 0.1.x — Hermes/OpenClaw/cron scripts need no changes; optional Fly pin `@thirdfy/agent-cli@0.2.1` after publish. Unknown flags now error instead of being silently ignored. **v0.1.48** fixes earn provider filtering so generic `deposit_earn_position` / `withdraw_earn_position` rows only appear for matching adapters (not unrelated morpho/vaults-fyi filters). **v0.1.47** adds CapyFi, FX, and bridge provider discovery hints. **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`.
45
+ - **Hyperliquid** and **Polymarket** provider discovery now include `recoveryActions` and `decommissionExample` for fund recovery before runtime delete.
46
+ - Hyperliquid recovery path: `get_hyperliquid_user_state` → `withdraw_hyperliquid_to_arbitrum` → withdraw execution wallet to owner.
47
+ - Polymarket recovery path: `get_polymarket_recovery_status` → `withdraw_polymarket_collateral` → withdraw execution wallet to owner.
48
+ - Pairs with Thirdfy API **v3.4.42+** managed recovery actions and EarnClaw runtime decommission flows.
46
49
 
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.
50
+ Older versions: [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
48
51
 
49
52
  ## Quick start
50
53
 
@@ -434,29 +437,15 @@ Managed-self execution performs strict wallet preflight and returns deterministi
434
437
  - Creator platform (agent registration and keys):
435
438
  [thirdfy.com/creator](https://thirdfy.com/creator)
436
439
 
437
- ## Development
440
+ ## Contributing
441
+
442
+ From a git clone of this repository:
438
443
 
439
444
  ```bash
440
- npm run validate:cli-contract-schemas
445
+ npm ci
446
+ npm run validate:public-docs
441
447
  npm test
442
448
  npm run smoke:cli
443
- npm run e2e:self:managed-custody-validation
444
- npm run e2e:managed:delegation:parity
445
449
  ```
446
450
 
447
- ## Release
448
-
449
- Version history and user-facing notes: [CHANGELOG.md](./CHANGELOG.md) (for example [v0.1.39](https://github.com/thirdfy/agent-cli/releases/tag/v0.1.39) — agent-wallet solo default, framework guidance, and delegation UX; [v0.1.38](https://github.com/thirdfy/agent-cli/releases/tag/v0.1.38) — npm README + lockfile metadata alignment; [v0.1.37](https://github.com/thirdfy/agent-cli/releases/tag/v0.1.37) — email OTP login, onboarding help, auth doctor, wallet list, masked `whoami`). **Before every version bump or npm publish:** update this **README** (release notes paragraph, quick start, and command groups) so the npm package page matches what ships; keep `CHANGELOG.md`, [command reference](./docs/command-reference.md), and MCP summaries aligned when discovery or onboarding surfaces change.
450
-
451
- ```bash
452
- npm version patch
453
- npm publish --access public
454
- git push origin main --follow-tags
455
- ```
456
-
457
- Release contract:
458
-
459
- - Keep `package.json` version and `CHANGELOG.md` synchronized in the release PR.
460
- - The git tag must be `vX.Y.Z` and match `package.json` exactly.
461
- - Push the matching tag so the [Release workflow](.github/workflows/release.yml) creates or aligns the GitHub release entry.
462
- - If npm already contains that version, the workflow skips republishing and still creates/aligns the GitHub release when triggered by the tag.
451
+ Version history lives in [CHANGELOG.md](./CHANGELOG.md). Maintainer publish steps: [docs/releasing.md](./docs/releasing.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdfy/agent-cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Thirdfy Agent CLI for onboarding, governance preflight, execute-intent, and status polling.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -61,6 +61,12 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
61
61
  'get_hyperliquid_builder_fee_status',
62
62
  'get_hyperliquid_referral_status',
63
63
  ],
64
+ recoveryActions: [
65
+ 'get_hyperliquid_user_state',
66
+ 'withdraw_hyperliquid_to_arbitrum',
67
+ ],
68
+ decommissionExample:
69
+ 'get_hyperliquid_user_state -> withdraw_hyperliquid_to_arbitrum -> withdraw-to-user on execution wallet',
64
70
  credentialType: 'hyperliquid_api_wallet',
65
71
  credentialUx:
66
72
  'Thirdfy manages Hyperliquid API-wallet setup for normal users. Delegated writes require encrypted privateKey-backed hyperliquid_api_wallet credentials; walletAddress-only records are rejected until Privy walletId-backed Hyperliquid signing ships.',
@@ -168,7 +174,17 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
168
174
  'browser_setup:create_or_derive_clob_credentials',
169
175
  'browser_setup:deploy_deposit_wallet_and_set_approvals',
170
176
  ],
171
- statusActions: ['get_polymarket_setup_status'],
177
+ statusActions: [
178
+ 'get_polymarket_funding_status',
179
+ 'get_polymarket_setup_status',
180
+ 'get_polymarket_recovery_status',
181
+ ],
182
+ recoveryActions: [
183
+ 'get_polymarket_recovery_status',
184
+ 'withdraw_polymarket_collateral',
185
+ ],
186
+ decommissionExample:
187
+ 'get_polymarket_recovery_status -> withdraw_polymarket_collateral -> withdraw-to-user',
172
188
  credentialType: 'polymarket_clob',
173
189
  credentialUx:
174
190
  'Autonomous agents use an agent-owned Privy wallet and Polymarket deposit wallet first: Thirdfy creates the agent wallet, deploys/approves the deposit wallet, and stores encrypted CLOB credentials once Polymarket key creation is available. User-owned browser setup remains optional for interactive capital.',