myhotlunchbox-mcp 1.2.6 → 1.2.7
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +3 -2
- package/dist/bundle.js +134 -8
- package/dist/tools/reports.js +10 -2
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for My Hot Lunchbox — order school lunches, manage students, and track payments via natural language",
|
|
10
|
-
"version": "1.2.
|
|
10
|
+
"version": "1.2.7"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "My Hot Lunchbox",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "MCP server for My Hot Lunchbox — school lunch calendar, ordering, and payments. Signs in server-side with the parent account credentials.",
|
|
18
|
-
"version": "1.2.
|
|
18
|
+
"version": "1.2.7",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myhotlunchbox-mcp",
|
|
3
3
|
"displayName": "My Hot Lunchbox",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.7",
|
|
5
5
|
"description": "MCP server for My Hot Lunchbox — order school lunches, manage students, and track payments via natural language",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
package/.mcp.json
CHANGED
package/dist/bundle.js
CHANGED
|
@@ -84,6 +84,7 @@ var require_util = __commonJS({
|
|
|
84
84
|
exports.explicitlyAborted = explicitlyAborted2;
|
|
85
85
|
exports.prefixIssues = prefixIssues2;
|
|
86
86
|
exports.unwrapMessage = unwrapMessage2;
|
|
87
|
+
exports.sizeCaps = sizeCaps2;
|
|
87
88
|
exports.attachSchema = attachSchema2;
|
|
88
89
|
exports.finalizeIssue = finalizeIssue2;
|
|
89
90
|
exports.getSizableOrigin = getSizableOrigin2;
|
|
@@ -618,6 +619,18 @@ var require_util = __commonJS({
|
|
|
618
619
|
function unwrapMessage2(message) {
|
|
619
620
|
return typeof message === "string" ? message : message?.message;
|
|
620
621
|
}
|
|
622
|
+
function sizeCaps2(defChecks) {
|
|
623
|
+
const caps = [];
|
|
624
|
+
for (const ch of defChecks ?? []) {
|
|
625
|
+
const d = ch._zod.def;
|
|
626
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
627
|
+
break;
|
|
628
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
629
|
+
if (max >= 0)
|
|
630
|
+
caps.push([max, ch]);
|
|
631
|
+
}
|
|
632
|
+
return caps;
|
|
633
|
+
}
|
|
621
634
|
function attachSchema2(issues, start, inst) {
|
|
622
635
|
var _a3;
|
|
623
636
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -2282,7 +2295,7 @@ var require_versions = __commonJS({
|
|
|
2282
2295
|
exports.version = {
|
|
2283
2296
|
major: 4,
|
|
2284
2297
|
minor: 6,
|
|
2285
|
-
patch:
|
|
2298
|
+
patch: 7
|
|
2286
2299
|
};
|
|
2287
2300
|
(function() {
|
|
2288
2301
|
var keys = Object.getOwnPropertyNames(exports);
|
|
@@ -3116,6 +3129,31 @@ var require_schemas = __commonJS({
|
|
|
3116
3129
|
return payload;
|
|
3117
3130
|
};
|
|
3118
3131
|
});
|
|
3132
|
+
function capSize2(inst, size) {
|
|
3133
|
+
const caps = util.sizeCaps(inst._zod.def.checks);
|
|
3134
|
+
if (!caps.length)
|
|
3135
|
+
return;
|
|
3136
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
3137
|
+
const parse3 = inst._zod.parse;
|
|
3138
|
+
inst._zod.parse = (payload, ctx) => {
|
|
3139
|
+
const n = size(payload.value);
|
|
3140
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
3141
|
+
for (const [max, ch] of util.sizeCaps(inst._zod.def.checks)) {
|
|
3142
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
3143
|
+
const start = payload.issues.length;
|
|
3144
|
+
ch._zod.check(payload);
|
|
3145
|
+
payload.issues[start].continue = false;
|
|
3146
|
+
util.attachSchema(payload.issues, start, inst);
|
|
3147
|
+
return payload;
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
return parse3(payload, ctx);
|
|
3152
|
+
};
|
|
3153
|
+
}
|
|
3154
|
+
var arraySize2 = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
3155
|
+
var mapSize2 = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
3156
|
+
var setSize2 = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
3119
3157
|
function handleArrayResult2(result, final, index) {
|
|
3120
3158
|
if (result.issues.length) {
|
|
3121
3159
|
final.issues.push(...util.prefixIssues(index, result.issues));
|
|
@@ -3159,6 +3197,7 @@ var require_schemas = __commonJS({
|
|
|
3159
3197
|
}
|
|
3160
3198
|
return payload;
|
|
3161
3199
|
};
|
|
3200
|
+
capSize2(inst, arraySize2);
|
|
3162
3201
|
});
|
|
3163
3202
|
function handlePropertyResult2(result, final, key, input2, optin, optout) {
|
|
3164
3203
|
const isPresent = key in input2;
|
|
@@ -4115,6 +4154,7 @@ var require_schemas = __commonJS({
|
|
|
4115
4154
|
return Promise.all(proms).then(() => payload);
|
|
4116
4155
|
return payload;
|
|
4117
4156
|
};
|
|
4157
|
+
capSize2(inst, mapSize2);
|
|
4118
4158
|
});
|
|
4119
4159
|
function handleMapResult2(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
4120
4160
|
if (keyResult.issues.length) {
|
|
@@ -4181,6 +4221,7 @@ var require_schemas = __commonJS({
|
|
|
4181
4221
|
return Promise.all(proms).then(() => payload);
|
|
4182
4222
|
return payload;
|
|
4183
4223
|
};
|
|
4224
|
+
capSize2(inst, setSize2);
|
|
4184
4225
|
});
|
|
4185
4226
|
function handleSetResult2(result, final) {
|
|
4186
4227
|
if (result.issues.length) {
|
|
@@ -16285,9 +16326,15 @@ ${code2}
|
|
|
16285
16326
|
doc.write(`}`);
|
|
16286
16327
|
return outputVar;
|
|
16287
16328
|
}
|
|
16329
|
+
function generateSizeGate2(doc, schema, size) {
|
|
16330
|
+
for (const [max, check2] of util.sizeCaps(schema._zod.def.checks)) {
|
|
16331
|
+
doc.write(`if (${size} > ${numericOperand2(max, check2._zod.def.check)}) return INVALID;`);
|
|
16332
|
+
}
|
|
16333
|
+
}
|
|
16288
16334
|
function generateArrayCheck2(doc, ctx, schema, accessor, buildsValue = true) {
|
|
16289
16335
|
const def = schema._zod.def;
|
|
16290
16336
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
16337
|
+
generateSizeGate2(doc, schema, `${accessor}.length`);
|
|
16291
16338
|
const outputVar = buildsValue ? newVar2(ctx) : null;
|
|
16292
16339
|
const iVar = newVar2(ctx);
|
|
16293
16340
|
const elemVar = newVar2(ctx);
|
|
@@ -16687,6 +16734,7 @@ ${code2}
|
|
|
16687
16734
|
function generateMapCheck2(doc, ctx, schema, accessor) {
|
|
16688
16735
|
const def = schema._zod.def;
|
|
16689
16736
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
16737
|
+
generateSizeGate2(doc, schema, `${accessor}.size`);
|
|
16690
16738
|
const outputVar = newVar2(ctx);
|
|
16691
16739
|
const kVar = newVar2(ctx);
|
|
16692
16740
|
const valVar = newVar2(ctx);
|
|
@@ -16703,6 +16751,7 @@ ${code2}
|
|
|
16703
16751
|
function generateSetCheck2(doc, ctx, schema, accessor) {
|
|
16704
16752
|
const def = schema._zod.def;
|
|
16705
16753
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
16754
|
+
generateSizeGate2(doc, schema, `${accessor}.size`);
|
|
16706
16755
|
const outputVar = newVar2(ctx);
|
|
16707
16756
|
const valVar = newVar2(ctx);
|
|
16708
16757
|
doc.write(`const ${outputVar} = new Set();`);
|
|
@@ -23411,7 +23460,7 @@ function declaredDialect(schema, remedy) {
|
|
|
23411
23460
|
throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${schema.$schema.slice(0, 200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);
|
|
23412
23461
|
}
|
|
23413
23462
|
|
|
23414
|
-
// node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs
|
|
23463
|
+
// node_modules/@modelcontextprotocol/server/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs
|
|
23415
23464
|
var z = __toESM(require_v4(), 1);
|
|
23416
23465
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
23417
23466
|
var SUPPORTED_PROTOCOL_VERSIONS = [
|
|
@@ -38261,7 +38310,7 @@ var API_KEY_RE = new RegExp([
|
|
|
38261
38310
|
// webhook signing secret (Stripe-style)
|
|
38262
38311
|
].map((p) => `\\b${p}`).join("|"), "g");
|
|
38263
38312
|
var GOOGLE_OAUTH_TOKEN_RE = /(?<![A-Za-z0-9+/])(?:ya29\.|1\/\/)[A-Za-z0-9._-]{8,}/g;
|
|
38264
|
-
var QUERY_SECRET_RE = new RegExp(`([
|
|
38313
|
+
var QUERY_SECRET_RE = new RegExp(`([?&#;](?:(?:access|refresh|id|auth|session|csrf|xsrf|api)[_-]?token|client[_-]?secret|api[_-]?secret|api[_-]?key|password|passwd|signature|secret|token|auth|key|sig|(?:code[_-]?)?verifier|(?:php|j)?sess(?:ion)?[_-]?id|sid|x[-_]${HEADER_NAME_RUN}?(?:api[-_]?key|token|secret|auth)${HEADER_NAME_RUN})=)[^&#\\s"'<>\`]+`, "gi");
|
|
38265
38314
|
var OAUTH_CODE_RE = /([?&]code=)(?=[^&#\s"'<>`]{16,})[^&#\s"'<>`]+/gi;
|
|
38266
38315
|
var FORM_PASSWORD_RE = /((?:^|[\s,;:"'(\[{])(?:password|passwd)=)[^&#\s"'<>`]+/gim;
|
|
38267
38316
|
var HEADER_SECRET_RE = new RegExp(`(\\b(?:x[-_]${HEADER_NAME_RUN}?(?:api[-_]?key|token|secret|auth)${HEADER_NAME_RUN}|api[-_]?key)\\s*:\\s*)[^\\s,;"'<>\`]+`, "gi");
|
|
@@ -38272,6 +38321,8 @@ var JSON_SECRET_KEYS = [
|
|
|
38272
38321
|
"api[_-]?secret",
|
|
38273
38322
|
"(?:x[_-])?api[_-]?key",
|
|
38274
38323
|
"private[_-]?key",
|
|
38324
|
+
"aws[_-]?secret[_-]?access[_-]?key",
|
|
38325
|
+
// fleet-audit#1297
|
|
38275
38326
|
"code[_-]?verifier",
|
|
38276
38327
|
// PKCE; a bare `verifier` key is too generic for JSON
|
|
38277
38328
|
`x[_-]${HEADER_NAME_RUN}?(?:api[_-]?key|token|secret|auth)${HEADER_NAME_RUN}`,
|
|
@@ -38969,6 +39020,7 @@ __export(util_exports, {
|
|
|
38969
39020
|
required: () => required,
|
|
38970
39021
|
safeExtend: () => safeExtend,
|
|
38971
39022
|
shallowClone: () => shallowClone,
|
|
39023
|
+
sizeCaps: () => sizeCaps,
|
|
38972
39024
|
slugify: () => slugify,
|
|
38973
39025
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
38974
39026
|
toZod: () => toZod,
|
|
@@ -39488,6 +39540,18 @@ function prefixIssues(path, issues) {
|
|
|
39488
39540
|
function unwrapMessage(message) {
|
|
39489
39541
|
return typeof message === "string" ? message : message?.message;
|
|
39490
39542
|
}
|
|
39543
|
+
function sizeCaps(defChecks) {
|
|
39544
|
+
const caps = [];
|
|
39545
|
+
for (const ch of defChecks ?? []) {
|
|
39546
|
+
const d = ch._zod.def;
|
|
39547
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
39548
|
+
break;
|
|
39549
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
39550
|
+
if (max >= 0)
|
|
39551
|
+
caps.push([max, ch]);
|
|
39552
|
+
}
|
|
39553
|
+
return caps;
|
|
39554
|
+
}
|
|
39491
39555
|
function attachSchema(issues, start, inst) {
|
|
39492
39556
|
var _a3;
|
|
39493
39557
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -40908,7 +40972,7 @@ ${content.join("\n")}
|
|
|
40908
40972
|
var version = {
|
|
40909
40973
|
major: 4,
|
|
40910
40974
|
minor: 6,
|
|
40911
|
-
patch:
|
|
40975
|
+
patch: 7
|
|
40912
40976
|
};
|
|
40913
40977
|
|
|
40914
40978
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -41664,6 +41728,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
41664
41728
|
return payload;
|
|
41665
41729
|
};
|
|
41666
41730
|
});
|
|
41731
|
+
function capSize(inst, size) {
|
|
41732
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
41733
|
+
if (!caps.length)
|
|
41734
|
+
return;
|
|
41735
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
41736
|
+
const parse3 = inst._zod.parse;
|
|
41737
|
+
inst._zod.parse = (payload, ctx) => {
|
|
41738
|
+
const n = size(payload.value);
|
|
41739
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
41740
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
41741
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
41742
|
+
const start = payload.issues.length;
|
|
41743
|
+
ch._zod.check(payload);
|
|
41744
|
+
payload.issues[start].continue = false;
|
|
41745
|
+
attachSchema(payload.issues, start, inst);
|
|
41746
|
+
return payload;
|
|
41747
|
+
}
|
|
41748
|
+
}
|
|
41749
|
+
}
|
|
41750
|
+
return parse3(payload, ctx);
|
|
41751
|
+
};
|
|
41752
|
+
}
|
|
41753
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
41754
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
41755
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
41667
41756
|
function handleArrayResult(result, final, index) {
|
|
41668
41757
|
if (result.issues.length) {
|
|
41669
41758
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -41707,6 +41796,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
41707
41796
|
}
|
|
41708
41797
|
return payload;
|
|
41709
41798
|
};
|
|
41799
|
+
capSize(inst, arraySize);
|
|
41710
41800
|
});
|
|
41711
41801
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
41712
41802
|
const isPresent = key in input2;
|
|
@@ -42663,6 +42753,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
42663
42753
|
return Promise.all(proms).then(() => payload);
|
|
42664
42754
|
return payload;
|
|
42665
42755
|
};
|
|
42756
|
+
capSize(inst, mapSize);
|
|
42666
42757
|
});
|
|
42667
42758
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
42668
42759
|
if (keyResult.issues.length) {
|
|
@@ -42729,6 +42820,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
42729
42820
|
return Promise.all(proms).then(() => payload);
|
|
42730
42821
|
return payload;
|
|
42731
42822
|
};
|
|
42823
|
+
capSize(inst, setSize);
|
|
42732
42824
|
});
|
|
42733
42825
|
function handleSetResult(result, final) {
|
|
42734
42826
|
if (result.issues.length) {
|
|
@@ -52259,9 +52351,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
52259
52351
|
doc.write(`}`);
|
|
52260
52352
|
return outputVar;
|
|
52261
52353
|
}
|
|
52354
|
+
function generateSizeGate(doc, schema, size) {
|
|
52355
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
52356
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
52357
|
+
}
|
|
52358
|
+
}
|
|
52262
52359
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
52263
52360
|
const def = schema._zod.def;
|
|
52264
52361
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
52362
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
52265
52363
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
52266
52364
|
const iVar = newVar(ctx);
|
|
52267
52365
|
const elemVar = newVar(ctx);
|
|
@@ -52661,6 +52759,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
52661
52759
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
52662
52760
|
const def = schema._zod.def;
|
|
52663
52761
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
52762
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
52664
52763
|
const outputVar = newVar(ctx);
|
|
52665
52764
|
const kVar = newVar(ctx);
|
|
52666
52765
|
const valVar = newVar(ctx);
|
|
@@ -52677,6 +52776,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
52677
52776
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
52678
52777
|
const def = schema._zod.def;
|
|
52679
52778
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
52779
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
52680
52780
|
const outputVar = newVar(ctx);
|
|
52681
52781
|
const valVar = newVar(ctx);
|
|
52682
52782
|
doc.write(`const ${outputVar} = new Set();`);
|
|
@@ -58881,10 +58981,34 @@ import { constants as fsConstants2, realpathSync } from "node:fs";
|
|
|
58881
58981
|
var O_NOFOLLOW2 = fsConstants2.O_NOFOLLOW ?? 0;
|
|
58882
58982
|
var O_NONBLOCK = fsConstants2.O_NONBLOCK ?? 0;
|
|
58883
58983
|
|
|
58984
|
+
// node_modules/@chrischall/mcp-utils/dist/internal/ascii.js
|
|
58985
|
+
function asciiLower(s) {
|
|
58986
|
+
return s.replace(/[A-Z]+/g, (m) => m.toLowerCase());
|
|
58987
|
+
}
|
|
58988
|
+
|
|
58884
58989
|
// node_modules/@chrischall/mcp-utils/dist/scrape/index.js
|
|
58885
58990
|
var NEXT_DATA_MAX_CHARS = 16 * 1024 * 1024;
|
|
58886
58991
|
function isCloudflareChallenge(html) {
|
|
58887
|
-
return
|
|
58992
|
+
return html.includes("_cf_chl_opt") || hasJustAMomentTitle(html);
|
|
58993
|
+
}
|
|
58994
|
+
var JUST_A_MOMENT = "just a moment";
|
|
58995
|
+
function hasJustAMomentTitle(html) {
|
|
58996
|
+
const lower = asciiLower(html);
|
|
58997
|
+
let i = 0;
|
|
58998
|
+
for (; ; ) {
|
|
58999
|
+
const open2 = lower.indexOf("<title", i);
|
|
59000
|
+
if (open2 < 0)
|
|
59001
|
+
return false;
|
|
59002
|
+
const gt = lower.indexOf(">", open2 + 6);
|
|
59003
|
+
if (gt < 0)
|
|
59004
|
+
return false;
|
|
59005
|
+
let j = gt + 1;
|
|
59006
|
+
while (j < lower.length && /\s/.test(lower[j]))
|
|
59007
|
+
j++;
|
|
59008
|
+
if (lower.startsWith(JUST_A_MOMENT, j))
|
|
59009
|
+
return true;
|
|
59010
|
+
i = gt + 1;
|
|
59011
|
+
}
|
|
58888
59012
|
}
|
|
58889
59013
|
|
|
58890
59014
|
// node_modules/@chrischall/mcp-utils/dist/http/index.js
|
|
@@ -60163,7 +60287,7 @@ var MhlbClient = class {
|
|
|
60163
60287
|
};
|
|
60164
60288
|
|
|
60165
60289
|
// src/version.ts
|
|
60166
|
-
var VERSION = "1.2.
|
|
60290
|
+
var VERSION = "1.2.7";
|
|
60167
60291
|
|
|
60168
60292
|
// src/tools/_shared.ts
|
|
60169
60293
|
var CONFIRMS = ` ${CONFIRM_FLOW_SENTENCE}`;
|
|
@@ -60843,6 +60967,8 @@ function* candidateNames(filename) {
|
|
|
60843
60967
|
for (let n = 2; ; n += 1) yield `${stem} (${n})${ext}`;
|
|
60844
60968
|
}
|
|
60845
60969
|
var MAX_NAME_ATTEMPTS = 1e3;
|
|
60970
|
+
var REPORT_FILE_MODE = 384;
|
|
60971
|
+
var REPORT_DIR_MODE = 448;
|
|
60846
60972
|
function writeWithoutClobbering(dir, filename, bytes) {
|
|
60847
60973
|
let attempts = 0;
|
|
60848
60974
|
for (const name of candidateNames(filename)) {
|
|
@@ -60850,7 +60976,7 @@ function writeWithoutClobbering(dir, filename, bytes) {
|
|
|
60850
60976
|
attempts += 1;
|
|
60851
60977
|
const candidate = join4(dir, name);
|
|
60852
60978
|
try {
|
|
60853
|
-
writeFileSync3(candidate, bytes, { flag: "wx" });
|
|
60979
|
+
writeFileSync3(candidate, bytes, { flag: "wx", mode: REPORT_FILE_MODE });
|
|
60854
60980
|
return candidate;
|
|
60855
60981
|
} catch (err) {
|
|
60856
60982
|
if (err.code !== "EEXIST") throw err;
|
|
@@ -60892,7 +61018,7 @@ function deliver(bytes, contentType, filename, inline) {
|
|
|
60892
61018
|
const dir = outputDir();
|
|
60893
61019
|
let path;
|
|
60894
61020
|
try {
|
|
60895
|
-
mkdirSync5(dir, { recursive: true });
|
|
61021
|
+
mkdirSync5(dir, { recursive: true, mode: REPORT_DIR_MODE });
|
|
60896
61022
|
path = writeWithoutClobbering(dir, filename, bytes);
|
|
60897
61023
|
} catch (cause) {
|
|
60898
61024
|
if (cause instanceof McpToolError) throw cause;
|
package/dist/tools/reports.js
CHANGED
|
@@ -41,6 +41,9 @@ export function* candidateNames(filename) {
|
|
|
41
41
|
/** How many suffixed names to try before giving up. Exported so tests track
|
|
42
42
|
* the real limit rather than hardcoding a copy of it. */
|
|
43
43
|
export const MAX_NAME_ATTEMPTS = 1000;
|
|
44
|
+
/** Report PDFs and any directory created for them are owner-only. */
|
|
45
|
+
export const REPORT_FILE_MODE = 0o600;
|
|
46
|
+
export const REPORT_DIR_MODE = 0o700;
|
|
44
47
|
/**
|
|
45
48
|
* Write the report without ever overwriting an existing file.
|
|
46
49
|
*
|
|
@@ -57,7 +60,10 @@ export function writeWithoutClobbering(dir, filename, bytes) {
|
|
|
57
60
|
attempts += 1;
|
|
58
61
|
const candidate = join(dir, name);
|
|
59
62
|
try {
|
|
60
|
-
|
|
63
|
+
// Owner-only: these PDFs carry children's names, lunch orders and
|
|
64
|
+
// receipts. `wx` (O_CREAT|O_EXCL) also never follows a symlink planted
|
|
65
|
+
// at the name — it fails EEXIST and the walk moves on.
|
|
66
|
+
writeFileSync(candidate, bytes, { flag: 'wx', mode: REPORT_FILE_MODE });
|
|
61
67
|
return candidate;
|
|
62
68
|
}
|
|
63
69
|
catch (err) {
|
|
@@ -96,7 +102,9 @@ function deliver(bytes, contentType, filename, inline) {
|
|
|
96
102
|
const dir = outputDir();
|
|
97
103
|
let path;
|
|
98
104
|
try {
|
|
99
|
-
|
|
105
|
+
// A directory created here is owner-only too; an existing one (e.g.
|
|
106
|
+
// ~/Downloads) is left as the user set it.
|
|
107
|
+
mkdirSync(dir, { recursive: true, mode: REPORT_DIR_MODE });
|
|
100
108
|
path = writeWithoutClobbering(dir, filename, bytes);
|
|
101
109
|
}
|
|
102
110
|
catch (cause) {
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Single source of truth for the server version; release-please rewrites it. */
|
|
2
|
-
export const VERSION = '1.2.
|
|
2
|
+
export const VERSION = '1.2.7'; // x-release-please-version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myhotlunchbox-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"mcpName": "io.github.chrischall/myhotlunchbox-mcp",
|
|
5
5
|
"description": "My Hot Lunchbox MCP server for Claude — developed and maintained by AI (Claude Code)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"capture:writes": "node scripts/capture-writes.mjs"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@chrischall/mcp-utils": "^3.0.
|
|
48
|
+
"@chrischall/mcp-utils": "^3.0.3",
|
|
49
49
|
"@modelcontextprotocol/server": "^2.3.0",
|
|
50
50
|
"dotenv": "^18.0.0",
|
|
51
51
|
"zod": "^4.6.5"
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/myhotlunchbox-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.2.
|
|
9
|
+
"version": "1.2.7",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "myhotlunchbox-mcp",
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.7",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|