felix-mcp 2.0.132 → 2.0.133

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/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  Non-custodial trading tools for AI agents across Hyperliquid, Polymarket, and
8
8
  Derive. Live execution is the default; paper mode must be selected explicitly.
9
9
 
10
- Package version: `felix-mcp@2.0.132`. For prepublication review, use the local
10
+ Package version: `felix-mcp@2.0.133`. For prepublication review, use the local
11
11
  tarball below. Packaging checks do not certify live money workflows.
12
12
 
13
13
  ## Hosted (no install)
@@ -48,14 +48,14 @@ node --version
48
48
  npm ci
49
49
  candidate_dir="$(mktemp -d)"
50
50
  npm pack --pack-destination "$candidate_dir"
51
- npm install --global "$candidate_dir/felix-mcp-2.0.132.tgz"
51
+ npm install --global "$candidate_dir/felix-mcp-2.0.133.tgz"
52
52
  felix-keys --help
53
53
  ```
54
54
 
55
55
  After the operator publishes this version, the registry installation is:
56
56
 
57
57
  ```bash
58
- npm install --global felix-mcp@2.0.132
58
+ npm install --global felix-mcp@2.0.133
59
59
  ```
60
60
 
61
61
  ### 2. Set up keys locally
@@ -153,12 +153,12 @@ create_account(
153
153
 
154
154
  Account creation is funded-first:
155
155
 
156
- 1. The first call reserves an isolated account and returns its Polygon deposit
157
- address. No wallet is deployed and no chain gas is spent.
158
- 2. Send at least the returned minimum, currently $5, using one of the exact
159
- accepted stablecoins in the response.
156
+ 1. The first call reserves an isolated account and returns how to fund it:
157
+ `create_deposit` moves stablecoins from another network into the account's
158
+ Arc home Safe. No wallet is deployed and no chain gas is spent.
159
+ 2. Deposit at least the returned minimum, currently $5, with `create_deposit`.
160
160
  3. After confirmation, retry `create_account` with the same idempotency key.
161
- 4. Felix verifies the owner-controlled Polygon wallet and Arc home Safe/module,
161
+ 4. Felix verifies the owner-controlled Arc home Safe/module,
162
162
  enables supported venues, stores the least-privilege child credential
163
163
  locally, and activates it. If Arc verification is pending or unavailable,
164
164
  retry the same key; no live credential is activated.
@@ -173,9 +173,10 @@ Then verify and trade:
173
173
  get_status()
174
174
  get_money_map()
175
175
  search_markets(q="bitcoin")
176
- preview_order(instrument="crypto:BTC", side="long", size_usd=25, auto_fund=true)
177
- preview_execution_route(objective="directional", instrument="BTC", side="long", size_usd=25)
178
- place_order(instrument="crypto:BTC", side="long", size_usd=25, auto_fund=true)
176
+ create_deposit(from_currency="usdc_base", from_amount=17, idempotency_key="first-deposit")
177
+ preview_order(instrument="crypto:BTC", side="buy", size_usd=12)
178
+ fund_hypercore_from_arc(amount_usd=15, idempotency_key="first-hl-funding")
179
+ place_manual_order(instrument="crypto:BTC", side="buy", size_usd=12)
179
180
  get_situation()
180
181
  ```
181
182
 
@@ -225,12 +226,11 @@ account's reported home rather than assuming every account uses Arc.
225
226
  `get_deposit_address` reports `funded`, retry `create_account` with the same
226
227
  idempotency key; it completes owner-signed Arc-home onboarding before issuing
227
228
  a live key.
228
- - `fund_market` spends USDC from the Polygon owner wallet, not from the Arc
229
- home Safe; Polygon USDC deposits still count as spendable cash. Funding
230
- Polymarket or Hyperliquid from Arc home funds has not passed a live canary on
231
- this release, and owner-wallet venue funding on an account with an active Arc
232
- home has not been re-certified live on it either. Derive funding and venue
233
- returns are not supported in this release.
229
+ - A new account funds venues from its Arc home: `fund_polymarket_from_arc`
230
+ (Polymarket) and `fund_hypercore_from_arc` (Hyperliquid), 5 to 25 USDC each
231
+ plus a disclosed 1.00 USDC network fee, the same moves the app uses.
232
+ `fund_market` spends USDC from a legacy Polygon owner wallet only. Derive
233
+ funding is not supported in this release.
234
234
  - Arc transfers (`prepare_arc_transfer`, `submit_arc_transfer`) are not yet
235
235
  certified end to end. Do not start one just to fund a venue. For a transfer
236
236
  already started, keep its operation ID and key and follow
@@ -251,11 +251,9 @@ account's reported home rather than assuming every account uses Arc.
251
251
  - `arc_home_deposit`: owner USDC on another chain into the Arc home Safe.
252
252
  Felix tops up only the shortfall in the owner's Gateway balance, broadcast
253
253
  by the owner through your own `FELIX_<CHAIN>_RPC_URL`.
254
- - `arc_home_fund_venue`: Polymarket only. It stages native USDC in the
255
- owner's Polygon wallet and returns `venue_funded: false` with a
256
- `fund_market(venue=prediction_market)` next step; it does not by itself
257
- fund Polymarket. Hyperliquid and Derive are refused before anything is
258
- prepared.
254
+ - `arc_home_fund_venue`: legacy, for accounts with a Polygon owner wallet
255
+ record. New accounts use `fund_polymarket_from_arc` and
256
+ `fund_hypercore_from_arc`.
259
257
  - Recovery: `get_arc_home_operation` (read), `reconcile_arc_home_operation`,
260
258
  and `report_arc_home_mint` for a destination mint you broadcast yourself.
261
259
  Retry the original tool with the same `idempotency_key`; never start a
@@ -329,8 +327,7 @@ replacement within the account's owner-approved ceiling.
329
327
 
330
328
  The account's operation, daily, and lifetime ceilings are selected and signed
331
329
  when the account is created. They cannot be raised in place by an API key,
332
- agent, or Felix. `update_wallet_policy` supports `pause`, `resume`, `renew`, and
333
- `lockdown`, not higher ceilings.
330
+ agent, or Felix. To stop all trading on an account, use `panic`.
334
331
 
335
332
  To use higher ceilings, create a new account with the intended limits and move
336
333
  funds through the normal withdrawal and deposit flows. Lower local limits may be
@@ -359,7 +356,9 @@ symbol formats.
359
356
  4. Verify the fill, position, fee status, and account state with
360
357
  `get_situation`, `get_positions`, and `get_fills`.
361
358
 
362
- `auto_fund:true` may fund the venue before placing the order. The preview is the
359
+ `auto_fund:true` may fund the venue before placing the order from the launcher
360
+ key; an account's own key funds the venue first with `fund_hypercore_from_arc`
361
+ or `fund_polymarket_from_arc`. The preview is the
363
362
  authoritative cost and feasibility check. A successful funding leg is never
364
363
  repeated merely because the later order is rejected.
365
364
 
@@ -389,10 +388,12 @@ Safe; it does not retrieve venue balances.
389
388
  | Money action | Status in this candidate |
390
389
  | --- | --- |
391
390
  | Fund Polymarket or Hyperliquid from the Polygon owner wallet | End-to-end live evidence on earlier builds |
392
- | Fund Polymarket or Hyperliquid from Arc home funds | Not certified on this candidate; `arc_home_fund_venue` stages Polymarket only |
393
- | Arc home Safe withdrawal or deposit (`arc_home_withdraw`, `arc_home_deposit`) | Not certified on this candidate |
391
+ | Fund Polymarket or Hyperliquid from Arc home funds | `fund_polymarket_from_arc` and `fund_hypercore_from_arc` (the app's routes) |
392
+ | Arc home Safe withdrawal (`arc_home_withdraw`) | Available |
393
+ | Arc home Safe deposit from another chain (`arc_home_deposit`) | Not certified on this candidate; new accounts use `create_deposit` |
394
394
  | Fund Derive | Not certified; do not start a new operation |
395
- | Return from any venue | Not certified; do not start a new operation |
395
+ | Return Hyperliquid perps to the Arc home (`arc_home_hypercore_return`) | Available (the app's route) |
396
+ | Return from other venues | Not available from the MCP in this release; use Wallet in the Felix app |
396
397
  | Withdraw owner-wallet or Safe funds to an approved address | Available; does not pull funds from a venue |
397
398
  | Arc transfer between Gateway domains | Not certified; recover existing operations only |
398
399
  | Direct venue-to-venue movement | Not certified |
@@ -571,14 +572,13 @@ the complete protocol.
571
572
  and venue minimums can dominate small accounts. Do not infer economics from a
572
573
  different instrument or venue.
573
574
 
574
- Polymarket and Derive live execution fees use prepaid fee credit. Read it with
575
- `get_fee_balance`, preview with `preview_fee_top_up`, and fund it with
576
- `top_up_fee_balance`. The fee is reserved before submission, captured only after
577
- a confirmed fill, and released after a confirmed no-fill. Withdrawals do not
578
- collect trading fees and Felix does not create fee debt.
575
+ Felix's trading fee is charged from the trading account after each fill and
576
+ never blocks an order, so no prepaid fee credit or top-up is needed to trade.
577
+ Withdrawals do not collect trading fees.
579
578
 
580
- Reserved credit is still unspent, but unavailable for another order until its
581
- reservation is released or captured. Fee credit is not withdrawable cash or
579
+ Accounts that still hold prepaid fee credit from earlier releases can read it
580
+ with `get_fee_balance`; reserved credit is unavailable for another order until
581
+ its reservation is released or captured. Fee credit is not withdrawable cash or
582
582
  venue collateral and is excluded from the money map's wallet total. When the
583
583
  response includes `exact`, use its six-decimal unit strings for accounting;
584
584
  the numeric USD fields are convenient display values. Captured prepaid fees
@@ -604,7 +604,6 @@ owner-authorized workflow.
604
604
 
605
605
  ## Emergency actions
606
606
 
607
- - `update_wallet_policy(action="lockdown")`: owner-controlled account stop.
608
607
  - `panic(confirm=true)`: blocks new exposure, attempts to cancel and flatten,
609
608
  and revokes active account API keys.
610
609
  - `archive_account`: locks and archives only a completely flat child account.
@@ -18,7 +18,7 @@ then creates the identity and loads it into the session with no restart.
18
18
  Or let your AI agent run this single command:
19
19
 
20
20
  ~~~bash
21
- npx -y --package felix-mcp@2.0.132 felix-keys onboard --accept-terms --client claude
21
+ npx -y --package felix-mcp@2.0.133 felix-keys onboard --accept-terms --client claude
22
22
  ~~~
23
23
 
24
24
  After the user reviews the terms and explicitly authorizes acceptance, the agent
@@ -95,26 +95,26 @@ Empty accounts remain database-only and consume no chain gas.
95
95
 
96
96
  $5 is the activation minimum. It activates the wallet; it does not by itself
97
97
  fund a first live trade, and Hyperliquid needs more than $5. Beyond the traded
98
- notional, one live open also pays a flat funding network fee ($1.00 to
99
- Polymarket or Hyperliquid, $0.75 to Derive) and needs prepaid execution-fee
100
- credit, whose top-up minimum is $0.10. Approximate all-in floors for a first
101
- live open:
102
-
103
- - Polymarket: about $2.20 ($1 minimum order, $1.00 network fee, $0.10 top-up).
104
- Many markets set a higher share-based minimum; read preview_order.
98
+ notional, funding a venue from the Arc home pays a flat 1.00 USDC network fee
99
+ (5 to 25 USDC per move). Felix's trading fee is charged from the trading
100
+ account after each fill; no prepaid fee credit or top-up is needed. Approximate
101
+ all-in floors for a first live open:
102
+
103
+ - Polymarket: about $6.00 (fund_polymarket_from_arc moves at least $5, plus
104
+ the $1.00 network fee). Many markets set a share-based minimum; read
105
+ preview_order.
105
106
  - Derive: about $1.90 when funds already sit on the Derive chain, or about
106
107
  $4.90 bridged from Polygon, where the bridge minimum is $4. Derive's real
107
108
  minimum order is market-derived and its option fee carries a $0.10 base.
108
109
  Derive funding is under release hold in this release: do not start a new
109
110
  Derive funding operation, even if a preview reports executable:true.
110
- - Hyperliquid: about $11.10 ($10 minimum notional, $1.00 network fee, $0.10
111
- top-up). This one exceeds the $5 activation deposit.
111
+ - Hyperliquid: about $11.00 ($10 minimum notional, $1.00 network fee), plus
112
+ Hyperliquid's one-time account activation (about $1.20, deducted from the
113
+ first funding) on a new HyperCore account. This exceeds the $5 activation
114
+ deposit.
112
115
 
113
- Never route the whole owner balance to a venue. Venue funding is paid from
114
- owner cash and so is the fee-credit top-up, so sending everything to
115
- Polymarket leaves $0.00 at home, the first order is refused with
116
- 'fee_balance_required', and the top-up is then refused for insufficient owner
117
- balance. Keep at least the top-up plus the disclosed trading buffer at home.
116
+ Never route the whole Arc home balance to a venue: each move also pays the
117
+ 1.00 USDC network fee from the Arc home, so keep that much there.
118
118
 
119
119
  After funding is verified, activation usually takes 60-120 seconds and may take
120
120
  longer while venue onboarding settles. Keep the call open. If it is interrupted,
@@ -122,7 +122,7 @@ retry with the same idempotency key; never invent a new key for the same attempt
122
122
  The workflow resumes completed checkpoints and reports whether any money moved.
123
123
 
124
124
  The MCP derives a unique account owner from the local root owner, verifies and
125
- signs the exact Polygon Safe policy and Arc home Safe/module locally, then
125
+ signs the exact Arc home Safe/module locally, then
126
126
  enables supported venues. It mints a least-privilege live key only after the
127
127
  Arc home verifies, stores the account binding in Keychain, and activates it.
128
128
  If Arc verification is pending or unavailable, retry the same key; do not
@@ -130,14 +130,15 @@ create a replacement account or send funds to an unverified Arc address.
130
130
  Read 'get_deposit_address' before any deposit. Every deposit settles into the
131
131
  Arc home Safe; use 'create_deposit' for any token on its own network, and send
132
132
  USDC that is already on Arc only to 'direct_arc_usdc.address'.
133
- To move money in or out of the Arc home Safe itself, use 'arc_home_withdraw',
134
- 'arc_home_deposit', or 'arc_home_fund_venue' (Polymarket staging only: it
135
- lands native USDC in the Polygon owner wallet, then call 'fund_market'). These
136
- are owner-signed, need an 'idempotency_key', and are not live-certified yet.
133
+ To fund a venue from the Arc home, use 'fund_polymarket_from_arc' (Polymarket)
134
+ or 'fund_hypercore_from_arc' (Hyperliquid), 5 to 25 USDC plus a 1.00 USDC
135
+ Felix network fee, owner-signed locally, the same moves the app uses. To move money
136
+ in or out of the Arc home Safe itself, use 'arc_home_withdraw' or
137
+ 'arc_home_deposit'. These are owner-signed and need an 'idempotency_key'.
137
138
  Recover with 'get_arc_home_operation' and 'reconcile_arc_home_operation'.
138
139
  Between the Arc home Safe and your own Hyperliquid perps (the moves the app
139
140
  uses, 5 to 25 USDC each, Relay, owner-signed locally): 'fund_hypercore_from_arc'
140
- (Home to perps; a separate 1.00 USDC Felix fee) and 'arc_home_hypercore_return'
141
+ (Home to perps; a separate 1.00 USDC Felix network fee) and 'arc_home_hypercore_return'
141
142
  (perps to Home; no Felix fee). Select the account with 'use_child_account'
142
143
  first; reuse the same 'idempotency_key' after any timeout.
143
144
  Guided onboarding already created the encrypted recovery file; require
@@ -154,12 +155,11 @@ Then:
154
155
 
155
156
  1. Retry 'create_account' after its required deposit and wait for activation.
156
157
  2. Call 'get_money_map' and verify the active account ID and balances.
157
- 3. Call 'preview_order' with 'auto_fund:true' to see the all-in route,
158
- constraints, fees, prepaid fee-credit requirement, and expected duration
158
+ 3. Call 'preview_order' to see constraints, fees and the live minimum
159
159
  without moving money.
160
- 4. Call 'top_up_fee_balance' if 'fee_credit_check' is not ready. Prepaid
161
- execution-fee credit starts at $0 and 'auto_fund' does not create it.
162
- 5. Call 'place_order' with the same intent and a stable idempotency key.
160
+ 4. Fund the venue from the Arc home with 'fund_hypercore_from_arc' or
161
+ 'fund_polymarket_from_arc' (5 to 25 USDC plus the 1.00 USDC network fee).
162
+ 5. Call 'place_manual_order' with the same intent and a stable idempotency key.
163
163
  6. Verify the result with 'get_situation', positions, fills, and money state.
164
164
 
165
165
  ### Autonomous Polymarket agents
@@ -193,12 +193,13 @@ observe the existing intent, never to create a new one.
193
193
  Use preview_order before every new live order shape. Venue minimums and fees
194
194
  vary by instrument, and Derive's fixed venue fees can make a small option order
195
195
  uneconomical even when collateral is technically sufficient. Do not infer a
196
- minimum from a previous contract. Fee-credit top-ups also preserve a disclosed
197
- owner-wallet trading buffer by default; overriding that warning can leave the
198
- home wallet unable to auto-fund a venue.
196
+ minimum from a previous contract.
199
197
 
200
- ## SDK or custom signer path
198
+ ## SDK or custom signer path (retired)
201
199
 
200
+ Polygon Safe wallets are retired: every account's wallet is its Arc home Safe,
201
+ created by 'create_account', and the tools below answer
202
+ 'polygon_safe_hub_retired'. This section is kept for reference only.
202
203
  Use this path only when your application already owns the signer lifecycle.
203
204
  The authenticated manage key creates or selects the account; the private key
204
205
  must remain inside your wallet, HSM, or OS credential store.
@@ -304,16 +305,11 @@ Web equivalents:
304
305
  - Never synthesize a Polymarket slug, Derive contract, or venue symbol.
305
306
  - Call preview_order before every new live shape. It is the authoritative
306
307
  source for tradeability, minimum size, collateral, leverage, liquidity,
307
- all-in execution fees, prepaid execution-fee credit, and auto-funding
308
- requirements. A minimum learned from
308
+ all-in execution fees, and funding requirements. A minimum learned from
309
309
  a previous instrument or rejection is not reusable market metadata.
310
- Read its 'fee_credit_check' block. Every live open reserves prepaid
311
- execution-fee credit before it touches the venue and is refused with
312
- 'fee_balance_required' when that credit is short. A new account's credit is
313
- $0, nothing in onboarding creates it, and there is no signup grant, so the
314
- first live open needs 'top_up_fee_balance' first. Auto-funding does not buy
315
- it: auto_fund routes venue collateral only. 'fee_credit_check.ok: null' means
316
- the billing ledger could not be read and does not block; submission rechecks. Derive
310
+ Read its 'fee_credit_check' block: Felix's fee is charged from the trading
311
+ account after each fill and never blocks an order, so no prepaid fee credit
312
+ or top-up is needed. Derive
317
313
  option previews also expose exact quote-sized signed delta and venue-native
318
314
  gamma, theta, and vega impact. Missing Greek fields are unavailable, not zero.
319
315
  If the owner configured Derive Greek limits, the preview includes the exact
@@ -326,17 +322,16 @@ Web equivalents:
326
322
 
327
323
  ## First safe trade
328
324
 
329
- 1. get_status — verify active account, client compatibility, venue health.
330
- 2. get_money_map — verify account scope, completeness, and available funds.
331
- 3. search_markets or list_markets — select a returned canonical instrument.
332
- 4. preview_order — no money moves. Read 'fee_credit_check' and the live minimum.
333
- 5. get_fee_balance, then top_up_fee_balance if prepaid execution-fee credit is
334
- short. A new account starts at $0 credit and the first live open is refused
335
- with 'fee_balance_required' without it. Do this BEFORE funding a venue: the
336
- top-up is paid from owner wallet cash, so funding a venue first can leave
337
- nothing to pay it with. auto_fund does not buy fee credit.
338
- 6. place_order — live by default; set paper:true only for explicit simulation.
339
- 7. get_situation, positions, and fills — reconcile before another action.
325
+ 1. get_status: verify active account, client compatibility, venue health.
326
+ 2. get_money_map: verify account scope, completeness, and available funds.
327
+ 3. search_markets or list_markets: select a returned canonical instrument.
328
+ 4. preview_order: no money moves. Read the live minimum and fees.
329
+ 5. fund_hypercore_from_arc or fund_polymarket_from_arc: fund the venue from
330
+ the Arc home (5 to 25 USDC plus the 1.00 USDC network fee). No fee top-up is
331
+ needed: the fee is charged after each fill.
332
+ 6. place_manual_order: live, exactly like the app's ticket. For a simulation
333
+ use place_order with paper:true.
334
+ 7. get_situation, positions, and fills: reconcile before another action.
340
335
 
341
336
  For a timeout or unknown order result, reuse the same idempotency key and
342
337
  reconcile. Never create a replacement key until the original intent is known.
package/dist/index.js CHANGED
@@ -126,7 +126,7 @@ export function validatedApiBase(raw = process.env.FELIX_API_URL || `https://${O
126
126
  return parsed.origin;
127
127
  }
128
128
  const API = validatedApiBase();
129
- const MCP_VERSION = "2.0.132";
129
+ const MCP_VERSION = "2.0.133";
130
130
  const AES_GCM_IV_BYTES = 12;
131
131
  const AES_GCM_TAG_BYTES = 16;
132
132
  const MAX_MONEY_JOURNAL_BYTES = 16 * 1024 * 1024;
@@ -2720,6 +2720,7 @@ async function ensureManualTradingPolicy(accountId, ownerKey, authKey, consent =
2720
2720
  manualPolicyReadyUntil.set(cacheKey, Date.now() + MANUAL_POLICY_READY_TTL_MS);
2721
2721
  // The remembered yes only covers retrying a failed submit: once signed, any later draft asks the owner again.
2722
2722
  approvedTradingPolicyTerms.delete(termsId);
2723
+ relayedTradingPolicyTerms.delete(termsId);
2723
2724
  return { ok: true, status: renewal ? "renewed" : "ready", policy: signed.summary, money_moved: false };
2724
2725
  })().finally(() => tradingPolicySubmitsInFlight.delete(termsId));
2725
2726
  tradingPolicySubmitsInFlight.set(termsId, submitting);
@@ -2817,7 +2818,7 @@ const ARC_HOME_RECONCILE_POLL_MS = 5_000;
2817
2818
  const ARC_HOME_VENUES = ["polymarket"];
2818
2819
  const ARC_HOME_VENUE_CHAIN = { polymarket: "polygon" };
2819
2820
  const ARC_HOME_UNSUPPORTED_VENUES = {
2820
- hyperliquid: "Arc home -> Hyperliquid funding needs a venue continuation this client does not ship yet.",
2821
+ hyperliquid: "This tool does not fund Hyperliquid. Use fund_hypercore_from_arc (5 to 25 USDC from the Arc home to the owner's own Hyperliquid perps).",
2821
2822
  derive: "Arc home -> Derive funding is not executable in this release.",
2822
2823
  };
2823
2824
  function arcHomeFailure(error, operationId, moneyMoved) {
@@ -3708,6 +3709,82 @@ function fundingRpcAccess(targetAccountId) {
3708
3709
  ...(managingChild ? { account_id: selectedAccountId } : {}),
3709
3710
  };
3710
3711
  }
3712
+ // Opus QA r12: engine refusals that a new (Arc home) account reaches, mapped to the tool that works for it.
3713
+ const FUND_VENUE_FROM_ARC_HINT = "Fund the venue from the Arc home with fund_polymarket_from_arc (5 to 25 USDC plus a disclosed 1.00 USDC "
3714
+ + "network fee) or fund_hypercore_from_arc (Hyperliquid), then place the order. Nothing was signed and no money moved.";
3715
+ const FEE_CREDIT_TOOLS = new Set(["top_up_fee_balance", "preview_fee_top_up", "settle_fees", "preview_fee_settlement"]);
3716
+ const VENUE_FUNDING_TOOLS = new Set([
3717
+ "start_home_funding", "start_capital_move", "prepare_venue_bootstrap", "submit_venue_bootstrap",
3718
+ "arc_home_fund_venue", "fund_market", "start_fund_market",
3719
+ ]);
3720
+ export function withNewAccountNextStep(name, out, args = {}) {
3721
+ if (out.ok !== false || !isRecord(out.error))
3722
+ return out;
3723
+ // Never rewrite a result whose money may have moved or that needs reconciling (Opus QA r13).
3724
+ const moneyMaybeMoved = (record) => record.money_moved === true
3725
+ || record.money_moved === "unknown" || record.user_funds_moved === true || record.reconciliation_required === true
3726
+ || record.outcome_unknown === true;
3727
+ if ([out, out.error, out.result, out.workflow].some((record) => isRecord(record) && moneyMaybeMoved(record)))
3728
+ return out;
3729
+ if (isRecord(out.result) && isRecord(out.result.error) && isRecord(out.result.result)
3730
+ && moneyMaybeMoved(out.result.result))
3731
+ return out;
3732
+ const error = out.error;
3733
+ const codes = [error.code, error.reason, out.reason].map((value) => nonEmptyString(value) ?? "");
3734
+ const message = typeof error.message === "string" ? error.message : "";
3735
+ // The mapped hint replaces every copy of the old one (an async operation repeats it at the top level and in result).
3736
+ const next = (hint, nextTools, extra = {}) => ({
3737
+ ...out, ...extra,
3738
+ ...(typeof out.hint === "string" ? { hint } : {}),
3739
+ ...(isRecord(out.result) && isRecord(out.result.error)
3740
+ ? { result: { ...out.result, error: { ...out.result.error, hint } } } : {}),
3741
+ error: { ...error, hint }, next_tools: nextTools,
3742
+ });
3743
+ if (codes.includes("arc_home_venue_wallet_unavailable")) {
3744
+ return next(FUND_VENUE_FROM_ARC_HINT, ["fund_polymarket_from_arc", "fund_hypercore_from_arc"]);
3745
+ }
3746
+ if (codes.includes("polygon_safe_hub_retired")) {
3747
+ return next("This Polygon Safe tool is retired: the account's wallet is its Arc home Safe. See it with get_balances, "
3748
+ + "fund it with create_deposit, fund a venue with fund_polymarket_from_arc or fund_hypercore_from_arc, and stop "
3749
+ + "all trading with panic.", ["get_balances", "create_deposit", "fund_polymarket_from_arc", "fund_hypercore_from_arc", "panic"]);
3750
+ }
3751
+ if (codes.includes("venue_return_prepare_not_launch_enabled")) {
3752
+ // Opus QA r14: new venue returns via bring_home are not enabled; name what works instead of a raw route.
3753
+ const venue = String(error.venue ?? out.venue ?? args.venue ?? "").toLowerCase();
3754
+ const already = " A return you already started keeps going: retry it with its original idempotency_key, and see "
3755
+ + "balances with get_money_map.";
3756
+ if (venue === "crypto" || venue === "hyperliquid") {
3757
+ return next("Bring Hyperliquid perps money home with arc_home_hypercore_return (5 to 25 USDC to the Arc home). "
3758
+ + "No return was created and no money moved." + already, ["arc_home_hypercore_return", "get_money_map"], { retryable: false });
3759
+ }
3760
+ return next("Bringing money home from this venue is not available from the MCP in this release; use Wallet in the "
3761
+ + "Felix app. No return was created and no money moved." + already, ["get_money_map"], { retryable: false });
3762
+ }
3763
+ if (codes.includes("fee_credit_topup_not_ready") && FEE_CREDIT_TOOLS.has(name)) {
3764
+ return next("Not needed: Felix charges its fee from the trading account as each order fills, so no prepaid fee "
3765
+ + "credit is required to trade. Nothing was signed and no money moved.", ["preview_order", "place_manual_order"], { fee_credit_required: false });
3766
+ }
3767
+ if (VENUE_FUNDING_TOOLS.has(name) && /lacks the '(?:transfer|manage)' scope/.test(message)) {
3768
+ const venue = String(args.venue ?? "").toLowerCase();
3769
+ // Only name routes that work from an account session (Opus QA r14: bring_home's new returns are not enabled).
3770
+ if (args.direction === "bring_home") {
3771
+ if (venue === "hyperliquid") {
3772
+ return next("Bring Hyperliquid perps money home with arc_home_hypercore_return (5 to 25 USDC to the Arc home). "
3773
+ + "Nothing was signed and no money moved.", ["arc_home_hypercore_return"]);
3774
+ }
3775
+ return next("Bringing money home from this venue is not available from the MCP in this release; use Wallet in the "
3776
+ + "Felix app. Nothing was signed and no money moved.", []);
3777
+ }
3778
+ if (venue === "lighter") {
3779
+ return next("Funding Lighter from the MCP is not available in this release; use Wallet in the Felix app. Nothing "
3780
+ + "was signed and no money moved.", []);
3781
+ }
3782
+ if (venue === "" || venue === "hyperliquid" || venue === "polymarket" || venue === "prediction_market") {
3783
+ return next(FUND_VENUE_FROM_ARC_HINT, ["fund_polymarket_from_arc", "fund_hypercore_from_arc"]);
3784
+ }
3785
+ }
3786
+ return out;
3787
+ }
3711
3788
  function isChildManagementRequest(method, path) {
3712
3789
  const pathname = path.split("?", 1)[0];
3713
3790
  if (method === "GET" || method === "DELETE") {
@@ -3719,9 +3796,15 @@ function isChildManagementRequest(method, path) {
3719
3796
  // key); the child is named by account_id (engine _target_context).
3720
3797
  || (method === "GET" && isArcHomeManageRoute(pathname));
3721
3798
  }
3799
+ // Opus QA r12 F3: the portfolio mandate needs "manage" (routes_quant_desk.py update_mandate), which the account's
3800
+ // read/trade key lacks; the engine targets the account via body.account_id (_target_context).
3801
+ if (method === "PUT")
3802
+ return pathname === "/v1/portfolio/mandate";
3722
3803
  if (method !== "POST")
3723
3804
  return false;
3724
3805
  return pathname === "/v1/referrals"
3806
+ // Owner-signed venue bootstrap (routes_agent_capital.py: require("manage"), money_context(account_id)).
3807
+ || pathname.startsWith("/v1/agent-capital/venue-bootstrap/")
3725
3808
  || pathname === "/v1/fund"
3726
3809
  || pathname === "/v1/bring-home"
3727
3810
  || pathname === "/v1/withdraw"
@@ -7261,6 +7344,12 @@ async function call(method, path, body, opts = {}) {
7261
7344
  && runtimeManagedAccountId
7262
7345
  && UUID_RE.test(runtimeManagedAccountId)
7263
7346
  && isChildManagementRequest(method, path)) {
7347
+ const explicitAccount = isRecord(requestBody) ? requestBody.account_id
7348
+ : new URLSearchParams(path.split("?", 2)[1] ?? "").get("account_id") ?? undefined;
7349
+ if (explicitAccount !== undefined && explicitAccount !== null
7350
+ && String(explicitAccount).toLowerCase() !== runtimeManagedAccountId.toLowerCase()) {
7351
+ return clientError("account_mismatch", "This session is working on a different account than the account_id you passed. Nothing was sent.", "Omit account_id to act on the selected account, or call use_child_account with the other account first.", { selected_account_id: runtimeManagedAccountId, money_moved: false });
7352
+ }
7264
7353
  key = START_KEY;
7265
7354
  const pathname = path.split("?", 1)[0];
7266
7355
  const targetInQuery = method === "GET"
@@ -7277,7 +7366,7 @@ async function call(method, path, body, opts = {}) {
7277
7366
  }
7278
7367
  }
7279
7368
  if (!key && !opts.public) {
7280
- return clientError("missing_api_key", "Set FELIX_API_KEY to a Felix fk_ key.", "Run the pinned felix-keys onboard command, then restart the MCP. It creates the local identity and encrypted recovery file automatically.");
7369
+ return clientError("missing_api_key", "Set FELIX_API_KEY to a Felix fk_ key.", "Call the onboard tool (no restart needed). It creates the local identity and encrypted recovery file automatically.");
7281
7370
  }
7282
7371
  const idempotencyKey = opts.idempotencyKey || (opts.idempotent ? randomUUID() : undefined);
7283
7372
  const transportAttempts = opts.retryOnError === false ? 1 : (method === "GET" || idempotencyKey ? 2 : 1);
@@ -12412,7 +12501,7 @@ const TOOLS = [
12412
12501
  },
12413
12502
  {
12414
12503
  name: "preview_order",
12415
- description: "Preview an order before placing it. No money moves; returns estimated fill, fees, live minimum, collateral, selected venue, and projected Hyperliquid leverage. fee_credit_check reports the prepaid execution-fee credit this open would reserve: a live open is refused when that credit is short, it starts at $0 on a new account, and auto-funding does not buy it -- call top_up_fee_balance first. Derive options also return exact quote-sized signed delta plus venue-native gamma, theta, and vega impact; missing Greeks remain unavailable, never zero. Set auto_fund:true to include the exact owner-to-venue funding plan without executing it.",
12504
+ description: "Preview an order before placing it. No money moves; returns estimated fill, fees, live minimum, collateral, selected venue, and projected Hyperliquid leverage. fee_credit_check reports how the Felix fee is collected: it is charged from the trading account after each fill and never blocks an order, so no prepaid fee credit or top-up is needed. Derive options also return exact quote-sized signed delta plus venue-native gamma, theta, and vega impact; missing Greeks remain unavailable, never zero. Set auto_fund:true to include the exact owner-to-venue funding plan without executing it.",
12416
12505
  inputSchema: schema({
12417
12506
  ...orderFields,
12418
12507
  auto_fund: booleanProp("Include a read-only funding plan when venue collateral is short. This preview never moves money."),
@@ -12635,7 +12724,7 @@ const TOOLS = [
12635
12724
  },
12636
12725
  {
12637
12726
  name: "place_manual_order",
12638
- description: "Place a LIVE manual order exactly like the app's ticket: market or limit, post-only, resting (Polymarket time_in_force GTC), reduce-only, leverage up to the venue maximum. This moves real money. Opening orders stay within this key's max_order_usd and max_daily_usd and the account's portfolio mandate. funding (from Home) also needs the transfer scope. If the account owner's trading policy (the app's device trading policy) is missing or within 3 days of expiry, it is signed locally first and returned in trading_policy (it includes Lighter Premium and Felix partner-fee consent). Reuse the same idempotency_key to retry safely; read the outcome with get_manual_order_receipt.",
12727
+ description: "Place a LIVE manual order exactly like the app's ticket: market or limit, post-only, resting (Polymarket time_in_force GTC), reduce-only, leverage up to the venue maximum. This moves real money. Opening orders stay within this key's max_order_usd and max_daily_usd and the account's portfolio mandate. An account's own key does not fund from Home: fund the venue first with fund_hypercore_from_arc or fund_polymarket_from_arc. If the account owner's trading policy (the app's device trading policy) is missing or within 3 days of expiry, it is signed locally first and returned in trading_policy (it includes Lighter Premium and Felix partner-fee consent). Reuse the same idempotency_key to retry safely; read the outcome with get_manual_order_receipt.",
12639
12728
  inputSchema: schema({ ...manualOrderFields, idempotency_key: stringProp("Retry-safety key; reuse it for retries of the same order. Auto-generated when omitted."),
12640
12729
  accept_trading_policy: booleanProp("Only after the owner answered yes to the trading_policy question this tool returned."),
12641
12730
  trading_policy_terms_id: stringProp("The trading_policy_terms_id from that question.") }, ["instrument", "side", "size_usd"]),
@@ -13187,9 +13276,9 @@ const TOOLS = [
13187
13276
  },
13188
13277
  {
13189
13278
  name: "arc_home_fund_venue",
13190
- description: "Stage Polymarket funding from the Arc home Safe: an owner-signed Circle Gateway withdrawal whose destination Felix resolves to this account's own Polygon owner wallet (the client refuses any other destination before signing). Completion is native USDC in the Polygon owner wallet, NOT Polymarket collateral: the result sets venue_funded=false and returns next_action fund_market(venue=prediction_market), a separate owner-signed call. Hyperliquid and Derive are refused before anything is prepared. Not live-certified on this release.",
13279
+ description: "LEGACY: for accounts that still have a Polygon owner wallet record. A new account funds Polymarket with fund_polymarket_from_arc and Hyperliquid with fund_hypercore_from_arc instead (this tool answers arc_home_venue_wallet_unavailable for them). Stages Polymarket funding from the Arc home Safe: an owner-signed Circle Gateway withdrawal whose destination Felix resolves to this account's own Polygon owner wallet (the client refuses any other destination before signing). Completion is native USDC in the Polygon owner wallet, NOT Polymarket collateral: the result sets venue_funded=false and returns next_action fund_market(venue=prediction_market), a separate owner-signed call. Hyperliquid and Derive are refused before anything is prepared. Not live-certified on this release.",
13191
13280
  inputSchema: schema({
13192
- venue: stringProp("Destination venue. Only polymarket is supported by this client.", ARC_HOME_VENUES),
13281
+ venue: stringProp("Destination venue. Only polymarket is supported by this tool; for Hyperliquid use fund_hypercore_from_arc."),
13193
13282
  amount_usd: numberProp("USDC to deliver to the Polygon owner wallet, at most six decimals.", 0.000001, ARC_HOME_MAX_AMOUNT_USD),
13194
13283
  max_fee_usd: numberProp("Owner-paid Circle Gateway fee ceiling. Defaults to 0.05.", 0.000001, ARC_HOME_MAX_FEE_USD),
13195
13284
  submit_destination_mint: booleanProp("Also broadcast the final Polygon mint into the owner wallet with the owner key through your own FELIX_POLYGON_RPC_URL. Defaults to true; that gas is owner paid."),
@@ -13258,12 +13347,12 @@ const TOOLS = [
13258
13347
  },
13259
13348
  {
13260
13349
  name: "get_fee_balance",
13261
- description: "Read prepaid execution-fee credit. Live Polymarket and Derive opens reserve this credit before submission; withdrawals never collect trading fees.",
13350
+ description: "Read any prepaid execution-fee credit left from earlier releases. New orders do not need it: Felix's fee is charged from the trading account after each fill and never blocks an order. Withdrawals never collect trading fees.",
13262
13351
  inputSchema: schema({}),
13263
13352
  },
13264
13353
  {
13265
13354
  name: "preview_fee_top_up",
13266
- description: "Preview an owner-signed execution-fee credit top-up without signing or exposing Felix's collection address. Nothing moves until top_up_fee_balance is called.",
13355
+ description: "Legacy, not needed to trade (Felix's fee is charged after each fill). Preview an owner-signed execution-fee credit top-up without signing or exposing Felix's collection address. Nothing moves until top_up_fee_balance is called.",
13267
13356
  inputSchema: schema({
13268
13357
  amount_usd: numberProp("USDC.e amount to prepay for future live execution fees.", 0.1, 10_000),
13269
13358
  idempotency_key: stringProp("Required workflow replay key. Reuse this exact key for top_up_fee_balance."),
@@ -13271,7 +13360,7 @@ const TOOLS = [
13271
13360
  },
13272
13361
  {
13273
13362
  name: "top_up_fee_balance",
13274
- description: "Sign one bounded USDC.e transfer locally and credit it for live execution fees. By default this refuses to consume the recommended owner-wallet trading buffer. Orders reserve exact fees before submission; no fee debt is created.",
13363
+ description: "Legacy: sign one bounded USDC.e transfer locally and credit it as prepaid execution-fee credit (accounts with a Polygon owner wallet only). Not needed to trade: Felix's fee is charged from the trading account after each fill and never blocks an order.",
13275
13364
  inputSchema: schema({
13276
13365
  amount_usd: numberProp("USDC.e amount to prepay for future live execution fees.", 0.1, 10_000),
13277
13366
  idempotency_key: stringProp("Required workflow replay key. Reuse it after any timeout or restart."),
@@ -13280,7 +13369,7 @@ const TOOLS = [
13280
13369
  },
13281
13370
  {
13282
13371
  name: "preview_fee_settlement",
13283
- description: "Deprecated compatibility alias for preview_fee_top_up. It previews prepaid execution-fee credit and never exposes the collection address.",
13372
+ description: "Legacy, not needed to trade. Deprecated compatibility alias for preview_fee_top_up. It previews prepaid execution-fee credit and never exposes the collection address.",
13284
13373
  inputSchema: schema({
13285
13374
  amount_usd: numberProp("USDC.e amount to prepay for future live execution fees.", 0.1, 10_000),
13286
13375
  idempotency_key: stringProp("Required workflow replay key. Reuse this exact key for settle_fees."),
@@ -13288,7 +13377,7 @@ const TOOLS = [
13288
13377
  },
13289
13378
  {
13290
13379
  name: "settle_fees",
13291
- description: "Deprecated compatibility alias for top_up_fee_balance. It adds prepaid credit; it does not settle debt and is never called by withdrawals.",
13380
+ description: "Legacy, not needed to trade. Deprecated compatibility alias for top_up_fee_balance. It adds prepaid credit; it does not settle debt and is never called by withdrawals.",
13292
13381
  inputSchema: schema({
13293
13382
  amount_usd: numberProp("USDC.e amount to prepay for future live execution fees.", 0.1, 10_000),
13294
13383
  idempotency_key: stringProp("Required workflow replay key. Reuse it after any timeout or restart."),
@@ -13376,7 +13465,7 @@ const TOOLS = [
13376
13465
  },
13377
13466
  {
13378
13467
  name: "init_wallet_onboarding",
13379
- description: `Start advanced client-owned Safe onboarding. The owner key must be generated and retained outside Felix; only public addresses are sent. Read ${GETTING_STARTED_GUIDE_URI} before implementing the signing flow.`,
13468
+ description: `RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Start advanced client-owned Safe onboarding. The owner key must be generated and retained outside Felix; only public addresses are sent. Read ${GETTING_STARTED_GUIDE_URI} before implementing the signing flow.`,
13380
13469
  inputSchema: schema({
13381
13470
  owner_address: stringProp("Client-owned EVM address.", undefined, { pattern: EVM_ADDRESS_RE.source }),
13382
13471
  home_address: stringProp("Optional fixed sweep-home address. Defaults to owner.", undefined, { pattern: EVM_ADDRESS_RE.source }),
@@ -13390,7 +13479,7 @@ const TOOLS = [
13390
13479
  },
13391
13480
  {
13392
13481
  name: "deploy_wallet_onboarding",
13393
- description: `Verify the owner's locally validated personal-sign challenge and activate the Safe policy wallet. Accepts a signature, never the owner key. Follow ${GETTING_STARTED_GUIDE_URI}.`,
13482
+ description: `RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Verify the owner's locally validated personal-sign challenge and activate the Safe policy wallet. Accepts a signature, never the owner key. Follow ${GETTING_STARTED_GUIDE_URI}.`,
13394
13483
  inputSchema: schema({
13395
13484
  onboarding_id: stringProp("Onboarding UUID.", undefined, { pattern: UUID_RE.source }),
13396
13485
  proof_signature: stringProp("0x-prefixed 65-byte owner proof signature.", undefined, { pattern: EVM_SIGNATURE_RE.source }),
@@ -13400,7 +13489,7 @@ const TOOLS = [
13400
13489
  },
13401
13490
  {
13402
13491
  name: "complete_wallet_onboarding",
13403
- description: `Verify and relay the owner's locally validated exact Safe module-enable and fallback-handler signatures, then link the client-owned wallet. Follow ${GETTING_STARTED_GUIDE_URI}.`,
13492
+ description: `RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Verify and relay the owner's locally validated exact Safe module-enable and fallback-handler signatures, then link the client-owned wallet. Follow ${GETTING_STARTED_GUIDE_URI}.`,
13404
13493
  inputSchema: schema({
13405
13494
  onboarding_id: stringProp("Onboarding UUID.", undefined, { pattern: UUID_RE.source }),
13406
13495
  enable_signature: stringProp("0x-prefixed 65-byte canonical Safe signature.", undefined, { pattern: EVM_SIGNATURE_RE.source }),
@@ -13419,7 +13508,7 @@ const TOOLS = [
13419
13508
  },
13420
13509
  {
13421
13510
  name: "migrate_wallet_to_v3",
13422
- description: "Migrate a caller-owned legacy Safe to Felix V3 in one resumable local workflow: prove ownership, deploy only the V3 policy, locally execute enable/fallback/disable-V2, and confirm atomic account promotion.",
13511
+ description: "RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Migrate a caller-owned legacy Safe to Felix V3 in one resumable local workflow: prove ownership, deploy only the V3 policy, locally execute enable/fallback/disable-V2, and confirm atomic account promotion.",
13423
13512
  inputSchema: schema({
13424
13513
  max_operation_usd: numberProp("Maximum autonomous operation size. Defaults to the legacy wallet limit.", 0),
13425
13514
  daily_limit_usd: numberProp("Maximum autonomous daily total. Defaults to the legacy wallet limit.", 0),
@@ -13432,7 +13521,7 @@ const TOOLS = [
13432
13521
  },
13433
13522
  {
13434
13523
  name: "prepare_wallet_policy",
13435
- description: "Prepare an owner-signed Safe V3 pause, resume, renewal, or emergency lockdown. Lockdown atomically pauses the agent and revokes fixed Polymarket approvals.",
13524
+ description: "RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Prepare an owner-signed Safe V3 pause, resume, renewal, or emergency lockdown. Lockdown atomically pauses the agent and revokes fixed Polymarket approvals.",
13436
13525
  inputSchema: schema({
13437
13526
  action: stringProp("pause|resume|renew|lockdown.", ["pause", "resume", "renew", "lockdown"]),
13438
13527
  delegation_days: integerProp("Renewal lifetime in days. Valid only for renew; maximum 90.", 1, 90),
@@ -13442,7 +13531,7 @@ const TOOLS = [
13442
13531
  },
13443
13532
  {
13444
13533
  name: "submit_wallet_policy",
13445
- description: "Relay an exact owner-signed Safe V3 policy transaction. Accepts only the sealed policy token and canonical Safe signature.",
13534
+ description: "RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Relay an exact owner-signed Safe V3 policy transaction. Accepts only the sealed policy token and canonical Safe signature.",
13446
13535
  inputSchema: schema({
13447
13536
  policy_token: stringProp("Opaque sealed policy intent returned by prepare_wallet_policy.", undefined, { minLength: 1, maxLength: 16000 }),
13448
13537
  owner_signature: stringProp("0x-prefixed 65-byte canonical EIP-712 signature.", undefined, { pattern: EVM_SIGNATURE_RE.source }),
@@ -13452,7 +13541,7 @@ const TOOLS = [
13452
13541
  },
13453
13542
  {
13454
13543
  name: "update_wallet_policy",
13455
- description: "Locally verify, sign, and relay a Safe V3 pause, resume, renewal, or emergency lockdown in one replay-safe workflow. Lockdown also revokes fixed Polymarket approvals.",
13544
+ description: "RETIRED: Polygon Safe wallets are retired and Felix answers 410 polygon_safe_hub_retired; every account's wallet is its Arc home Safe (fund it with create_deposit; stop all trading with panic). Locally verify, sign, and relay a Safe V3 pause, resume, renewal, or emergency lockdown in one replay-safe workflow. Lockdown also revokes fixed Polymarket approvals.",
13456
13545
  inputSchema: schema({
13457
13546
  action: stringProp("pause|resume|renew|lockdown.", ["pause", "resume", "renew", "lockdown"]),
13458
13547
  delegation_days: integerProp("Renewal lifetime in days. Valid only for renew; maximum 90.", 1, 90),
@@ -13897,7 +13986,7 @@ const TOOLS = [
13897
13986
  },
13898
13987
  {
13899
13988
  name: "create_account",
13900
- description: `Create a real-money Felix account, like app.felix.trade. The first call reserves one isolated identity, binds its owner, and (until the account's Arc home holds the $5 minimum) returns account_funding_required with deposit_flow: pay with create_deposit, then retry the exact same idempotency_key; it never hands out a Polygon address. Felix then sets up and verifies the Arc home Safe/module, signs the account owner's trading policy locally (the app's device trading policy: no risk limits, Hyperliquid fast-custody trade keys, and Lighter Premium with Felix partner fees, returned in trading_policy), and mints a live key. The $5 deposit does not fund a first live trade, and prepaid execution-fee credit is separate. Emits progress every 15 seconds. Requires the registered local owner signer and launcher manage key. Cold start: ${GETTING_STARTED_GUIDE_URI}.`,
13989
+ description: `Create a real-money Felix account, like app.felix.trade. The first call reserves one isolated identity, binds its owner, and (until the account's Arc home holds the $5 minimum) returns account_funding_required with deposit_flow: pay with create_deposit, then retry the exact same idempotency_key; it never hands out a Polygon address. Felix then sets up and verifies the Arc home Safe/module, signs the account owner's trading policy locally (the app's device trading policy: no risk limits, Hyperliquid fast-custody trade keys, and Lighter Premium with Felix partner fees, returned in trading_policy), and mints a live key. The $5 deposit does not fund a first live trade: fund the venue with fund_hypercore_from_arc or fund_polymarket_from_arc. No prepaid fee credit is needed; Felix's fee is charged after each fill. Emits progress every 15 seconds. Requires the registered local owner signer and launcher manage key. Cold start: ${GETTING_STARTED_GUIDE_URI}.`,
13901
13990
  inputSchema: schema({
13902
13991
  email: stringProp("Optional new email for the isolated child. Omit to generate an internal identity."),
13903
13992
  label: stringProp("Optional account/live-key label."),
@@ -16878,9 +16967,10 @@ export function makeServer() {
16878
16967
  }
16879
16968
  case "arc_home_fund_venue": {
16880
16969
  const venue = nonEmptyString(a.venue)?.toLowerCase();
16881
- const unsupported = venue ? ARC_HOME_UNSUPPORTED_VENUES[venue] : undefined;
16970
+ const unsupported = venue && Object.hasOwn(ARC_HOME_UNSUPPORTED_VENUES, venue)
16971
+ ? ARC_HOME_UNSUPPORTED_VENUES[venue] : undefined;
16882
16972
  const bad = (unsupported
16883
- ? clientError("arc_home_venue_unsupported", unsupported, "Nothing was prepared or signed. For Polymarket use venue=polymarket; for other venues use fund_market from the Polygon owner wallet where that venue is certified.", { venue, money_moved: false })
16973
+ ? clientError("arc_home_venue_unsupported", unsupported, "Nothing was prepared or signed. Fund Hyperliquid with fund_hypercore_from_arc and Polymarket with fund_polymarket_from_arc.", { venue, money_moved: false })
16884
16974
  : undefined)
16885
16975
  || (!venue || !ARC_HOME_VENUES.includes(venue)
16886
16976
  ? clientError("invalid_argument", `venue must be one of ${ARC_HOME_VENUES.join(", ")}.`)
@@ -19867,6 +19957,7 @@ export function makeServer() {
19867
19957
  }
19868
19958
  : {});
19869
19959
  }
19960
+ out = withNewAccountNextStep(name, out, a);
19870
19961
  if (liveMutation) {
19871
19962
  out = { ...out, idempotency_key: liveMutation.key };
19872
19963
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "felix-mcp",
3
- "version": "2.0.132",
3
+ "version": "2.0.133",
4
4
  "mcpName": "trade.felix/mcp",
5
5
  "description": "Non-custodial trading infrastructure for AI agents: one wallet, one risk policy, every market.",
6
6
  "homepage": "https://felix.trade/docs",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "trade.felix/mcp",
4
4
  "title": "Felix MCP",
5
5
  "description": "Non-custodial trading infrastructure for AI agents across prediction markets, crypto, and options.",
6
- "version": "2.0.132",
6
+ "version": "2.0.133",
7
7
  "websiteUrl": "https://felix.trade/docs",
8
8
  "icons": [
9
9
  {
@@ -25,7 +25,7 @@
25
25
  {
26
26
  "registryType": "npm",
27
27
  "identifier": "felix-mcp",
28
- "version": "2.0.132",
28
+ "version": "2.0.133",
29
29
  "transport": {
30
30
  "type": "stdio"
31
31
  }