@chrischall/hellofresh-mcp 0.5.0 → 0.5.2

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.
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "HelloFresh (US) tools for Claude Code",
8
- "version": "0.5.0"
8
+ "version": "0.5.2"
9
9
  },
10
10
  "plugins": [
11
11
  {
@@ -13,7 +13,7 @@
13
13
  "displayName": "HelloFresh",
14
14
  "source": "./",
15
15
  "description": "Unofficial HelloFresh (US) tools for Claude — subscription, weekly deliveries, menus, meal picks, skips and box sizes via MCP",
16
- "version": "0.5.0",
16
+ "version": "0.5.2",
17
17
  "author": {
18
18
  "name": "Chris Chall"
19
19
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hellofresh",
3
3
  "displayName": "HelloFresh",
4
- "version": "0.5.0",
4
+ "version": "0.5.2",
5
5
  "description": "Unofficial HelloFresh (US) tools for Claude — subscription, weekly deliveries, menus, meal picks, skips and box sizes via MCP",
6
6
  "author": {
7
7
  "name": "Chris Chall"
package/README.md CHANGED
@@ -84,7 +84,7 @@ If calls fail with "Not signed in to HelloFresh", sign in again at hellofresh.co
84
84
  | Env var | Default | Purpose |
85
85
  |---|---|---|
86
86
  | `HELLOFRESH_WS_PORT` | `37149` | The fetchproxy bridge port. The whole fetchproxy fleet and ContextMint Bridge share `37149`. Override it only for local testing, or when a host injects a per-registration port. |
87
- | `MCP_USER_TZ` | the system zone | Your IANA time zone, for example `America/New_York`. It decides "this week" in `hf_recent_picks`. Set it when hosted, because a hosted server runs in UTC. |
87
+ | `MCP_USER_TZ` | the system zone | Your IANA time zone, for example `America/New_York`. It decides "this week" in `hf_recent_picks` and the day a late box arrived in `hf_cooking_plan`. Set it when hosted, because a hosted server runs in UTC. |
88
88
  | `HELLOFRESH_DEBUG` | off | Log the bridge's role and lifecycle to stderr. |
89
89
  | `MCP_CONFIRM_MODE` | `ask-user` | What a write does on a client that cannot show a confirmation prompt. See below. |
90
90
  | `MCP_CONFIRM_ELICITATION` | `on` | `off` never shows a confirmation prompt, so every client takes the `MCP_CONFIRM_MODE` path. Use it for clients that declare prompts but never render them. |
@@ -174,7 +174,7 @@ Read tools take `view: compact | full` (default `compact`). A box `price` with `
174
174
  | `hf_list_profiles` | The meal-planner profiles (servings, meals, allowed categories, preferences, premium cap) and where they were loaded from. Local config only. |
175
175
  | `hf_suggest_meals` | Ranked picks for a week and a planner profile (e.g. a 4-person kid-friendly week), skipping recent repeats and recipes you rated 2 or lower, favouring your favourites and varied proteins: the top picks plus 2 alternates per slot, with reasons. Read-only. |
176
176
  | `hf_get_recipe` | One meal's full recipe by week + menu index (protein swaps say which protein they swap in): time, difficulty, allergens, nutrition per serving, ingredient amounts for the week's servings (nearest listed yield otherwise, flagged), plain-text steps, utensils, recipe card PDF and web page. Recipe text is framed as untrusted third-party content. Read-only. |
177
- | `hf_cooking_plan` | A week's picked meals in a recommended cook order — fish, shellfish, other seafood, poultry, ground meat, whole cuts of beef/pork/lamb, vegetarian last; ties by shorter time — each with a suggested day from the delivery date, why, total time, key ingredients, the pantry staples to have on hand and recipe card. Read-only. |
177
+ | `hf_cooking_plan` | A week's picked meals in a recommended cook order — fish, shellfish, other seafood, poultry, ground meat, whole cuts of beef/pork/lamb, vegetarian last; ties by shorter time — each with a suggested day from the delivery date (from the day a late box actually arrived, per tracking), why, total time, key ingredients, the pantry staples to have on hand and recipe card. Read-only. |
178
178
  | `hf_pantry_check` | What to have in the pantry for a week: the staples HelloFresh does not ship (salt, pepper, oil, often butter/eggs/sugar/flour) across the picked meals, summed per ingredient and unit at the week's servings (× quantity; "to taste" when unmeasured), with the dishes using each and a one-line summary. Read-only. |
179
179
  | `hf_weekly_plan` | One read to approve a week: box size needed vs current, suggested picks, the box price for the size it needs (HelloFresh's checkout total + premiums, or a labelled estimate), a one-line summary, and the exact follow-up write calls in order (never a resize of the first box, which keeps its size — see `notes`). Read-only. |
180
180
  | `hf_plan_weeks` | Plan 1–6 weeks at once, each `{week, profile}` (which profile applies to which week is your call — it reads no calendar): each week's `hf_weekly_plan` answer, never suggesting a recipe already planned for an earlier week, a combined summary (one line per week), the total of HelloFresh's own box prices (estimate-only weeks named, not added) and the follow-up writes per week. Skipped weeks are reported as skipped. Read-only. |
package/dist/bundle.js CHANGED
@@ -73661,6 +73661,7 @@ function trackingPublicId(t) {
73661
73661
  return m?.[1];
73662
73662
  }
73663
73663
  var opt = (key, value) => value === void 0 || value === null || value === "" ? {} : { [key]: value };
73664
+ var isDelivered = (status) => status === "delivered" || status === "package.delivered";
73664
73665
  var step = (s) => ({
73665
73666
  ...opt("status", s.status),
73666
73667
  ...opt("statusDetail", s.status_detail),
@@ -73689,7 +73690,7 @@ function projectTracking(raw) {
73689
73690
  ...opt("carrierTrackingUrl", b.carrier_tracking_url ?? b.public_url),
73690
73691
  ...opt("trackingUrl", b.hf_tracking_url),
73691
73692
  ...opt("deliveryDate", b.delivery_date),
73692
- delivered: last.status === "delivered" || newer?.status === "delivered",
73693
+ delivered: b.internal_status === "delivered" || isDelivered(last.status) || isDelivered(newer?.status),
73693
73694
  ...newer ? { latestEvent: newer } : {},
73694
73695
  ...photos > 0 ? { proofOfDeliveryPhotos: photos } : {},
73695
73696
  history
@@ -73697,6 +73698,10 @@ function projectTracking(raw) {
73697
73698
  })
73698
73699
  };
73699
73700
  }
73701
+ function deliveredAt(box) {
73702
+ if (!box.delivered) return void 0;
73703
+ return box.history.find((h) => isDelivered(h.status) && h.at)?.at ?? box.statusAt;
73704
+ }
73700
73705
  var QUICK_TAGS = /* @__PURE__ */ new Set(["quick", "easy-prep"]);
73701
73706
  var QUICK_MINUTES = 30;
73702
73707
  function isSeafoodCategory(category) {
@@ -74306,6 +74311,37 @@ function recipeIdOf(meal, index, week) {
74306
74311
  }
74307
74312
  function registerCookingTools(server, deps2) {
74308
74313
  const { client } = deps2;
74314
+ const now = deps2.now ?? Date.now;
74315
+ const cookStart = async (raw, scheduled) => {
74316
+ const publicId = trackingPublicId(raw.tracking);
74317
+ if (!publicId) return { start: scheduled };
74318
+ const read = await attempt(async () => projectTracking(await client.getTracking(publicId)));
74319
+ if (!read.ok) {
74320
+ return { start: scheduled, note: `Tracking could not be read (${read.reason}), so days count from the scheduled delivery day.` };
74321
+ }
74322
+ const box = read.value.boxes[0];
74323
+ if (!box) return { start: scheduled };
74324
+ const localDate = (at2) => todayIso({ now: new Date(at2) });
74325
+ const at = deliveredAt(box);
74326
+ if (at && !Number.isNaN(Date.parse(at))) {
74327
+ const arrived = localDate(Date.parse(at));
74328
+ if (arrived === scheduled) return { start: scheduled };
74329
+ return {
74330
+ start: arrived,
74331
+ arrivedDate: arrived,
74332
+ note: `The box arrived ${arrived}, not on its scheduled ${scheduled}: days count from the day it arrived.`
74333
+ };
74334
+ }
74335
+ const today = localDate(now());
74336
+ if (!box.delivered && today > scheduled) {
74337
+ const latest = box.latestEvent?.status ?? box.status ?? "unknown";
74338
+ return {
74339
+ start: today,
74340
+ note: `The box has not arrived yet (scheduled ${scheduled}; latest tracking: ${latest}), so days count from today: shift them once it arrives.`
74341
+ };
74342
+ }
74343
+ return { start: scheduled };
74344
+ };
74309
74345
  server.registerTool(
74310
74346
  "hf_get_recipe",
74311
74347
  {
@@ -74344,14 +74380,15 @@ function registerCookingTools(server, deps2) {
74344
74380
  server.registerTool(
74345
74381
  "hf_cooking_plan",
74346
74382
  {
74347
- description: `Plan cooking for a HelloFresh delivery week: the picked meals in a recommended cook order, most perishable first (fish, then shellfish, other seafood, poultry, ground meat, whole cuts of beef/pork/lamb, vegetarian last; ties by shorter total time), each with a suggested day counted from the delivery date, why, total time, a short ingredient list, the pantry staples HelloFresh does not ship (salt, oil\u2026) and the recipe card. ${UNTRUSTED_DESCRIPTION_SUFFIX}`,
74383
+ description: `Plan cooking for a HelloFresh delivery week: the picked meals in a recommended cook order, most perishable first (fish, then shellfish, other seafood, poultry, ground meat, whole cuts of beef/pork/lamb, vegetarian last; ties by shorter total time), each with a suggested day counted from the delivery date (or, per the carrier tracking, the day a late box actually arrived), why, total time, a short ingredient list, the pantry staples HelloFresh does not ship (salt, oil\u2026) and the recipe card. ${UNTRUSTED_DESCRIPTION_SUFFIX}`,
74348
74384
  annotations: readOnly("HelloFresh: cooking plan"),
74349
74385
  _meta: foodMeta("whats-on", { aliases: ["what to cook", "cooking order", "dinner this week"] }),
74350
74386
  inputSchema: external_exports.object({ week: weekParam })
74351
74387
  },
74352
74388
  async ({ week }) => {
74353
74389
  const account = await loadAccount(client);
74354
- const delivery = projectDelivery(await client.getDelivery(account.subscriptionId, week));
74390
+ const rawDelivery = await client.getDelivery(account.subscriptionId, week);
74391
+ const delivery = projectDelivery(rawDelivery);
74355
74392
  const deliveryDate = dateOf(delivery.deliveryDate);
74356
74393
  const head = { week, ...deliveryDate ? { deliveryDate } : {}, status: delivery.status };
74357
74394
  if (delivery.status === "skipped") {
@@ -74394,18 +74431,22 @@ function registerCookingTools(server, deps2) {
74394
74431
  })
74395
74432
  );
74396
74433
  const ordered = cookOrder(dishes2);
74434
+ const timing = deliveryDate ? await cookStart(rawDelivery, deliveryDate) : void 0;
74397
74435
  return fenced({
74398
74436
  ...head,
74437
+ ...timing?.arrivedDate ? { arrivedDate: timing.arrivedDate } : {},
74399
74438
  dishes: ordered.map(({ text: _text, category: _category, seafoodKind: _kind, rank, why, ...d }, i) => {
74400
74439
  const tied = ordered.filter((o) => o.rank === rank && o.index !== d.index).map((o) => `#${o.index}`);
74401
74440
  return {
74402
74441
  order: i + 1,
74403
- ...deliveryDate ? dayFrom(deliveryDate, i) : {},
74442
+ ...timing ? dayFrom(timing.start, i) : {},
74404
74443
  ...d,
74405
74444
  why: tied.length > 0 ? `${why} Same perishability as ${tied.join(", ")}: shorter total time first.` : why
74406
74445
  };
74407
74446
  }),
74408
- ...deliveryDate ? { dayNote: "Days count from the delivery day (the most perishable dish that evening); shift them to fit your week." } : {}
74447
+ ...timing ? {
74448
+ dayNote: timing.note ?? "Days count from the delivery day (the most perishable dish that evening); shift them to fit your week."
74449
+ } : {}
74409
74450
  });
74410
74451
  }
74411
74452
  );
@@ -75870,6 +75911,7 @@ function linksOf(attachments) {
75870
75911
  });
75871
75912
  return links.length > 0 ? links : void 0;
75872
75913
  }
75914
+ var UI_ONLY_KINDS = /* @__PURE__ */ new Set(["humanAgentTyping", "fileUploadConfig"]);
75873
75915
  function projectEvents(raw) {
75874
75916
  const out = [];
75875
75917
  for (const e of raw) {
@@ -75899,7 +75941,7 @@ function projectEvents(raw) {
75899
75941
  out.push({ kind: type === "JOIN" ? "agentJoined" : type === "LEAVE" ? "agentLeft" : kind, ...base });
75900
75942
  continue;
75901
75943
  }
75902
- if (kind === "humanAgentTyping") continue;
75944
+ if (UI_ONLY_KINDS.has(kind)) continue;
75903
75945
  const detail = kind === "queueInfo" ? ev.queueInfo : void 0;
75904
75946
  out.push({ kind, ...base, ...detail !== void 0 ? { detail } : {} });
75905
75947
  }
@@ -76223,9 +76265,9 @@ function registerSupportTools(server, deps2) {
76223
76265
  warning: `The support chat did not confirm the message (${messageOf(err)}), so it may have been delivered. Check with hf_support_read before sending it again; do not repeat it blindly.`
76224
76266
  });
76225
76267
  }
76226
- if (got.events) c.events = got.events;
76227
76268
  let at = -1;
76228
- for (let i = c.events.length - 1; i >= 0; i--) {
76269
+ if (got.events) c.events = got.events;
76270
+ for (let i = got.events ? c.events.length - 1 : -1; i >= before; i--) {
76229
76271
  if (c.events[i].from === "user" && c.events[i].text?.trim() === text.trim()) {
76230
76272
  at = i;
76231
76273
  break;
@@ -76975,7 +77017,7 @@ function createSessionCache(env = process.env) {
76975
77017
  }
76976
77018
 
76977
77019
  // src/version.ts
76978
- var VERSION = "0.5.0";
77020
+ var VERSION = "0.5.2";
76979
77021
 
76980
77022
  // src/index.ts
76981
77023
  var bridge = createHelloFreshBridge({ port: readWsPort(), version: VERSION });
package/dist/normalize.js CHANGED
@@ -92,6 +92,8 @@ export function trackingPublicId(t) {
92
92
  return m?.[1];
93
93
  }
94
94
  const opt = (key, value) => (value === undefined || value === null || value === '' ? {} : { [key]: value });
95
+ /** HelloFresh's own `delivered`, or the carrier scan `package.delivered` (seen live 2026-12-01). */
96
+ const isDelivered = (status) => status === 'delivered' || status === 'package.delivered';
95
97
  const step = (s) => ({
96
98
  ...opt('status', s.status),
97
99
  ...opt('statusDetail', s.status_detail),
@@ -127,7 +129,7 @@ export function projectTracking(raw) {
127
129
  ...opt('carrierTrackingUrl', b.carrier_tracking_url ?? b.public_url),
128
130
  ...opt('trackingUrl', b.hf_tracking_url),
129
131
  ...opt('deliveryDate', b.delivery_date),
130
- delivered: last.status === 'delivered' || newer?.status === 'delivered',
132
+ delivered: b.internal_status === 'delivered' || isDelivered(last.status) || isDelivered(newer?.status),
131
133
  ...(newer ? { latestEvent: newer } : {}),
132
134
  ...(photos > 0 ? { proofOfDeliveryPhotos: photos } : {}),
133
135
  history,
@@ -135,6 +137,12 @@ export function projectTracking(raw) {
135
137
  }),
136
138
  };
137
139
  }
140
+ /** When a delivered box arrived: its newest delivered event, else its status time. Undefined until delivered. */
141
+ export function deliveredAt(box) {
142
+ if (!box.delivered)
143
+ return undefined;
144
+ return box.history.find((h) => isDelivered(h.status) && h.at)?.at ?? box.statusAt;
145
+ }
138
146
  const QUICK_TAGS = new Set(['quick', 'easy-prep']);
139
147
  const QUICK_MINUTES = 30;
140
148
  function isSeafoodCategory(category) {
package/dist/support.js CHANGED
@@ -61,6 +61,7 @@ function linksOf(attachments) {
61
61
  });
62
62
  return links.length > 0 ? links : undefined;
63
63
  }
64
+ const UI_ONLY_KINDS = new Set(['humanAgentTyping', 'fileUploadConfig']);
64
65
  /** The state snapshot's events, projected: who said what and when. Unknown shapes are skipped, never guessed at. */
65
66
  export function projectEvents(raw) {
66
67
  const out = [];
@@ -94,8 +95,9 @@ export function projectEvents(raw) {
94
95
  out.push({ kind: type === 'JOIN' ? 'agentJoined' : type === 'LEAVE' ? 'agentLeft' : kind, ...base });
95
96
  continue;
96
97
  }
97
- // humanAgentTyping is transient UI state, not part of the record.
98
- if (kind === 'humanAgentTyping')
98
+ // Transient UI state, not part of the record: typing indicators, and the widget's upload
99
+ // settings (`fileUploadConfig`, streamed after a user message — seen live 2026-12-02).
100
+ if (UI_ONLY_KINDS.has(kind))
99
101
  continue;
100
102
  const detail = kind === 'queueInfo' ? ev.queueInfo : undefined;
101
103
  out.push({ kind, ...base, ...(detail !== undefined ? { detail } : {}) });
@@ -4,9 +4,9 @@
4
4
  // ingredients, steps) is written by HelloFresh — third-party content — so both
5
5
  // answer inside the untrusted-content envelope.
6
6
  import { z } from 'zod';
7
- import { McpToolError, UNTRUSTED_CONTENT_RULE, UNTRUSTED_DESCRIPTION_SUFFIX, resolveView, toolAnnotations, untrustedResult, } from '@chrischall/mcp-utils';
7
+ import { McpToolError, UNTRUSTED_CONTENT_RULE, UNTRUSTED_DESCRIPTION_SUFFIX, resolveView, todayIso, toolAnnotations, untrustedResult, } from '@chrischall/mcp-utils';
8
8
  import { cookOrder, dayFrom, pantryItems, pantryLine, projectRecipe, recipeMinutes } from '../cooking.js';
9
- import { projectDelivery, projectMenu } from '../normalize.js';
9
+ import { deliveredAt, projectDelivery, projectMenu, projectTracking, trackingPublicId } from '../normalize.js';
10
10
  import { foodMeta } from './hints.js';
11
11
  import { HF_VIEWS, attempt, dateOf, hfView, loadAccount, readRawMenu, weekParam } from './shared.js';
12
12
  const readOnly = (title) => toolAnnotations({ title, readOnly: true, idempotent: true, openWorld: true });
@@ -43,6 +43,45 @@ function recipeIdOf(meal, index, week) {
43
43
  }
44
44
  export function registerCookingTools(server, deps) {
45
45
  const { client } = deps;
46
+ const now = deps.now ?? Date.now;
47
+ /**
48
+ * The day to count cook days from: the scheduled delivery date, unless tracking (read best effort) shows the
49
+ * box arrived on another day, or is late and still on its way — then the arrival day, or today.
50
+ */
51
+ const cookStart = async (raw, scheduled) => {
52
+ const publicId = trackingPublicId(raw.tracking);
53
+ if (!publicId)
54
+ return { start: scheduled };
55
+ const read = await attempt(async () => projectTracking(await client.getTracking(publicId)));
56
+ if (!read.ok) {
57
+ return { start: scheduled, note: `Tracking could not be read (${read.reason}), so days count from the scheduled delivery day.` };
58
+ }
59
+ const box = read.value.boxes[0];
60
+ if (!box)
61
+ return { start: scheduled };
62
+ // The user's wall-clock date (MCP_USER_TZ, else the system zone): a 7 PM ET delivery is 00:15 UTC next day.
63
+ const localDate = (at) => todayIso({ now: new Date(at) });
64
+ const at = deliveredAt(box);
65
+ if (at && !Number.isNaN(Date.parse(at))) {
66
+ const arrived = localDate(Date.parse(at));
67
+ if (arrived === scheduled)
68
+ return { start: scheduled };
69
+ return {
70
+ start: arrived,
71
+ arrivedDate: arrived,
72
+ note: `The box arrived ${arrived}, not on its scheduled ${scheduled}: days count from the day it arrived.`,
73
+ };
74
+ }
75
+ const today = localDate(now());
76
+ if (!box.delivered && today > scheduled) {
77
+ const latest = box.latestEvent?.status ?? box.status ?? 'unknown';
78
+ return {
79
+ start: today,
80
+ note: `The box has not arrived yet (scheduled ${scheduled}; latest tracking: ${latest}), so days count from today: shift them once it arrives.`,
81
+ };
82
+ }
83
+ return { start: scheduled };
84
+ };
46
85
  server.registerTool('hf_get_recipe', {
47
86
  description: 'Read the full HelloFresh recipe for one meal on a week’s menu (by menu index, a protein swap included): ' +
48
87
  'total time, difficulty, allergens, nutrition per serving, ingredients with amounts for the week’s servings ' +
@@ -82,7 +121,8 @@ export function registerCookingTools(server, deps) {
82
121
  server.registerTool('hf_cooking_plan', {
83
122
  description: 'Plan cooking for a HelloFresh delivery week: the picked meals in a recommended cook order, most perishable ' +
84
123
  'first (fish, then shellfish, other seafood, poultry, ground meat, whole cuts of beef/pork/lamb, vegetarian ' +
85
- 'last; ties by shorter total time), each with a suggested day counted from the delivery date, why, total ' +
124
+ 'last; ties by shorter total time), each with a suggested day counted from the delivery date (or, per the ' +
125
+ 'carrier tracking, the day a late box actually arrived), why, total ' +
86
126
  'time, a short ingredient list, the pantry staples HelloFresh does not ship (salt, oil…) and the recipe card. ' +
87
127
  `${UNTRUSTED_DESCRIPTION_SUFFIX}`,
88
128
  annotations: readOnly('HelloFresh: cooking plan'),
@@ -90,7 +130,8 @@ export function registerCookingTools(server, deps) {
90
130
  inputSchema: z.object({ week: weekParam }),
91
131
  }, async ({ week }) => {
92
132
  const account = await loadAccount(client);
93
- const delivery = projectDelivery(await client.getDelivery(account.subscriptionId, week));
133
+ const rawDelivery = await client.getDelivery(account.subscriptionId, week);
134
+ const delivery = projectDelivery(rawDelivery);
94
135
  const deliveryDate = dateOf(delivery.deliveryDate);
95
136
  const head = { week, ...(deliveryDate ? { deliveryDate } : {}), status: delivery.status };
96
137
  if (delivery.status === 'skipped') {
@@ -135,19 +176,24 @@ export function registerCookingTools(server, deps) {
135
176
  };
136
177
  }));
137
178
  const ordered = cookOrder(dishes);
179
+ const timing = deliveryDate ? await cookStart(rawDelivery, deliveryDate) : undefined;
138
180
  return fenced({
139
181
  ...head,
182
+ ...(timing?.arrivedDate ? { arrivedDate: timing.arrivedDate } : {}),
140
183
  dishes: ordered.map(({ text: _text, category: _category, seafoodKind: _kind, rank, why, ...d }, i) => {
141
184
  const tied = ordered.filter((o) => o.rank === rank && o.index !== d.index).map((o) => `#${o.index}`);
142
185
  return {
143
186
  order: i + 1,
144
- ...(deliveryDate ? dayFrom(deliveryDate, i) : {}),
187
+ ...(timing ? dayFrom(timing.start, i) : {}),
145
188
  ...d,
146
189
  why: tied.length > 0 ? `${why} Same perishability as ${tied.join(', ')}: shorter total time first.` : why,
147
190
  };
148
191
  }),
149
- ...(deliveryDate
150
- ? { dayNote: 'Days count from the delivery day (the most perishable dish that evening); shift them to fit your week.' }
192
+ ...(timing
193
+ ? {
194
+ dayNote: timing.note ??
195
+ 'Days count from the delivery day (the most perishable dish that evening); shift them to fit your week.',
196
+ }
151
197
  : {}),
152
198
  });
153
199
  });
@@ -222,11 +222,12 @@ export function registerSupportTools(server, deps) {
222
222
  'Check with hf_support_read before sending it again; do not repeat it blindly.',
223
223
  });
224
224
  }
225
+ // The message is verified only by a NEW user line holding it in the transcript HelloFresh sent
226
+ // back: an earlier copy (a repeated "yes") or a turn with no transcript proves nothing.
227
+ let at = -1;
225
228
  if (got.events)
226
229
  c.events = got.events;
227
- // The message is verified when the transcript HelloFresh sent back holds it as the user's.
228
- let at = -1;
229
- for (let i = c.events.length - 1; i >= 0; i--) {
230
+ for (let i = got.events ? c.events.length - 1 : -1; i >= before; i--) {
230
231
  if (c.events[i].from === 'user' && c.events[i].text?.trim() === text.trim()) {
231
232
  at = i;
232
233
  break;
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  // literal below on release; every manifest that carries a version is listed in
3
3
  // release-please-config.json's extra-files and kept in lockstep by
4
4
  // tests/version-sync.test.ts. Keep the release marker on the export line only.
5
- export const VERSION = '0.5.0'; // x-release-please-version
5
+ export const VERSION = '0.5.2'; // x-release-please-version
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "hellofresh-mcp",
5
5
  "display_name": "HelloFresh",
6
- "version": "0.5.0",
6
+ "version": "0.5.2",
7
7
  "description": "Unofficial HelloFresh (US) tools for Claude — subscription, weekly deliveries, menus, meal picks, skips and box sizes via your signed-in browser",
8
8
  "author": {
9
9
  "name": "Chris Chall",
@@ -55,7 +55,7 @@
55
55
  "user_tz": {
56
56
  "type": "string",
57
57
  "title": "Time zone (optional)",
58
- "description": "Optional. Your IANA time zone, for example America/New_York. It decides \"this week\" in hf_recent_picks. Leave blank to use the system zone.",
58
+ "description": "Optional. Your IANA time zone, for example America/New_York. It decides \"this week\" in hf_recent_picks and the day a late box arrived in hf_cooking_plan. Leave blank to use the system zone.",
59
59
  "required": false
60
60
  },
61
61
  "confirm_mode": {
package/mint.yaml CHANGED
@@ -32,7 +32,7 @@ env:
32
32
  required: false
33
33
  help: >-
34
34
  Your IANA time zone (e.g. America/New_York), used for "this week" in
35
- hf_recent_picks. Unset, a hosted server uses the system zone (UTC), so
35
+ hf_recent_picks and for the day a late box arrived in hf_cooking_plan. Unset, a hosted server uses the system zone (UTC), so
36
36
  the week rolls over at UTC midnight on Sunday.
37
37
  - name: HELLOFRESH_DEBUG
38
38
  required: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrischall/hellofresh-mcp",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "license": "MIT",
5
5
  "mcpName": "io.github.chrischall/hellofresh-mcp",
6
6
  "description": "Unofficial HelloFresh (US) MCP server for Claude — subscription, weekly deliveries, menus, meal picks, skips and box sizes — developed and maintained by AI (Claude Code)",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/chrischall/hellofresh-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.5.0",
9
+ "version": "0.5.2",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@chrischall/hellofresh-mcp",
14
- "version": "0.5.0",
14
+ "version": "0.5.2",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },
@@ -24,7 +24,7 @@
24
24
  },
25
25
  {
26
26
  "name": "MCP_USER_TZ",
27
- "description": "Your IANA time zone (e.g. America/New_York), used for \"this week\" in hf_recent_picks. Defaults to the system zone.",
27
+ "description": "Your IANA time zone (e.g. America/New_York), used for \"this week\" in hf_recent_picks and for the day a late box arrived in hf_cooking_plan. Defaults to the system zone.",
28
28
  "isRequired": false,
29
29
  "format": "string"
30
30
  },
@@ -71,7 +71,8 @@ means the browser may be signed out: same remedy.
71
71
  - `hf_cooking_plan` `{week}` — the week's picks in cook order, most perishable
72
72
  first (fish → shellfish → other seafood → poultry → ground meat → beef/pork/lamb
73
73
  → vegetarian; ties by shorter time), each with a suggested day from the
74
- delivery date, why, time, key ingredients and `pantry` (the staples to have
74
+ delivery date — or, per the carrier tracking, from the day a late box
75
+ arrived (`arrivedDate`), or today while a late box is still on its way — why, time, key ingredients and `pantry` (the staples to have
75
76
  on hand).
76
77
  - `hf_pantry_check` `{week, view?}` — what to have in the pantry: the staples
77
78
  HelloFresh does NOT ship (salt, pepper, oil, often butter/eggs/sugar/flour)