@thirdfy/agent-cli 0.2.79 → 0.2.80
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 +7 -0
- package/README.md +3 -6
- package/package.json +1 -1
- package/src/commands/discovery.mjs +3 -2
- package/src/runtime/actions/chainFilter.mjs +13 -0
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.2.80] - 2026-10-01
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`actions --chain-id <id>` now filters.** It returned the whole catalog (359 rows) for any chain. It now keeps rows whose `supportedChains` includes the chain, plus rows with no `supportedChains` (chain-agnostic; several offchain venues have none yet). `run` and `preflight` are unchanged. Pin: `test/dogeos-provider-discovery.test.cjs`.
|
|
12
|
+
- **DogeOS quickstart and provider runbook used an action that does not exist.** `barkswap.swap` with `amountInRaw` failed with `PARAMS_SCHEMA_INVALID`. The docs now use the live catalog names (`dogeos-barkswap-get-quote`, `dogeos-barkswap-execute-swap` with `amountIn` in token units, `dogeos-laika-buy-token` with `dogeAmountWei`), list all 19 DogeOS actions across `dogeos-barkswap`, `dogeos-laika` and `dogeos-ecosystem`, and add the public testnet facts: RPC, explorer, faucet, WDOGE/USDC addresses, user-paid DOGE gas, and the allowlist 403.
|
|
13
|
+
|
|
7
14
|
## [0.2.79] - 2026-09-30
|
|
8
15
|
|
|
9
16
|
### Added
|
package/README.md
CHANGED
|
@@ -40,13 +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.80
|
|
44
44
|
|
|
45
|
-
- **`
|
|
46
|
-
-
|
|
47
|
-
- **`run` shows a data read's typed reading first** in human mode (`typed`, `parseIssues`, `freshness`, `attribution`), then the full result. `--json` is unchanged.
|
|
48
|
-
- Large `--json` output piped to another program is no longer cut at the pipe buffer size. Exit codes are unchanged.
|
|
49
|
-
- Signals and typed readings need Thirdfy API 3.17.0 or later; an older API lists no signals.
|
|
45
|
+
- **`actions --chain-id <id>` now filters** to actions that run on that chain, plus chain-agnostic ones. Before, it returned the whole catalog for any chain.
|
|
46
|
+
- **DogeOS quickstart rewritten for the public testnet**: live action names (`dogeos-barkswap-get-quote`, `dogeos-barkswap-execute-swap`, `dogeos-laika-buy-token`), RPC, explorer, faucet, WDOGE/USDC addresses, and user-paid DOGE gas. See [docs/dogeos-quickstart.md](./docs/dogeos-quickstart.md).
|
|
50
47
|
- See [CHANGELOG.md](./CHANGELOG.md) and GitHub Releases for older versions.
|
|
51
48
|
|
|
52
49
|
## Quick start
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { apiGet, apiPost } from '../core/http.mjs';
|
|
|
3
3
|
import { extractActions, getCachedActionsCatalog } from '../core/context.mjs';
|
|
4
4
|
import { getEffectiveRunMode } from '../core/runMode.mjs';
|
|
5
5
|
import { formatCreditsBalanceSummary } from '../lib/creditsUsdSummary.mjs';
|
|
6
|
+
import { filterActionsByChain } from '../runtime/actions/chainFilter.mjs';
|
|
6
7
|
export function createDiscoveryCommands({ printEnvelope, applyActionFilters, getTradingProviderHint, resolveChainSupport, getAuthToken, resolveAgentApiKey }) {
|
|
7
8
|
async function commandCatalogsList(ctx, flags, capabilities) {
|
|
8
9
|
const response = await apiGet(ctx, '/api/v1/agent/actions/catalog');
|
|
@@ -32,10 +33,10 @@ async function commandCatalogsList(ctx, flags, capabilities) {
|
|
|
32
33
|
|
|
33
34
|
async function commandActions(ctx, flags, capabilities) {
|
|
34
35
|
const policyAware = Boolean(flags.agentApiKey);
|
|
35
|
-
const
|
|
36
|
+
const chainIdFilter = Number(flags.chainId || 0) || undefined;
|
|
37
|
+
const actions = filterActionsByChain(applyActionFilters(await getCachedActionsCatalog(ctx, flags), flags), chainIdFilter);
|
|
36
38
|
const providerHint = getTradingProviderHint(flags.provider);
|
|
37
39
|
const effectiveRunMode = getEffectiveRunMode(ctx, flags);
|
|
38
|
-
const chainIdFilter = Number(flags.chainId || 0) || undefined;
|
|
39
40
|
const chainSupport = resolveChainSupport(capabilities, chainIdFilter, effectiveRunMode);
|
|
40
41
|
printEnvelope({
|
|
41
42
|
success: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `actions --chain-id <id>` keeps catalog rows that run on that chain.
|
|
3
|
+
* A row without `supportedChains` is chain-agnostic and stays.
|
|
4
|
+
*/
|
|
5
|
+
export function filterActionsByChain(actions, chainId) {
|
|
6
|
+
const wanted = Number(chainId || 0);
|
|
7
|
+
if (!wanted || !Array.isArray(actions)) return actions;
|
|
8
|
+
return actions.filter((action) => {
|
|
9
|
+
const chains = action?.supportedChains;
|
|
10
|
+
if (!Array.isArray(chains) || chains.length === 0) return true;
|
|
11
|
+
return chains.some((value) => Number(value) === wanted);
|
|
12
|
+
});
|
|
13
|
+
}
|