@curless/hotel-storefront 0.85.0 → 0.87.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.
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/accept-terms.d.ts +4 -0
- package/dist/tools/accept-terms.d.ts.map +1 -0
- package/dist/tools/accept-terms.js +26 -0
- package/dist/tools/accept-terms.js.map +1 -0
- package/dist/tools/add-booking-addon.d.ts +4 -0
- package/dist/tools/add-booking-addon.d.ts.map +1 -0
- package/dist/tools/add-booking-addon.js +44 -0
- package/dist/tools/add-booking-addon.js.map +1 -0
- package/dist/tools/add-to-trip.d.ts +4 -0
- package/dist/tools/add-to-trip.d.ts.map +1 -0
- package/dist/tools/add-to-trip.js +49 -0
- package/dist/tools/add-to-trip.js.map +1 -0
- package/dist/tools/all-tools.d.ts +19124 -0
- package/dist/tools/all-tools.d.ts.map +1 -0
- package/dist/tools/all-tools.js +43 -0
- package/dist/tools/all-tools.js.map +1 -0
- package/dist/tools/answer.d.ts +3 -0
- package/dist/tools/answer.d.ts.map +1 -0
- package/dist/tools/answer.js +104 -0
- package/dist/tools/answer.js.map +1 -0
- package/dist/tools/args.d.ts +149 -0
- package/dist/tools/args.d.ts.map +1 -0
- package/dist/tools/args.js +176 -0
- package/dist/tools/args.js.map +1 -0
- package/dist/tools/base-output-schemas.d.ts +3 -0
- package/dist/tools/base-output-schemas.d.ts.map +1 -0
- package/dist/tools/base-output-schemas.js +396 -0
- package/dist/tools/base-output-schemas.js.map +1 -0
- package/dist/tools/book-picked.d.ts +4 -0
- package/dist/tools/book-picked.d.ts.map +1 -0
- package/dist/tools/book-picked.js +14 -0
- package/dist/tools/book-picked.js.map +1 -0
- package/dist/tools/booking-answer.d.ts +24 -0
- package/dist/tools/booking-answer.d.ts.map +1 -0
- package/dist/tools/booking-answer.js +567 -0
- package/dist/tools/booking-answer.js.map +1 -0
- package/dist/tools/buy-shop-item.d.ts +4 -0
- package/dist/tools/buy-shop-item.d.ts.map +1 -0
- package/dist/tools/buy-shop-item.js +45 -0
- package/dist/tools/buy-shop-item.js.map +1 -0
- package/dist/tools/call.d.ts +11 -0
- package/dist/tools/call.d.ts.map +1 -0
- package/dist/tools/call.js +2 -0
- package/dist/tools/call.js.map +1 -0
- package/dist/tools/cancel-facts.d.ts +281 -0
- package/dist/tools/cancel-facts.d.ts.map +1 -0
- package/dist/tools/cancel-facts.js +309 -0
- package/dist/tools/cancel-facts.js.map +1 -0
- package/dist/tools/cancel.d.ts +4 -0
- package/dist/tools/cancel.d.ts.map +1 -0
- package/dist/tools/cancel.js +415 -0
- package/dist/tools/cancel.js.map +1 -0
- package/dist/tools/capability-adjust.d.ts +31 -0
- package/dist/tools/capability-adjust.d.ts.map +1 -0
- package/dist/tools/capability-adjust.js +299 -0
- package/dist/tools/capability-adjust.js.map +1 -0
- package/dist/tools/card-addons.d.ts +4 -0
- package/dist/tools/card-addons.d.ts.map +1 -0
- package/dist/tools/card-addons.js +76 -0
- package/dist/tools/card-addons.js.map +1 -0
- package/dist/tools/change-booking.d.ts +4 -0
- package/dist/tools/change-booking.d.ts.map +1 -0
- package/dist/tools/change-booking.js +145 -0
- package/dist/tools/change-booking.js.map +1 -0
- package/dist/tools/clear-trip.d.ts +4 -0
- package/dist/tools/clear-trip.d.ts.map +1 -0
- package/dist/tools/clear-trip.js +10 -0
- package/dist/tools/clear-trip.js.map +1 -0
- package/dist/tools/compare.d.ts +4 -0
- package/dist/tools/compare.d.ts.map +1 -0
- package/dist/tools/compare.js +114 -0
- package/dist/tools/compare.js.map +1 -0
- package/dist/tools/current-trip.d.ts +70 -0
- package/dist/tools/current-trip.d.ts.map +1 -0
- package/dist/tools/current-trip.js +269 -0
- package/dist/tools/current-trip.js.map +1 -0
- package/dist/tools/deps.d.ts +229 -0
- package/dist/tools/deps.d.ts.map +1 -0
- package/dist/tools/deps.js +2 -0
- package/dist/tools/deps.js.map +1 -0
- package/dist/tools/follow-ups.d.ts +120 -0
- package/dist/tools/follow-ups.d.ts.map +1 -0
- package/dist/tools/follow-ups.js +369 -0
- package/dist/tools/follow-ups.js.map +1 -0
- package/dist/tools/forget-preferences.d.ts +4 -0
- package/dist/tools/forget-preferences.d.ts.map +1 -0
- package/dist/tools/forget-preferences.js +24 -0
- package/dist/tools/forget-preferences.js.map +1 -0
- package/dist/tools/get-hotel.d.ts +4 -0
- package/dist/tools/get-hotel.d.ts.map +1 -0
- package/dist/tools/get-hotel.js +350 -0
- package/dist/tools/get-hotel.js.map +1 -0
- package/dist/tools/hotel-choices.d.ts +132 -0
- package/dist/tools/hotel-choices.d.ts.map +1 -0
- package/dist/tools/hotel-choices.js +587 -0
- package/dist/tools/hotel-choices.js.map +1 -0
- package/dist/tools/itinerary.d.ts +4 -0
- package/dist/tools/itinerary.d.ts.map +1 -0
- package/dist/tools/itinerary.js +158 -0
- package/dist/tools/itinerary.js.map +1 -0
- package/dist/tools/list-booking-addons.d.ts +4 -0
- package/dist/tools/list-booking-addons.d.ts.map +1 -0
- package/dist/tools/list-booking-addons.js +21 -0
- package/dist/tools/list-booking-addons.js.map +1 -0
- package/dist/tools/list-bookings.d.ts +4 -0
- package/dist/tools/list-bookings.d.ts.map +1 -0
- package/dist/tools/list-bookings.js +119 -0
- package/dist/tools/list-bookings.js.map +1 -0
- package/dist/tools/list-extras.d.ts +4 -0
- package/dist/tools/list-extras.d.ts.map +1 -0
- package/dist/tools/list-extras.js +90 -0
- package/dist/tools/list-extras.js.map +1 -0
- package/dist/tools/list-hotels-ask.d.ts +133 -0
- package/dist/tools/list-hotels-ask.d.ts.map +1 -0
- package/dist/tools/list-hotels-ask.js +326 -0
- package/dist/tools/list-hotels-ask.js.map +1 -0
- package/dist/tools/list-hotels-empty.d.ts +5 -0
- package/dist/tools/list-hotels-empty.d.ts.map +1 -0
- package/dist/tools/list-hotels-empty.js +130 -0
- package/dist/tools/list-hotels-empty.js.map +1 -0
- package/dist/tools/list-hotels-home.d.ts +9 -0
- package/dist/tools/list-hotels-home.d.ts.map +1 -0
- package/dist/tools/list-hotels-home.js +181 -0
- package/dist/tools/list-hotels-home.js.map +1 -0
- package/dist/tools/list-hotels-page.d.ts +43 -0
- package/dist/tools/list-hotels-page.d.ts.map +1 -0
- package/dist/tools/list-hotels-page.js +344 -0
- package/dist/tools/list-hotels-page.js.map +1 -0
- package/dist/tools/list-hotels.d.ts +4 -0
- package/dist/tools/list-hotels.d.ts.map +1 -0
- package/dist/tools/list-hotels.js +24 -0
- package/dist/tools/list-hotels.js.map +1 -0
- package/dist/tools/list-shop-items.d.ts +4 -0
- package/dist/tools/list-shop-items.d.ts.map +1 -0
- package/dist/tools/list-shop-items.js +34 -0
- package/dist/tools/list-shop-items.js.map +1 -0
- package/dist/tools/list-shop-orders.d.ts +4 -0
- package/dist/tools/list-shop-orders.d.ts.map +1 -0
- package/dist/tools/list-shop-orders.js +22 -0
- package/dist/tools/list-shop-orders.js.map +1 -0
- package/dist/tools/look-up.d.ts +4 -0
- package/dist/tools/look-up.d.ts.map +1 -0
- package/dist/tools/look-up.js +207 -0
- package/dist/tools/look-up.js.map +1 -0
- package/dist/tools/output-schemas.d.ts +645 -0
- package/dist/tools/output-schemas.d.ts.map +1 -0
- package/dist/tools/output-schemas.js +503 -0
- package/dist/tools/output-schemas.js.map +1 -0
- package/dist/tools/paid-lines.d.ts +718 -0
- package/dist/tools/paid-lines.d.ts.map +1 -0
- package/dist/tools/paid-lines.js +359 -0
- package/dist/tools/paid-lines.js.map +1 -0
- package/dist/tools/pay-with-union-pay.d.ts +4 -0
- package/dist/tools/pay-with-union-pay.d.ts.map +1 -0
- package/dist/tools/pay-with-union-pay.js +112 -0
- package/dist/tools/pay-with-union-pay.js.map +1 -0
- package/dist/tools/payment-words.d.ts +269 -0
- package/dist/tools/payment-words.d.ts.map +1 -0
- package/dist/tools/payment-words.js +365 -0
- package/dist/tools/payment-words.js.map +1 -0
- package/dist/tools/pick-room.d.ts +4 -0
- package/dist/tools/pick-room.d.ts.map +1 -0
- package/dist/tools/pick-room.js +23 -0
- package/dist/tools/pick-room.js.map +1 -0
- package/dist/tools/policies.d.ts +4 -0
- package/dist/tools/policies.d.ts.map +1 -0
- package/dist/tools/policies.js +74 -0
- package/dist/tools/policies.js.map +1 -0
- package/dist/tools/pricing.d.ts +55 -0
- package/dist/tools/pricing.d.ts.map +1 -0
- package/dist/tools/pricing.js +260 -0
- package/dist/tools/pricing.js.map +1 -0
- package/dist/tools/put-room-line.d.ts +12 -0
- package/dist/tools/put-room-line.d.ts.map +1 -0
- package/dist/tools/put-room-line.js +347 -0
- package/dist/tools/put-room-line.js.map +1 -0
- package/dist/tools/quote-card.d.ts +234 -0
- package/dist/tools/quote-card.d.ts.map +1 -0
- package/dist/tools/quote-card.js +375 -0
- package/dist/tools/quote-card.js.map +1 -0
- package/dist/tools/refund-booking.d.ts +4 -0
- package/dist/tools/refund-booking.d.ts.map +1 -0
- package/dist/tools/refund-booking.js +112 -0
- package/dist/tools/refund-booking.js.map +1 -0
- package/dist/tools/request-booking.d.ts +4 -0
- package/dist/tools/request-booking.d.ts.map +1 -0
- package/dist/tools/request-booking.js +5 -0
- package/dist/tools/request-booking.js.map +1 -0
- package/dist/tools/request-words.d.ts +238 -0
- package/dist/tools/request-words.d.ts.map +1 -0
- package/dist/tools/request-words.js +487 -0
- package/dist/tools/request-words.js.map +1 -0
- package/dist/tools/room-choices.d.ts +64 -0
- package/dist/tools/room-choices.d.ts.map +1 -0
- package/dist/tools/room-choices.js +374 -0
- package/dist/tools/room-choices.js.map +1 -0
- package/dist/tools/session-notes.d.ts +164 -0
- package/dist/tools/session-notes.d.ts.map +1 -0
- package/dist/tools/session-notes.js +412 -0
- package/dist/tools/session-notes.js.map +1 -0
- package/dist/tools/sign-in.d.ts +4 -0
- package/dist/tools/sign-in.d.ts.map +1 -0
- package/dist/tools/sign-in.js +72 -0
- package/dist/tools/sign-in.js.map +1 -0
- package/dist/tools/sign-out.d.ts +4 -0
- package/dist/tools/sign-out.d.ts.map +1 -0
- package/dist/tools/sign-out.js +13 -0
- package/dist/tools/sign-out.js.map +1 -0
- package/dist/tools/terms-answer.d.ts +114 -0
- package/dist/tools/terms-answer.d.ts.map +1 -0
- package/dist/tools/terms-answer.js +492 -0
- package/dist/tools/terms-answer.js.map +1 -0
- package/dist/tools/tool-defs-account.d.ts +80 -0
- package/dist/tools/tool-defs-account.d.ts.map +1 -0
- package/dist/tools/tool-defs-account.js +65 -0
- package/dist/tools/tool-defs-account.js.map +1 -0
- package/dist/tools/tool-defs-addons.d.ts +251 -0
- package/dist/tools/tool-defs-addons.d.ts.map +1 -0
- package/dist/tools/tool-defs-addons.js +198 -0
- package/dist/tools/tool-defs-addons.js.map +1 -0
- package/dist/tools/tool-defs-booking.d.ts +410 -0
- package/dist/tools/tool-defs-booking.d.ts.map +1 -0
- package/dist/tools/tool-defs-booking.js +285 -0
- package/dist/tools/tool-defs-booking.js.map +1 -0
- package/dist/tools/tool-defs-browse.d.ts +444 -0
- package/dist/tools/tool-defs-browse.d.ts.map +1 -0
- package/dist/tools/tool-defs-browse.js +307 -0
- package/dist/tools/tool-defs-browse.js.map +1 -0
- package/dist/tools/tool-defs-trip.d.ts +136 -0
- package/dist/tools/tool-defs-trip.d.ts.map +1 -0
- package/dist/tools/tool-defs-trip.js +79 -0
- package/dist/tools/tool-defs-trip.js.map +1 -0
- package/dist/tools/tool-env.d.ts +64 -0
- package/dist/tools/tool-env.d.ts.map +1 -0
- package/dist/tools/tool-env.js +49 -0
- package/dist/tools/tool-env.js.map +1 -0
- package/dist/tools/tool-set.d.ts +1425 -0
- package/dist/tools/tool-set.d.ts.map +1 -0
- package/dist/tools/tool-set.js +244 -0
- package/dist/tools/tool-set.js.map +1 -0
- package/dist/tools/view-trip.d.ts +4 -0
- package/dist/tools/view-trip.d.ts.map +1 -0
- package/dist/tools/view-trip.js +7 -0
- package/dist/tools/view-trip.js.map +1 -0
- package/dist/tools.d.ts +13 -2089
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +11 -10685
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { DEFAULT_PAGE, MAX_PAGE } from '../backend.js';
|
|
2
|
+
import { FACILITIES } from '../facilities.js';
|
|
3
|
+
import { MAX_COMPARED, MAX_CONS, MAX_DAYS, MAX_ITEMS_PER_DAY, MAX_MOMENTS, MAX_PROS, } from '../present.js';
|
|
4
|
+
import { MAX_ROOMS_PER_LINE } from '../trip.js';
|
|
5
|
+
import { aBrandOf, catalogue, upFirst } from '../vocab.js';
|
|
6
|
+
import { LOOK_UP_MAX, reads } from './tool-set.js';
|
|
7
|
+
// The tools that look: the list, one hotel, a look-up, the extras, a comparison, a plan, the policies.
|
|
8
|
+
export const listHotelsTool = ({ n, v, open, places, stayProps }) => ({
|
|
9
|
+
name: n.listHotels,
|
|
10
|
+
// ⚠️ WHAT THIS CARD IS FOR, IN ITS FIRST SENTENCE (总线程, 2026-10-26).
|
|
11
|
+
// robin on live 0.47.7, a new Atour conversation: 「11月1号到7号北京行程」
|
|
12
|
+
// went straight to this tool and drew "Beijing, 4 hotels" - the planning
|
|
13
|
+
// exemption sat only in the server instructions, which a host may not
|
|
14
|
+
// pass on (evals without them failed the same way, 5/6 and 4/6). So the
|
|
15
|
+
// description says it too, as what the card is, never as an order: the
|
|
16
|
+
// directory rule (tool-descriptions.test.ts) holds, and "first" is one of
|
|
17
|
+
// its words, hence "the other way round".
|
|
18
|
+
description: `${upFirst(catalogue(v))}, shown to a guest - as a card, in an app that draws one - to look through and pick one ${v.noun} to book. It holds no plan of days: a day-by-day plan (行程, 安排, an itinerary) is an answer of its own, laid out by the days, with a ${v.noun} for each part of the trip read up as text. Asked with no place - or a country of many cities - it answers with the places to choose from: regions, countries and cities, each with how many ${v.nounPlural} it has; \`all\` lists the ${v.nounPlural} themselves. \`city\` (a city or a country) or \`query\` answers with the ${v.nounPlural}: a picture, the city and area, a rating where the ${v.noun} publishes one, and a from-price, and a city usually holds several. With \`checkIn\` and \`checkOut\` every ${v.noun} is priced for those nights - its cheapest room that takes the party, \`rooms\` of it, for the whole stay with taxes - or marked as having no room for them. \`sort\` and \`maxNightly\` order and cap by that price, or by the from-price without dates, where the matches share one currency. \`brand\`, \`facilities\`, \`freeCancellation\`, \`breakfast\` and \`bed\` narrow the list, and the answer counts what each would leave. A long list comes a page at a time: the answer says how many more there are and the \`offset\` of the next page. Words or a place that match nothing are widened once, and the answer names what it widened to.${v.hints.search ? ` ${v.hints.search}` : ''}`,
|
|
19
|
+
annotations: reads(`Browse ${catalogue(v)}`, open),
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
query: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: "Free text over the name, city, area, description and amenities - the guest's own words",
|
|
26
|
+
},
|
|
27
|
+
city: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: `One city or one country${places.length ? `, e.g. ${places.map((p) => `"${p}"`).join(' or ')}` : ''}`,
|
|
30
|
+
},
|
|
31
|
+
...stayProps,
|
|
32
|
+
rooms: {
|
|
33
|
+
type: 'integer',
|
|
34
|
+
minimum: 1,
|
|
35
|
+
maximum: MAX_ROOMS_PER_LINE,
|
|
36
|
+
description: `With dates: how many rooms of one type the party needs, 1 to ${MAX_ROOMS_PER_LINE}. Default 1`,
|
|
37
|
+
},
|
|
38
|
+
sort: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
enum: ['group', 'price-low', 'price-high', 'rating'],
|
|
41
|
+
// In a market there are several groups, and "the group" is none of them.
|
|
42
|
+
description: `Default \`group\`: the cities ${v.market ? `with the most ${v.nounPlural}` : `the group has most ${v.nounPlural} in`} lead the list. A price order - by the stay's price with dates, the from-price without - holds only where the matches share one currency; across currencies it is dropped and the answer says which currencies they are`,
|
|
43
|
+
},
|
|
44
|
+
maxNightly: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
description: 'A ceiling on the price of a night - of the stay with dates, the from-price without - in the currency the matches are quoted in. Across currencies it is dropped and the answer says so',
|
|
47
|
+
},
|
|
48
|
+
limit: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: `How many to return, 1 to ${MAX_PAGE}. Default ${DEFAULT_PAGE}`,
|
|
51
|
+
},
|
|
52
|
+
offset: {
|
|
53
|
+
type: 'number',
|
|
54
|
+
description: 'How many of the matches to skip: the answer says where the next page starts',
|
|
55
|
+
},
|
|
56
|
+
brand: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: v.market
|
|
59
|
+
? "One of the hotels' own brands (Kerry, Hanting - not a hotel group), as the list's brand counts name it"
|
|
60
|
+
: "One of the group's brands, as the list's brand counts name it",
|
|
61
|
+
},
|
|
62
|
+
...(v.market
|
|
63
|
+
? {
|
|
64
|
+
group: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: "One hotel group's hotels only, by the group's name",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
: {}),
|
|
70
|
+
facilities: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
items: { type: 'string', enum: FACILITIES.map((x) => x.key) },
|
|
73
|
+
description: `What every ${v.noun} listed must have`,
|
|
74
|
+
},
|
|
75
|
+
freeCancellation: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
description: `Only ${v.nounPlural} with a room that can be cancelled free - and, with dates, that room is the one priced`,
|
|
78
|
+
},
|
|
79
|
+
breakfast: {
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
description: `Only ${v.nounPlural} with a room that includes breakfast - and, with dates, that room is the one priced`,
|
|
82
|
+
},
|
|
83
|
+
bed: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['king', 'twin'],
|
|
86
|
+
description: `Only ${v.nounPlural} with a room that has this bed - \`king\` is one large bed (king, queen or double), \`twin\` is two beds - and, with dates, that room is the one priced. Given with \`freeCancellation\` or \`breakfast\`, one room must have all of them`,
|
|
87
|
+
},
|
|
88
|
+
all: {
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
description: `Unnarrowed, or narrowed to a country of many cities, the answer is the places to choose from; true lists the ${v.nounPlural} themselves`,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
export const getHotelTool = ({ n, v, open, stayProps }) => ({
|
|
96
|
+
name: n.getHotel,
|
|
97
|
+
description: `One ${v.noun} in full: description, amenities, address, and check-in and check-out times where the ${v.noun} publishes them. Given \`checkIn\` and \`checkOut\` it also returns the room types that can be booked for those nights, one line per type at its lowest rate: the nightly rate, the stay total including taxes and fees, whether it can be cancelled free and until when, and how many rates it has. \`rooms\` leaves out the types that have fewer than that many left. \`bed\`, \`breakfast\`, \`freeCancellation\`, \`window\`, \`payment\` and \`family\` keep only the rates that meet all of those given; a card, in an app that draws one, still holds every room, with the given filters selected. Without dates it returns the ${v.noun} only, because a room has no price until the nights are known. The ${v.noun} is shown to the guest - as a card, in an app that draws one.${v.hints.hotel ? ` ${v.hints.hotel}` : ''}`,
|
|
98
|
+
annotations: reads(`View one ${catalogue(v, true)}`, open),
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: 'object',
|
|
101
|
+
properties: {
|
|
102
|
+
hotel: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: `The ${v.noun}'s name or id${v.hints.example ? `, e.g. "${v.hints.example}"` : ''}`,
|
|
105
|
+
},
|
|
106
|
+
...stayProps,
|
|
107
|
+
rooms: {
|
|
108
|
+
type: 'integer',
|
|
109
|
+
minimum: 1,
|
|
110
|
+
maximum: MAX_ROOMS_PER_LINE,
|
|
111
|
+
description: `How many rooms of one type, 1 to ${MAX_ROOMS_PER_LINE}. Default 1`,
|
|
112
|
+
},
|
|
113
|
+
bed: {
|
|
114
|
+
type: 'string',
|
|
115
|
+
enum: ['king', 'twin'],
|
|
116
|
+
description: 'With dates: only rooms with this bed - `king` is one large bed (king, queen or double), `twin` is two beds. A room sold as king or twin has both',
|
|
117
|
+
},
|
|
118
|
+
breakfast: {
|
|
119
|
+
type: 'boolean',
|
|
120
|
+
description: 'With dates: only rooms whose rate includes breakfast',
|
|
121
|
+
},
|
|
122
|
+
freeCancellation: {
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
description: 'With dates: only rooms that can be cancelled free',
|
|
125
|
+
},
|
|
126
|
+
window: {
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
description: 'With dates: only rooms with a window (not a partial or an inner one)',
|
|
129
|
+
},
|
|
130
|
+
payment: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
enum: ['at-hotel', 'online'],
|
|
133
|
+
description: 'With dates: only rooms paid at the hotel (`at-hotel`) or in advance online (`online`)',
|
|
134
|
+
},
|
|
135
|
+
family: {
|
|
136
|
+
type: 'boolean',
|
|
137
|
+
description: 'With dates: only rooms that sleep 3 or more',
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
required: ['hotel'],
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
export const lookUpTool = ({ n, v, open, stayProps }) => ({
|
|
144
|
+
name: n.lookUp,
|
|
145
|
+
// ⚠️ THE ONE READING TOOL THAT DRAWS NOTHING. Every other one renders a
|
|
146
|
+
// card on every call, so a model reading up before it answered - list
|
|
147
|
+
// the city, open four hotels, then compare - put six cards in front of
|
|
148
|
+
// the guest for one question (robin, 2026-09-29, Opus in Claude.ai). The
|
|
149
|
+
// reference apps do the same split: search without a card, present with
|
|
150
|
+
// one.
|
|
151
|
+
description: `Reads up to ${LOOK_UP_MAX} ${v.nounPlural} - a \`city\`'s (or a country's), or the ones named in \`${v.nounPlural}\` - and returns them as text, with nothing drawn and nothing shown to the guest: each one's id, area, rating, description and amenities, its add-ons with their ids and prices, and, given \`checkIn\` and \`checkOut\`, its rooms priced for those nights with taxes in. Nothing it reads is shown, so the ${v.nounPlural} of a day-by-day plan - for each part of the trip, those near where its days are spent - can be read up before the plan is drawn; its ids are the ones a comparison and a plan take.`,
|
|
152
|
+
annotations: reads(`Look up ${catalogue(v)}`, open),
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
properties: {
|
|
156
|
+
city: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
description: `A city or a country: its ${v.nounPlural}, up to ${LOOK_UP_MAX}`,
|
|
159
|
+
},
|
|
160
|
+
[v.nounPlural]: {
|
|
161
|
+
type: 'array',
|
|
162
|
+
items: { type: 'string' },
|
|
163
|
+
description: `Up to ${LOOK_UP_MAX} ${v.nounPlural} by name or id; these are read when both are given`,
|
|
164
|
+
},
|
|
165
|
+
...stayProps,
|
|
166
|
+
rooms: {
|
|
167
|
+
type: 'integer',
|
|
168
|
+
minimum: 1,
|
|
169
|
+
maximum: MAX_ROOMS_PER_LINE,
|
|
170
|
+
description: `How many rooms of one type, 1 to ${MAX_ROOMS_PER_LINE}. Default 1`,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
export const listExtrasTool = ({ n, v, open, stayProps }) => ({
|
|
176
|
+
name: n.listExtras,
|
|
177
|
+
description: `What one ${v.noun} offers beside the room: airport transfers, dinners, guided experiences, spa and family add-ons, each with its price and whether it is charged per stay, per person or per night, shown to the guest - as a card, in an app that draws one.`,
|
|
178
|
+
annotations: reads(v.market ? `Add-ons on ${v.brand}` : `${v.brand} add-ons`, open),
|
|
179
|
+
inputSchema: {
|
|
180
|
+
type: 'object',
|
|
181
|
+
properties: {
|
|
182
|
+
hotel: { type: 'string', description: `The ${v.noun}'s name or id` },
|
|
183
|
+
...stayProps,
|
|
184
|
+
booking: {
|
|
185
|
+
type: 'string',
|
|
186
|
+
description: `A booking's confirmation code. The answer is then that booking's ${v.noun}, its add-ons for those nights and how many of each the booking holds`,
|
|
187
|
+
},
|
|
188
|
+
email: {
|
|
189
|
+
type: 'string',
|
|
190
|
+
description: 'The email the booking was made with, when it was made elsewhere',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
export const compareTool = ({ n, v, open, stayProps }) => ({
|
|
196
|
+
name: n.compare,
|
|
197
|
+
// ⚠️ NO PRICES IN, NO PRICES OUT OF THE MODEL. The arguments carry ids and
|
|
198
|
+
// prose; every figure on the card is read off the hotel's own record. A
|
|
199
|
+
// model that could send a price could one day send the wrong one, onto a
|
|
200
|
+
// card that looks official.
|
|
201
|
+
description: `Puts two to four ${v.nounPlural} side by side - as one card, in an app that draws one. Each column's price, rate, cancellation terms, breakfast and rooms left come from the ${v.noun}'s own record; the arguments carry only the ids, one line on who each suits, and its pros and cons. With \`checkIn\`/\`checkOut\` the columns carry each ${v.noun}'s cheapest room for those nights; without them, a from-price.`,
|
|
202
|
+
annotations: reads(`Compare ${catalogue(v)}`, open),
|
|
203
|
+
inputSchema: {
|
|
204
|
+
type: 'object',
|
|
205
|
+
properties: {
|
|
206
|
+
entries: {
|
|
207
|
+
type: 'array',
|
|
208
|
+
minItems: 2,
|
|
209
|
+
maxItems: MAX_COMPARED,
|
|
210
|
+
description: `The ${v.nounPlural} to set beside each other, in the order they should appear`,
|
|
211
|
+
items: {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
hotel: { type: 'string', description: `The ${v.noun}'s name or id` },
|
|
215
|
+
bestFor: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
description: 'One line on who this one suits, in your own words',
|
|
218
|
+
},
|
|
219
|
+
pros: { type: 'array', items: { type: 'string' }, maxItems: MAX_PROS },
|
|
220
|
+
cons: { type: 'array', items: { type: 'string' }, maxItems: MAX_CONS },
|
|
221
|
+
},
|
|
222
|
+
required: ['hotel'],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
recommended: { type: 'string', description: `The one ${v.noun} to mark as the pick` },
|
|
226
|
+
title: { type: 'string', description: 'A heading for the plan' },
|
|
227
|
+
...stayProps,
|
|
228
|
+
},
|
|
229
|
+
required: ['entries'],
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
export const itineraryTool = ({ n, v, open, places, stayProps }) => ({
|
|
233
|
+
name: n.itinerary,
|
|
234
|
+
description: `A day-by-day plan (行程) - one card, in an app that draws one - for a trip of several days, or for days a guest asked to have planned (a city with a span of dates and 行程 is one): the days are laid out by where they are spent, and each part of the trip has a ${v.noun} near those days, chosen from the ${v.nounPlural} read up as text. Each day carries its own label, an optional note, the moments of the day in order, and the ${v.nounPlural} and add-ons attached to it, with their details filled in from their own records - a ${v.noun} with its photograph and, given dates, the price of its nights. Each stay is marked with whether it is booked, in the trip or only in the plan, and the answer says how many of each. Nothing is added to the trip.`,
|
|
235
|
+
annotations: reads(v.market ? `Lay out an itinerary on ${v.brand}` : `Lay out ${aBrandOf(v)} itinerary`, open),
|
|
236
|
+
inputSchema: {
|
|
237
|
+
type: 'object',
|
|
238
|
+
properties: {
|
|
239
|
+
title: { type: 'string', description: 'What to call the trip' },
|
|
240
|
+
days: {
|
|
241
|
+
type: 'array',
|
|
242
|
+
minItems: 1,
|
|
243
|
+
maxItems: MAX_DAYS,
|
|
244
|
+
items: {
|
|
245
|
+
type: 'object',
|
|
246
|
+
properties: {
|
|
247
|
+
label: {
|
|
248
|
+
type: 'string',
|
|
249
|
+
description: `e.g. "Arrive${places[0] ? ` in ${places[0]}` : ''}" - each day's date is printed beside it, so leave the date out`,
|
|
250
|
+
},
|
|
251
|
+
note: {
|
|
252
|
+
type: 'string',
|
|
253
|
+
description: 'One or two lines on the day, in your own words',
|
|
254
|
+
},
|
|
255
|
+
why: {
|
|
256
|
+
type: 'string',
|
|
257
|
+
description: `Why the ${v.noun} named on this day suits the days of that stay - near what, good for what - one sentence, in your own words, with no lead-in such as "My pick:" - the plan has its own`,
|
|
258
|
+
},
|
|
259
|
+
items: {
|
|
260
|
+
type: 'array',
|
|
261
|
+
items: { type: 'string' },
|
|
262
|
+
maxItems: MAX_ITEMS_PER_DAY,
|
|
263
|
+
description: `${v.nounPlural} and add-ons for that day, by name or id`,
|
|
264
|
+
},
|
|
265
|
+
plan: {
|
|
266
|
+
type: 'array',
|
|
267
|
+
maxItems: MAX_MOMENTS,
|
|
268
|
+
description: 'The day in order, in your own words: when, and what happens then. Nothing in it is booked or priced',
|
|
269
|
+
items: {
|
|
270
|
+
type: 'object',
|
|
271
|
+
properties: {
|
|
272
|
+
time: {
|
|
273
|
+
type: 'string',
|
|
274
|
+
description: 'When in the day, e.g. "Afternoon" or "19:00"',
|
|
275
|
+
},
|
|
276
|
+
what: { type: 'string', description: 'What happens then, in a few words' },
|
|
277
|
+
note: { type: 'string', description: 'One line more, optional' },
|
|
278
|
+
},
|
|
279
|
+
required: ['what'],
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
required: ['label'],
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
...stayProps,
|
|
287
|
+
},
|
|
288
|
+
required: ['title', 'days'],
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
export const policiesTool = ({ n, v, open }) => ({
|
|
292
|
+
name: n.policies,
|
|
293
|
+
description: `What one ${v.noun} publishes about cancellation, check-in and check-out, children and extra beds, pets, deposits and accessibility. With \`topic\` it returns that topic; without, all of them.`,
|
|
294
|
+
annotations: reads(v.market ? `${upFirst(v.noun)} policies on ${v.brand}` : `${v.brand} policies`, open),
|
|
295
|
+
inputSchema: {
|
|
296
|
+
type: 'object',
|
|
297
|
+
properties: {
|
|
298
|
+
hotel: { type: 'string', description: `The ${v.noun}'s name or id` },
|
|
299
|
+
topic: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
enum: ['cancellation', 'check-in', 'children', 'pets', 'deposit', 'accessibility'],
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
required: ['hotel'],
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
//# sourceMappingURL=tool-defs-browse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-defs-browse.js","sourceRoot":"","sources":["../../src/tools/tool-defs-browse.ts"],"names":[],"mappings":"AAAA,OAA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OAAO,EAAE,MAAM,CAAC;KAC5B;CACF,CAAU,CAAC;AAEd,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAW,EAAE,EAAE,CACtD,CAAC;IACC,IAAI,EAAE,CAAC,CAAC,QAAQ;IAChB,WAAW,EAAE,YAAY,CAAC,CAAC,IAAI,+KAA+K;IAC9M,WAAW,EAAE,KAAK,CAChB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,EAC9E,IAAI,CACL;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,eAAe,EAAE;YACpE,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC;aACnF;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACF,CAAU,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { ToolEnv } from './tool-env.js';
|
|
2
|
+
export declare const addToTripTool: ({ n, v, open, stayProps }: ToolEnv) => {
|
|
3
|
+
readonly name: `add_to_${string}trip`;
|
|
4
|
+
readonly description: `Puts room nights or an add-on into the trip - a plan kept in this conversation - and returns the whole trip, priced. Nothing in the trip is booked or charged. A room line needs the ${string}, the room type and the dates; \`rooms\` sets how many of that room type. An add-on line needs the ${string} and the add-on. A line is replaced, not stacked: sending the same room and dates again sets that line's room count, and 0 takes it out of the plan.`;
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly readOnlyHint: false;
|
|
8
|
+
readonly destructiveHint: true;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: boolean;
|
|
11
|
+
};
|
|
12
|
+
readonly inputSchema: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly rooms: {
|
|
16
|
+
readonly type: "integer";
|
|
17
|
+
readonly minimum: 0;
|
|
18
|
+
readonly maximum: 5;
|
|
19
|
+
readonly description: "How many of that room type in the plan, 1 to 5. Default 1; 0 takes the line out";
|
|
20
|
+
};
|
|
21
|
+
readonly quantity: {
|
|
22
|
+
readonly type: "integer";
|
|
23
|
+
readonly minimum: 0;
|
|
24
|
+
readonly maximum: 20;
|
|
25
|
+
readonly description: "For an add-on: how many, 1 to 20. Default 1 - or, for an add-on priced per person, everyone in the rooms the trip holds at that hotel (guests per room x rooms; the guests asked for when there is no room yet); 0 removes it";
|
|
26
|
+
};
|
|
27
|
+
readonly checkIn: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
30
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
31
|
+
};
|
|
32
|
+
readonly checkOut: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
35
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
36
|
+
};
|
|
37
|
+
readonly guests: {
|
|
38
|
+
readonly type: "integer";
|
|
39
|
+
readonly minimum: 1;
|
|
40
|
+
readonly maximum: 8;
|
|
41
|
+
readonly description: "People in the room. Default 2";
|
|
42
|
+
};
|
|
43
|
+
readonly hotel: {
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
readonly description: `The ${string}'s name or id`;
|
|
46
|
+
};
|
|
47
|
+
readonly room: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
readonly description: "The room type id or name, as the hotel returned it";
|
|
50
|
+
};
|
|
51
|
+
readonly extra: {
|
|
52
|
+
readonly type: "string";
|
|
53
|
+
readonly description: "The add-on id or name. A line names either this or `room`";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly required: readonly ["hotel"];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const viewTripTool: ({ n, v, open }: ToolEnv) => {
|
|
60
|
+
readonly name: `view_${string}trip`;
|
|
61
|
+
readonly description: "The trip as it stands: every room line and add-on with its own total, the taxes and fees, and the all-in total, laid out day by day (on the card, in an app that draws one).";
|
|
62
|
+
readonly annotations: {
|
|
63
|
+
readonly title: string;
|
|
64
|
+
readonly readOnlyHint: true;
|
|
65
|
+
readonly destructiveHint: false;
|
|
66
|
+
readonly idempotentHint: true;
|
|
67
|
+
readonly openWorldHint: boolean;
|
|
68
|
+
};
|
|
69
|
+
readonly inputSchema: {
|
|
70
|
+
readonly type: "object";
|
|
71
|
+
readonly properties: {};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export declare const clearTripTool: ({ n, v, open }: ToolEnv) => {
|
|
75
|
+
readonly name: `clear_${string}trip`;
|
|
76
|
+
readonly description: "Empties the trip.";
|
|
77
|
+
readonly annotations: {
|
|
78
|
+
readonly title: string;
|
|
79
|
+
readonly readOnlyHint: false;
|
|
80
|
+
readonly destructiveHint: true;
|
|
81
|
+
readonly idempotentHint: true;
|
|
82
|
+
readonly openWorldHint: boolean;
|
|
83
|
+
};
|
|
84
|
+
readonly inputSchema: {
|
|
85
|
+
readonly type: "object";
|
|
86
|
+
readonly properties: {};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export declare const pickRoomTool: ({ n, v, open, stayProps }: ToolEnv) => {
|
|
90
|
+
readonly name: `pick_${string}room`;
|
|
91
|
+
readonly description: "The card's own step when the guest presses Reserve on one rate: the one room being booked, replacing whatever was picked before. It does not touch the trip, which holds the stays an assistant arranges.";
|
|
92
|
+
readonly annotations: {
|
|
93
|
+
readonly title: string;
|
|
94
|
+
readonly readOnlyHint: false;
|
|
95
|
+
readonly destructiveHint: false;
|
|
96
|
+
readonly idempotentHint: true;
|
|
97
|
+
readonly openWorldHint: boolean;
|
|
98
|
+
};
|
|
99
|
+
readonly inputSchema: {
|
|
100
|
+
readonly type: "object";
|
|
101
|
+
readonly properties: {
|
|
102
|
+
readonly rooms: {
|
|
103
|
+
readonly type: "integer";
|
|
104
|
+
readonly minimum: 0;
|
|
105
|
+
readonly maximum: 5;
|
|
106
|
+
readonly description: "How many of that room type, 1 to 5. Default 1; 0 empties the pick";
|
|
107
|
+
};
|
|
108
|
+
readonly checkIn: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
111
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
112
|
+
};
|
|
113
|
+
readonly checkOut: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
116
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
117
|
+
};
|
|
118
|
+
readonly guests: {
|
|
119
|
+
readonly type: "integer";
|
|
120
|
+
readonly minimum: 1;
|
|
121
|
+
readonly maximum: 8;
|
|
122
|
+
readonly description: "People in the room. Default 2";
|
|
123
|
+
};
|
|
124
|
+
readonly hotel: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
readonly description: `The ${string}'s name or id`;
|
|
127
|
+
};
|
|
128
|
+
readonly room: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly description: "The room type id or name, as the hotel returned it";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly required: readonly ["hotel", "room"];
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=tool-defs-trip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-defs-trip.d.ts","sourceRoot":"","sources":["../../src/tools/tool-defs-trip.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAK7C,eAAO,MAAM,aAAa,GAAI,2BAA2B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCnD,CAAC;AAEd,eAAO,MAAM,YAAY,GAAI,gBAAgB,OAAO;;;;;;;;;;;;;;CAOvC,CAAC;AAEd,eAAO,MAAM,aAAa,GAAI,gBAAgB,OAAO;;;;;;;;;;;;;;CAMxC,CAAC;AAEd,eAAO,MAAM,YAAY,GAAI,2BAA2B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BlD,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { MAX_EXTRA_QUANTITY, MAX_ROOMS_PER_LINE } from '../trip.js';
|
|
2
|
+
import { edits, reads, replaces } from './tool-set.js';
|
|
3
|
+
// The tools that keep the trip, and the card's own step that picks one room.
|
|
4
|
+
export const addToTripTool = ({ n, v, open, stayProps }) => ({
|
|
5
|
+
name: n.addToTrip,
|
|
6
|
+
description: `Puts room nights or an add-on into the trip - a plan kept in this conversation - and returns the whole trip, priced. Nothing in the trip is booked or charged. A room line needs the ${v.noun}, the room type and the dates; \`rooms\` sets how many of that room type. An add-on line needs the ${v.noun} and the add-on. A line is replaced, not stacked: sending the same room and dates again sets that line's room count, and 0 takes it out of the plan.`,
|
|
7
|
+
// ⚠️ `replaces`, NOT `edits` (0.79.8, the OpenAI scan of 11-20: "marked destructiveHint: false,
|
|
8
|
+
// but its behavior appears to cause material loss or a hard-to-reverse change"): a line sent
|
|
9
|
+
// again overwrites that line's room count and 0 takes it out - not only additive, which is
|
|
10
|
+
// what `destructiveHint: false` claims. The trip is still only this conversation's plan.
|
|
11
|
+
annotations: replaces(`Add to the ${v.brand} trip`, open),
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
hotel: { type: 'string', description: `The ${v.noun}'s name or id` },
|
|
16
|
+
room: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The room type id or name, as the hotel returned it',
|
|
19
|
+
},
|
|
20
|
+
extra: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The add-on id or name. A line names either this or `room`',
|
|
23
|
+
},
|
|
24
|
+
...stayProps,
|
|
25
|
+
rooms: {
|
|
26
|
+
type: 'integer',
|
|
27
|
+
minimum: 0,
|
|
28
|
+
maximum: MAX_ROOMS_PER_LINE,
|
|
29
|
+
description: `How many of that room type in the plan, 1 to ${MAX_ROOMS_PER_LINE}. Default 1; 0 takes the line out`,
|
|
30
|
+
},
|
|
31
|
+
quantity: {
|
|
32
|
+
type: 'integer',
|
|
33
|
+
minimum: 0,
|
|
34
|
+
maximum: MAX_EXTRA_QUANTITY,
|
|
35
|
+
description: `For an add-on: how many, 1 to ${MAX_EXTRA_QUANTITY}. Default 1 - or, for an add-on priced per person, everyone in the rooms the trip holds at that hotel (guests per room x rooms; the guests asked for when there is no room yet); 0 removes it`,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['hotel'],
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
export const viewTripTool = ({ n, v, open }) => ({
|
|
42
|
+
name: n.viewTrip,
|
|
43
|
+
description: 'The trip as it stands: every room line and add-on with its own total, the taxes and fees, and the all-in total, laid out day by day (on the card, in an app that draws one).',
|
|
44
|
+
annotations: reads(`View the ${v.brand} trip`, open),
|
|
45
|
+
inputSchema: { type: 'object', properties: {} },
|
|
46
|
+
});
|
|
47
|
+
export const clearTripTool = ({ n, v, open }) => ({
|
|
48
|
+
name: n.clearTrip,
|
|
49
|
+
description: 'Empties the trip.',
|
|
50
|
+
annotations: replaces(`Clear the ${v.brand} trip`, open),
|
|
51
|
+
inputSchema: { type: 'object', properties: {} },
|
|
52
|
+
});
|
|
53
|
+
export const pickRoomTool = ({ n, v, open, stayProps }) => ({
|
|
54
|
+
// ⚠️ THE CARD'S, NEVER THE MODEL'S (`ui.visibility: ['app']`, server.ts):
|
|
55
|
+
// the press on Reserve. The picked room is a slot of its own beside the
|
|
56
|
+
// trip (`pickedKey`) - this never reads or writes the trip.
|
|
57
|
+
name: n.pickRoom,
|
|
58
|
+
description: "The card's own step when the guest presses Reserve on one rate: the one room being booked, replacing whatever was picked before. It does not touch the trip, which holds the stays an assistant arranges.",
|
|
59
|
+
annotations: edits(`Pick ${v.article ?? (/^[AEIOU]/i.test(v.brand) ? 'an' : 'a')} ${v.brand} room`, open),
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
hotel: { type: 'string', description: `The ${v.noun}'s name or id` },
|
|
64
|
+
room: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'The room type id or name, as the hotel returned it',
|
|
67
|
+
},
|
|
68
|
+
...stayProps,
|
|
69
|
+
rooms: {
|
|
70
|
+
type: 'integer',
|
|
71
|
+
minimum: 0,
|
|
72
|
+
maximum: MAX_ROOMS_PER_LINE,
|
|
73
|
+
description: `How many of that room type, 1 to ${MAX_ROOMS_PER_LINE}. Default 1; 0 empties the pick`,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
required: ['hotel', 'room'],
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=tool-defs-trip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-defs-trip.js","sourceRoot":"","sources":["../../src/tools/tool-defs-trip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEvD,6EAA6E;AAE7E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,SAA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AAkB,iCAAiC;aACrG;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;KAC5B;CACF,CAAU,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ToolNames } from '../config.js';
|
|
2
|
+
import type { Vocabulary } from '../vocab.js';
|
|
3
|
+
/** What every tool's definition is built from. */
|
|
4
|
+
export type ToolEnv = ReturnType<typeof toolEnv>;
|
|
5
|
+
/** The names, the words of this deployment, and the parts the definitions share. */
|
|
6
|
+
export declare const toolEnv: (n: ToolNames, v: Vocabulary) => {
|
|
7
|
+
n: ToolNames;
|
|
8
|
+
v: Vocabulary;
|
|
9
|
+
open: boolean;
|
|
10
|
+
places: string[];
|
|
11
|
+
stayProps: {
|
|
12
|
+
readonly checkIn: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
15
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
16
|
+
};
|
|
17
|
+
readonly checkOut: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly pattern: "^\\d{4}-\\d{2}-\\d{2}$";
|
|
20
|
+
readonly description: `${string}, as YYYY-MM-DD`;
|
|
21
|
+
};
|
|
22
|
+
readonly guests: {
|
|
23
|
+
readonly type: "integer";
|
|
24
|
+
readonly minimum: 1;
|
|
25
|
+
readonly maximum: 8;
|
|
26
|
+
readonly description: "People in the room. Default 2";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
guestProps: {
|
|
30
|
+
readonly name: {
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
readonly description: "The guest's full name, as it should appear on the booking";
|
|
33
|
+
};
|
|
34
|
+
readonly email: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
readonly description: "The email the confirmation goes to";
|
|
37
|
+
};
|
|
38
|
+
readonly phone: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly description: "Optional";
|
|
41
|
+
};
|
|
42
|
+
readonly requests: {
|
|
43
|
+
readonly type: "array";
|
|
44
|
+
readonly items: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly enum: import("../types.js").RoomRequestKind[];
|
|
47
|
+
};
|
|
48
|
+
readonly description: "Preferences the desk tries to meet on the day. None of them is held; the answer says so";
|
|
49
|
+
};
|
|
50
|
+
readonly arrivingAt: {
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
readonly description: "What time the guest reaches the hotel, `HH:MM` on the hotel's own clock. A time counts as a late arrival on its own";
|
|
53
|
+
};
|
|
54
|
+
readonly notes: {
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
readonly description: "Anything else for the desk, in the guest's own words, up to 200 characters";
|
|
57
|
+
};
|
|
58
|
+
readonly rememberRequests: {
|
|
59
|
+
readonly type: "boolean";
|
|
60
|
+
readonly description: "True when the guest asked for these room preferences to be remembered for their next stays. Needs a signed-in member; what is kept is the lasting kind - a bed type, a floor, a quiet or connecting room; an accessible room is asked for on each stay and is not kept";
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=tool-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-env.d.ts","sourceRoot":"","sources":["../../src/tools/tool-env.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,kDAAkD;AAClD,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;AAEjD,oFAAoF;AACpF,eAAO,MAAM,OAAO,GAAI,GAAG,SAAS,EAAE,GAAG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDlD,CAAC"}
|