@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.
- package/README.md +18 -8
- 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/fence.d.ts +12 -1
- package/dist/fence.d.ts.map +1 -1
- package/dist/fence.js +0 -0
- package/dist/fence.js.map +1 -1
- package/dist/legal.js +1 -1
- package/dist/legal.js.map +1 -1
- package/dist/money.d.ts +2 -0
- package/dist/money.d.ts.map +1 -1
- package/dist/money.js +43 -6
- package/dist/money.js.map +1 -1
- package/dist/server.d.ts +8 -8
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +10 -2
- package/dist/server.js.map +1 -1
- package/dist/sessions.d.ts.map +1 -1
- package/dist/sessions.js +3 -2
- package/dist/sessions.js.map +1 -1
- package/dist/surface.d.ts +2 -0
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +10 -1
- package/dist/surface.js.map +1 -1
- package/dist/tools.d.ts +4 -4
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +21 -8
- package/dist/tools.js.map +1 -1
- package/dist/trip-ids.js +1 -1
- package/dist/trip-ids.js.map +1 -1
- package/package.json +2 -2
- package/dist/__tests__/__fixtures__/huazhu-fake.d.ts +0 -2
- package/dist/__tests__/__fixtures__/huazhu-fake.d.ts.map +0 -1
- package/dist/__tests__/__fixtures__/huazhu-fake.js +0 -3
- package/dist/__tests__/__fixtures__/huazhu-fake.js.map +0 -1
- package/dist/__tests__/__helpers__/sessions.d.ts +0 -10
- package/dist/__tests__/__helpers__/sessions.d.ts.map +0 -1
- package/dist/__tests__/__helpers__/sessions.js +0 -40
- package/dist/__tests__/__helpers__/sessions.js.map +0 -1
- package/dist/__tests__/audit-p0.test.d.ts +0 -2
- package/dist/__tests__/audit-p0.test.d.ts.map +0 -1
- package/dist/__tests__/audit-p0.test.js +0 -274
- package/dist/__tests__/audit-p0.test.js.map +0 -1
- package/dist/__tests__/audit-p2.test.d.ts +0 -2
- package/dist/__tests__/audit-p2.test.d.ts.map +0 -1
- package/dist/__tests__/audit-p2.test.js +0 -98
- package/dist/__tests__/audit-p2.test.js.map +0 -1
- package/dist/__tests__/card-contract.test.d.ts +0 -2
- package/dist/__tests__/card-contract.test.d.ts.map +0 -1
- package/dist/__tests__/card-contract.test.js +0 -268
- package/dist/__tests__/card-contract.test.js.map +0 -1
- package/dist/__tests__/data.test.d.ts +0 -2
- package/dist/__tests__/data.test.d.ts.map +0 -1
- package/dist/__tests__/data.test.js +0 -210
- package/dist/__tests__/data.test.js.map +0 -1
- package/dist/__tests__/dates.test.d.ts +0 -2
- package/dist/__tests__/dates.test.d.ts.map +0 -1
- package/dist/__tests__/dates.test.js +0 -107
- package/dist/__tests__/dates.test.js.map +0 -1
- package/dist/__tests__/demo-hotels.test.d.ts +0 -2
- package/dist/__tests__/demo-hotels.test.d.ts.map +0 -1
- package/dist/__tests__/demo-hotels.test.js +0 -765
- package/dist/__tests__/demo-hotels.test.js.map +0 -1
- package/dist/__tests__/huazhu-audit.test.d.ts +0 -2
- package/dist/__tests__/huazhu-audit.test.d.ts.map +0 -1
- package/dist/__tests__/huazhu-audit.test.js +0 -234
- package/dist/__tests__/huazhu-audit.test.js.map +0 -1
- package/dist/__tests__/huazhu-backend.test.d.ts +0 -2
- package/dist/__tests__/huazhu-backend.test.d.ts.map +0 -1
- package/dist/__tests__/huazhu-backend.test.js +0 -1326
- package/dist/__tests__/huazhu-backend.test.js.map +0 -1
- package/dist/__tests__/huazhu-cancel-policy.test.d.ts +0 -2
- package/dist/__tests__/huazhu-cancel-policy.test.d.ts.map +0 -1
- package/dist/__tests__/huazhu-cancel-policy.test.js +0 -82
- package/dist/__tests__/huazhu-cancel-policy.test.js.map +0 -1
- package/dist/__tests__/huazhu-sandbox.test.d.ts +0 -2
- package/dist/__tests__/huazhu-sandbox.test.d.ts.map +0 -1
- package/dist/__tests__/huazhu-sandbox.test.js +0 -195
- package/dist/__tests__/huazhu-sandbox.test.js.map +0 -1
- package/dist/__tests__/huazhu-sellable.test.d.ts +0 -2
- package/dist/__tests__/huazhu-sellable.test.d.ts.map +0 -1
- package/dist/__tests__/huazhu-sellable.test.js +0 -192
- package/dist/__tests__/huazhu-sellable.test.js.map +0 -1
- package/dist/__tests__/present.test.d.ts +0 -2
- package/dist/__tests__/present.test.d.ts.map +0 -1
- package/dist/__tests__/present.test.js +0 -367
- package/dist/__tests__/present.test.js.map +0 -1
- package/dist/__tests__/prose.test.d.ts +0 -2
- package/dist/__tests__/prose.test.d.ts.map +0 -1
- package/dist/__tests__/prose.test.js +0 -171
- package/dist/__tests__/prose.test.js.map +0 -1
- package/dist/__tests__/server.test.d.ts +0 -2
- package/dist/__tests__/server.test.d.ts.map +0 -1
- package/dist/__tests__/server.test.js +0 -557
- package/dist/__tests__/server.test.js.map +0 -1
- package/dist/__tests__/state.test.d.ts +0 -2
- package/dist/__tests__/state.test.d.ts.map +0 -1
- package/dist/__tests__/state.test.js +0 -204
- package/dist/__tests__/state.test.js.map +0 -1
- package/dist/__tests__/tool-descriptions.test.d.ts +0 -2
- package/dist/__tests__/tool-descriptions.test.d.ts.map +0 -1
- package/dist/__tests__/tool-descriptions.test.js +0 -220
- package/dist/__tests__/tool-descriptions.test.js.map +0 -1
- package/dist/__tests__/tools.test.d.ts +0 -2
- package/dist/__tests__/tools.test.d.ts.map +0 -1
- package/dist/__tests__/tools.test.js +0 -1598
- 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
|
|
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` |
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
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` |
|
|
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
|
|
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
|
|
89
|
+
npx @curless/hotel-storefront --check ./config.json
|
|
80
90
|
```
|
|
81
91
|
|
|
82
92
|
## Payment
|
package/dist/card.generated.d.ts
CHANGED
|
@@ -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 = "
|
|
3
|
+
export declare const HOTEL_CARD_SOURCE_SHA = "f3eef32efeac05656919cfe87bcefa621e47cb16849b8f12add95b741f9bc904";
|
|
4
4
|
//# sourceMappingURL=card.generated.d.ts.map
|