felix-mcp 2.0.129 → 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 +50 -48
- package/dist/arc-first-deposit.js +366 -0
- package/dist/arc-polygon-funding.js +1207 -0
- package/dist/arc-venue-app-policy.js +24 -0
- package/dist/funding.js +27 -2
- package/dist/getting-started-guide.js +58 -57
- package/dist/index.js +1143 -125
- package/dist/manual-policy.js +281 -0
- package/dist/redact-output.js +3 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// MANUAL_POLICY_MCP_20261117: the account owner's Manual trading policy (the app's "device trading policy").
|
|
2
|
+
//
|
|
3
|
+
// Every manual order and every fund-from-Home order runs under this owner-signed policy. The app prepares it
|
|
4
|
+
// and the owner's device signs it; the owner decided (2026-11-17) that MCP owners never have to visit the site,
|
|
5
|
+
// so the MCP prepares it through /v1/manual/trading-policy and signs it locally with the account's owner key.
|
|
6
|
+
//
|
|
7
|
+
// Never blind-sign: the prepared text is parsed line by line against the engine's canonical mandate format
|
|
8
|
+
// (risk_authorizer.policy.canonical_mandate_message) and must name THIS account, THIS owner, the account's
|
|
9
|
+
// deterministic Manual key, read/trade scopes, known venues and the app's unrestricted Manual limits. Optional
|
|
10
|
+
// sections are only the ones the engine emits, in canonical JSON.
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
import { getAddress, isAddress } from "viem";
|
|
13
|
+
import { privateKeyToAccount } from "viem/accounts";
|
|
14
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
15
|
+
const HASH_RE = /^(?:0x)?[0-9a-f]{64}$/;
|
|
16
|
+
const HEADER = "Felix autonomous trading mandate";
|
|
17
|
+
const KNOWN_VENUES = ["derive", "hyperliquid", "hyperliquid_spot", "lighter", "polymarket"];
|
|
18
|
+
// risk_authorizer.policy.UNRESTRICTED_LIMITS: the owner's own manual trading carries no risk limits.
|
|
19
|
+
const UNRESTRICTED = {
|
|
20
|
+
max_order_units: "1000000000000000",
|
|
21
|
+
max_daily_units: "1000000000000000",
|
|
22
|
+
max_daily_loss_units: "1000000000000000",
|
|
23
|
+
max_position_units: "1000000000000000",
|
|
24
|
+
max_concentration_bps: "10000",
|
|
25
|
+
max_slippage_bps: "10000",
|
|
26
|
+
max_leverage: "100",
|
|
27
|
+
};
|
|
28
|
+
const LIGHTER_PURPOSE = "Upgrade my own Lighter account to Premium and approve Felix partner fees. "
|
|
29
|
+
+ "Lighter collects Felix fees on fills, in addition to its Premium fees. "
|
|
30
|
+
+ "Renew approvals within this trading policy; never downgrade automatically.";
|
|
31
|
+
const BASE_FIELDS = [
|
|
32
|
+
"domain", "schema_version", "mandate_id", "mandate_version", "account_id", "api_key_id", "owner",
|
|
33
|
+
"fixed_home", "scopes", "venues", "instruments", "max_order_units", "max_daily_units",
|
|
34
|
+
"max_daily_loss_units", "max_position_units", "max_concentration_bps", "max_slippage_bps", "max_leverage",
|
|
35
|
+
"allow_reduce_only_after_expiry", "valid_from", "mandate_expires_at", "grant_expires_at", "nonce",
|
|
36
|
+
];
|
|
37
|
+
const MAX_POLICY_DAYS = 366;
|
|
38
|
+
const FAST_ACTIONS = ["order", "cancel", "cancelByCloid", "batchModify", "updateLeverage"];
|
|
39
|
+
export class ManualPolicyError extends Error {
|
|
40
|
+
code;
|
|
41
|
+
constructor(code, message) {
|
|
42
|
+
super(message);
|
|
43
|
+
this.code = code;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function fail(message) {
|
|
47
|
+
throw new ManualPolicyError("trading_policy_unverified", message);
|
|
48
|
+
}
|
|
49
|
+
/** services/engine/retail_execution_policy.manual_key_id: uuid.UUID(bytes=sha256(...)[:16], version=4). */
|
|
50
|
+
export function manualPolicyKeyId(accountId) {
|
|
51
|
+
if (!UUID_RE.test(accountId))
|
|
52
|
+
fail("The account id is not a valid UUID.");
|
|
53
|
+
const raw = createHash("sha256").update(`felix-retail-manual-key-v1:${accountId}`).digest().subarray(0, 16);
|
|
54
|
+
const bytes = Buffer.from(raw);
|
|
55
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x40;
|
|
56
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
57
|
+
const hex = bytes.toString("hex");
|
|
58
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
59
|
+
}
|
|
60
|
+
/** Python json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=True). */
|
|
61
|
+
function canonicalJson(value) {
|
|
62
|
+
if (value === null || typeof value === "boolean")
|
|
63
|
+
return JSON.stringify(value);
|
|
64
|
+
if (typeof value === "number") {
|
|
65
|
+
if (!Number.isFinite(value))
|
|
66
|
+
fail("The policy contains a non-finite number.");
|
|
67
|
+
return JSON.stringify(value);
|
|
68
|
+
}
|
|
69
|
+
if (typeof value === "string") {
|
|
70
|
+
return JSON.stringify(value).replace(/[\u007f-]/g, (c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
71
|
+
}
|
|
72
|
+
if (Array.isArray(value))
|
|
73
|
+
return `[${value.map(canonicalJson).join(",")}]`;
|
|
74
|
+
if (typeof value === "object") {
|
|
75
|
+
const keys = Object.keys(value).sort();
|
|
76
|
+
return `{${keys.map((key) => `${canonicalJson(key)}:${canonicalJson(value[key])}`).join(",")}}`;
|
|
77
|
+
}
|
|
78
|
+
fail("The policy contains an unsupported value.");
|
|
79
|
+
}
|
|
80
|
+
function parseCanonicalJsonLine(raw, label) {
|
|
81
|
+
let parsed;
|
|
82
|
+
try {
|
|
83
|
+
parsed = JSON.parse(raw);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
fail(`The ${label} section is not JSON.`);
|
|
87
|
+
}
|
|
88
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || canonicalJson(parsed) !== raw
|
|
89
|
+
|| raw.length > 32_768) {
|
|
90
|
+
fail(`The ${label} section is not in canonical form.`);
|
|
91
|
+
}
|
|
92
|
+
return parsed;
|
|
93
|
+
}
|
|
94
|
+
/** Verify the prepared Manual policy for this account and owner, then sign it with the owner key. */
|
|
95
|
+
export async function signManualTradingPolicy(prepared, expected) {
|
|
96
|
+
const { message, summary } = verifyManualTradingPolicy(prepared, expected);
|
|
97
|
+
const signature = await privateKeyToAccount(expected.ownerPrivateKey).signMessage({ message });
|
|
98
|
+
return { signature, summary };
|
|
99
|
+
}
|
|
100
|
+
/** The question the owner answers before the MCP signs a new or renewed trading policy (owner consent, 2026-11-17). */
|
|
101
|
+
export function tradingPolicyQuestion(summary) {
|
|
102
|
+
const expires = new Date(summary.mandate_expires_at * 1000).toISOString().slice(0, 10);
|
|
103
|
+
const lighter = summary.lighter_consent_terms;
|
|
104
|
+
const parts = [
|
|
105
|
+
`Allow Felix MCP to sign this account's trading policy (the same one the Felix app asks you to confirm), valid until ${expires}?`,
|
|
106
|
+
"It lets you place manual orders on " + summary.venues.join(", ") + " with no extra risk limits beyond each key's own limits.",
|
|
107
|
+
];
|
|
108
|
+
if (summary.fast_custody) {
|
|
109
|
+
parts.push(`It approves Felix's enclave-held trade-only keys for fast trading on ${summary.fast_custody_venues.join(", ")} `
|
|
110
|
+
+ "(they can order and cancel, never withdraw; money moves only between your own Home and venue accounts).");
|
|
111
|
+
}
|
|
112
|
+
if (lighter) {
|
|
113
|
+
parts.push(`Lighter: ${String(lighter.purpose)} Fee maxima in this approval: perps taker ${String(lighter.max_perps_taker_fee)}, `
|
|
114
|
+
+ `perps maker ${String(lighter.max_perps_maker_fee)}, spot taker ${String(lighter.max_spot_taker_fee)}, `
|
|
115
|
+
+ `spot maker ${String(lighter.max_spot_maker_fee)} (Lighter fee units); Lighter venue fees ${String(lighter.venue_taker_bps)} bps taker, `
|
|
116
|
+
+ `${String(lighter.venue_maker_bps)} bps maker.`);
|
|
117
|
+
}
|
|
118
|
+
parts.push("Signing moves no money.");
|
|
119
|
+
return parts.join(" ");
|
|
120
|
+
}
|
|
121
|
+
/** Verify only (no signature): the exact text to sign and its summary. */
|
|
122
|
+
export function verifyManualTradingPolicy(prepared, expected) {
|
|
123
|
+
const account = privateKeyToAccount(expected.ownerPrivateKey);
|
|
124
|
+
const owner = account.address;
|
|
125
|
+
const message = typeof prepared.message === "string" ? prepared.message : "";
|
|
126
|
+
const lines = message.split("\n");
|
|
127
|
+
if (!message || lines[0] !== HEADER || message.length > 65_536)
|
|
128
|
+
fail("Felix did not return a trading policy.");
|
|
129
|
+
const fields = {};
|
|
130
|
+
const order = [];
|
|
131
|
+
for (const line of lines.slice(1)) {
|
|
132
|
+
const split = line.indexOf(":");
|
|
133
|
+
if (split <= 0)
|
|
134
|
+
fail("The trading policy has a malformed line.");
|
|
135
|
+
const name = line.slice(0, split);
|
|
136
|
+
if (fields[name] !== undefined)
|
|
137
|
+
fail("The trading policy repeats a field.");
|
|
138
|
+
fields[name] = line.slice(split + 1);
|
|
139
|
+
order.push(name);
|
|
140
|
+
}
|
|
141
|
+
// Exactly the canonical base fields in order, then only the optional sections the engine emits, in order.
|
|
142
|
+
if (order.slice(0, BASE_FIELDS.length).join(",") !== BASE_FIELDS.join(",")) {
|
|
143
|
+
fail("The trading policy fields are not in Felix's canonical order.");
|
|
144
|
+
}
|
|
145
|
+
const optional = order.slice(BASE_FIELDS.length);
|
|
146
|
+
const allowedOptional = ["predecessor_mandate_hash", "fast_custody", "lighter_integrator"];
|
|
147
|
+
let cursor = 0;
|
|
148
|
+
for (const name of optional) {
|
|
149
|
+
const index = allowedOptional.indexOf(name);
|
|
150
|
+
if (index < cursor)
|
|
151
|
+
fail("The trading policy contains an unexpected section.");
|
|
152
|
+
cursor = index + 1;
|
|
153
|
+
}
|
|
154
|
+
const now = expected.nowSeconds ?? Math.floor(Date.now() / 1000);
|
|
155
|
+
const schema = fields.schema_version;
|
|
156
|
+
const mandateVersion = Number(fields.mandate_version);
|
|
157
|
+
const validFrom = Number(fields.valid_from);
|
|
158
|
+
const expires = Number(fields.mandate_expires_at);
|
|
159
|
+
const grantExpires = Number(fields.grant_expires_at);
|
|
160
|
+
const keyId = manualPolicyKeyId(expected.accountId);
|
|
161
|
+
const venues = (fields.venues || "").split(",");
|
|
162
|
+
const sameAddress = (value) => typeof value === "string" && isAddress(value)
|
|
163
|
+
&& getAddress(value) === owner;
|
|
164
|
+
if (fields.domain !== "api.felix.trade"
|
|
165
|
+
|| !(schema === "1" || (schema === "2" && HASH_RE.test(fields.predecessor_mandate_hash || "")))
|
|
166
|
+
|| (schema === "1" && fields.predecessor_mandate_hash !== undefined)
|
|
167
|
+
|| !UUID_RE.test(fields.mandate_id || "")
|
|
168
|
+
|| !Number.isSafeInteger(mandateVersion) || mandateVersion < 1
|
|
169
|
+
|| fields.account_id !== expected.accountId
|
|
170
|
+
|| fields.api_key_id !== keyId
|
|
171
|
+
|| !sameAddress(fields.owner) || !sameAddress(fields.fixed_home)
|
|
172
|
+
|| fields.scopes !== "read,trade"
|
|
173
|
+
|| venues.length === 0 || venues.some((venue) => !KNOWN_VENUES.includes(venue))
|
|
174
|
+
|| venues.join(",") !== KNOWN_VENUES.filter((venue) => venues.includes(venue)).join(",")
|
|
175
|
+
|| !/^\[(?:"[A-Za-z0-9:_.*\/-]{1,64}"(?:,"[A-Za-z0-9:_.*\/-]{1,64}")*)\]$/.test(fields.instruments || "")
|
|
176
|
+
|| Object.entries(UNRESTRICTED).some(([name, value]) => fields[name] !== value)
|
|
177
|
+
|| !["true", "false"].includes(fields.allow_reduce_only_after_expiry)
|
|
178
|
+
|| !Number.isSafeInteger(validFrom) || validFrom > now + 60 || validFrom < now - 3_600
|
|
179
|
+
|| !Number.isSafeInteger(expires) || expires <= now + 3_600 || expires > now + MAX_POLICY_DAYS * 86_400
|
|
180
|
+
|| !Number.isSafeInteger(grantExpires) || grantExpires <= now || grantExpires > now + 3_600
|
|
181
|
+
|| !/^[0-9a-f]{32}$/.test(fields.nonce || "")) {
|
|
182
|
+
fail("Felix's trading policy does not match this account, its owner, or the app's Manual policy.");
|
|
183
|
+
}
|
|
184
|
+
if (fields.fast_custody !== undefined) {
|
|
185
|
+
// risk_authorizer.policy.validate_fast_custody: enclave trade-only keys that move money only between the
|
|
186
|
+
// account's own Home and venue accounts.
|
|
187
|
+
const scope = parseCanonicalJsonLine(fields.fast_custody, "fast custody");
|
|
188
|
+
const venuesScope = scope.venues;
|
|
189
|
+
const keys = Object.keys(scope).sort().join(",");
|
|
190
|
+
if (keys !== "actions,agent_address,generation,home_chain,main_address,venues,version"
|
|
191
|
+
|| scope.version !== 1 || scope.home_chain !== "arc"
|
|
192
|
+
|| typeof scope.generation !== "string" || !UUID_RE.test(scope.generation)
|
|
193
|
+
|| typeof scope.main_address !== "string" || !isAddress(scope.main_address)
|
|
194
|
+
|| typeof scope.agent_address !== "string" || !isAddress(scope.agent_address)
|
|
195
|
+
|| scope.main_address.toLowerCase() === scope.agent_address.toLowerCase()
|
|
196
|
+
// risk_authorizer.policy.FAST_ACTIONS, pinned: trade-only actions, never a withdrawal or transfer.
|
|
197
|
+
|| !Array.isArray(scope.actions) || scope.actions.length !== FAST_ACTIONS.length
|
|
198
|
+
|| scope.actions.some((action, index) => action !== FAST_ACTIONS[index])
|
|
199
|
+
|| /^0x0{40}$/i.test(scope.main_address) || /^0x0{40}$/i.test(scope.agent_address)
|
|
200
|
+
|| !venuesScope || typeof venuesScope !== "object" || Array.isArray(venuesScope)
|
|
201
|
+
|| Object.keys(venuesScope).length === 0
|
|
202
|
+
|| Object.entries(venuesScope).some(([venue, raw]) => {
|
|
203
|
+
const settings = raw;
|
|
204
|
+
return !["hyperliquid", "lighter"].includes(venue) || !settings || typeof settings !== "object"
|
|
205
|
+
|| Object.keys(settings).sort().join(",") !== "fee_last,idle_return_seconds,keep_trading_balance,min_receive_bps,route"
|
|
206
|
+
|| typeof settings.keep_trading_balance !== "boolean"
|
|
207
|
+
|| !Number.isInteger(settings.idle_return_seconds)
|
|
208
|
+
|| Number(settings.idle_return_seconds) < 60 || Number(settings.idle_return_seconds) > 86_400
|
|
209
|
+
|| settings.route !== "relay_own_accounts_v1" || settings.min_receive_bps !== 9900
|
|
210
|
+
|| settings.fee_last !== true;
|
|
211
|
+
})) {
|
|
212
|
+
fail("The fast-custody section of the trading policy is not Felix's own-account scope.");
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (fields.lighter_integrator !== undefined) {
|
|
216
|
+
// nitro_signer/shared/lighter_integrator.consent_scope, pinned: the partner account and fee maxima the owner
|
|
217
|
+
// consents to. Any other partner or higher fee is refused.
|
|
218
|
+
const consent = parseCanonicalJsonLine(fields.lighter_integrator, "Lighter consent");
|
|
219
|
+
if (consent.purpose !== LIGHTER_PURPOSE || consent.account_tier !== "premium"
|
|
220
|
+
|| consent.integrator_l1 !== "0xfe373a2086ed116f16098fb986e017c9856af3db"
|
|
221
|
+
|| consent.max_approval_ms !== 30 * 24 * 3600 * 1000
|
|
222
|
+
|| consent.max_perps_taker_fee !== 1000 || consent.max_perps_maker_fee !== 200
|
|
223
|
+
|| consent.max_spot_taker_fee !== 1000 || consent.max_spot_maker_fee !== 300
|
|
224
|
+
|| Object.keys(consent).sort().join(",") !== [
|
|
225
|
+
"account_tier", "integrator_l1", "max_approval_ms", "max_perps_maker_fee", "max_perps_taker_fee",
|
|
226
|
+
"max_spot_maker_fee", "max_spot_taker_fee", "purpose", "venue_maker_bps", "venue_taker_bps",
|
|
227
|
+
].join(",")
|
|
228
|
+
|| typeof consent.venue_maker_bps !== "string" || !/^[0-9]{1,3}(\.[0-9]{1,4})?$/.test(consent.venue_maker_bps)
|
|
229
|
+
|| typeof consent.venue_taker_bps !== "string" || !/^[0-9]{1,3}(\.[0-9]{1,4})?$/.test(consent.venue_taker_bps)) {
|
|
230
|
+
fail("The Lighter consent in the trading policy is not Felix's published consent.");
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if ((prepared.account_id !== undefined && prepared.account_id !== expected.accountId)
|
|
234
|
+
|| (prepared.api_key_id !== undefined && prepared.api_key_id !== keyId)
|
|
235
|
+
|| (prepared.key_id !== undefined && prepared.key_id !== keyId)
|
|
236
|
+
|| (prepared.mandate_id !== undefined && prepared.mandate_id !== fields.mandate_id)
|
|
237
|
+
|| typeof prepared.policy_token !== "string" || !prepared.policy_token) {
|
|
238
|
+
fail("Felix's trading policy envelope does not match its signed text.");
|
|
239
|
+
}
|
|
240
|
+
const fastScope = fields.fast_custody !== undefined ? JSON.parse(fields.fast_custody) : undefined;
|
|
241
|
+
const fastVenues = fastScope && fastScope.venues && typeof fastScope.venues === "object"
|
|
242
|
+
? Object.keys(fastScope.venues).sort() : [];
|
|
243
|
+
const lighterTerms = fields.lighter_integrator !== undefined ? JSON.parse(fields.lighter_integrator) : null;
|
|
244
|
+
// Every authority-bearing field of the signed text, leaving out only per-draft values: nonce, mandate_id,
|
|
245
|
+
// grant_expires_at, valid_from, and the enclave key identities (generation, main/agent address), which the engine
|
|
246
|
+
// draws fresh for each first-time draft. Policy length is bound in whole days.
|
|
247
|
+
const fastTerms = fastScope ? Object.fromEntries(Object.entries(fastScope)
|
|
248
|
+
.filter(([key]) => !["generation", "main_address", "agent_address"].includes(key))) : null;
|
|
249
|
+
const termsId = createHash("sha256").update(canonicalJson({
|
|
250
|
+
account: expected.accountId, api_key_id: keyId, owner: owner.toLowerCase(), fixed_home: String(fields.fixed_home).toLowerCase(),
|
|
251
|
+
schema, scopes: fields.scopes, venues, instruments: fields.instruments, limits: UNRESTRICTED,
|
|
252
|
+
allow_reduce_only_after_expiry: fields.allow_reduce_only_after_expiry,
|
|
253
|
+
policy_days: Math.round((expires - validFrom) / 86_400),
|
|
254
|
+
// Opus QA r6 F2: a renewal copies the current terms, so it is bound to the policy it replaces (that policy's expiry,
|
|
255
|
+
// read from Felix before preparing): every new or renewed policy needs its own yes, and a re-prepared draft of the
|
|
256
|
+
// same renewal keeps its id.
|
|
257
|
+
renewal_of: expected.renewalOf ?? null,
|
|
258
|
+
// Opus QA r7 F1: the UTC day the question says the policy is "valid until". A lapsed policy re-drafted later is a
|
|
259
|
+
// new set of terms (a new yes); a draft re-prepared the same day keeps its id.
|
|
260
|
+
valid_until: new Date(expires * 1000).toISOString().slice(0, 10),
|
|
261
|
+
fast_custody: fastTerms, lighter: lighterTerms,
|
|
262
|
+
})).digest("hex").slice(0, 32);
|
|
263
|
+
return {
|
|
264
|
+
message,
|
|
265
|
+
summary: {
|
|
266
|
+
account_id: expected.accountId,
|
|
267
|
+
api_key_id: keyId,
|
|
268
|
+
mandate_id: fields.mandate_id,
|
|
269
|
+
mandate_version: mandateVersion,
|
|
270
|
+
venues,
|
|
271
|
+
unrestricted: true,
|
|
272
|
+
mandate_expires_at: expires,
|
|
273
|
+
fast_custody: fields.fast_custody !== undefined,
|
|
274
|
+
fast_custody_venues: fastVenues,
|
|
275
|
+
lighter_premium_consent: lighterTerms !== null,
|
|
276
|
+
lighter_consent_terms: lighterTerms,
|
|
277
|
+
renewal: expected.renewalOf !== undefined && expected.renewalOf !== null,
|
|
278
|
+
terms_id: termsId,
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
}
|
package/dist/redact-output.js
CHANGED
|
@@ -46,7 +46,9 @@ function redactString(value, field, authContext) {
|
|
|
46
46
|
.replace(/\bBearer\s+[^\s,;"'\]}]+/gi, `Bearer ${REDACTED}`)
|
|
47
47
|
.replace(/\bfk_[a-z0-9_-]{16,}/gi, REDACTED)
|
|
48
48
|
.replace(/\b(?:signature|sig|(?:root_)?owner_private_key|launcher_api_key|private_key|(?:session|access|refresh)[_-]?token)["']?\s*[:=]\s*["']?[^\s,;"'\]}]+/gi, (match) => `${match.split(/[:=]/, 1)[0]}=${REDACTED}`)
|
|
49
|
-
.replace(/0x[0-9a-f]{130}\b/gi, REDACTED)
|
|
49
|
+
.replace(/0x[0-9a-f]{130}\b/gi, REDACTED)
|
|
50
|
+
// Never show a person's email (owner rule). Felix's own support/system addresses stay readable.
|
|
51
|
+
.replace(/[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,})/g, (match, domain) => /(?:^|\.)(?:felix\.trade|mandare\.ai)$/i.test(domain) ? match : "[REDACTED_EMAIL]");
|
|
50
52
|
if (!PUBLIC_IDENTIFIER.test(field.replace(/([a-z0-9])([A-Z])/g, "$1_$2")) || !/^0x[0-9a-f]{64}$/i.test(text)) {
|
|
51
53
|
text = text.replace(/0x[0-9a-f]{64}\b/gi, (match, offset) => {
|
|
52
54
|
const label = text.slice(Math.max(0, offset - 48), offset);
|
package/package.json
CHANGED
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.
|
|
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.
|
|
28
|
+
"version": "2.0.133",
|
|
29
29
|
"transport": {
|
|
30
30
|
"type": "stdio"
|
|
31
31
|
}
|