rightcard-mcp 0.1.24 → 0.1.25

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.
@@ -11,7 +11,16 @@ export interface ConfigurableCardSpec {
11
11
  * its card in Oct 2026; both names contain "venmo". Mirrors the Swift spec. */
12
12
  exactIDs?: string[];
13
13
  multiCardMax: number;
14
+ /** A second pick at a lower rate (TD Cash 2%), saved under "<card id>#2"
15
+ * in the picks map. Mirrors ConfigurableCardSpec.secondTier (Nov 19 2026). */
16
+ secondTier?: {
17
+ rate: number;
18
+ eligible: SpendCategory[];
19
+ };
14
20
  }
21
+ export declare const secondTierKey: (cardId: string) => string;
22
+ /** The second tier as a spec of its own, so an answer it wins reads at its own rate. */
23
+ export declare function secondTierSpec(spec: ConfigurableCardSpec): ConfigurableCardSpec | null;
15
24
  export declare const CONFIGURABLE_SPECS: ConfigurableCardSpec[];
16
25
  /** ConfigurableCardCatalog.normalize: lowercase, "+" → "plus", strip non-alphanumerics. */
17
26
  export declare function normalizeConfigurable(s: string): string;
@@ -1,4 +1,20 @@
1
+ export const secondTierKey = (cardId) => cardId + "#2";
2
+ /** The second tier as a spec of its own, so an answer it wins reads at its own rate. */
3
+ export function secondTierSpec(spec) {
4
+ if (!spec.secondTier)
5
+ return null;
6
+ return { ...spec, key: spec.key + "#2", bonusRate: spec.secondTier.rate, slots: 1,
7
+ eligible: spec.secondTier.eligible, secondTier: undefined, multiCardMax: 1 };
8
+ }
1
9
  export const CONFIGURABLE_SPECS = [
10
+ {
11
+ // TD Cash (Nov 19 2026, td.com): a 3% pick and a 2% pick, changeable each quarter.
12
+ key: "td_cash", displayName: "TD Cash", bonusRate: 3, slots: 1,
13
+ eligible: ["dining", "entertainment", "gas", "grocery", "travel"],
14
+ note: "TD Cash pays 3% in one category and 2% in another, from dining, entertainment, gas, groceries and travel. You can change both every quarter. A new card starts at 3% on dining and 2% on groceries.",
15
+ matchNeedles: [], exactIDs: ["td_bank_td_cash_credit_card"], multiCardMax: 1,
16
+ secondTier: { rate: 2, eligible: ["dining", "entertainment", "gas", "grocery", "travel"] },
17
+ },
2
18
  {
3
19
  key: "amex_business_gold", displayName: "Amex Business Gold", bonusRate: 4, slots: 2,
4
20
  // Nov 16 2026: Amex took airfare off the 4X list and added transit (mirrors Swift).
package/dist/engine.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Mirrors MerchantYieldEngine (BASE-RATE mode only — offers live on the phone, never here).
2
2
  import { ALL_CATEGORIES, CATEGORY_DISPLAY, capCovers, categoryStoreTypes, isPermanentMerchantBenefit, multiplier, requiresApplePay, overrideIsActive, rotatingCap, standingCaps, storeTypes, } from "./model.js";
3
3
  import { merchantMatchesCoBrandBenefit, offerMatches } from "./matching.js";
4
- import { specFor } from "./configurable.js";
4
+ import { specFor, secondTierKey, secondTierSpec } from "./configurable.js";
5
5
  import { basisLabel, cashOutCPP, centsPerPoint, earnUnitLabel, effectiveProgram, fmt1, fmtRate, valuesPointsAboveCash, withPooling, } from "./valuation.js";
6
6
  /** Where the quarter is turned on. Mirrors MerchantYieldEngine.activationApp. */
7
7
  export function activationApp(issuer) {
@@ -210,6 +210,13 @@ function appliedRate(card, category, subKey, merchantQuery, overrides, cardConfi
210
210
  winningConfig = spec;
211
211
  winningOverride = null;
212
212
  }
213
+ const second = spec ? secondTierSpec(spec) : null;
214
+ if (second && second.eligible.includes(category) && cardConfigs[secondTierKey(card.id)]?.has(category)
215
+ && second.bonusRate > rate) {
216
+ rate = second.bonusRate;
217
+ winningConfig = second;
218
+ winningOverride = null;
219
+ }
213
220
  // A standing cap marked used up pays its "after" rate (mirrors the app).
214
221
  if (sharesCategoryCap(winningOverride, now) && usedUp.size > 0) {
215
222
  for (const cap of standingCaps(card.id)) {
package/dist/matching.js CHANGED
@@ -21,6 +21,12 @@ const COBRAND_PLACE_WORDS = new Set([
21
21
  "hotel", "hotels", "resort", "resorts", "suites", "express", "restaurant",
22
22
  "restaurants", "collection", "garden", "gardens", "plaza", "club",
23
23
  "vacations", "airlines", "airline", "airways", "market", "store", "stores",
24
+ // Nov 20 2026: short brand words (CVS, BJ's, AAA) are dropped, so these kinds
25
+ // of store let "Walmart Pharmacy" match "CVS Pharmacy" and "Whole Foods
26
+ // Market" match "Cub Foods".
27
+ "pharmacy", "drug", "food", "foods", "fresh", "grocery", "travel", "rental",
28
+ "rentals", "house", "shop", "mart", "hardware", "center", "optical", "tire",
29
+ "tires", "business",
24
30
  ]);
25
31
  const TLD_RE = /\.(com|net|org|co|io|tv|shop|store|us)\b/g;
26
32
  const isAlnum = (ch) => /[\p{L}\p{N}]/u.test(ch);
package/dist/tools.js CHANGED
@@ -78,7 +78,7 @@ export function buildServer(getCatalog) {
78
78
  category: CategorySchema.optional().describe("Spend category when there is no specific store."),
79
79
  valuation: z.enum(["cash", "points"]).default("cash").describe("'cash' counts each point at up to 1¢, and hotel/airline points at their lower value (default). 'points' values points per program at conservative travel values."),
80
80
  on: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe("Date (YYYY-MM-DD, UTC) for rotating windows; defaults to today."),
81
- chosen_categories: z.record(z.string(), z.array(CategorySchema)).optional().describe("For choose-your-category cards (Citi Custom Cash, BofA Customized, Venmo): card id → the categories the person set."),
81
+ chosen_categories: z.record(z.string(), z.array(CategorySchema)).optional().describe("For choose-your-category cards (Citi Custom Cash, BofA Customized, Venmo): card id → the categories the person set. TD Cash takes two picks: its 3% one under the card id, its 2% one under \"<card id>#2\"."),
82
82
  },
83
83
  }, async ({ wallet, merchant, category, valuation, on, chosen_categories }) => {
84
84
  const catalog = await getCatalog();
package/dist/valuation.js CHANGED
@@ -106,6 +106,10 @@ export function inferProgram(issuer, id, currency) {
106
106
  // GM — the generic 2¢ fallback read its flat 3x as "6%" (mirrors Swift).
107
107
  if (has("gm_rewards", "gm rewards"))
108
108
  return "fixedValue";
109
+ // Emirates Skywards (Barclays, Nov 19 2026): no value in our sources, so the
110
+ // 1¢ floor, not the generic 1.5¢ miles guess (mirrors Swift).
111
+ if (has("emirates", "skywards"))
112
+ return "fixedValue";
109
113
  // Bank of America Premium Rewards + PenFed points: a set ~1¢, no transfer
110
114
  // partners (mirrors RewardValuation.infer, Sep 26 2026).
111
115
  if (has("bank of america", "bank_of_america", "penfed") || s.startsWith("bofa"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rightcard-mcp",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "mcpName": "ai.rightcard/mcp",
5
5
  "description": "RightCard MCP — the card-selection oracle for agents. Which of your credit cards to use at any store, from verified data. No bank login.",
6
6
  "type": "module",