@curless/hotel-storefront 0.27.4 → 0.27.6

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 (108) hide show
  1. package/README.md +18 -8
  2. package/dist/card.generated.d.ts +1 -1
  3. package/dist/card.generated.js +2 -2
  4. package/dist/card.generated.js.map +1 -1
  5. package/dist/fence.d.ts +12 -1
  6. package/dist/fence.d.ts.map +1 -1
  7. package/dist/fence.js +0 -0
  8. package/dist/fence.js.map +1 -1
  9. package/dist/legal.js +1 -1
  10. package/dist/legal.js.map +1 -1
  11. package/dist/money.d.ts +2 -0
  12. package/dist/money.d.ts.map +1 -1
  13. package/dist/money.js +43 -6
  14. package/dist/money.js.map +1 -1
  15. package/dist/server.d.ts +8 -8
  16. package/dist/server.d.ts.map +1 -1
  17. package/dist/server.js +10 -2
  18. package/dist/server.js.map +1 -1
  19. package/dist/sessions.d.ts.map +1 -1
  20. package/dist/sessions.js +3 -2
  21. package/dist/sessions.js.map +1 -1
  22. package/dist/surface.d.ts +2 -0
  23. package/dist/surface.d.ts.map +1 -1
  24. package/dist/surface.js +10 -1
  25. package/dist/surface.js.map +1 -1
  26. package/dist/tools.d.ts +4 -4
  27. package/dist/tools.d.ts.map +1 -1
  28. package/dist/tools.js +21 -8
  29. package/dist/tools.js.map +1 -1
  30. package/dist/trip-ids.js +1 -1
  31. package/dist/trip-ids.js.map +1 -1
  32. package/package.json +2 -2
  33. package/dist/__tests__/__fixtures__/huazhu-fake.d.ts +0 -2
  34. package/dist/__tests__/__fixtures__/huazhu-fake.d.ts.map +0 -1
  35. package/dist/__tests__/__fixtures__/huazhu-fake.js +0 -3
  36. package/dist/__tests__/__fixtures__/huazhu-fake.js.map +0 -1
  37. package/dist/__tests__/__helpers__/sessions.d.ts +0 -10
  38. package/dist/__tests__/__helpers__/sessions.d.ts.map +0 -1
  39. package/dist/__tests__/__helpers__/sessions.js +0 -40
  40. package/dist/__tests__/__helpers__/sessions.js.map +0 -1
  41. package/dist/__tests__/audit-p0.test.d.ts +0 -2
  42. package/dist/__tests__/audit-p0.test.d.ts.map +0 -1
  43. package/dist/__tests__/audit-p0.test.js +0 -274
  44. package/dist/__tests__/audit-p0.test.js.map +0 -1
  45. package/dist/__tests__/audit-p2.test.d.ts +0 -2
  46. package/dist/__tests__/audit-p2.test.d.ts.map +0 -1
  47. package/dist/__tests__/audit-p2.test.js +0 -98
  48. package/dist/__tests__/audit-p2.test.js.map +0 -1
  49. package/dist/__tests__/card-contract.test.d.ts +0 -2
  50. package/dist/__tests__/card-contract.test.d.ts.map +0 -1
  51. package/dist/__tests__/card-contract.test.js +0 -268
  52. package/dist/__tests__/card-contract.test.js.map +0 -1
  53. package/dist/__tests__/data.test.d.ts +0 -2
  54. package/dist/__tests__/data.test.d.ts.map +0 -1
  55. package/dist/__tests__/data.test.js +0 -210
  56. package/dist/__tests__/data.test.js.map +0 -1
  57. package/dist/__tests__/dates.test.d.ts +0 -2
  58. package/dist/__tests__/dates.test.d.ts.map +0 -1
  59. package/dist/__tests__/dates.test.js +0 -107
  60. package/dist/__tests__/dates.test.js.map +0 -1
  61. package/dist/__tests__/demo-hotels.test.d.ts +0 -2
  62. package/dist/__tests__/demo-hotels.test.d.ts.map +0 -1
  63. package/dist/__tests__/demo-hotels.test.js +0 -765
  64. package/dist/__tests__/demo-hotels.test.js.map +0 -1
  65. package/dist/__tests__/huazhu-audit.test.d.ts +0 -2
  66. package/dist/__tests__/huazhu-audit.test.d.ts.map +0 -1
  67. package/dist/__tests__/huazhu-audit.test.js +0 -234
  68. package/dist/__tests__/huazhu-audit.test.js.map +0 -1
  69. package/dist/__tests__/huazhu-backend.test.d.ts +0 -2
  70. package/dist/__tests__/huazhu-backend.test.d.ts.map +0 -1
  71. package/dist/__tests__/huazhu-backend.test.js +0 -1326
  72. package/dist/__tests__/huazhu-backend.test.js.map +0 -1
  73. package/dist/__tests__/huazhu-cancel-policy.test.d.ts +0 -2
  74. package/dist/__tests__/huazhu-cancel-policy.test.d.ts.map +0 -1
  75. package/dist/__tests__/huazhu-cancel-policy.test.js +0 -82
  76. package/dist/__tests__/huazhu-cancel-policy.test.js.map +0 -1
  77. package/dist/__tests__/huazhu-sandbox.test.d.ts +0 -2
  78. package/dist/__tests__/huazhu-sandbox.test.d.ts.map +0 -1
  79. package/dist/__tests__/huazhu-sandbox.test.js +0 -195
  80. package/dist/__tests__/huazhu-sandbox.test.js.map +0 -1
  81. package/dist/__tests__/huazhu-sellable.test.d.ts +0 -2
  82. package/dist/__tests__/huazhu-sellable.test.d.ts.map +0 -1
  83. package/dist/__tests__/huazhu-sellable.test.js +0 -192
  84. package/dist/__tests__/huazhu-sellable.test.js.map +0 -1
  85. package/dist/__tests__/present.test.d.ts +0 -2
  86. package/dist/__tests__/present.test.d.ts.map +0 -1
  87. package/dist/__tests__/present.test.js +0 -367
  88. package/dist/__tests__/present.test.js.map +0 -1
  89. package/dist/__tests__/prose.test.d.ts +0 -2
  90. package/dist/__tests__/prose.test.d.ts.map +0 -1
  91. package/dist/__tests__/prose.test.js +0 -171
  92. package/dist/__tests__/prose.test.js.map +0 -1
  93. package/dist/__tests__/server.test.d.ts +0 -2
  94. package/dist/__tests__/server.test.d.ts.map +0 -1
  95. package/dist/__tests__/server.test.js +0 -557
  96. package/dist/__tests__/server.test.js.map +0 -1
  97. package/dist/__tests__/state.test.d.ts +0 -2
  98. package/dist/__tests__/state.test.d.ts.map +0 -1
  99. package/dist/__tests__/state.test.js +0 -204
  100. package/dist/__tests__/state.test.js.map +0 -1
  101. package/dist/__tests__/tool-descriptions.test.d.ts +0 -2
  102. package/dist/__tests__/tool-descriptions.test.d.ts.map +0 -1
  103. package/dist/__tests__/tool-descriptions.test.js +0 -220
  104. package/dist/__tests__/tool-descriptions.test.js.map +0 -1
  105. package/dist/__tests__/tools.test.d.ts +0 -2
  106. package/dist/__tests__/tools.test.d.ts.map +0 -1
  107. package/dist/__tests__/tools.test.js +0 -1598
  108. package/dist/__tests__/tools.test.js.map +0 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ vocabulary and where the rooms come from live in a `HotelConfig`, so the second
5
5
  hotel group is a JSON file rather than a fork.
6
6
 
7
7
  ```bash
8
- npx curless-hotel-storefront ./config.json # a brand's own repo, e.g. curless-group1/shangrila-mcp
8
+ npx @curless/hotel-storefront ./config.json # a brand's own repo, e.g. curless-group1/shangrila-mcp
9
9
  ```
10
10
 
11
11
  It answers on `POST /mcp` (streamable HTTP), serves its own card as a `ui://`
@@ -21,16 +21,26 @@ weekend" books someone the wrong nights, and they find out at the front desk.
21
21
 
22
22
  ## The tools
23
23
 
24
+ Nineteen, named from the brand's prefix. A backend that cannot do something
25
+ says so in its `capabilities`, and those tools are not listed at all - Huazhu's
26
+ deployment has twelve (no loyalty, add-ons, in-place changes or policy text).
27
+
24
28
  | | |
25
29
  |---|---|
26
- | `list_<brand>_hotels` | Hotels by city or free text. A city usually holds several, and all of them come back |
27
- | `get_<brand>_hotel` | One hotel; with `checkIn`/`checkOut`, its rooms priced for those nights |
28
- | `list_<brand>_extras` | Transfers, dining, experiences, spa, family |
30
+ | `list_<brand>_hotels` | The group's destinations, or hotels by city or free text - with filters, a sort and a nightly ceiling, and with `checkIn`/`checkOut` each priced for those nights. A city usually holds several, and all of them come back |
31
+ | `look_up_<brand>_hotels` | Up to six hotels read as text and drawn nowhere: what a comparison or a plan is made from |
32
+ | `get_<brand>_hotel` | One hotel; with dates, its rooms priced for those nights and the arrival days either side |
33
+ | `compare_<brand>_hotels` | Two to four side by side - the model's judgement, the server's figures (it takes no prices) |
34
+ | `show_<brand>_itinerary` | Day by day, each item marked as in the trip or only planned |
35
+ | `list_<brand>_extras` | Transfers, dining, experiences, spa, family - for a stay, or for a booking already made |
29
36
  | `add_to_<brand>_trip` · `view_` · `clear_` | The trip: room nights plus add-ons, priced as one |
30
- | `request_<brand>_booking` | Holds the rooms (demo) or books them, paid at the hotel (a group's own API); a confirmation code per stay |
31
- | `list_my_<brand>_bookings` | |
37
+ | `request_<brand>_booking` | A demonstration hold (demo) or a booking paid at the hotel (a group's own API); a confirmation code per stay |
38
+ | `list_my_<brand>_bookings` | This conversation's bookings, or one found by its code and the email it was made with |
32
39
  | `preview_<brand>_cancellation` · `cancel_<brand>_booking` | The fee and its rule, before anything is cancelled |
40
+ | `preview_<brand>_booking_change` · `change_<brand>_booking` | New nights, rooms or add-ons: the difference first, then the change |
33
41
  | `get_<brand>_hotel_policies` | What the property itself publishes |
42
+ | `sign_in_<brand>_member` · `sign_out_` | A membership number and the surname on it - a member rate, never a way into anybody's booking |
43
+ | `forget_<brand>_preferences` | Removes the room preferences a member asked to have remembered |
34
44
 
35
45
  Tool descriptions say what a tool does and nothing else; how to behave lives in
36
46
  the server's `instructions`, which is what both assistant directories' listing
@@ -62,7 +72,7 @@ Everything goes through one `HotelBackend` interface, and there are two:
62
72
  the config.
63
73
  - **`data.api.sandbox: true`** is the same connector against a SIMULATED
64
74
  Huazhu, for testing before there is an account: `node dist/huazhu/sandbox.js`
65
- serves the distributor API as its documentation describes it, with eight
75
+ serves the distributor API as its documentation describes it, with nine
66
76
  invented hotels named 【模拟】/[Sandbox] and no photographs, and keeps its
67
77
  bookings in `SANDBOX_STATE_FILE`. The flag makes every answer say `demo`, the
68
78
  instructions and the legal pages say it is a test environment, and nothing
@@ -76,7 +86,7 @@ something that always says no.
76
86
  ```bash
77
87
  # The first call against a real environment, read-only - it never books:
78
88
  HUAZHU_CLIENT_ID=… HUAZHU_CLIENT_SECRET=… HUAZHU_DISTRIBUTOR_ID=… \
79
- npx curless-hotel-storefront --check ./config.json
89
+ npx @curless/hotel-storefront --check ./config.json
80
90
  ```
81
91
 
82
92
  ## Payment
@@ -1,4 +1,4 @@
1
1
  export declare const HOTEL_CARD_HTML: string;
2
2
  /** sha256 of widget/src + widget/index.html at build time - the drift guard reads this. */
3
- export declare const HOTEL_CARD_SOURCE_SHA = "a328c0c854922e1418ca0d3e2e7a3b5957e6750d43649be6380fbcf8b2c7dfcf";
3
+ export declare const HOTEL_CARD_SOURCE_SHA = "f3eef32efeac05656919cfe87bcefa621e47cb16849b8f12add95b741f9bc904";
4
4
  //# sourceMappingURL=card.generated.d.ts.map