@curless/hotel-storefront 0.68.3 → 0.69.1
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 +23 -0
- package/dist/card.generated.d.ts +1 -1
- package/dist/card.generated.js +2 -2
- package/dist/card.generated.js.map +1 -1
- package/dist/cidr.d.ts +46 -0
- package/dist/cidr.d.ts.map +1 -0
- package/dist/cidr.js +143 -0
- package/dist/cidr.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/legal.d.ts +7 -1
- package/dist/legal.d.ts.map +1 -1
- package/dist/legal.js +10 -3
- package/dist/legal.js.map +1 -1
- package/dist/lib.d.ts +6 -0
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +5 -0
- package/dist/lib.js.map +1 -1
- package/dist/ranges-check-cli.d.ts +3 -0
- package/dist/ranges-check-cli.d.ts.map +1 -0
- package/dist/ranges-check-cli.js +10 -0
- package/dist/ranges-check-cli.js.map +1 -0
- package/dist/ranges-check.d.ts +39 -0
- package/dist/ranges-check.d.ts.map +1 -0
- package/dist/ranges-check.js +137 -0
- package/dist/ranges-check.js.map +1 -0
- package/dist/server.d.ts +5 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +56 -11
- package/dist/server.js.map +1 -1
- package/dist/source-allowlist.d.ts +95 -0
- package/dist/source-allowlist.d.ts.map +1 -0
- package/dist/source-allowlist.js +250 -0
- package/dist/source-allowlist.js.map +1 -0
- package/dist/source-ranges.d.ts +30 -0
- package/dist/source-ranges.d.ts.map +1 -0
- package/dist/source-ranges.js +376 -0
- package/dist/source-ranges.js.map +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +37 -14
- package/dist/tools.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { parseCidr } from './cidr.js';
|
|
2
|
+
import { PLATFORM_RANGES } from './source-ranges.js';
|
|
3
|
+
/** A range written the one way it compares: its network and prefix, read by cidr.ts. */
|
|
4
|
+
const canonical = (raw) => {
|
|
5
|
+
const c = parseCidr(raw);
|
|
6
|
+
return c ? `${c.v}:${c.net.toString(16)}/${c.bits}` : undefined;
|
|
7
|
+
};
|
|
8
|
+
/** The URL `ranges-check` reads - the Markdown of a docs page, where it has one. */
|
|
9
|
+
export const fetchUrlOf = (s) => s.format === 'anthropic-ip-page' ? `${s.url}.md` : s.url;
|
|
10
|
+
/**
|
|
11
|
+
* The ranges a source publishes, from what its URL answered - or an Error.
|
|
12
|
+
*
|
|
13
|
+
* ⚠️ ANTHROPIC'S PAGE: ONLY THE `### IPv4` / `### IPv6` LISTS UNDER ITS
|
|
14
|
+
* OUTBOUND SECTION - not its inbound section (where its API is reached: a
|
|
15
|
+
* range read from there would let in a block nobody calls from), and not its
|
|
16
|
+
* phased-out list, whatever that is called next (audit P3-11).
|
|
17
|
+
*
|
|
18
|
+
* ⚠️ A SOURCE THAT LISTS NOTHING WAS NOT READ: an empty list is an error (exit
|
|
19
|
+
* 2), not every range removed (audit P3-11).
|
|
20
|
+
*/
|
|
21
|
+
export const parsePublished = (s, body) => {
|
|
22
|
+
if (s.format === 'openai-prefixes-json') {
|
|
23
|
+
const json = JSON.parse(body);
|
|
24
|
+
if (!Array.isArray(json.prefixes))
|
|
25
|
+
throw new Error('no "prefixes" in the file');
|
|
26
|
+
const listed = json.prefixes
|
|
27
|
+
.map((p) => p.ipv4Prefix ?? p.ipv6Prefix)
|
|
28
|
+
.filter((x) => typeof x === 'string');
|
|
29
|
+
if (!listed.length)
|
|
30
|
+
throw new Error('"prefixes" lists no range');
|
|
31
|
+
return listed;
|
|
32
|
+
}
|
|
33
|
+
const start = body.search(/^##\s+Outbound IP addresses\s*$/m);
|
|
34
|
+
if (start < 0)
|
|
35
|
+
throw new Error('no "## Outbound IP addresses" heading on the page');
|
|
36
|
+
const rest = body.slice(start).replace(/^##\s+Outbound[^\n]*\n/, '');
|
|
37
|
+
const next = rest.search(/^##\s/m);
|
|
38
|
+
const section = next < 0 ? rest : rest.slice(0, next);
|
|
39
|
+
// Each `### IPv4` / `### IPv6` list, to the next heading of any level.
|
|
40
|
+
const found = [
|
|
41
|
+
...section.matchAll(/^###\s+IPv[46]\s*$([\s\S]*?)(?=^#{1,6}\s|(?![\s\S]))/gm),
|
|
42
|
+
].flatMap((m) => [...(m[1] ?? '').matchAll(/`([0-9a-fA-F:.]+\/\d{1,3})`/g)].map((r) => r[1]));
|
|
43
|
+
if (!found.length)
|
|
44
|
+
throw new Error('no ranges under "Outbound IP addresses" / "### IPv4" or "### IPv6"');
|
|
45
|
+
return found;
|
|
46
|
+
};
|
|
47
|
+
/** One source compared with what it publishes now. */
|
|
48
|
+
export const compareSource = (platform, s, published, version) => {
|
|
49
|
+
const theirs = new Map();
|
|
50
|
+
const bad = [];
|
|
51
|
+
for (const raw of published) {
|
|
52
|
+
const k = canonical(raw);
|
|
53
|
+
if (k)
|
|
54
|
+
theirs.set(k, raw);
|
|
55
|
+
else
|
|
56
|
+
bad.push(raw);
|
|
57
|
+
}
|
|
58
|
+
const ours = new Map(s.cidrs.map((raw) => [canonical(raw) ?? raw, raw]));
|
|
59
|
+
return {
|
|
60
|
+
platform,
|
|
61
|
+
url: s.url,
|
|
62
|
+
added: [...theirs].filter(([k]) => !ours.has(k)).map(([, raw]) => raw),
|
|
63
|
+
removed: [...ours].filter(([k]) => !theirs.has(k)).map(([, raw]) => raw),
|
|
64
|
+
...(version ? { version } : {}),
|
|
65
|
+
ours: ours.size,
|
|
66
|
+
theirs: theirs.size,
|
|
67
|
+
...(bad.length
|
|
68
|
+
? {
|
|
69
|
+
error: `published ranges not written exactly, left out of the comparison: ${bad.join(', ')}`,
|
|
70
|
+
}
|
|
71
|
+
: {}),
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/** Every source of every platform, read again and compared. */
|
|
75
|
+
export const checkRanges = async (doFetch = fetch, platforms = PLATFORM_RANGES) => {
|
|
76
|
+
const out = [];
|
|
77
|
+
for (const p of platforms) {
|
|
78
|
+
for (const s of p.sources) {
|
|
79
|
+
try {
|
|
80
|
+
const res = await doFetch(fetchUrlOf(s), {
|
|
81
|
+
headers: { 'user-agent': 'hotel-storefront-ranges-check' },
|
|
82
|
+
signal: AbortSignal.timeout(20_000),
|
|
83
|
+
});
|
|
84
|
+
if (!res.ok)
|
|
85
|
+
throw new Error(`HTTP ${res.status}`);
|
|
86
|
+
const body = await res.text();
|
|
87
|
+
const version = s.format === 'openai-prefixes-json'
|
|
88
|
+
? JSON.parse(body).creationTime
|
|
89
|
+
: undefined;
|
|
90
|
+
out.push(compareSource(p.id, s, parsePublished(s, body), version));
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
out.push({
|
|
94
|
+
platform: p.id,
|
|
95
|
+
url: s.url,
|
|
96
|
+
added: [],
|
|
97
|
+
removed: [],
|
|
98
|
+
ours: s.cidrs.length,
|
|
99
|
+
theirs: 0,
|
|
100
|
+
error: e instanceof Error ? e.message : String(e),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return out;
|
|
106
|
+
};
|
|
107
|
+
/** The exit code for a comparison: 0 the same, 1 something differs, 2 something unread. */
|
|
108
|
+
export const exitCodeOf = (diffs) => diffs.some((d) => d.error && d.theirs === 0)
|
|
109
|
+
? 2
|
|
110
|
+
: diffs.some((d) => d.added.length || d.removed.length || d.error)
|
|
111
|
+
? 1
|
|
112
|
+
: 0;
|
|
113
|
+
/** The report a person reads. */
|
|
114
|
+
export const reportOf = (diffs, platforms = PLATFORM_RANGES) => {
|
|
115
|
+
const lines = [];
|
|
116
|
+
for (const d of diffs) {
|
|
117
|
+
const s = platforms.find((p) => p.id === d.platform)?.sources.find((x) => x.url === d.url);
|
|
118
|
+
lines.push(`${d.platform} ${d.url}`);
|
|
119
|
+
if (d.version || s?.version) {
|
|
120
|
+
lines.push(` version: published ${d.version ?? '?'}, ours ${s?.version ?? '-'}`);
|
|
121
|
+
}
|
|
122
|
+
if (d.error)
|
|
123
|
+
lines.push(` ⚠️ ${d.error}`);
|
|
124
|
+
if (!d.added.length && !d.removed.length && !(d.error && d.theirs === 0)) {
|
|
125
|
+
lines.push(` same (${d.ours} ranges)`);
|
|
126
|
+
}
|
|
127
|
+
for (const a of d.added)
|
|
128
|
+
lines.push(` + ${a} published now, not in source-ranges.ts`);
|
|
129
|
+
for (const r of d.removed)
|
|
130
|
+
lines.push(` - ${r} in source-ranges.ts, no longer published`);
|
|
131
|
+
}
|
|
132
|
+
for (const p of platforms.filter((x) => x.unpublished)) {
|
|
133
|
+
lines.push(`${p.id} no published ranges (looked ${p.unpublished?.checked}) - nothing to compare; look again by hand: ${p.unpublished?.looked.join(' ')}`);
|
|
134
|
+
}
|
|
135
|
+
return lines.join('\n');
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=ranges-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ranges-check.js","sourceRoot":"","sources":["../src/ranges-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAyC,MAAM,oBAAoB,CAAC;AAgC5F,wFAAwF;AACxF,MAAM,SAAS,GAAG,CAAC,GAAW,EAAsB,EAAE;IACpD,MAAM,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAClE,CAAC,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAc,EAAU,EAAE,CACnD,CAAC,CAAC,M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AAC;QAC1C,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC;QACzF,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;IAC/F,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,KAAK,CAAC,IAAI,CACR,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC,CAAC,WAAW,EAAE,OAAO,+CAA+C,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC/I,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Hono } from 'hono';
|
|
|
2
2
|
import type { HotelConfig } from './config.js';
|
|
3
3
|
import { MemberStore } from './members.js';
|
|
4
4
|
import { Sessions } from './sessions.js';
|
|
5
|
+
import { type SourceAllowlist } from './source-allowlist.js';
|
|
5
6
|
import { type BrandFonts, type ToolDeps } from './tools.js';
|
|
6
7
|
import { TripIds } from './trip-ids.js';
|
|
7
8
|
import { TripStore } from './trip.js';
|
|
@@ -29,7 +30,7 @@ export declare const INITIALIZE_PER_MINUTE = 300;
|
|
|
29
30
|
* number. Found by reading the boot banner of a container that had just been
|
|
30
31
|
* deployed (2026-09-22): seventeen tools listed, and "0.7.0" above them.
|
|
31
32
|
*/
|
|
32
|
-
export declare const VERSION = "0.
|
|
33
|
+
export declare const VERSION = "0.69.1";
|
|
33
34
|
/**
|
|
34
35
|
* The card's resource URI.
|
|
35
36
|
*
|
|
@@ -38,7 +39,7 @@ export declare const VERSION = "0.68.3";
|
|
|
38
39
|
* connector went storefront-v35 → v40 in a single day of UI work for exactly
|
|
39
40
|
* this reason.
|
|
40
41
|
*/
|
|
41
|
-
export declare const CARD_URI = "ui://curless/hotel/booking-
|
|
42
|
+
export declare const CARD_URI = "ui://curless/hotel/booking-v135.html";
|
|
42
43
|
/**
|
|
43
44
|
* The URI one deployment names its card by: `CARD_URI` with a short hash of
|
|
44
45
|
* everything a host caches under it - the card itself, and the hosts it may
|
|
@@ -192,6 +193,8 @@ export type BuiltServer = {
|
|
|
192
193
|
members: MemberStore;
|
|
193
194
|
tripIds: TripIds;
|
|
194
195
|
sessions: Sessions;
|
|
196
|
+
/** Who may reach /mcp, where the deployment limits it - see source-allowlist.ts. */
|
|
197
|
+
sources?: SourceAllowlist;
|
|
195
198
|
/** Whatever the stores have not written yet, written now - on a clean stop. */
|
|
196
199
|
flush: () => void;
|
|
197
200
|
/**
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAYA,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAO1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAYA,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAO1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAE,QAAQ,EAAe,MAAM,eAAe,CAAC;AACtD,OAAO,EAEL,KAAK,eAAe,EAIrB,MAAM,uBAAu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MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,mFAAmF;IACnF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,qHAAqH;IACrH,YAAY,CAAC,EAAE,OAAO,KAAK,CAAC;IAC5B,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAoBF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,WAAW,GAAI,MAAM,aAAa,KAAG,WA0/CjD,CAAC;AAmCF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,IAAI,MAAM,KAAG,MACyK,CAAC;AAGxN,6GAA6G;AAC7G,eAAO,MAAM,mBAAmB,sMACqK,CAAC;AA0BtM,iFAAiF;AACjF,eAAO,MAAM,YAAY,6PACmO,CAAC;AAiD7P,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,iGAAiG;AACjG,eAAO,MAAM,WAAW,MAAM,CAAC;AAc/B,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAG9D,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CASlF,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -16,6 +16,7 @@ import { MemberStore } from './members.js';
|
|
|
16
16
|
import { paidAnswer } from './paid.js';
|
|
17
17
|
import { PICTURES_PATH, PictureStore, picturesAs } from './pictures.js';
|
|
18
18
|
import { Sessions, cardSupport } from './sessions.js';
|
|
19
|
+
import { REFUSED_SAID, checkSourceAllowlist, makeSourceAllowlist, sourceAddress, } from './source-allowlist.js';
|
|
19
20
|
import { StateDir } from './state.js';
|
|
20
21
|
import { makeSupplier } from './supplier.js';
|
|
21
22
|
import { buildInstructions, listTools, tripToolNames } from './surface.js';
|
|
@@ -51,7 +52,7 @@ export const INITIALIZE_PER_MINUTE = 300;
|
|
|
51
52
|
* number. Found by reading the boot banner of a container that had just been
|
|
52
53
|
* deployed (2026-09-22): seventeen tools listed, and "0.7.0" above them.
|
|
53
54
|
*/
|
|
54
|
-
export const VERSION = '0.
|
|
55
|
+
export const VERSION = '0.69.1';
|
|
55
56
|
/**
|
|
56
57
|
* The card's resource URI.
|
|
57
58
|
*
|
|
@@ -60,7 +61,7 @@ export const VERSION = '0.68.3';
|
|
|
60
61
|
* connector went storefront-v35 → v40 in a single day of UI work for exactly
|
|
61
62
|
* this reason.
|
|
62
63
|
*/
|
|
63
|
-
export const CARD_URI = 'ui://curless/hotel/booking-
|
|
64
|
+
export const CARD_URI = 'ui://curless/hotel/booking-v135.html';
|
|
64
65
|
/** The card as it ships, hashed once - what a host caches under the URI. */
|
|
65
66
|
const CARD_HTML_SHA = createHash('sha256').update(HOTEL_CARD_HTML).digest('hex');
|
|
66
67
|
/**
|
|
@@ -310,6 +311,8 @@ export const buildServer = (opts) => {
|
|
|
310
311
|
const config = opts.config;
|
|
311
312
|
const brand = resolveBrand(config);
|
|
312
313
|
const now = opts.now ?? (() => Date.now());
|
|
314
|
+
// Before anything else is built: an allowlist written wrong stops the start.
|
|
315
|
+
const sources = makeSourceAllowlist(config.sourceAllowlist, opts.env ?? process.env, { now });
|
|
313
316
|
const publicUrl = (opts.publicUrl ?? config.urls.publicUrl ?? config.urls.appUrl).replace(/\/$/, '');
|
|
314
317
|
const state = new StateDir(stateDirOf(config, opts));
|
|
315
318
|
/**
|
|
@@ -707,7 +710,13 @@ export const buildServer = (opts) => {
|
|
|
707
710
|
// tool takes the conversation's `trip`, described as the id its answers give
|
|
708
711
|
// (`WORDS_TRIP_PARAM`) - see `words` in tools/call. A card host's list, and a
|
|
709
712
|
// list read with no session, are as they were, byte for byte.
|
|
710
|
-
|
|
713
|
+
//
|
|
714
|
+
// ⚠️ …AND NONE OF THE CARD'S OWN TOOLS (0.69.1, 总线程 11-12, as Nexva One does): a
|
|
715
|
+
// client that draws no card does not read `visibility: ['app']` (Manus listed the
|
|
716
|
+
// pick, the picked room's booking, the terms' and the account's card tools to its
|
|
717
|
+
// model), and a call to one is refused anyway (`card_only`, tools/call). Left out
|
|
718
|
+
// of its list; still refused, naming the tool to use.
|
|
719
|
+
const toolList = (words = false) => listTools([...TOOLS.map((t) => homeListing(t, brand, made.hotelCount())), ...ACCOUNT_TOOLS].filter((t) => !words || !APP_ONLY.has(t.name)), { ...OUTPUT_SCHEMAS, ...(account?.outputSchemas() ?? {}) }, (name) => (CARDLESS.has(name) ? {} : APP_ONLY.has(name) ? appOnly(meta()) : meta()), TRIP_TOOLS, words);
|
|
711
720
|
/**
|
|
712
721
|
* The tools that change nothing, by their own annotations: called naming no
|
|
713
722
|
* trip by a client that draws no card, they do not anchor a new connection
|
|
@@ -846,7 +855,7 @@ export const buildServer = (opts) => {
|
|
|
846
855
|
// …or the membership sign-in's /login, where members sign in (0.58.0).
|
|
847
856
|
memberLogin?.mount(app);
|
|
848
857
|
app.get('/docs', (c) => c.html(docsPage(config, caps)));
|
|
849
|
-
app.get('/privacy', (c) => c.html(privacyPage(config, [...new Set([...made.imageDomains(), ...(homeFrom ? [homeFrom] : [])])], caps, state.persisted)));
|
|
858
|
+
app.get('/privacy', (c) => c.html(privacyPage(config, [...new Set([...made.imageDomains(), ...(homeFrom ? [homeFrom] : [])])], caps, state.persisted, sources !== undefined)));
|
|
850
859
|
app.get('/terms', (c) => c.html(termsPage(config, caps)));
|
|
851
860
|
// Where a guest lands from the payment page, paid (robin, 2026-10-15) - see
|
|
852
861
|
// paid.ts. Only where something is paid in advance: the backend's
|
|
@@ -906,6 +915,8 @@ export const buildServer = (opts) => {
|
|
|
906
915
|
...made.health(),
|
|
907
916
|
...(account?.health() ?? {}),
|
|
908
917
|
...(memberLogin?.health() ?? {}),
|
|
918
|
+
// New sessions by platform, and who came from elsewhere (by network only).
|
|
919
|
+
...(sources ? { sourceAllowlist: sources.health() } : {}),
|
|
909
920
|
// ⚠️ A store that cannot write is a person's job - see state.ts.
|
|
910
921
|
...(Object.keys(stateTrouble).length ? { stateTrouble } : {}),
|
|
911
922
|
...(pictures.trouble ? { picturesTrouble: pictures.trouble } : {}),
|
|
@@ -936,6 +947,22 @@ export const buildServer = (opts) => {
|
|
|
936
947
|
// asked for: behind Caddy that is /shangrila, no trailing slash, so it landed
|
|
937
948
|
// on the host's own /docs - a 404 (2026-10-07).
|
|
938
949
|
app.get('/', (c) => c.redirect(`${publicUrl}/docs`, 302));
|
|
950
|
+
// ⚠️ /mcp ONLY, EVERY METHOD, BEFORE ITS HANDLERS - see source-allowlist.ts.
|
|
951
|
+
// Under enforce, a request from anywhere but an allowed platform is answered
|
|
952
|
+
// here, its body never read. Under shadow nothing is refused: `initialize`
|
|
953
|
+
// logs the verdict, below.
|
|
954
|
+
if (sources?.mode === 'enforce') {
|
|
955
|
+
app.use('/mcp', async (c, next) => {
|
|
956
|
+
const ip = sourceOf(c);
|
|
957
|
+
const verdict = sources.judge(ip);
|
|
958
|
+
if (verdict.allowed)
|
|
959
|
+
return next();
|
|
960
|
+
sources.noteRefused(ip, verdict, c.req.header('user-agent'));
|
|
961
|
+
return c.json({ jsonrpc: '2.0', id: null, error: { code: -32001, message: REFUSED_SAID } }, 403, {
|
|
962
|
+
'cache-control': 'no-store',
|
|
963
|
+
});
|
|
964
|
+
});
|
|
965
|
+
}
|
|
939
966
|
// No sessions are ended on request: they lapse (sessions.ts). 405 is the
|
|
940
967
|
// spec's word for that - 404 read as "no MCP server here" (2026-10-05 audit, P3).
|
|
941
968
|
app.delete('/mcp', (c) => c.body(null, 405, { Allow: 'GET, POST' }));
|
|
@@ -992,6 +1019,14 @@ export const buildServer = (opts) => {
|
|
|
992
1019
|
// since 0.67.0), so the lines of one connection can be followed.
|
|
993
1020
|
console.log(`[mcp] initialize client=${printable(typeof client === 'string' ? client : '-', 60)} cards=${cards} s=${h8(sessionId)}`);
|
|
994
1021
|
noteHeaders(c, 'initialize', typeof client === 'string' ? client : undefined, '');
|
|
1022
|
+
// Where it came from, once a session (source-allowlist.ts) - only where
|
|
1023
|
+
// the deployment limits it; elsewhere no address is logged, as before.
|
|
1024
|
+
const source = sources ? sourceOf(c) : undefined;
|
|
1025
|
+
sources?.noteSession(source, sources.judge(source), {
|
|
1026
|
+
...(typeof client === 'string' ? { client } : {}),
|
|
1027
|
+
...(c.req.header('user-agent') ? { ua: c.req.header('user-agent') } : {}),
|
|
1028
|
+
session: h8(sessionId),
|
|
1029
|
+
});
|
|
995
1030
|
c.header('Mcp-Session-Id', sessionId);
|
|
996
1031
|
return ok(c, id, {
|
|
997
1032
|
protocolVersion: PROTOCOL_VERSION,
|
|
@@ -1153,14 +1188,14 @@ export const buildServer = (opts) => {
|
|
|
1153
1188
|
if (APP_ONLY.has(name) && !saidCards && !OWN_REFUSALS.has(name)) {
|
|
1154
1189
|
calls.accountRefused += 1;
|
|
1155
1190
|
console.log(`[mcp] ${printable(name, 60)} refused: card_only - client=${printable(sessions.clientOf(presented) ?? '-', 60)} cards=${cardsSaid ?? '-'}`);
|
|
1191
|
+
// …and which tool does it in words (0.69.1, 总线程 11-12).
|
|
1192
|
+
const instead = name === brand.tools.payWithUnionPay
|
|
1193
|
+
? `A booking waiting for its payment is paid on the payment page its answer gives; ${brand.tools.listBookings} shows the booking again.`
|
|
1194
|
+
: `To book a room, add it to the trip with ${brand.tools.addToTrip} and book the trip with ${brand.tools.requestBooking}.`;
|
|
1195
|
+
const said = `${name} is the booking card's own, and this app draws no card: nothing was done. ${instead}`;
|
|
1156
1196
|
return ok(c, id, {
|
|
1157
|
-
content: [
|
|
1158
|
-
|
|
1159
|
-
type: 'text',
|
|
1160
|
-
text: `${name} is the booking card's own, and this app draws no card: nothing was done.`,
|
|
1161
|
-
},
|
|
1162
|
-
],
|
|
1163
|
-
structuredContent: { view: 'error', brand: config.brand, code: 'card_only' },
|
|
1197
|
+
content: [{ type: 'text', text: said }],
|
|
1198
|
+
structuredContent: { view: 'error', brand: config.brand, code: 'card_only', said },
|
|
1164
1199
|
isError: true,
|
|
1165
1200
|
});
|
|
1166
1201
|
}
|
|
@@ -1638,6 +1673,7 @@ export const buildServer = (opts) => {
|
|
|
1638
1673
|
members,
|
|
1639
1674
|
tripIds,
|
|
1640
1675
|
sessions,
|
|
1676
|
+
...(sources ? { sources } : {}),
|
|
1641
1677
|
flush: () => state.flush(),
|
|
1642
1678
|
drain: () => made.drain?.() ?? Promise.resolve(),
|
|
1643
1679
|
};
|
|
@@ -1736,6 +1772,13 @@ const headerNames = (c) => {
|
|
|
1736
1772
|
export const HEADER_LOGS_PER_APP = 5;
|
|
1737
1773
|
/** Apps whose header names are logged at all, by where - past it, a new name is not (0.67.0). */
|
|
1738
1774
|
export const HEADER_APPS = 200;
|
|
1775
|
+
/**
|
|
1776
|
+
* Where a request came from, for the allowlist (source-allowlist.ts
|
|
1777
|
+
* `sourceAddress`): the connection's own address when that is public - nothing
|
|
1778
|
+
* stood in front of us to write the header - and `clientIp` otherwise.
|
|
1779
|
+
*/
|
|
1780
|
+
const sourceOf = (c) => sourceAddress(clientIp(c.req.header('x-forwarded-for')), c.env?.incoming?.socket
|
|
1781
|
+
?.remoteAddress);
|
|
1739
1782
|
export const clientIp = (header) => {
|
|
1740
1783
|
const last = (header ?? '').split(',').at(-1)?.trim();
|
|
1741
1784
|
return last || undefined;
|
|
@@ -1747,6 +1790,8 @@ export const loadConfig = (path) => {
|
|
|
1747
1790
|
// The demonstration's own switches (`data.invented`, `data.capabilities`)
|
|
1748
1791
|
// are refused here, at start, not found out by a tool that is missing.
|
|
1749
1792
|
checkDemoData(config.data);
|
|
1793
|
+
// …and so is an allowlist written wrong (a brand's own tests load it here).
|
|
1794
|
+
checkSourceAllowlist(config.sourceAllowlist);
|
|
1750
1795
|
return { config, configPath };
|
|
1751
1796
|
};
|
|
1752
1797
|
//# sourceMappingURL=server.js.map
|