@curless/hotel-storefront 0.23.2 → 0.24.0

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.
Files changed (91) hide show
  1. package/README.md +28 -11
  2. package/dist/__tests__/__fixtures__/huazhu-fake.d.ts +54 -0
  3. package/dist/__tests__/__fixtures__/huazhu-fake.d.ts.map +1 -0
  4. package/dist/__tests__/__fixtures__/huazhu-fake.js +340 -0
  5. package/dist/__tests__/__fixtures__/huazhu-fake.js.map +1 -0
  6. package/dist/__tests__/huazhu-backend.test.d.ts +2 -0
  7. package/dist/__tests__/huazhu-backend.test.d.ts.map +1 -0
  8. package/dist/__tests__/huazhu-backend.test.js +434 -0
  9. package/dist/__tests__/huazhu-backend.test.js.map +1 -0
  10. package/dist/__tests__/huazhu-cancel-policy.test.d.ts +2 -0
  11. package/dist/__tests__/huazhu-cancel-policy.test.d.ts.map +1 -0
  12. package/dist/__tests__/huazhu-cancel-policy.test.js +82 -0
  13. package/dist/__tests__/huazhu-cancel-policy.test.js.map +1 -0
  14. package/dist/__tests__/huazhu-sellable.test.d.ts +2 -0
  15. package/dist/__tests__/huazhu-sellable.test.d.ts.map +1 -0
  16. package/dist/__tests__/huazhu-sellable.test.js +192 -0
  17. package/dist/__tests__/huazhu-sellable.test.js.map +1 -0
  18. package/dist/__tests__/server.test.js +129 -4
  19. package/dist/__tests__/server.test.js.map +1 -1
  20. package/dist/__tests__/tool-descriptions.test.js +57 -4
  21. package/dist/__tests__/tool-descriptions.test.js.map +1 -1
  22. package/dist/backend.d.ts +27 -0
  23. package/dist/backend.d.ts.map +1 -1
  24. package/dist/backend.js +7 -0
  25. package/dist/backend.js.map +1 -1
  26. package/dist/card.generated.d.ts +1 -1
  27. package/dist/card.generated.js +2 -2
  28. package/dist/card.generated.js.map +1 -1
  29. package/dist/config.d.ts +52 -4
  30. package/dist/config.d.ts.map +1 -1
  31. package/dist/config.js.map +1 -1
  32. package/dist/facilities.d.ts.map +1 -1
  33. package/dist/facilities.js +7 -5
  34. package/dist/facilities.js.map +1 -1
  35. package/dist/huazhu/backend.d.ts +40 -0
  36. package/dist/huazhu/backend.d.ts.map +1 -0
  37. package/dist/huazhu/backend.js +1318 -0
  38. package/dist/huazhu/backend.js.map +1 -0
  39. package/dist/huazhu/bookings.d.ts +81 -0
  40. package/dist/huazhu/bookings.d.ts.map +1 -0
  41. package/dist/huazhu/bookings.js +189 -0
  42. package/dist/huazhu/bookings.js.map +1 -0
  43. package/dist/huazhu/cancel-policy.d.ts +69 -0
  44. package/dist/huazhu/cancel-policy.d.ts.map +1 -0
  45. package/dist/huazhu/cancel-policy.js +201 -0
  46. package/dist/huazhu/cancel-policy.js.map +1 -0
  47. package/dist/huazhu/catalog.d.ts +75 -0
  48. package/dist/huazhu/catalog.d.ts.map +1 -0
  49. package/dist/huazhu/catalog.js +251 -0
  50. package/dist/huazhu/catalog.js.map +1 -0
  51. package/dist/huazhu/check.d.ts +5 -0
  52. package/dist/huazhu/check.d.ts.map +1 -0
  53. package/dist/huazhu/check.js +170 -0
  54. package/dist/huazhu/check.js.map +1 -0
  55. package/dist/huazhu/client.d.ts +100 -0
  56. package/dist/huazhu/client.d.ts.map +1 -0
  57. package/dist/huazhu/client.js +232 -0
  58. package/dist/huazhu/client.js.map +1 -0
  59. package/dist/huazhu/sellable.d.ts +81 -0
  60. package/dist/huazhu/sellable.d.ts.map +1 -0
  61. package/dist/huazhu/sellable.js +219 -0
  62. package/dist/huazhu/sellable.js.map +1 -0
  63. package/dist/huazhu/wire.d.ts +389 -0
  64. package/dist/huazhu/wire.d.ts.map +1 -0
  65. package/dist/huazhu/wire.js +72 -0
  66. package/dist/huazhu/wire.js.map +1 -0
  67. package/dist/index.js +18 -4
  68. package/dist/index.js.map +1 -1
  69. package/dist/legal.d.ts +4 -3
  70. package/dist/legal.d.ts.map +1 -1
  71. package/dist/legal.js +33 -18
  72. package/dist/legal.js.map +1 -1
  73. package/dist/lib.d.ts +8 -3
  74. package/dist/lib.d.ts.map +1 -1
  75. package/dist/lib.js +8 -1
  76. package/dist/lib.js.map +1 -1
  77. package/dist/server.d.ts +20 -8
  78. package/dist/server.d.ts.map +1 -1
  79. package/dist/server.js +132 -28
  80. package/dist/server.js.map +1 -1
  81. package/dist/surface.d.ts +2 -1
  82. package/dist/surface.d.ts.map +1 -1
  83. package/dist/surface.js +37 -10
  84. package/dist/surface.js.map +1 -1
  85. package/dist/tools.d.ts +33 -20
  86. package/dist/tools.d.ts.map +1 -1
  87. package/dist/tools.js +122 -11
  88. package/dist/tools.js.map +1 -1
  89. package/dist/types.d.ts +21 -2
  90. package/dist/types.d.ts.map +1 -1
  91. package/package.json +1 -1
@@ -0,0 +1,72 @@
1
+ // Huazhu's distributor OpenAPI, as its documentation describes it - the wire
2
+ // shapes and the codes, nothing else.
3
+ //
4
+ // Source: https://docs.huazhu.com/crs/api/distributor/docs/v1/ (read in full
5
+ // 2026-09-30, before any account existed). Every field here is copied from a
6
+ // table on those pages; where a table and its own example disagree, the
7
+ // example is what a server actually sent and both are accepted - see
8
+ // `HuazhuDate`.
9
+ //
10
+ // ⚠️ NOTHING HERE HAS BEEN SEEN FROM A REAL HUAZHU SERVER YET. The shapes are
11
+ // the documentation's. The first call against the test environment is where
12
+ // they are checked, and anything that disagrees is fixed HERE, in one place.
13
+ export const SUCCESS = 1000;
14
+ /** The rate's guarantee code → the payment types it accepts (the dictionary's own table). */
15
+ export const PAYMENT_FOR_GUARANTEE = {
16
+ PL: ['NGPL', 'OGPL', 'CCPL'],
17
+ GTX: ['OGPL', 'OPN', 'CCPL', 'CPN'],
18
+ PN: ['OPN', 'CCPN', 'CPN'],
19
+ };
20
+ // ------------------------------------------------------------------ codes ----
21
+ /** The global codes, any endpoint. */
22
+ export const CODES = {
23
+ systemError: 2001,
24
+ invalidToken: 2002,
25
+ invalidDistributor: 2003,
26
+ requiredField: 2004,
27
+ invalidField: 2005,
28
+ fieldFormat: 2006,
29
+ hotelNotCooperating: 2007,
30
+ invalidProduct: 2008,
31
+ rateLimited: 2009,
32
+ };
33
+ /** "请求次数超过每日限制" - /hotels and /hotel. The catalog stops and resumes tomorrow. */
34
+ export const DAILY_LIMIT = new Set([3102, 3204]);
35
+ /** Nothing matched - an empty answer, not a failure. */
36
+ export const NO_MATCH = new Set([3101, 4103, 4206, 4306]);
37
+ /** "Hotel is closed" / "Invalid hotel Id" - the hotel is not sellable, from any endpoint. */
38
+ export const HOTEL_GONE = new Set([
39
+ 3201, 3202, 3203, 4101, 4102, 4201, 4202, 4304, 4305, 5104, 5105, 5204, 5205,
40
+ ]);
41
+ /**
42
+ * Codes after which /reservation/book is retried with the SAME
43
+ * distributorResId - the documentation's own list ("下单失败,重试建议的异常码").
44
+ */
45
+ export const BOOK_RETRYABLE = new Set([CODES.systemError, CODES.invalidToken]);
46
+ /**
47
+ * Rate tags that decide WHO may see a rate. "相关使用逻辑务必遵守商务约定,未遵守导致的
48
+ * 损失需承担相应责任" - a rate for students, first-time guests or coupon holders
49
+ * shown to anyone is a loss the contract puts on us. None of them is offered
50
+ * unless the deployment's config lets it through by name.
51
+ */
52
+ export const GATED_TAGS = new Set([
53
+ 'PrePayCoupons',
54
+ 'FirstStayDiscount',
55
+ 'BrandNewCustomerDiscount',
56
+ 'StudnetDiscount',
57
+ 'DistrVipDiscount',
58
+ 'PassengerRate',
59
+ 'DistrCoupons',
60
+ 'CityBrandNewCustomerDiscount',
61
+ 'ConnectivityFreeRoom',
62
+ 'MediaPrePayCoupons',
63
+ ]);
64
+ /** Meal plans that put a meal on the rate. RO is room only. */
65
+ export const MEAL_PLANS = {
66
+ BB: 'Breakfast',
67
+ BF: 'Buffet breakfast',
68
+ HB: 'Half board',
69
+ FB: 'Full board',
70
+ AI: 'All inclusive',
71
+ };
72
+ //# sourceMappingURL=wire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.js","sourceRoot":"","sources":["../../src/huazhu/wire.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,sCAAsC;A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C7E,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IAChC,eAAe;IACf,mBAAmB;IACnB,0BAA0B;IAC1B,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,8BAA8B;IAC9B,sBAAsB;IACtB,oBAAoB;CACrB,CAAC,CAAC;AAEH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAA2B;IAChD,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,kBAAkB;IACtB,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,YAAY;IAChB,EAAE,EAAE,eAAe;CACpB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { serve } from '@hono/node-server';
3
+ import { checkHuazhu } from './huazhu/check.js';
3
4
  import { VERSION, buildServer, loadConfig } from './server.js';
4
5
  // The binary. Everything it does is in server.ts; this reads the environment,
5
6
  // starts listening, and says what it is serving.
@@ -7,17 +8,30 @@ import { VERSION, buildServer, loadConfig } from './server.js';
7
8
  // The config path is an argument or an environment variable, never a default
8
9
  // that points at one brand's file - a connector that falls back to Shangri-La's
9
10
  // data is a connector that serves the wrong hotels to the next group.
10
- const path = process.argv[2] ?? process.env.HOTEL_CONFIG;
11
+ //
12
+ // `--check <config.json>` does not serve: it walks a group's own API read-only
13
+ // and says what came back - see huazhu/check.ts.
14
+ const checking = process.argv[2] === '--check';
15
+ const path = (checking ? process.argv[3] : process.argv[2]) ?? process.env.HOTEL_CONFIG;
11
16
  if (!path) {
12
- console.error('usage: curless-hotel-storefront <config.json> (or HOTEL_CONFIG=...)');
17
+ console.error('usage: curless-hotel-storefront [--check] <config.json> (or HOTEL_CONFIG=...)');
13
18
  process.exit(2);
14
19
  }
15
20
  const { config, configPath } = loadConfig(path);
16
- const { app, brand } = buildServer({ config, configPath });
21
+ if (checking) {
22
+ const api = config.data.api;
23
+ if (config.data.source !== 'api' || !api) {
24
+ console.error(`${config.brand}: --check is for a config whose data.source is "api"`);
25
+ process.exit(2);
26
+ }
27
+ const ok = await checkHuazhu(api, process.env);
28
+ process.exit(ok ? 0 : 1);
29
+ }
30
+ const { app, brand, deps } = buildServer({ config, configPath });
17
31
  const port = Number(process.env.PORT ?? 8790);
18
32
  serve({ fetch: app.fetch, port }, (info) => {
19
33
  console.log(`${config.server.title} — ${brand.vocab.demo ? 'DEMONSTRATION DATA' : 'live'} — hotel-storefront ${VERSION} on :${info.port}`);
20
34
  console.log(` mcp POST ${config.urls.publicUrl ?? config.urls.appUrl}/mcp`);
21
- console.log(` tools ${Object.values(brand.tools).join(', ')}`);
35
+ console.log(` tools ${[...(deps.offered ?? Object.values(brand.tools))].join(', ')}`);
22
36
  });
23
37
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE/D,8EAA8E;AAC9E,iDAAiD;AACjD,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,sEAAsE;AAEtE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;AACzD,IAAI,CAAC,IAAI,EAAE,CAAC;IACV,OAAO,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;IACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,EAAE,MAAM,EAAE,UAAU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AI,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE;IACzC,OAAO,CAAC,GAAG,CACT,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,MAAM,uBAAuB,OAAO,QAAQ,IAAI,CAAC,IAAI,EAAE,CAC9H,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,kBAAkB,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC;IACjF,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3F,CAAC,CAAC,CAAC"}
package/dist/legal.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { type BackendCapabilities } from './backend.js';
1
2
  import type { HotelConfig } from './config.js';
2
- export declare const docsPage: (config: HotelConfig) => string;
3
- export declare const privacyPage: (config: HotelConfig, imageHosts?: string[]) => string;
4
- export declare const termsPage: (config: HotelConfig) => string;
3
+ export declare const docsPage: (config: HotelConfig, caps?: BackendCapabilities) => string;
4
+ export declare const privacyPage: (config: HotelConfig, imageHosts?: string[], caps?: BackendCapabilities) => string;
5
+ export declare const termsPage: (config: HotelConfig, caps?: BackendCapabilities) => string;
5
6
  //# sourceMappingURL=legal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"legal.d.ts","sourceRoot":"","sources":["../src/legal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoE/C,eAAO,MAAM,QAAQ,GAAI,QAAQ,WAAW,KAAG,MAgC5C,CAAC;AAEJ,eAAO,MAAM,WAAW,GAAI,QAAQ,WAAW,EAAE,aAAY,MAAM,EAAO,KAAG,MA2E1E,CAAC;AAEJ,eAAO,MAAM,SAAS,GAAI,QAAQ,WAAW,KAAG,MA2B7C,CAAC"}
1
+ {"version":3,"file":"legal.d.ts","sourceRoot":"","sources":["../src/legal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA0E/C,eAAO,MAAM,QAAQ,GACnB,QAAQ,WAAW,EACnB,OAAM,mBAAuC,KAC5C,MAwCA,CAAC;AAEJ,eAAO,MAAM,WAAW,GACtB,QAAQ,WAAW,EACnB,aAAY,MAAM,EAAO,EACzB,OAAM,mBAAuC,KAC5C,MAiFA,CAAC;AAEJ,eAAO,MAAM,SAAS,GACpB,QAAQ,WAAW,EACnB,OAAM,mBAAuC,KAC5C,MA6BA,CAAC"}
package/dist/legal.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { FULL_CAPABILITIES } from './backend.js';
1
2
  // The pages a directory review asks for, and a guest may actually read.
2
3
  //
3
4
  // Written from the CONFIG rather than fixed text, for the same reason the tool
@@ -48,22 +49,32 @@ const demoBanner = (config) => config.data.source === 'api'
48
49
  * that say what this connector is are where that belongs - not in a comment in
49
50
  * a data file. `operator` is who built it; the brand is not them.
50
51
  */
51
- const marksNotice = (config) => `<h2>Names and pictures</h2>
52
+ const marksNotice = (config) => config.data.source === 'api'
53
+ ? `<h2>Names and pictures</h2>
54
+ <p>${esc(config.brand)}, the names of its properties and the photographs shown on the card belong to
55
+ ${esc(config.brand)}, and come from its own distribution system. This connector is operated by
56
+ ${esc(config.legal.operator ?? 'Curless')}, which sells ${esc(config.brand)}'s rooms as a distributor;
57
+ it is not ${esc(config.brand)}.</p>`
58
+ : `<h2>Names and pictures</h2>
52
59
  <p>${esc(config.brand)}, the names of its properties and the photographs shown on the card belong to
53
60
  ${esc(config.brand)}. They are used here to demonstrate a booking connector against the group's real
54
61
  property list. This connector is operated by ${esc(config.legal.operator ?? 'Curless')} and is not
55
62
  ${esc(config.brand)}, not affiliated with it, and not endorsed by it.</p>`;
56
- export const docsPage = (config) => shell('What this connector does', config.brand, `<h1>${esc(config.brand)} ${esc(config.naming?.nounPlural ?? 'hotels')}</h1>
63
+ export const docsPage = (config, caps = FULL_CAPABILITIES) => shell('What this connector does', config.brand, `<h1>${esc(config.brand)} ${esc(config.naming?.nounPlural ?? 'hotels')}</h1>
57
64
  <p>An MCP connector that lets an AI assistant look up ${esc(config.brand)} properties, price a stay on
58
- given nights, put rooms and add-ons into a trip, and ask for those rooms to be held.</p>
65
+ given nights, put ${caps.extras ? 'rooms and add-ons' : 'rooms'} into a trip, and ${caps.booking === 'pay-at-hotel'
66
+ ? 'book those rooms, to be paid at the hotel'
67
+ : 'ask for those rooms to be held'}.</p>
59
68
  ${demoBanner(config)}
60
69
  <h2>What it can do</h2>
61
70
  <ul>
62
71
  <li>List the ${esc(config.naming?.nounPlural ?? 'hotels')} in a city — all of them, not a pick.</li>
63
72
  <li>Show one property's rooms for specific nights, with the stay total including taxes and fees,
64
73
  the cancellation terms, and how many rooms are left.</li>
65
- <li>Build a trip of room nights and add-ons, and price it.</li>
66
- <li>Request a booking: the rooms are held and a confirmation code is issued.</li>
74
+ <li>Build a trip of room nights${caps.extras ? ' and add-ons' : ''}, and price it.</li>
75
+ <li>${caps.booking === 'pay-at-hotel'
76
+ ? `Book: each stay becomes ${esc(config.brand)}'s own reservation, with its own confirmation code, paid at the hotel.`
77
+ : 'Request a booking: the rooms are held and a confirmation code is issued.'}</li>
67
78
  <li>Show what cancelling would cost before anything is cancelled, then cancel.</li>
68
79
  <li>Answer from the property's own published policies.</li>
69
80
  </ul>
@@ -77,7 +88,7 @@ export const docsPage = (config) => shell('What this connector does', config.bra
77
88
  cancellation fee is shown with the rule it came from.</li>
78
89
  </ul>
79
90
  ${footer(config)}`);
80
- export const privacyPage = (config, imageHosts = []) => shell('Privacy', config.brand, `<h1>Privacy</h1>
91
+ export const privacyPage = (config, imageHosts = [], caps = FULL_CAPABILITIES) => shell('Privacy', config.brand, `<h1>Privacy</h1>
81
92
  ${demoBanner(config)}
82
93
  <h2>What this connector holds</h2>
83
94
  <ul>
@@ -88,17 +99,18 @@ export const privacyPage = (config, imageHosts = []) => shell('Privacy', config.
88
99
  gave one, the room requests (a bed type, a floor, a quiet, connecting or accessible room, an
89
100
  early check-in or a late arrival), your arrival time and any note, the dates, rooms and price,
90
101
  and the reason if you give one for cancelling. ${config.data.source === 'api'
91
- ? `It is passed to ${esc(config.brand)}, who keep the booking.`
102
+ ? `It is sent to ${esc(config.brand)}, who make and keep the reservation - the name, the email, the phone number, the dates, the rooms and the requests, which reach the hotel's desk. This connector also keeps a copy on its own server, until 90 days after the check-out date, so that the booking can be found and cancelled from the conversation: ${esc(config.brand)}'s system does not give back the email a booking was made with.`
92
103
  : 'In this demonstration it is kept in memory for as long as this process runs, and nothing is written to disk; once there are many, bookings that are over are forgotten first.'}</li>
93
104
  <li><strong>Who can open a booking.</strong> The conversation it was made in — and anyone who
94
105
  gives its confirmation code together with the email it was made with, as a front desk would
95
- ask. That pair lets the booking be read, changed or cancelled, from another conversation too,
106
+ ask. That pair lets the booking be read, ${caps.changes ? 'changed ' : ''}or cancelled, from another conversation too,
96
107
  so keep them as you would any booking confirmation. The email alone opens nothing.</li>
97
108
  <li><strong>A session id</strong>, issued by this connector when the assistant connects. The
98
- conversation's trip, bookings and sign-in are filed under it; it identifies a conversation,
109
+ conversation's trip, bookings${caps.members ? ' and sign-in' : ''} are filed under it; it identifies a conversation,
99
110
  not a person, and is never shown in an answer. The card gets a separate random id for the
100
111
  trip it is showing, so the card and the conversation reach the same one.</li>
101
- <li><strong>A membership sign-in</strong> — the membership number and surname you gave, and the
112
+ ${caps.members
113
+ ? `<li><strong>A membership sign-in</strong> — the membership number and surname you gave, and the
102
114
  name, tier and points they match — for this conversation, and forgotten two hours after it
103
115
  was last used.</li>
104
116
  <li><strong>Room preferences you asked to have remembered</strong> — only if you are signed in as a
@@ -107,18 +119,19 @@ export const privacyPage = (config, imageHosts = []) => shell('Privacy', config.
107
119
  membership number, and nothing else: never an accessible room (that is asked for on each
108
120
  stay that needs it), a note, a name, an email, an arrival time or a card. It comes back the
109
121
  next time that membership signs in, and "forget my preferences" removes it. ${config.data.source === 'api'
110
- ? `It is kept on the membership's own profile with ${esc(config.brand)}.`
111
- : 'In this demonstration it is kept in memory and does not survive a restart.'}</li>
112
- <li><strong>Wrong guesses</strong> — a confirmation code and email, or a membership number and
113
- surname, that did not match — counted for a quarter of an hour, so that neither pair can be
122
+ ? `It is kept on the membership's own profile with ${esc(config.brand)}.`
123
+ : 'In this demonstration it is kept in memory and does not survive a restart.'}</li>`
124
+ : ''}
125
+ <li><strong>Wrong guesses</strong> — a confirmation code and email${caps.members ? ', or a membership number and surname,' : ''} that did not match — counted for a quarter of an hour, so that neither pair can be
114
126
  guessed at. After a few, that kind of lookup waits.</li>
115
127
  </ul>
116
128
  <h2>What it does not hold</h2>
117
129
  <ul>
118
130
  <li>No card numbers, and no payment details of any kind — it has nowhere to put them
119
131
  and never asks.</li>
120
- <li>No account and no password. The only thing kept about you from one conversation to the next
121
- is the room preferences above, and only when you asked.</li>
132
+ <li>No account and no password. ${caps.members
133
+ ? 'The only thing kept about you from one conversation to the next is the room preferences above, and only when you asked.'
134
+ : 'Nothing is kept about you from one conversation to the next except a booking you made, as above.'}</li>
122
135
  <li>No advertising or analytics identifiers, and nothing is sold or shared.</li>
123
136
  </ul>
124
137
  ${imageHosts.length
@@ -138,7 +151,7 @@ export const privacyPage = (config, imageHosts = []) => shell('Privacy', config.
138
151
  : ''}
139
152
  ${marksNotice(config)}
140
153
  ${footer(config)}`);
141
- export const termsPage = (config) => shell('Terms', config.brand, `<h1>Terms</h1>
154
+ export const termsPage = (config, caps = FULL_CAPABILITIES) => shell('Terms', config.brand, `<h1>Terms</h1>
142
155
  ${demoBanner(config)}
143
156
  <h2>What this is</h2>
144
157
  <p>A connector operated by ${esc(config.legal.operator ?? 'Curless')} that an AI assistant uses on
@@ -148,7 +161,9 @@ export const termsPage = (config) => shell('Terms', config.brand, `<h1>Terms</h1
148
161
  <h2>Bookings</h2>
149
162
  <p>${config.payment?.mode === 'wallet'
150
163
  ? 'A booking is confirmed once payment completes. Until then the rooms are held only.'
151
- : 'A booking request holds rooms; it takes no payment and is not a confirmed reservation. The hold lapses at the time stated on the confirmation.'} Cancellation terms are the property's own, and are shown in full before anything is cancelled.</p>
164
+ : caps.booking === 'pay-at-hotel'
165
+ ? `A booking is ${esc(config.brand)}'s own reservation, made in your name and paid at the hotel under its terms; this connector takes no payment. A booking whose confirmation has not come back from ${esc(config.brand)} is said to be waiting until it has.`
166
+ : 'A booking request holds rooms; it takes no payment and is not a confirmed reservation. The hold lapses at the time stated on the confirmation.'} Cancellation terms are the property's own, and are shown in full before anything is cancelled.</p>
152
167
  <h2>No warranty</h2>
153
168
  <p>This connector is provided as is. ${config.data.source === 'api'
154
169
  ? 'Rates and availability can change between a quote and a booking.'
package/dist/legal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"legal.js","sourceRoot":"","sources":["../src/legal.ts"],"names":[],"mappings":"AAEA,wEAAwE;AACxE,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,gFAAgF;AAChF,wDAAwD;AAExD,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,IAAY,EAAU,EAAE,CAAC;;;SAG7D,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC;;;;;;;;;;;;;;6BAcN,IAAI;CAChC,CAAC;AAEF,MAAM,GAAG,GAAG,CAAC,CAAU,EAAU,EAAE,CACjC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CACxC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,K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AAM,CAAC,KAAK,EACZ;OACG,UAAU,CAAC,MAAM,CAAC;;kCAES,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,SAAS,CAAC;uBAE/D,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK;IAC1B,CAAC,CAAC,2CAA2C,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC;IACtG,CAAC,CAAC,2FACN;;UAGD,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,QAAQ;IAC/B,CAAC,CAAC,oFAAoF;IACtF,CAAC,CAAC,IAAI,CAAC,OAAO,KAAK,cAAc;QAC/B,CAAC,CAAC,gBAAgB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,qKAAqK,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC;QAC/P,CAAC,CAAC,gJACR;;4CAGE,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK;IAC1B,CAAC,CAAC,kEAAkE;IACpE,CAAC,CAAC,6CACN;OACE,WAAW,CAAC,MAAM,CAAC;OACnB,MAAM,CAAC,MAAM,CAAC,EAAE,CACpB,CAAC"}
package/dist/lib.d.ts CHANGED
@@ -16,10 +16,15 @@ export { loadHotelData, parseHotelData } from './data.js';
16
16
  export { loadConfig, buildServer, widgetMeta, imageDomainsOf, CARD_URI, CARD_MIME, VERSION, } from './server.js';
17
17
  export { createDemoHotels } from './demo-hotels.js';
18
18
  export { toolNames } from './config.js';
19
+ export { buildTools, withheldTools } from './tools.js';
19
20
  export { resolveBrand, DEMO_NOTE } from './vocab.js';
20
- export { MAX_PAGE } from './backend.js';
21
- export type { HotelBackend } from './backend.js';
22
- export type { HotelConfig, ToolNames } from './config.js';
21
+ export { FULL_CAPABILITIES, MAX_PAGE } from './backend.js';
22
+ export type { BackendCapabilities, HotelBackend } from './backend.js';
23
+ export type { ApiSource, HotelConfig, ToolNames } from './config.js';
24
+ export { HUAZHU_CAPABILITIES, createHuazhuHotels } from './huazhu/backend.js';
25
+ export { checkHuazhu } from './huazhu/check.js';
26
+ export { HuazhuClient, HuazhuRefusal, HuazhuUnreachable } from './huazhu/client.js';
27
+ export { describePolicy, parseCancelPolicy } from './huazhu/cancel-policy.js';
23
28
  export type { ResolvedBrand, Vocabulary } from './vocab.js';
24
29
  export type { Booking, Extra, Hotel, HotelDetail, HotelPolicy, Identity, Member, Money, Quote, Room, Stay, TripLine, } from './types.js';
25
30
  //# sourceMappingURL=lib.d.ts.map
package/dist/lib.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,QAAQ,EACR,SAAS,EACT,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5D,YAAY,EACV,OAAO,EACP,KAAK,EACL,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,QAAQ,EACR,SAAS,EACT,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACtE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5D,YAAY,EACV,OAAO,EACP,KAAK,EACL,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,QAAQ,GACT,MAAM,YAAY,CAAC"}
package/dist/lib.js CHANGED
@@ -16,6 +16,13 @@ export { loadHotelData, parseHotelData } from './data.js';
16
16
  export { loadConfig, buildServer, widgetMeta, imageDomainsOf, CARD_URI, CARD_MIME, VERSION, } from './server.js';
17
17
  export { createDemoHotels } from './demo-hotels.js';
18
18
  export { toolNames } from './config.js';
19
+ // What a deployment offers, for a brand repository checking its own config.
20
+ export { buildTools, withheldTools } from './tools.js';
19
21
  export { resolveBrand, DEMO_NOTE } from './vocab.js';
20
- export { MAX_PAGE } from './backend.js';
22
+ export { FULL_CAPABILITIES, MAX_PAGE } from './backend.js';
23
+ // A group's own booking system, for a brand repository's own checks.
24
+ export { HUAZHU_CAPABILITIES, createHuazhuHotels } from './huazhu/backend.js';
25
+ export { checkHuazhu } from './huazhu/check.js';
26
+ export { HuazhuClient, HuazhuRefusal, HuazhuUnreachable } from './huazhu/client.js';
27
+ export { describePolicy, parseCancelPolicy } from './huazhu/cancel-policy.js';
21
28
  //# sourceMappingURL=lib.js.map
package/dist/lib.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,QAAQ,EACR,SAAS,EACT,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,QAAQ,EACR,SAAS,EACT,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,4EAA4E;AAC5E,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG3D,qEAAqE;AACrE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/server.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare const PROTOCOL_VERSION = "2025-06-18";
16
16
  * number. Found by reading the boot banner of a container that had just been
17
17
  * deployed (2026-09-22): seventeen tools listed, and "0.7.0" above them.
18
18
  */
19
- export declare const VERSION = "0.23.2";
19
+ export declare const VERSION = "0.24.0";
20
20
  /**
21
21
  * The card's resource URI.
22
22
  *
@@ -25,7 +25,7 @@ export declare const VERSION = "0.23.2";
25
25
  * connector went storefront-v35 → v40 in a single day of UI work for exactly
26
26
  * this reason.
27
27
  */
28
- export declare const CARD_URI = "ui://curless/hotel/booking-v39.html";
28
+ export declare const CARD_URI = "ui://curless/hotel/booking-v40.html";
29
29
  /**
30
30
  * ⚠️ `text/html;profile=mcp-app`, not `text/html+skybridge`. The MIME is how a
31
31
  * host recognises this resource as a card at all; the plausible near-miss made
@@ -41,10 +41,10 @@ export declare const CARD_MIME = "text/html;profile=mcp-app";
41
41
  */
42
42
  export declare const UI_META: {
43
43
  readonly ui: {
44
- readonly resourceUri: "ui://curless/hotel/booking-v39.html";
44
+ readonly resourceUri: "ui://curless/hotel/booking-v40.html";
45
45
  };
46
- readonly 'ui/resourceUri': "ui://curless/hotel/booking-v39.html";
47
- readonly 'openai/outputTemplate': "ui://curless/hotel/booking-v39.html";
46
+ readonly 'ui/resourceUri': "ui://curless/hotel/booking-v40.html";
47
+ readonly 'openai/outputTemplate': "ui://curless/hotel/booking-v40.html";
48
48
  readonly 'openai/widgetAccessible': true;
49
49
  };
50
50
  /**
@@ -63,20 +63,22 @@ export declare const widgetMeta: (imageDomains: string[]) => {
63
63
  csp: {
64
64
  resourceDomains: string[];
65
65
  };
66
- resourceUri: "ui://curless/hotel/booking-v39.html";
66
+ resourceUri: "ui://curless/hotel/booking-v40.html";
67
67
  };
68
68
  'openai/widgetCSP': {
69
69
  connect_domains: never[];
70
70
  resource_domains: string[];
71
71
  };
72
- 'ui/resourceUri': "ui://curless/hotel/booking-v39.html";
73
- 'openai/outputTemplate': "ui://curless/hotel/booking-v39.html";
72
+ 'ui/resourceUri': "ui://curless/hotel/booking-v40.html";
73
+ 'openai/outputTemplate': "ui://curless/hotel/booking-v40.html";
74
74
  'openai/widgetAccessible': true;
75
75
  };
76
76
  /** The trip snapshot that rides beside every answer, for the card's header. */
77
77
  export declare const TRIP_META_KEY = "curless/trip";
78
78
  export type BuiltServer = {
79
79
  app: Hono;
80
+ /** Settled once there is something to answer with - see `Made.ready`. */
81
+ ready: () => Promise<void>;
80
82
  brand: ResolvedBrand;
81
83
  deps: ToolDeps;
82
84
  trips: TripStore;
@@ -89,6 +91,16 @@ export type ServerOptions = {
89
91
  configPath?: string;
90
92
  publicUrl?: string;
91
93
  now?: () => number;
94
+ /** How the group's own API is reached - a test's fake, or the platform's fetch. */
95
+ fetch?: typeof fetch;
96
+ /** Where the group's API credentials are read from. Default `process.env`. */
97
+ env?: Record<string, string | undefined>;
98
+ /**
99
+ * The work an API backend does on its own clock: keeping the hotel list
100
+ * current, and following up bookings whose outcome is not known yet. Off in
101
+ * tests. Default on.
102
+ */
103
+ background?: boolean;
92
104
  };
93
105
  export declare const buildServer: (opts: ServerOptions) => BuiltServer;
94
106
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,IAAI,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,KAAK,QAAQ,EAA8C,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAW,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,YAAY,CAAC;AAS9D,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,wCAAwC,CAAC;AAC9D;;;;;GAKG;AACH,eAAO,MAAM,SAAS,8BAA8B,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;CAKV,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,cAAc,MAAM,EAAE;;;;;;;;;;;;;;CAI/C,CAAC;AAEH,+EAA+E;AAC/E,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,IAAI,CAAC;IACV,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,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