@curless/hotel-storefront 0.27.14 → 0.27.16
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/dist/aggregate/make.d.ts +6 -0
- package/dist/aggregate/make.d.ts.map +1 -1
- package/dist/aggregate/make.js +15 -4
- package/dist/aggregate/make.js.map +1 -1
- package/dist/aggregate/places.d.ts.map +1 -1
- package/dist/aggregate/places.js +1 -0
- package/dist/aggregate/places.js.map +1 -1
- package/dist/assets.d.ts +13 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +44 -0
- package/dist/assets.js.map +1 -0
- package/dist/legal.d.ts.map +1 -1
- package/dist/legal.js +4 -0
- package/dist/legal.js.map +1 -1
- package/dist/server.d.ts +1 -10
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +28 -52
- package/dist/server.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +16 -6
- package/dist/tools.js.map +1 -1
- package/package.json +2 -1
package/dist/tools.js
CHANGED
|
@@ -729,6 +729,13 @@ const allTools = (n, v) => {
|
|
|
729
729
|
// model deciding what to tell a guest.
|
|
730
730
|
const OBJ = { type: 'object' };
|
|
731
731
|
const ARR = { type: 'array', items: { type: 'object' } };
|
|
732
|
+
/**
|
|
733
|
+
* A list of names - cities, currencies, a comparison's row labels. ⚠️ Declared
|
|
734
|
+
* as ARR (objects) since the first build while the answers carried strings: a
|
|
735
|
+
* host validating `structuredContent` against `outputSchema`, as the MCP spec
|
|
736
|
+
* has a client do, would refuse every city list (2026-10-08).
|
|
737
|
+
*/
|
|
738
|
+
const STRS = { type: 'array', items: { type: 'string' } };
|
|
732
739
|
const STR = { type: 'string' };
|
|
733
740
|
const BOOL = { type: 'boolean' };
|
|
734
741
|
const TRIP_SCHEMA = {
|
|
@@ -836,7 +843,7 @@ export const buildOutputSchemas = (n) => ({
|
|
|
836
843
|
/** How many MATCHED. `shown` is how many are in `hotels`. */
|
|
837
844
|
total: { type: 'number' },
|
|
838
845
|
shown: { type: 'number' },
|
|
839
|
-
cities:
|
|
846
|
+
cities: STRS,
|
|
840
847
|
query: STR,
|
|
841
848
|
/** The order actually used, which is not always the one asked for. */
|
|
842
849
|
sort: STR,
|
|
@@ -845,7 +852,7 @@ export const buildOutputSchemas = (n) => ({
|
|
|
845
852
|
/** The cheapest of those, ONLY when the ceiling left nothing. Never matches. */
|
|
846
853
|
nearest: ARR,
|
|
847
854
|
/** Present only when the matches span more than one, which drops the price knobs. */
|
|
848
|
-
currencies:
|
|
855
|
+
currencies: STRS,
|
|
849
856
|
/** Set when nothing matched and one wider search was tried instead. */
|
|
850
857
|
widened: OBJ,
|
|
851
858
|
},
|
|
@@ -896,7 +903,9 @@ export const buildOutputSchemas = (n) => ({
|
|
|
896
903
|
[n.requestBooking]: {
|
|
897
904
|
type: 'object',
|
|
898
905
|
properties: {
|
|
899
|
-
|
|
906
|
+
// `trip`: nothing was booked and the trip is shown again - its price
|
|
907
|
+
// moved, or (in a market) it holds two groups' stays.
|
|
908
|
+
view: { enum: ['booking', 'needs-guest', 'empty-trip', 'error', 'trip'] },
|
|
900
909
|
brand: STR,
|
|
901
910
|
toolNames: OBJ,
|
|
902
911
|
bookingMode: STR,
|
|
@@ -946,8 +955,8 @@ export const buildOutputSchemas = (n) => ({
|
|
|
946
955
|
columns: ARR,
|
|
947
956
|
dropped: ARR,
|
|
948
957
|
/** Present only when the columns are priced in more than one currency. */
|
|
949
|
-
currencies:
|
|
950
|
-
rowLabels:
|
|
958
|
+
currencies: STRS,
|
|
959
|
+
rowLabels: STRS,
|
|
951
960
|
},
|
|
952
961
|
required: ['view'],
|
|
953
962
|
},
|
|
@@ -2811,7 +2820,8 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
2811
2820
|
if (name === t.clearTrip) {
|
|
2812
2821
|
deps.trips.clear(key);
|
|
2813
2822
|
return {
|
|
2814
|
-
|
|
2823
|
+
// No `total` at all: an empty trip has none, and `null` broke the schema.
|
|
2824
|
+
structured: { view: 'trip', ...common(deps, key), lines: [], count: 0 },
|
|
2815
2825
|
text: 'The trip is empty.',
|
|
2816
2826
|
};
|
|
2817
2827
|
}
|