@thirdfy/agent-cli 0.2.77 → 0.2.78
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 +13 -0
- package/README.md +5 -7
- package/package.json +1 -1
- package/src/cli/manifest.mjs +1 -1
- package/src/commands/avantis.mjs +7 -4
- package/src/commands/credits.mjs +3 -1
- package/src/commands/telemetry.mjs +5 -1
- package/src/commands/venue.mjs +5 -2
- package/src/core/actionTimeouts.mjs +4 -5
- package/src/core/venueBrand.mjs +76 -0
- package/src/runtime/actions/selection.mjs +56 -18
- package/src/runtime/certification/executionCertify.mjs +3 -1
- package/src/runtime/certification/venueActionSchemas.mjs +5 -3
- package/src/runtime/execution/lanes.mjs +4 -2
- package/src/runtime/execution/payloads.mjs +3 -4
- package/src/runtime/execution/runners.mjs +1 -1
- package/src/runtime/providerHints.mjs +92 -65
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@thirdfy/agent-cli` are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.2.78] - 2026-09-24
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **Avantis is now Veranta.** The Base perps venue rebranded (ticker AVNT unchanged). Help, errors, provider hints and docs say Veranta. Provider hints for `avantis` / `avantis-vault` list Veranta action names (`place_veranta_perps_order`, `deposit_veranta_vault`, ...) and carry `displayName: "Veranta"` and `providerAliases`.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Veranta names work against every API deployment.** A Veranta action name (`*_veranta_*`) resolves to the catalog row the API in hand has: the Veranta row on an API with Veranta names, the Avantis row on one without. Avantis names keep working, including against a catalog that lists them only as aliases of Veranta rows. With no catalog to check, a Veranta name is sent in the Avantis spelling, which every deployment accepts. `pricing quote` does the same.
|
|
14
|
+
- **`veranta` / `veranta-vault` provider aliases.** `--provider veranta` lists the same actions as `--provider avantis` (and `veranta-vault` as `avantis-vault`). `venue readiness|setup|fund veranta` calls the API with the `avantis` venue id. `avantis` is still accepted everywhere.
|
|
15
|
+
- **Hardcoded venue lists recognise both spellings:** the offchain-venue lane guard (`OFFCHAIN_VENUE_ORDER_SELF_UNSUPPORTED`), the 180s long timeout for onboarding and market open/close, the `agent_wallet` `traderAddress` default, the `complete_*_onboarding` `estimatedAmountUsd` default, and `certify` venue fixtures (a live Veranta row replaces the Avantis fixture; the schema digest is spelling-independent).
|
|
16
|
+
- Error codes and internal identifiers are unchanged (`avantis_delegate`, `AVANTIS_*` setup blockers, provider ids `avantis` / `avantis-vault`). Pin: `test/veranta-rebrand.test.cjs`.
|
|
17
|
+
|
|
5
18
|
## [0.2.77] - 2026-09-24
|
|
6
19
|
|
|
7
20
|
### Changed
|
package/README.md
CHANGED
|
@@ -40,13 +40,11 @@ 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.78
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
- `
|
|
48
|
-
- `deposit_earn_position` accepts `amountHuman` / `amountInHuman` as `amount`. Unknown actions report `blockedReason: UNKNOWN_ACTION` with `suggestions`.
|
|
49
|
-
- Built on commander 14 and ethers 6.17; Node 20+ is still supported.
|
|
45
|
+
- Avantis, the Base perps venue, is now **Veranta**. Use `--provider veranta` / `veranta-vault` and Veranta action names such as `place_veranta_perps_order` and `get_veranta_positions`.
|
|
46
|
+
- Avantis names (`--provider avantis`, `place_avantis_perps_order`, `venue readiness avantis`) keep working. A Veranta name finds the matching action whether the Thirdfy API catalog lists Veranta or Avantis names.
|
|
47
|
+
- `venue readiness|setup|fund veranta` works; `avantis` is still accepted.
|
|
50
48
|
- See [CHANGELOG.md](./CHANGELOG.md) and GitHub Releases for older versions.
|
|
51
49
|
|
|
52
50
|
## Quick start
|
|
@@ -326,7 +324,7 @@ Provider and venue guides are kept outside `README` so this page stays stable as
|
|
|
326
324
|
- 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)
|
|
327
325
|
- Execution: `preflight`, `run`, `intent-status`, `jeff preflight`, `jeff trade`, `jeff status`
|
|
328
326
|
- Polymarket: `polymarket status`, `polymarket setup`, `polymarket dry-run`
|
|
329
|
-
- Venue tooling: `venue readiness`, `venue setup`, `venue fund` (`polymarket`, `hyperliquid`, `lighter`, `
|
|
327
|
+
- Venue tooling: `venue readiness`, `venue setup`, `venue fund` (`polymarket`, `hyperliquid`, `lighter`, `veranta`)
|
|
330
328
|
- Hummingbot: `hummingbot status`, `connectors`, `executor-schema`, `executor-create`, `executor-stop`, `gateway-networks`, `gateway-connectors`
|
|
331
329
|
- Condor Pattern A: `condor policy-status`, `condor preflight`
|
|
332
330
|
- Managed signer execution: `wallet execute`, `wallet sign`, `wallet submit`, `agent run`
|
package/package.json
CHANGED
package/src/cli/manifest.mjs
CHANGED
|
@@ -103,7 +103,7 @@ export const CLI_MANIFEST = [
|
|
|
103
103
|
path: ['venue', 'readiness'],
|
|
104
104
|
handler: 'commandVenueReadiness',
|
|
105
105
|
options: ['auth', 'venue'],
|
|
106
|
-
description: 'Normalized venue readiness (polymarket, hyperliquid, lighter,
|
|
106
|
+
description: 'Normalized venue readiness (polymarket, hyperliquid, lighter, veranta)',
|
|
107
107
|
args: { query: '<venue>' },
|
|
108
108
|
tier: 'online',
|
|
109
109
|
},
|
package/src/commands/avantis.mjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { toLegacyVenueActionKey } from '../core/venueBrand.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Veranta (formerly Avantis) helpers. Names keep the Avantis spelling (internal identifiers); every
|
|
5
|
+
* check accepts both the `*_avantis_*` and `*_veranta_*` action spellings.
|
|
6
|
+
*/
|
|
1
7
|
export function createAvantisHelpers(deps) {
|
|
2
8
|
const { getPreparedParams, resolveManagedExecutionPreflight } = deps;
|
|
3
9
|
|
|
4
10
|
function avantisDefaultAddressParamForAction(action) {
|
|
5
|
-
const canonical =
|
|
6
|
-
.trim()
|
|
7
|
-
.toLowerCase()
|
|
8
|
-
.replace(/_/g, '-');
|
|
11
|
+
const canonical = toLegacyVenueActionKey(action).replace(/_/g, '-');
|
|
9
12
|
if (
|
|
10
13
|
canonical === 'get-avantis-open-orders' ||
|
|
11
14
|
canonical === 'get-avantis-positions' ||
|
package/src/commands/credits.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { requireFlag } from '../core/args.mjs';
|
|
2
2
|
import { apiGet, apiPost } from '../core/http.mjs';
|
|
3
|
+
import { toAvantisSpelling } from '../core/venueBrand.mjs';
|
|
3
4
|
import {
|
|
4
5
|
formatCreditsEstimateSummary,
|
|
5
6
|
formatCreditsModelsSummary,
|
|
@@ -117,7 +118,8 @@ export function createCreditsCommands({ printEnvelope, getAuthToken }) {
|
|
|
117
118
|
ctx,
|
|
118
119
|
'/api/v1/credits/pricing/quote',
|
|
119
120
|
{
|
|
120
|
-
|
|
121
|
+
// Veranta names price as their Avantis spelling, which every API deployment knows.
|
|
122
|
+
actionKey: toAvantisSpelling(action),
|
|
121
123
|
chainId: Number(flags.chainId || 8453),
|
|
122
124
|
},
|
|
123
125
|
{ Authorization: `Bearer ${authToken}` },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { requireFlag, parseJsonFlag } from '../core/args.mjs';
|
|
2
2
|
import { apiGet, apiPost } from '../core/http.mjs';
|
|
3
|
+
import { hasVerantaToken, normalizeVenueProviderId } from '../core/venueBrand.mjs';
|
|
3
4
|
export function createTelemetryCommands({ printEnvelope, resolveAgentApiKey }) {
|
|
4
5
|
function applySharedPortfolioListingFiltersToQuery(query, flags) {
|
|
5
6
|
if (flags.chainId) query.set('chainId', String(flags.chainId));
|
|
@@ -110,7 +111,10 @@ async function commandTrackAction(ctx, flags, capabilities) {
|
|
|
110
111
|
if (flags.idempotencyKey) payload.idempotencyKey = String(flags.idempotencyKey);
|
|
111
112
|
if (flags.category) payload.category = String(flags.category);
|
|
112
113
|
if (flags.source) payload.source = String(flags.source);
|
|
113
|
-
if (flags.provider)
|
|
114
|
+
if (flags.provider) {
|
|
115
|
+
// `veranta` / `veranta-vault` report under the internal `avantis` / `avantis-vault` ids.
|
|
116
|
+
payload.provider = hasVerantaToken(flags.provider) ? normalizeVenueProviderId(flags.provider) : String(flags.provider);
|
|
117
|
+
}
|
|
114
118
|
if (flags.protocol) payload.protocol = String(flags.protocol);
|
|
115
119
|
if (flags.namespace) payload.namespace = String(flags.namespace);
|
|
116
120
|
if (flags.actionType) payload.actionType = String(flags.actionType);
|
package/src/commands/venue.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { apiGet, apiPost } from '../core/http.mjs';
|
|
2
2
|
import { loadProfileConfig } from '../core/context.mjs';
|
|
3
|
+
import { normalizeVenueProviderId } from '../core/venueBrand.mjs';
|
|
3
4
|
|
|
5
|
+
// `avantis` is the internal venue id the API expects; `veranta` (the venue's new name) maps onto it.
|
|
4
6
|
const VENUES = new Set(['polymarket', 'hyperliquid', 'lighter', 'avantis']);
|
|
5
7
|
|
|
6
8
|
function resolveVenue(flags) {
|
|
7
9
|
const fromQuery = Array.isArray(flags.query) ? flags.query[0] : flags.query;
|
|
8
|
-
const
|
|
10
|
+
const requested = String(flags.venue || fromQuery || '').trim().toLowerCase();
|
|
11
|
+
const venue = normalizeVenueProviderId(requested);
|
|
9
12
|
if (!VENUES.has(venue)) {
|
|
10
|
-
throw new Error(`Unsupported venue "${
|
|
13
|
+
throw new Error(`Unsupported venue "${requested}". Use polymarket, hyperliquid, lighter, or veranta.`);
|
|
11
14
|
}
|
|
12
15
|
return venue;
|
|
13
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_TIMEOUT_MS } from './constants.mjs';
|
|
2
2
|
import { isReadOnlyActionName, isReadOnlyResolvedAction } from './readOnlyActions.mjs';
|
|
3
|
+
import { toLegacyVenueActionKey } from './venueBrand.mjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Default HTTP timeout for managed writes. A perps order or TP/SL update signs, broadcasts, and waits
|
|
@@ -8,6 +9,7 @@ import { isReadOnlyActionName, isReadOnlyResolvedAction } from './readOnlyAction
|
|
|
8
9
|
*/
|
|
9
10
|
const DEFAULT_WRITE_TIMEOUT_MS = 90_000;
|
|
10
11
|
|
|
12
|
+
// Keyed by the Avantis spelling; `normalizeActionId` maps Veranta names onto it.
|
|
11
13
|
const LONG_RUNNING_ACTIONS = new Set([
|
|
12
14
|
'complete_avantis_onboarding',
|
|
13
15
|
'get_avantis_setup_status',
|
|
@@ -29,17 +31,14 @@ const LONG_RUNNING_ACTIONS = new Set([
|
|
|
29
31
|
'swap',
|
|
30
32
|
'execute_optimal_swap',
|
|
31
33
|
'deposit_hyperliquid_cctp',
|
|
32
|
-
// Avantis market open/close: the API streams the batched order for up to 90s, then polls its
|
|
34
|
+
// Veranta (formerly Avantis) market open/close: the API streams the batched order for up to 90s, then polls its
|
|
33
35
|
// tracking status for up to 90s more before it answers.
|
|
34
36
|
'place_avantis_perps_order',
|
|
35
37
|
'close_avantis_position',
|
|
36
38
|
]);
|
|
37
39
|
|
|
38
40
|
function normalizeActionId(action) {
|
|
39
|
-
return
|
|
40
|
-
.trim()
|
|
41
|
-
.replace(/-/g, '_')
|
|
42
|
-
.toLowerCase();
|
|
41
|
+
return toLegacyVenueActionKey(action).replace(/-/g, '_');
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
function positiveEnvMs(...names) {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Veranta (formerly Avantis) naming.
|
|
3
|
+
*
|
|
4
|
+
* Avantis, the Base perps venue, rebranded to Veranta. The Thirdfy API is moving its action names
|
|
5
|
+
* from `*_avantis_*` to `*_veranta_*` (Veranta canonical, Avantis kept as aliases). Until every API
|
|
6
|
+
* deployment has the Veranta rows, the CLI has to work against both catalogs:
|
|
7
|
+
*
|
|
8
|
+
* - A Veranta action name resolves to whatever the catalog in hand has (the Avantis row on an older API).
|
|
9
|
+
* - An Avantis action name keeps working unchanged.
|
|
10
|
+
* - Hardcoded CLI lists (lanes, timeouts, address defaults) are keyed by the Avantis spelling, so they
|
|
11
|
+
* compare through `toLegacyVenueActionKey`.
|
|
12
|
+
*
|
|
13
|
+
* Provider ids `avantis` / `avantis-vault` stay the internal identifiers. `veranta` / `veranta-vault`
|
|
14
|
+
* are accepted wherever the CLI reads a provider id.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const LEGACY_TOKEN = 'avantis';
|
|
18
|
+
const BRAND_TOKEN = 'veranta';
|
|
19
|
+
|
|
20
|
+
// The token only counts as a whole word inside an action or provider id (`_`/`-` separated).
|
|
21
|
+
const BRAND_TOKEN_RE = /(^|[_-])veranta(?=[_-]|$)/gi;
|
|
22
|
+
const LEGACY_TOKEN_RE = /(^|[_-])avantis(?=[_-]|$)/gi;
|
|
23
|
+
|
|
24
|
+
/** Human-facing venue name. */
|
|
25
|
+
export const VERANTA_DISPLAY_NAME = 'Veranta';
|
|
26
|
+
|
|
27
|
+
/** True when the id carries the Veranta token (`place_veranta_perps_order`, `veranta-vault`). */
|
|
28
|
+
export function hasVerantaToken(value) {
|
|
29
|
+
BRAND_TOKEN_RE.lastIndex = 0;
|
|
30
|
+
return BRAND_TOKEN_RE.test(String(value || ''));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** True when the id carries the Avantis token (`place_avantis_perps_order`, `avantis-vault`). */
|
|
34
|
+
export function hasAvantisToken(value) {
|
|
35
|
+
LEGACY_TOKEN_RE.lastIndex = 0;
|
|
36
|
+
return LEGACY_TOKEN_RE.test(String(value || ''));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** `place_veranta_perps_order` -> `place_avantis_perps_order`. Other names pass through unchanged. */
|
|
40
|
+
export function toAvantisSpelling(value) {
|
|
41
|
+
return String(value ?? '').replace(BRAND_TOKEN_RE, `$1${LEGACY_TOKEN}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** `place_avantis_perps_order` -> `place_veranta_perps_order`. Other names pass through unchanged. */
|
|
45
|
+
export function toVerantaSpelling(value) {
|
|
46
|
+
return String(value ?? '').replace(LEGACY_TOKEN_RE, `$1${BRAND_TOKEN}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The other spelling of a venue action name, or null when the name has no Avantis/Veranta token.
|
|
51
|
+
* Used to retry catalog resolution with the spelling the API in hand still uses.
|
|
52
|
+
*/
|
|
53
|
+
export function alternateVenueActionSpelling(value) {
|
|
54
|
+
const text = String(value ?? '');
|
|
55
|
+
if (hasVerantaToken(text)) return toAvantisSpelling(text);
|
|
56
|
+
if (hasAvantisToken(text)) return toVerantaSpelling(text);
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Brand-insensitive action key for hardcoded CLI lists: trimmed, lowercased, Veranta mapped to the
|
|
62
|
+
* Avantis spelling. Separators are preserved; callers still pick `_` or `-`.
|
|
63
|
+
*/
|
|
64
|
+
export function toLegacyVenueActionKey(value) {
|
|
65
|
+
return toAvantisSpelling(String(value ?? '').trim().toLowerCase());
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Normalize a provider or venue id the CLI reads from flags: trimmed, lowercased, and
|
|
70
|
+
* `veranta` / `veranta-vault` mapped to the internal `avantis` / `avantis-vault`.
|
|
71
|
+
*/
|
|
72
|
+
export function normalizeVenueProviderId(value) {
|
|
73
|
+
const id = String(value ?? '').trim().toLowerCase();
|
|
74
|
+
if (!id) return id;
|
|
75
|
+
return toAvantisSpelling(id);
|
|
76
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { requireFlag } from '../../core/args.mjs';
|
|
2
2
|
import { getCachedActionsCatalog } from '../../core/context.mjs';
|
|
3
3
|
import { suggestCatalogActions } from '../validation/actionParamsGate.mjs';
|
|
4
|
+
import {
|
|
5
|
+
alternateVenueActionSpelling,
|
|
6
|
+
normalizeVenueProviderId,
|
|
7
|
+
toAvantisSpelling,
|
|
8
|
+
toLegacyVenueActionKey,
|
|
9
|
+
} from '../../core/venueBrand.mjs';
|
|
4
10
|
export function createActionSelection({ getTradingProviderHint, formatProviderAmbiguousActionHint, formatProviderUnknownActionHint }) {
|
|
5
11
|
function getActionKey(action) {
|
|
6
12
|
return String(action?.action || action?.id || action?.key || action?.name || '')
|
|
@@ -21,7 +27,8 @@ function formatActionList(items) {
|
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
function normalizeProviderId(value) {
|
|
24
|
-
|
|
30
|
+
// Lowercased id; `veranta` / `veranta-vault` map to the internal `avantis` / `avantis-vault`.
|
|
31
|
+
return normalizeVenueProviderId(value || '');
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
function rowActionKey(action) {
|
|
@@ -46,7 +53,8 @@ function canonicalizeCatalogActionKey(value) {
|
|
|
46
53
|
function inferActionProvider(action) {
|
|
47
54
|
// API catalog metadata (`providerId`, `domain`, `category`) is the source of truth.
|
|
48
55
|
// This fallback only keeps older catalog rows / older API deployments discoverable.
|
|
49
|
-
|
|
56
|
+
// Veranta action names infer like their Avantis spelling (`avantis` / `avantis-vault`).
|
|
57
|
+
const key = toLegacyVenueActionKey(canonicalActionKey(action));
|
|
50
58
|
const knownMap = {
|
|
51
59
|
swap: 'trading',
|
|
52
60
|
'execute-optimal-swap': 'trading',
|
|
@@ -263,7 +271,8 @@ function isSpotTradingCatalogAction(action) {
|
|
|
263
271
|
}
|
|
264
272
|
|
|
265
273
|
function isProviderActionKey(action, provider) {
|
|
266
|
-
|
|
274
|
+
// Brand-insensitive: `place_veranta_perps_order` matches provider `avantis`.
|
|
275
|
+
const actionKey = toLegacyVenueActionKey(rowActionKey(action));
|
|
267
276
|
const normalizedProvider = normalizeProviderId(provider).replace(/-/g, '_');
|
|
268
277
|
if (!actionKey || !normalizedProvider) return false;
|
|
269
278
|
return (
|
|
@@ -283,6 +292,7 @@ function actionMatchesProvider(action, requestedProvider, allActions) {
|
|
|
283
292
|
if (requestedProvider === 'hyperliquid') return isProviderActionKey(action, 'hyperliquid');
|
|
284
293
|
if (requestedProvider === 'lighter') return isProviderActionKey(action, 'lighter');
|
|
285
294
|
if (requestedProvider === 'avantis') {
|
|
295
|
+
// Veranta (formerly Avantis) perps; `--provider veranta` normalizes to `avantis` before this runs.
|
|
286
296
|
return isProviderActionKey(action, 'avantis') && !actionKey.includes('vault');
|
|
287
297
|
}
|
|
288
298
|
if (requestedProvider === 'polymarket') return isProviderActionKey(action, 'polymarket');
|
|
@@ -351,20 +361,12 @@ async function resolveActionSelection(ctx, flags) {
|
|
|
351
361
|
return resolveActionFromRows(requestedAction, actions, flags);
|
|
352
362
|
}
|
|
353
363
|
|
|
354
|
-
|
|
364
|
+
/**
|
|
365
|
+
* Exact catalog match for one spelling: canonical overrides, action id, `_`/`-` canonical id, then
|
|
366
|
+
* alias. Returns null when nothing matches; throws on ambiguity.
|
|
367
|
+
*/
|
|
368
|
+
function matchCatalogEntry(requestedAction, keyed, flags = {}) {
|
|
355
369
|
const requestedLower = String(requestedAction || '').toLowerCase();
|
|
356
|
-
const keyed = actions
|
|
357
|
-
.map((action) => ({
|
|
358
|
-
key: getActionKey(action),
|
|
359
|
-
aliases: getActionAliases(action),
|
|
360
|
-
action,
|
|
361
|
-
}))
|
|
362
|
-
.filter((entry) => entry.key);
|
|
363
|
-
|
|
364
|
-
if (!keyed.length) {
|
|
365
|
-
return { requestedAction, resolvedAction: requestedAction, resolvedActionMeta: null, suggestions: [] };
|
|
366
|
-
}
|
|
367
|
-
|
|
368
370
|
const canonicalAliasOverrides = {
|
|
369
371
|
get_vaults_fyi_vaults: 'get-vaults-fyi-vaults',
|
|
370
372
|
get_vaults_fyi_opportunities: 'get-vaults-fyi-vaults',
|
|
@@ -446,11 +448,47 @@ function resolveActionFromRows(requestedAction, actions, flags = {}) {
|
|
|
446
448
|
)}.${formatProviderAmbiguousActionHint(providerHint)}`
|
|
447
449
|
);
|
|
448
450
|
}
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function resolveActionFromRows(requestedAction, actions, flags = {}) {
|
|
455
|
+
const requestedLower = String(requestedAction || '').toLowerCase();
|
|
456
|
+
const keyed = actions
|
|
457
|
+
.map((action) => ({
|
|
458
|
+
key: getActionKey(action),
|
|
459
|
+
aliases: getActionAliases(action),
|
|
460
|
+
action,
|
|
461
|
+
}))
|
|
462
|
+
.filter((entry) => entry.key);
|
|
463
|
+
|
|
464
|
+
if (!keyed.length) {
|
|
465
|
+
// No catalog to check against: send the Avantis spelling of a Veranta name, which every API
|
|
466
|
+
// deployment accepts (older ones only know `*_avantis_*`; newer ones keep it as an alias).
|
|
467
|
+
return {
|
|
468
|
+
requestedAction,
|
|
469
|
+
resolvedAction: alternateVenueActionSpelling(requestedAction) ? toAvantisSpelling(requestedAction) : requestedAction,
|
|
470
|
+
resolvedActionMeta: null,
|
|
471
|
+
suggestions: [],
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
const direct = matchCatalogEntry(requestedAction, keyed, flags);
|
|
476
|
+
if (direct) return direct;
|
|
477
|
+
|
|
478
|
+
// Veranta (formerly Avantis): retry with the other spelling so `place_veranta_perps_order` finds the
|
|
479
|
+
// `place_avantis_perps_order` row on an API that has not shipped Veranta names, and the reverse.
|
|
480
|
+
const alternate = alternateVenueActionSpelling(requestedAction);
|
|
481
|
+
if (alternate) {
|
|
482
|
+
const viaAlternate = matchCatalogEntry(alternate, keyed, flags);
|
|
483
|
+
if (viaAlternate) return { ...viaAlternate, requestedAction };
|
|
484
|
+
}
|
|
485
|
+
const alternateLower = alternate ? alternate.toLowerCase() : null;
|
|
449
486
|
|
|
487
|
+
const fuzzyNeedles = alternateLower ? [requestedLower, alternateLower] : [requestedLower];
|
|
450
488
|
const fuzzy = keyed.filter(
|
|
451
489
|
(entry) =>
|
|
452
|
-
entry.key.toLowerCase().includes(
|
|
453
|
-
entry.aliases.some((a) => a.toLowerCase().includes(
|
|
490
|
+
fuzzyNeedles.some((needle) => entry.key.toLowerCase().includes(needle)) ||
|
|
491
|
+
entry.aliases.some((a) => fuzzyNeedles.some((needle) => a.toLowerCase().includes(needle)))
|
|
454
492
|
);
|
|
455
493
|
if (fuzzy.length === 1) {
|
|
456
494
|
return { requestedAction, resolvedAction: fuzzy[0].key, resolvedActionMeta: fuzzy[0].action || null };
|
|
@@ -3,6 +3,7 @@ import { createHash } from 'node:crypto';
|
|
|
3
3
|
import { CLI_MANIFEST } from '../../cli/manifest.mjs';
|
|
4
4
|
import { validateParamsSchema, sanitizeParamsForSchemaValidation } from '../validation/paramsSchema.mjs';
|
|
5
5
|
import { VENUE_WRITE_ACTION_FIXTURES } from './venueActionSchemas.mjs';
|
|
6
|
+
import { toLegacyVenueActionKey } from '../../core/venueBrand.mjs';
|
|
6
7
|
|
|
7
8
|
const require = createRequire(import.meta.url);
|
|
8
9
|
|
|
@@ -23,7 +24,8 @@ const AUTHORITY_INPUT_CHECKS = [
|
|
|
23
24
|
];
|
|
24
25
|
|
|
25
26
|
function normalizeActionKey(action) {
|
|
26
|
-
|
|
27
|
+
// Brand-insensitive: a live `place_veranta_perps_order` row replaces the `place_avantis_perps_order` fixture.
|
|
28
|
+
return toLegacyVenueActionKey(action).replace(/_/g, '-');
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
function isWriteAction(action) {
|
|
@@ -218,8 +218,10 @@ export const VENUE_WRITE_ACTION_FIXTURES = [
|
|
|
218
218
|
validSample: { orderId: '0xabc' },
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
|
+
// Veranta (formerly Avantis). Fixture ids keep the Avantis spelling so the default schema digest
|
|
222
|
+
// is unchanged; the Veranta names are aliases.
|
|
221
223
|
action: 'place_avantis_perps_order',
|
|
222
|
-
aliases: ['place-avantis-perps-order'],
|
|
224
|
+
aliases: ['place-avantis-perps-order', 'place_veranta_perps_order', 'place-veranta-perps-order'],
|
|
223
225
|
provider: 'avantis',
|
|
224
226
|
authorityInputs: ['agentApiKey', 'estimatedAmountUsd'],
|
|
225
227
|
paramsSchema: {
|
|
@@ -249,7 +251,7 @@ export const VENUE_WRITE_ACTION_FIXTURES = [
|
|
|
249
251
|
},
|
|
250
252
|
{
|
|
251
253
|
action: 'cancel_avantis_perps_order',
|
|
252
|
-
aliases: ['cancel-avantis-perps-order'],
|
|
254
|
+
aliases: ['cancel-avantis-perps-order', 'cancel_veranta_perps_order', 'cancel-veranta-perps-order'],
|
|
253
255
|
provider: 'avantis',
|
|
254
256
|
authorityInputs: ['agentApiKey'],
|
|
255
257
|
paramsSchema: {
|
|
@@ -267,7 +269,7 @@ export const VENUE_WRITE_ACTION_FIXTURES = [
|
|
|
267
269
|
},
|
|
268
270
|
{
|
|
269
271
|
action: 'close_avantis_position',
|
|
270
|
-
aliases: ['close-avantis-position'],
|
|
272
|
+
aliases: ['close-avantis-position', 'close_veranta_position', 'close-veranta-position'],
|
|
271
273
|
provider: 'avantis',
|
|
272
274
|
authorityInputs: ['agentApiKey', 'estimatedAmountUsd'],
|
|
273
275
|
paramsSchema: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createCliError } from '../../core/envelope.mjs';
|
|
2
|
+
import { toLegacyVenueActionKey } from '../../core/venueBrand.mjs';
|
|
2
3
|
export function createExecutionLanes() {
|
|
3
4
|
const OFFCHAIN_VENUE_ORDER_ACTIONS = new Set([
|
|
4
5
|
'place_hyperliquid_perps_order',
|
|
@@ -29,6 +30,7 @@ const OFFCHAIN_VENUE_ORDER_ACTIONS = new Set([
|
|
|
29
30
|
'condor-executor-create',
|
|
30
31
|
'condor_executor_stop',
|
|
31
32
|
'condor-executor-stop',
|
|
33
|
+
// Veranta (formerly Avantis): keyed by the Avantis spelling; Veranta names map onto it below.
|
|
32
34
|
'place_avantis_perps_order',
|
|
33
35
|
'place-avantis-perps-order',
|
|
34
36
|
'cancel_avantis_perps_order',
|
|
@@ -57,11 +59,11 @@ const OFFCHAIN_VENUE_ORDER_ACTIONS = new Set([
|
|
|
57
59
|
'cancel-avantis-mm-order',
|
|
58
60
|
]);
|
|
59
61
|
function enforceOffchainVenueLaneCompatibility(action, runMode) {
|
|
60
|
-
const normalizedAction =
|
|
62
|
+
const normalizedAction = toLegacyVenueActionKey(action);
|
|
61
63
|
if (runMode !== 'self' || !OFFCHAIN_VENUE_ORDER_ACTIONS.has(normalizedAction)) return;
|
|
62
64
|
throw createCliError(
|
|
63
65
|
'OFFCHAIN_VENUE_ORDER_SELF_UNSUPPORTED',
|
|
64
|
-
'Polymarket CLOB, Hyperliquid perps, Lighter perps,
|
|
66
|
+
'Polymarket CLOB, Hyperliquid perps, Lighter perps, Veranta perps, Hummingbot executor, and Condor executor actions are offchain signed API actions, not EVM build-tx actions. Use self for setup/funding signatures, then run venue orders with --run-mode thirdfy, --run-mode hybrid, or --run-mode agent_wallet.',
|
|
65
67
|
{
|
|
66
68
|
recommendedRunModes: ['thirdfy', 'hybrid', 'agent_wallet'],
|
|
67
69
|
setupOnlyRunMode: 'self',
|
|
@@ -4,6 +4,7 @@ import { resolveExecutionContextFromEnv } from '../../core/executionContext.mjs'
|
|
|
4
4
|
import { requireFlag, parseJsonFlag } from '../../core/args.mjs';
|
|
5
5
|
import { loadProfileConfig } from '../../core/context.mjs';
|
|
6
6
|
import { createCliError } from '../../core/envelope.mjs';
|
|
7
|
+
import { toLegacyVenueActionKey } from '../../core/venueBrand.mjs';
|
|
7
8
|
import { normalizeRunMode, normalizeManagedRunMode, normalizeHybridWalletMode } from '../../core/runMode.mjs';
|
|
8
9
|
import { assertHostedRuntimePolymarketWriteIdempotency } from './hostedRuntimeWriteGate.mjs';
|
|
9
10
|
import { resolveTokenInForFunding } from '../../core/fundingTokenIn.mjs';
|
|
@@ -29,10 +30,8 @@ export function mergeConfirmWritesIntoParams(params, flags) {
|
|
|
29
30
|
export function resolveExecuteEstimatedAmountUsd(action, flags) {
|
|
30
31
|
const fromFlags = Number(flags?.estimatedAmountUsd);
|
|
31
32
|
if (Number.isFinite(fromFlags) && fromFlags > 0) return fromFlags;
|
|
32
|
-
const key =
|
|
33
|
-
|
|
34
|
-
.toLowerCase()
|
|
35
|
-
.replace(/-/g, '_');
|
|
33
|
+
const key = toLegacyVenueActionKey(action).replace(/-/g, '_');
|
|
34
|
+
// Veranta onboarding (either spelling).
|
|
36
35
|
if (key === 'complete_avantis_onboarding') return 1;
|
|
37
36
|
return undefined;
|
|
38
37
|
}
|
|
@@ -527,7 +527,7 @@ async function executeManagedWalletRun(ctx, flags, resolved, options) {
|
|
|
527
527
|
// (often as a JSON string under data.result). Reads skip funding gates; routing still fails closed.
|
|
528
528
|
const isRead = isReadOnlyAction(resolved);
|
|
529
529
|
const skipPreflight = Boolean(options?.skipPreflight);
|
|
530
|
-
// A seeded preflight (Hyperliquid/Lighter/
|
|
530
|
+
// A seeded preflight (Hyperliquid/Lighter/Veranta address defaults) already ran; reuse it.
|
|
531
531
|
const readFastPath =
|
|
532
532
|
!skipPreflight && !options?.managedPreflight && shouldUseManagedReadFastPath(flags, resolved, options);
|
|
533
533
|
let preflight = readFastPath ? READ_FAST_PATH_PREFLIGHT : null;
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { normalizeVenueProviderId } from '../core/venueBrand.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Veranta (formerly Avantis) naming for the `avantis` / `avantis-vault` hints, static or from the
|
|
5
|
+
* capabilities manifest. Empty for every other provider.
|
|
6
|
+
*/
|
|
7
|
+
function verantaNamingFields(provider) {
|
|
8
|
+
if (provider !== 'avantis' && provider !== 'avantis-vault') return {};
|
|
9
|
+
const alias = provider === 'avantis' ? 'veranta' : 'veranta-vault';
|
|
10
|
+
return {
|
|
11
|
+
displayName: 'Veranta',
|
|
12
|
+
formerName: 'Avantis',
|
|
13
|
+
providerAliases: [alias],
|
|
14
|
+
actionNaming: `Veranta (formerly Avantis). Veranta action names (*_veranta_*) are canonical; Avantis names (*_avantis_*) still resolve. Provider id stays ${provider}; --provider ${alias} is an alias.`,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
1
18
|
/**
|
|
2
19
|
* Static and capabilities-backed provider discovery hints for CLI actions filtering.
|
|
3
20
|
*/
|
|
4
21
|
export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
5
22
|
function getTradingProviderHint(providerId) {
|
|
6
|
-
|
|
23
|
+
// `veranta` / `veranta-vault` resolve to the internal `avantis` / `avantis-vault` hints.
|
|
24
|
+
const provider = normalizeVenueProviderId(providerId || '');
|
|
7
25
|
const manifestHint = getCachedProviderHintFromCapabilities(provider);
|
|
8
26
|
const setupHints =
|
|
9
27
|
manifestHint?.setupHints && typeof manifestHint.setupHints === 'object' ? manifestHint.setupHints : {};
|
|
@@ -206,68 +224,69 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
206
224
|
if (provider === 'avantis') {
|
|
207
225
|
return {
|
|
208
226
|
provider,
|
|
227
|
+
...verantaNamingFields(provider),
|
|
209
228
|
category: 'leveraged_perps',
|
|
210
|
-
canonicalWriteAction: '
|
|
229
|
+
canonicalWriteAction: 'place_veranta_perps_order',
|
|
211
230
|
readActions: [
|
|
212
|
-
'
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
'
|
|
217
|
-
'
|
|
218
|
-
'
|
|
219
|
-
'
|
|
220
|
-
'
|
|
221
|
-
'
|
|
222
|
-
'
|
|
223
|
-
'
|
|
224
|
-
'
|
|
225
|
-
'
|
|
231
|
+
'get_veranta_markets',
|
|
232
|
+
'get_veranta_pair',
|
|
233
|
+
'get_veranta_price',
|
|
234
|
+
'get_veranta_spread',
|
|
235
|
+
'get_veranta_positions',
|
|
236
|
+
'get_veranta_open_orders',
|
|
237
|
+
'get_veranta_allowance',
|
|
238
|
+
'get_veranta_delegation_status',
|
|
239
|
+
'get_veranta_funding_status',
|
|
240
|
+
'get_veranta_setup_status',
|
|
241
|
+
'get_veranta_onboarding_plan',
|
|
242
|
+
'get_veranta_builder_fee_status',
|
|
243
|
+
'get_veranta_referral_status',
|
|
244
|
+
'get_veranta_referral_stats',
|
|
226
245
|
],
|
|
227
246
|
orderManagementActions: [
|
|
228
|
-
'
|
|
229
|
-
'
|
|
230
|
-
'
|
|
231
|
-
'
|
|
232
|
-
'
|
|
233
|
-
'
|
|
234
|
-
'
|
|
235
|
-
'
|
|
236
|
-
'
|
|
237
|
-
'
|
|
238
|
-
'
|
|
239
|
-
'
|
|
240
|
-
'
|
|
241
|
-
'
|
|
242
|
-
'
|
|
247
|
+
'place_veranta_perps_order',
|
|
248
|
+
'cancel_veranta_perps_order',
|
|
249
|
+
'close_veranta_position',
|
|
250
|
+
'update_veranta_tp_sl',
|
|
251
|
+
'cancel_veranta_tp_sl',
|
|
252
|
+
'place_veranta_twap_order',
|
|
253
|
+
'close_veranta_twap_order',
|
|
254
|
+
'cancel_veranta_twap_order',
|
|
255
|
+
'place_veranta_coin_perps_order',
|
|
256
|
+
'increase_veranta_coin_position',
|
|
257
|
+
'close_veranta_coin_position',
|
|
258
|
+
'place_veranta_mm_order',
|
|
259
|
+
'cancel_veranta_mm_order',
|
|
260
|
+
'get_veranta_open_orders',
|
|
261
|
+
'get_veranta_positions',
|
|
243
262
|
],
|
|
244
263
|
setupActions: [
|
|
245
|
-
'
|
|
246
|
-
'
|
|
247
|
-
'
|
|
248
|
-
'
|
|
249
|
-
'
|
|
250
|
-
'
|
|
251
|
-
'
|
|
252
|
-
'
|
|
253
|
-
'
|
|
254
|
-
'
|
|
264
|
+
'get_veranta_funding_status',
|
|
265
|
+
'get_veranta_setup_status',
|
|
266
|
+
'get_veranta_onboarding_plan',
|
|
267
|
+
'prepare_veranta_onboarding',
|
|
268
|
+
'complete_veranta_onboarding',
|
|
269
|
+
'approve_veranta_builder_fee',
|
|
270
|
+
'revoke_veranta_builder_fee',
|
|
271
|
+
'set_veranta_referral_code',
|
|
272
|
+
'register_veranta_referral_code',
|
|
273
|
+
'claim_veranta_referral_rebate',
|
|
255
274
|
],
|
|
256
275
|
statusActions: [
|
|
257
|
-
'
|
|
258
|
-
'
|
|
259
|
-
'
|
|
260
|
-
'
|
|
276
|
+
'get_veranta_funding_status',
|
|
277
|
+
'get_veranta_setup_status',
|
|
278
|
+
'get_veranta_builder_fee_status',
|
|
279
|
+
'get_veranta_delegation_status',
|
|
261
280
|
],
|
|
262
281
|
recoveryActions: [
|
|
263
|
-
'
|
|
264
|
-
'
|
|
282
|
+
'get_veranta_positions',
|
|
283
|
+
'close_veranta_position',
|
|
265
284
|
],
|
|
266
285
|
decommissionExample:
|
|
267
|
-
'
|
|
286
|
+
'get_veranta_positions -> close_veranta_position -> withdraw-to-user on execution wallet (Base USDC)',
|
|
268
287
|
credentialType: 'avantis_delegate',
|
|
269
288
|
credentialUx:
|
|
270
|
-
'Thirdfy mints and stores the encrypted
|
|
289
|
+
'Thirdfy mints and stores the encrypted Veranta delegate. CLI callers use Thirdfy auth only. Do not paste a private key.',
|
|
271
290
|
recommendedFundingChainId: 8453,
|
|
272
291
|
supportedFundingSourceChains: [
|
|
273
292
|
{ chainId: 8453, name: 'Base', path: 'native USDC in managed execution wallet (recommended)' },
|
|
@@ -283,32 +302,33 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
283
302
|
funding:
|
|
284
303
|
'Fund the managed execution wallet on Base (8453) with native USDC. Minimum collateral follows the live catalog notional floor.',
|
|
285
304
|
laneCompatibility:
|
|
286
|
-
'Use agent_wallet for solo managed-wallet onboarding and perps writes after avantis_delegate credential is stored. Use thirdfy or hybrid for delegated capital. Thirdfy builds EIP-712 intents; the delegate credential signs batched-market submissions. Relayer is default. Builder-fee collection stays unwired until
|
|
305
|
+
'Use agent_wallet for solo managed-wallet onboarding and perps writes after avantis_delegate credential is stored. Use thirdfy or hybrid for delegated capital. Thirdfy builds EIP-712 intents; the delegate credential signs batched-market submissions. Relayer is default. Builder-fee collection stays unwired until Veranta supplies a fee-enabled template.',
|
|
287
306
|
setupExample:
|
|
288
|
-
'actions --provider
|
|
307
|
+
'actions --provider veranta -> get_veranta_funding_status -> complete_veranta_onboarding (agent_wallet on Base 8453) -> get_veranta_setup_status before place_veranta_perps_order. Do not call approve_veranta_builder_fee until setup status shows a wired template.',
|
|
289
308
|
example:
|
|
290
|
-
'thirdfy-agent actions --provider
|
|
309
|
+
'thirdfy-agent actions --provider veranta && thirdfy-agent preflight --action place_veranta_perps_order --params \'{"pairIndex":0,"side":"long","collateralUsdc":10,"leverage":10,"orderType":"market"}\'',
|
|
291
310
|
};
|
|
292
311
|
}
|
|
293
312
|
if (provider === 'avantis-vault') {
|
|
294
313
|
return {
|
|
295
314
|
provider,
|
|
315
|
+
...verantaNamingFields(provider),
|
|
296
316
|
category: 'earn',
|
|
297
|
-
canonicalReadAction: '
|
|
298
|
-
canonicalWriteAction: '
|
|
299
|
-
readActions: ['
|
|
317
|
+
canonicalReadAction: 'get_veranta_vault_info',
|
|
318
|
+
canonicalWriteAction: 'deposit_veranta_vault',
|
|
319
|
+
readActions: ['get_veranta_vault_info', 'get_veranta_vault_position'],
|
|
300
320
|
orderManagementActions: [
|
|
301
|
-
'
|
|
302
|
-
'
|
|
303
|
-
'
|
|
304
|
-
'
|
|
321
|
+
'deposit_veranta_vault',
|
|
322
|
+
'request_veranta_vault_withdrawal',
|
|
323
|
+
'redeem_veranta_vault',
|
|
324
|
+
'claim_veranta_vault',
|
|
305
325
|
],
|
|
306
326
|
recommendedFundingChainId: 8453,
|
|
307
327
|
supportedChains: [8453],
|
|
308
328
|
funding: 'Fund the managed execution wallet on Base with native USDC before vault deposit.',
|
|
309
|
-
laneCompatibility: 'Avantis LP vault on Base. Use agent_wallet, thirdfy, or hybrid. Relayer is default.',
|
|
329
|
+
laneCompatibility: 'Veranta (formerly Avantis) LP vault on Base. Use agent_wallet, thirdfy, or hybrid. Relayer is default.',
|
|
310
330
|
example:
|
|
311
|
-
'thirdfy-agent actions --provider
|
|
331
|
+
'thirdfy-agent actions --provider veranta-vault && thirdfy-agent run --action get_veranta_vault_info --provider veranta-vault --json',
|
|
312
332
|
};
|
|
313
333
|
}
|
|
314
334
|
if (provider === 'bitfinex') {
|
|
@@ -901,12 +921,12 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
901
921
|
}
|
|
902
922
|
|
|
903
923
|
function getCachedProviderHintFromCapabilities(provider) {
|
|
904
|
-
const normalizedProvider =
|
|
924
|
+
const normalizedProvider = normalizeVenueProviderId(provider || '');
|
|
905
925
|
if (!normalizedProvider) return null;
|
|
906
926
|
const manifests = Array.isArray(getNegotiatedCapabilitiesCache()?.providers?.manifests)
|
|
907
927
|
? getNegotiatedCapabilitiesCache().providers.manifests
|
|
908
928
|
: [];
|
|
909
|
-
const match = manifests.find((entry) =>
|
|
929
|
+
const match = manifests.find((entry) => normalizeVenueProviderId(entry?.providerId || '') === normalizedProvider);
|
|
910
930
|
if (!match) return null;
|
|
911
931
|
const canonicalWriteActions = {
|
|
912
932
|
trading: 'swap',
|
|
@@ -958,13 +978,20 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
958
978
|
custodyMode: match.custodyMode || null,
|
|
959
979
|
description: match.description || null,
|
|
960
980
|
source: 'cli_capabilities_manifest',
|
|
981
|
+
...verantaNamingFields(normalizedProvider),
|
|
961
982
|
...(match.setupHints && typeof match.setupHints === 'object' ? { setupHints: match.setupHints } : {}),
|
|
962
983
|
};
|
|
963
984
|
}
|
|
964
985
|
|
|
986
|
+
// Veranta hints carry `providerAliases`; show the public name in messages (`--provider veranta`).
|
|
987
|
+
function providerLabelForHint(providerHint) {
|
|
988
|
+
const alias = Array.isArray(providerHint?.providerAliases) ? providerHint.providerAliases[0] : null;
|
|
989
|
+
return alias || providerHint.provider;
|
|
990
|
+
}
|
|
991
|
+
|
|
965
992
|
function formatProviderAmbiguousActionHint(providerHint) {
|
|
966
993
|
if (!providerHint) return '';
|
|
967
|
-
const p = providerHint
|
|
994
|
+
const p = providerLabelForHint(providerHint);
|
|
968
995
|
const w = providerHint.canonicalWriteAction;
|
|
969
996
|
if (w) return ` Provider ${p} expects ${w}.`;
|
|
970
997
|
return ` Provider ${p} did not declare a canonical write action in capabilities; run actions --provider ${p} first.`;
|
|
@@ -972,7 +999,7 @@ export function createProviderHints({ getNegotiatedCapabilitiesCache }) {
|
|
|
972
999
|
|
|
973
1000
|
function formatProviderUnknownActionHint(providerHint) {
|
|
974
1001
|
if (!providerHint) return '';
|
|
975
|
-
const p = providerHint
|
|
1002
|
+
const p = providerLabelForHint(providerHint);
|
|
976
1003
|
const w = providerHint.canonicalWriteAction;
|
|
977
1004
|
if (w) return ` Provider ${p} expects ${w}; run actions --provider ${p} first.`;
|
|
978
1005
|
return ` Provider ${p} did not declare a canonical write action in capabilities; run actions --provider ${p} first.`;
|