@thirdfy/agent-cli 0.1.48 → 0.2.2
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 +48 -0
- package/README.md +25 -23
- package/bin/thirdfy-agent.mjs +3 -5106
- package/package.json +17 -4
- package/scripts/validate-npm-pack.mjs +43 -0
- package/src/cli/errors.mjs +103 -0
- package/src/cli/flags.mjs +66 -0
- package/src/cli/help.mjs +89 -0
- package/src/cli/manifest.mjs +422 -0
- package/src/cli/options/agent.mjs +9 -0
- package/src/cli/options/analytics.mjs +5 -0
- package/src/cli/options/auth.mjs +10 -0
- package/src/cli/options/bootstrap.mjs +19 -0
- package/src/cli/options/chains.mjs +3 -0
- package/src/cli/options/credentials.mjs +15 -0
- package/src/cli/options/delegation.mjs +22 -0
- package/src/cli/options/execution.mjs +24 -0
- package/src/cli/options/global.mjs +16 -0
- package/src/cli/options/index.mjs +37 -0
- package/src/cli/options/polymarket.mjs +3 -0
- package/src/cli/options/tracking.mjs +18 -0
- package/src/cli/options/wallet.mjs +7 -0
- package/src/cli/program.mjs +5 -0
- package/src/cli/register.mjs +118 -0
- package/src/commands/agent.mjs +194 -0
- package/src/commands/bootstrap.mjs +762 -0
- package/src/commands/credentials.mjs +102 -0
- package/src/commands/delegation.mjs +355 -0
- package/src/commands/discovery.mjs +77 -0
- package/src/commands/doctor.mjs +320 -0
- package/src/commands/execute.mjs +255 -0
- package/src/commands/hyperliquid.mjs +51 -0
- package/src/commands/index.mjs +6 -0
- package/src/commands/polymarket.mjs +89 -0
- package/src/commands/prompt.mjs +33 -0
- package/src/commands/telemetry.mjs +146 -0
- package/src/commands/wallet.mjs +129 -0
- package/src/core/args.mjs +68 -0
- package/src/core/constants.mjs +31 -0
- package/src/core/context.mjs +145 -0
- package/src/core/envelope.mjs +20 -0
- package/src/core/http.mjs +77 -0
- package/src/core/index.mjs +6 -0
- package/src/core/runMode.mjs +72 -0
- package/src/runtime/actions/selection.mjs +339 -0
- package/src/runtime/agentExtract.mjs +52 -0
- package/src/runtime/authHelpers.mjs +53 -0
- package/src/runtime/bitfinexProbe.mjs +121 -0
- package/src/runtime/context.mjs +28 -0
- package/src/runtime/createThirdfyAgentRuntime.mjs +2 -0
- package/src/runtime/errors.mjs +3 -0
- package/src/runtime/execution/amounts.mjs +193 -0
- package/src/runtime/execution/lanes.mjs +75 -0
- package/src/runtime/execution/payloads.mjs +148 -0
- package/src/runtime/execution/runners.mjs +702 -0
- package/src/runtime/handlers.mjs +181 -0
- package/src/runtime/index.mjs +4 -0
- package/src/runtime/main.mjs +204 -0
- package/src/runtime/onboardingHints.mjs +54 -0
- package/src/runtime/owsSigning.mjs +118 -0
- package/src/runtime/providerHints.mjs +414 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,54 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.2.2] - 2026-05-23
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **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.
|
|
12
|
+
- **`validate:public-docs`** — enforces README/npm surface rules (current version heading, CHANGELOG link, no maintainer publish strings, max inline version highlights).
|
|
13
|
+
- **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`.
|
|
14
|
+
|
|
15
|
+
## [0.2.1] - 2026-05-23
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **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.
|
|
20
|
+
- Removed `dispatch.mjs` and the hybrid `parseArgs()` + `mergeCommanderGlobals()` entry path.
|
|
21
|
+
- Unknown CLI flags now error via Commander (previously ignored by the hand-rolled parser).
|
|
22
|
+
- Thirdfy API `GET /api/v1/agent/cli/capabilities` `profileDefaults.personal` aligned to `agent_wallet` (matches CLI `PROFILE_DEFAULTS`).
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- `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.
|
|
27
|
+
- `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.
|
|
28
|
+
- Provider parity also asserts DogeOS provider ids (`dogeos-barkswap`, `dogeos-laika`, `dogeos-ecosystem`) in CLI selection + MCP.
|
|
29
|
+
- `test/commander-routing.test.cjs` — `-V`, `--version --json`, unknown command/option envelopes, `help onboarding`.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- `-V` / `--version` no longer print the full Commander help tree before the version string (early argv handling before `parseAsync`).
|
|
34
|
+
|
|
35
|
+
### Agent / operator notes
|
|
36
|
+
|
|
37
|
+
- **No argv path or JSON envelope changes** for documented commands; Hermes/OpenClaw/cron scripts need no changes.
|
|
38
|
+
- Optional Fly pin after publish: `THIRDFY_AGENT_CLI_PACKAGE=@thirdfy/agent-cli@0.2.1`.
|
|
39
|
+
|
|
40
|
+
## [0.2.0] - 2026-05-23
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- Modular CLI layout: `src/core/` (HTTP, context, envelope, run modes), `src/commands/` (execute, delegation, wallet, bootstrap, polymarket, hyperliquid), `src/cli/` (help + initial Commander globals).
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- `commander` dependency; `npm run validate:npm-pack` guards published tarball paths.
|
|
49
|
+
- `npm run e2e:local-api:smoke` — fail-fast smoke against a local Thirdfy API (`THIRDFY_API_BASE`, default `http://127.0.0.1:3000`).
|
|
50
|
+
|
|
51
|
+
### Agent / operator notes
|
|
52
|
+
|
|
53
|
+
- **No argv or JSON envelope changes** for Hermes, OpenClaw, or cron scripts that invoke `thirdfy-agent` as a subprocess.
|
|
54
|
+
|
|
7
55
|
## [0.1.48] - 2026-05-23
|
|
8
56
|
|
|
9
57
|
### Fixed
|
package/README.md
CHANGED
|
@@ -40,11 +40,12 @@ Run without global install:
|
|
|
40
40
|
npx @thirdfy/agent-cli --help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## What's new in v0.2.2
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
- **npm README cleanup** — the registry homepage is user-facing again: one **What's new** section for the current version, full history in [CHANGELOG.md](./CHANGELOG.md) (no multi-version release wall or maintainer publish steps on npm).
|
|
46
|
+
- **Public docs validation** — `npm run validate:public-docs` enforces README/npm surface rules before publish.
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
Older highlights (Commander routing, stricter flags): see [CHANGELOG.md](./CHANGELOG.md) · [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
|
|
48
49
|
|
|
49
50
|
## Quick start
|
|
50
51
|
|
|
@@ -62,6 +63,15 @@ thirdfy-agent intent-status --intent-id "<intentId>" --json
|
|
|
62
63
|
|
|
63
64
|
By default, the CLI targets production (`https://api.thirdfy.com`). Use `--api-base` (or `THIRDFY_API_BASE`) only for staging/dev/custom deployments.
|
|
64
65
|
|
|
66
|
+
### Local API smoke
|
|
67
|
+
|
|
68
|
+
With Thirdfy API running locally (default `http://127.0.0.1:3000`):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
export THIRDFY_API_BASE=http://127.0.0.1:3000
|
|
72
|
+
npm run e2e:local-api:smoke
|
|
73
|
+
```
|
|
74
|
+
|
|
65
75
|
## Auth model
|
|
66
76
|
|
|
67
77
|
- `AGENT_API_KEY`: execution identity for `preflight`, `run`, `self-exec`, and policy-aware discovery.
|
|
@@ -303,6 +313,12 @@ Provider and venue guides are kept outside `README` so this page stays stable as
|
|
|
303
313
|
- Delegation execution helpers: `delegation balance`, `delegation redeem`
|
|
304
314
|
- Account: `credits balance`
|
|
305
315
|
|
|
316
|
+
## CLI routing (Commander + runtime)
|
|
317
|
+
|
|
318
|
+
Since **v0.2.1**, [`bin/thirdfy-agent.mjs`](./bin/thirdfy-agent.mjs) is a thin entrypoint. Routing lives in [`src/cli/manifest.mjs`](./src/cli/manifest.mjs) (Commander `parseAsync`); behavior and handler wiring live in [`src/runtime/`](./src/runtime/). JSON envelopes, subcommand paths, and global flags (`--json`, `--api-base`, `--run-mode`, …) match **0.1.x** for documented flows. **Unknown flags now error** instead of being silently ignored. Built-in Commander `help` is disabled so `thirdfy-agent help onboarding` keeps working.
|
|
319
|
+
|
|
320
|
+
Maintainers validating releases locally: `npm run validate:release-preflight`. After API deploy: `THIRDFY_API_BASE=https://api.thirdfy.com npm run validate:live-api-capabilities`.
|
|
321
|
+
|
|
306
322
|
## Where to find what is supported
|
|
307
323
|
|
|
308
324
|
- Full command groups and usage map: [`docs/command-reference.md`](./docs/command-reference.md)
|
|
@@ -419,29 +435,15 @@ Managed-self execution performs strict wallet preflight and returns deterministi
|
|
|
419
435
|
- Creator platform (agent registration and keys):
|
|
420
436
|
[thirdfy.com/creator](https://thirdfy.com/creator)
|
|
421
437
|
|
|
422
|
-
##
|
|
438
|
+
## Contributing
|
|
439
|
+
|
|
440
|
+
From a git clone of this repository:
|
|
423
441
|
|
|
424
442
|
```bash
|
|
425
|
-
npm
|
|
443
|
+
npm ci
|
|
444
|
+
npm run validate:public-docs
|
|
426
445
|
npm test
|
|
427
446
|
npm run smoke:cli
|
|
428
|
-
npm run e2e:self:managed-custody-validation
|
|
429
|
-
npm run e2e:managed:delegation:parity
|
|
430
447
|
```
|
|
431
448
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
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.
|
|
435
|
-
|
|
436
|
-
```bash
|
|
437
|
-
npm version patch
|
|
438
|
-
npm publish --access public
|
|
439
|
-
git push origin main --follow-tags
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
Release contract:
|
|
443
|
-
|
|
444
|
-
- Keep `package.json` version and `CHANGELOG.md` synchronized in the release PR.
|
|
445
|
-
- The git tag must be `vX.Y.Z` and match `package.json` exactly.
|
|
446
|
-
- Push the matching tag so the [Release workflow](.github/workflows/release.yml) creates or aligns the GitHub release entry.
|
|
447
|
-
- If npm already contains that version, the workflow skips republishing and still creates/aligns the GitHub release when triggered by the tag.
|
|
449
|
+
Version history lives in [CHANGELOG.md](./CHANGELOG.md). Maintainer publish steps: [docs/releasing.md](./docs/releasing.md).
|