@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 @@
|
|
|
1
|
+
{"version":3,"file":"tool-set.d.ts","sourceRoot":"","sources":["../../src/tools/tool-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA4B9C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,WAAW,OAAO;;;;;;CAO1C,CAAC;AAEd,kFAAkF;AAClF,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,WAAW,OAAO;;;;;;CAO1C,CAAC;AAEd;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,EAAE,WAAW,OAAO;;;;;;CAO7C,CAAC;AAEd,qGAAqG;AACrG,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,WAAW,OAAO;;;;;;CAO1C,CAAC;AAEd;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,EAAE,WAAW,OAAO;;;;;;CAO3C,CAAC;AAEd,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,EAAE,WAAW,OAAO;;;;;;CAO5C,CAAC;AAId,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM;;;;CAKpB,CAAC;AAEd,+GAA+G;AAC/G,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACrB,GAAG,SAAS,EACZ,GAAG,UAAU,EACb,OAAM,mBAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ookingGuestFields, bookingsAndCancelWords, readOnlyList, tonightHomeList, withCoupons, withHourlyRooms, withoutExtras, } from './capability-adjust.js';
|
|
4
|
+
import { HOME_LIST_MAX } from './current-trip.js';
|
|
5
|
+
// The eleven things a guest can do: find hotels, look at one on dates, see what
|
|
6
|
+
// else it offers, build a trip, ask for the rooms, and deal with a booking they
|
|
7
|
+
// already have.
|
|
8
|
+
//
|
|
9
|
+
// ⚠️ TOOL DESCRIPTIONS SAY WHAT A TOOL DOES AND NOTHING ELSE. No "always call
|
|
10
|
+
// X first", no "do not use web search", no rules about the model's behaviour.
|
|
11
|
+
// That is not style: the directory listings both attest that "tool descriptions
|
|
12
|
+
// contain no instructions about model behavior, other tools, or external
|
|
13
|
+
// instruction sources", and the shopping connector had to move nine
|
|
14
|
+
// descriptions' worth of guidance into the server instructions on 2026-09-17 to
|
|
15
|
+
// make that attestation true. This package starts there. Behaviour lives in
|
|
16
|
+
// surface.ts, and `tool-descriptions.test.ts` holds the line.
|
|
17
|
+
/**
|
|
18
|
+
* Annotations, every hint stated, and each one true of the code.
|
|
19
|
+
*
|
|
20
|
+
* OpenAI's review rejected the shopping app's v1.0.0 over exactly this - an
|
|
21
|
+
* absent `idempotentHint` reads as null, and `openWorldHint: false` was a claim
|
|
22
|
+
* the code could not support. So: reads are reads, the trip tools write OUR
|
|
23
|
+
* state and say so, and `openWorldHint` follows where the rooms actually come
|
|
24
|
+
* from - false while this serves a local demonstration file, true once a
|
|
25
|
+
* deployment points at the group's own booking system, which answers with
|
|
26
|
+
* whatever it says at that moment.
|
|
27
|
+
*/
|
|
28
|
+
export const reads = (title, openWorld) => ({
|
|
29
|
+
title,
|
|
30
|
+
readOnlyHint: true,
|
|
31
|
+
destructiveHint: false,
|
|
32
|
+
idempotentHint: true,
|
|
33
|
+
openWorldHint: openWorld,
|
|
34
|
+
});
|
|
35
|
+
/** Changes the trip we hold for this conversation. Nothing at the hotel moves. */
|
|
36
|
+
export const edits = (title, openWorld) => ({
|
|
37
|
+
title,
|
|
38
|
+
readOnlyHint: false,
|
|
39
|
+
destructiveHint: false,
|
|
40
|
+
idempotentHint: true,
|
|
41
|
+
openWorldHint: openWorld,
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Writes over something that was there - the whole trip, or a booking's nights.
|
|
45
|
+
* Repeating it changes nothing more, but what it replaced is gone (2026-10-05
|
|
46
|
+
* audit, P3: these two said `destructiveHint: false`).
|
|
47
|
+
*/
|
|
48
|
+
export const replaces = (title, openWorld) => ({
|
|
49
|
+
title,
|
|
50
|
+
readOnlyHint: false,
|
|
51
|
+
destructiveHint: true,
|
|
52
|
+
idempotentHint: true,
|
|
53
|
+
openWorldHint: openWorld,
|
|
54
|
+
});
|
|
55
|
+
/** Asks the hotel to hold rooms. Takes no money, and undoing it is what the cancel tools are for. */
|
|
56
|
+
export const books = (title, openWorld) => ({
|
|
57
|
+
title,
|
|
58
|
+
readOnlyHint: false,
|
|
59
|
+
destructiveHint: false,
|
|
60
|
+
idempotentHint: false,
|
|
61
|
+
openWorldHint: openWorld,
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Places an order with the hotel's group - a booking, or the guest's agreement that sends it
|
|
65
|
+
* (0.75.0, T3). `destructiveHint: true`: OpenAI's rule gives it to "an irreversible send or a
|
|
66
|
+
* transaction", and that the group lets a booking be cancelled afterwards is not a reason to
|
|
67
|
+
* say false. Not idempotent: a second call is a second order.
|
|
68
|
+
*/
|
|
69
|
+
export const orders = (title, openWorld) => ({
|
|
70
|
+
title,
|
|
71
|
+
readOnlyHint: false,
|
|
72
|
+
destructiveHint: true,
|
|
73
|
+
idempotentHint: false,
|
|
74
|
+
openWorldHint: openWorld,
|
|
75
|
+
});
|
|
76
|
+
export const cancels = (title, openWorld) => ({
|
|
77
|
+
title,
|
|
78
|
+
readOnlyHint: false,
|
|
79
|
+
destructiveHint: true,
|
|
80
|
+
idempotentHint: true,
|
|
81
|
+
openWorldHint: openWorld,
|
|
82
|
+
});
|
|
83
|
+
// ⚠️ THE SHAPE IS IN THE SCHEMA, not only in the words (2026-10-05 audit, P2):
|
|
84
|
+
// a date, a count of rooms and a number of guests each say what they may be.
|
|
85
|
+
export const DATE = (what) => ({
|
|
86
|
+
type: 'string',
|
|
87
|
+
pattern: '^\\d{4}-\\d{2}-\\d{2}$',
|
|
88
|
+
description: `${what}, as YYYY-MM-DD`,
|
|
89
|
+
});
|
|
90
|
+
/** How many ${nounPlural} one look-up reads - a city's worth, and what a comparison can hold and then some. */
|
|
91
|
+
export const LOOK_UP_MAX = 6;
|
|
92
|
+
/**
|
|
93
|
+
* The tools this deployment offers: every tool, less the ones its backend
|
|
94
|
+
* cannot do, and with the descriptions of the rest saying only what is true
|
|
95
|
+
* of it - see `BackendCapabilities`.
|
|
96
|
+
*/
|
|
97
|
+
export const buildTools = (n, v, caps = FULL_CAPABILITIES) => forCapabilities(allTools(n, v), n, v, caps);
|
|
98
|
+
/** The list tool's sentence on what it answers asked with no place - every deployment's. */
|
|
99
|
+
export const PLACES_SENTENCE = /Asked with no place[\s\S]*?themselves\. /;
|
|
100
|
+
/** The same, where a list without dates is priced for tonight (`listsTonight`) - see `tonightHomeSentence`. */
|
|
101
|
+
const TONIGHT_HOME_SENTENCE = /Asked with no place, it answers with the cities[\s\S]*?asked to see every one\. /;
|
|
102
|
+
/**
|
|
103
|
+
* The most hotels a list priced for tonight by default holds on one page
|
|
104
|
+
* (`listsTonight`, 0.75.1, 总线程 11-18): every one is a price asked of the group - two
|
|
105
|
+
* calls, and its products - so a guest who named no nights waits for twelve at most, and
|
|
106
|
+
* the rest come with the next page. A `limit` above it is taken as this.
|
|
107
|
+
*/
|
|
108
|
+
export const TONIGHT_PAGE_MAX = 12;
|
|
109
|
+
/**
|
|
110
|
+
* What the list tool answers asked with no place, where a list without dates is priced
|
|
111
|
+
* for tonight and there are too many hotels for one page (Huazhu's production, 88 on
|
|
112
|
+
* 2026-11-18): the cities to choose from - the home - and never `all` for it.
|
|
113
|
+
*/
|
|
114
|
+
export const tonightHomeSentence = (v) => `Asked with no place, it answers with the cities to choose from, each with how many ${v.nounPlural} it has: that is the home, for a guest who has not said where. Any list here without dates - a city, words, a brand or a filter - is priced for tonight, a page at a time; \`all\` lists every ${v.noun} itself the same way, for a guest who asked to see every one. `;
|
|
115
|
+
/**
|
|
116
|
+
* The list tool where the deployment is one hotel in all (2026-10-15, Huazhu's
|
|
117
|
+
* test system): asked with no place it answers with that hotel's page, not
|
|
118
|
+
* with places to choose from - and says so, or the model offers to look in
|
|
119
|
+
* another city (three smoke runs did). Where it is a few (`HOME_LIST_MAX`,
|
|
120
|
+
* Huazhu's production, 2026-10-30), asked with no place it lists all of them.
|
|
121
|
+
* Never in a market.
|
|
122
|
+
*
|
|
123
|
+
* ⚠️ `all` SAYS SO TOO (0.51.1): its "true lists the hotels themselves" is
|
|
124
|
+
* what had the model open Huazhu's production with `all: true` - the one way
|
|
125
|
+
* past the home, with no tonight and no prices. It is the home there now, and
|
|
126
|
+
* its description says it changes nothing.
|
|
127
|
+
*/
|
|
128
|
+
export const homeListing = (t, brand, count) => {
|
|
129
|
+
const v = brand.vocab;
|
|
130
|
+
if (t.name !== brand.tools.listHotels || v.market || count < 1 || count > HOME_LIST_MAX)
|
|
131
|
+
return t;
|
|
132
|
+
const home = count === 1 ? `it answers with that ${v.noun}'s own page` : 'it lists every one of them';
|
|
133
|
+
const one = `This deployment has ${count === 1 ? `ONE ${v.noun} in all` : `only a few ${v.nounPlural}`}: asked with no place, or with \`all\`, ${home}; any list here without dates is priced for tonight; and there is no other ${v.noun} or city to list or search. `;
|
|
134
|
+
// The places sentence as every deployment has it, or as one priced for tonight has it
|
|
135
|
+
// (`tonightHomeSentence`): either way, this one is said instead.
|
|
136
|
+
const places = new RegExp(`${TONIGHT_HOME_SENTENCE.source}|${PLACES_SENTENCE.source}`);
|
|
137
|
+
const schema = t.inputSchema;
|
|
138
|
+
const all = schema?.properties?.all;
|
|
139
|
+
return {
|
|
140
|
+
...t,
|
|
141
|
+
description: places.test(t.description)
|
|
142
|
+
? t.description.replace(places, one)
|
|
143
|
+
: `${one}${t.description}`,
|
|
144
|
+
...(schema && all
|
|
145
|
+
? {
|
|
146
|
+
inputSchema: {
|
|
147
|
+
...schema,
|
|
148
|
+
properties: {
|
|
149
|
+
...schema.properties,
|
|
150
|
+
all: {
|
|
151
|
+
...all,
|
|
152
|
+
description: `Changes nothing here: with ${count === 1 ? `one ${v.noun} in all` : `only a few ${v.nounPlural}`}, asked with no place ${home} either way`,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
}
|
|
157
|
+
: {}),
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/** The tool names a backend with these capabilities leaves out. */
|
|
161
|
+
export const withheldTools = (n, caps) => new Set([
|
|
162
|
+
...(caps.members ? [] : [n.signIn, n.signOut, n.forgetPreferences, n.memberCard]),
|
|
163
|
+
...(caps.extras ? [] : [n.listExtras]),
|
|
164
|
+
...(caps.changes || caps.extras ? [] : [n.previewChange, n.changeBooking]),
|
|
165
|
+
...(caps.policies === false ? [n.policies] : []),
|
|
166
|
+
...(caps.unionpay ? [] : [n.payWithUnionPay]),
|
|
167
|
+
// The group's own checkout (Otaless 0.63.0): the card's agreement to its
|
|
168
|
+
// terms, a paid booking's refund, and the add-ons after a booking - each
|
|
169
|
+
// listed only where the backend says it has them, and never where nothing
|
|
170
|
+
// can be booked.
|
|
171
|
+
...(caps.groupCheckout && !caps.readOnly ? [] : [n.acceptTerms]),
|
|
172
|
+
// ⚠️ NO REFUND TOOL BESIDE CANCEL (0.74.2, robin 11-17: 「这个申请退款和取消有什么区别,应该留
|
|
173
|
+
// 一个取消就好了吧」): a paid booking's money is asked back by cancelling it (`caps.refunds`
|
|
174
|
+
// now says that), so a guest - or a model - never has two ways out of one booking.
|
|
175
|
+
n.refundBooking,
|
|
176
|
+
...(caps.addons && !caps.readOnly ? [] : [n.listBookingAddons, n.addBookingAddon]),
|
|
177
|
+
// The add-on shop (`capabilities.shop`, docs §17.6): its listing where the deployment has it, and
|
|
178
|
+
// its buy tool only where buying is open too. The names exist only with `data.otaless.shop`.
|
|
179
|
+
...(n.listShopItems && !(caps.shop && !caps.readOnly) ? [n.listShopItems] : []),
|
|
180
|
+
...(n.buyShopItem && !(caps.shop && caps.shopBuy && !caps.readOnly) ? [n.buyShopItem] : []),
|
|
181
|
+
// The account's value-added service orders (0.84.1): where the shop's listing is.
|
|
182
|
+
...(n.listShopOrders && !(caps.shop && !caps.readOnly) ? [n.listShopOrders] : []),
|
|
183
|
+
// The card's own add-ons tool (0.82.0): only where the hotel's add-ons or the shop are on.
|
|
184
|
+
...(n.cardAddons && !((caps.addons || caps.shop) && !caps.readOnly) ? [n.cardAddons] : []),
|
|
185
|
+
// Nothing can be booked here yet (`readOnly`, Otaless 2026-11-03): no tool
|
|
186
|
+
// that books, finds, changes or cancels a booking - the card's own two
|
|
187
|
+
// for Reserve included, so no button that books is drawn.
|
|
188
|
+
...(caps.readOnly
|
|
189
|
+
? [
|
|
190
|
+
n.requestBooking,
|
|
191
|
+
n.pickRoom,
|
|
192
|
+
n.bookPicked,
|
|
193
|
+
n.listBookings,
|
|
194
|
+
n.previewCancellation,
|
|
195
|
+
n.cancelBooking,
|
|
196
|
+
n.previewChange,
|
|
197
|
+
n.changeBooking,
|
|
198
|
+
n.payWithUnionPay,
|
|
199
|
+
]
|
|
200
|
+
: []),
|
|
201
|
+
]);
|
|
202
|
+
/**
|
|
203
|
+
* Orders are the ACCOUNT'S (Otaless, 0.75.0 T5/T6): the group's own checkout with booking on.
|
|
204
|
+
* A booking is found by the account that made it - never by a confirmation code and the email
|
|
205
|
+
* it was made with - and what it sends the group is the guest's name, phone, email, dates and
|
|
206
|
+
* rooms and nothing else (no requests, arrival time or notes). So no tool lists an `email` to
|
|
207
|
+
* find one, nor a field the order has nowhere to carry. (`groupCheckout` is only ever Otaless's.)
|
|
208
|
+
*/
|
|
209
|
+
export const ordersByAccount = (caps) => !!caps.groupCheckout && !caps.readOnly;
|
|
210
|
+
/**
|
|
211
|
+
* What to tell a guest who wants to book where nothing can be booked yet
|
|
212
|
+
* (`capabilities.readOnly`) - the same words in the instructions and in each
|
|
213
|
+
* answer that would otherwise say how to book.
|
|
214
|
+
*/
|
|
215
|
+
export const readOnlyWords = (v) => `Nothing can be booked through ${v.brand} yet: it shows ${v.noun}s, rooms and prices only. When the guest wants to book, say so plainly - nothing is booked or held - and suggest booking with the ${v.noun}'s own group directly, on its website or app, with the ${v.noun}, room and dates from here.`;
|
|
216
|
+
/**
|
|
217
|
+
* Said with every price where nothing can be booked yet (`capabilities.readOnly`;
|
|
218
|
+
* 总线程 11-09, Manus on Otaless after 0.59.0): asked for a hotel's rooms after a
|
|
219
|
+
* comparison, the model answered from the comparison - which said nothing of
|
|
220
|
+
* it - and called them "两种可订房型", with nowhere to book. On a list, a hotel's
|
|
221
|
+
* page, a comparison and a plan, in the text and, word for word, in the
|
|
222
|
+
* structure (`notBookable`); what `readOnlyWords` tells it to do when the guest
|
|
223
|
+
* asks to book, in one sentence.
|
|
224
|
+
*/
|
|
225
|
+
export const notBookableWords = (v) => `Nothing can be booked through ${v.brand} yet: never call a ${v.noun}, room or rate here bookable (可订) - to book, the guest uses the ${v.noun}'s own group, on its website or app, with the ${v.noun}, room and dates from here.`;
|
|
226
|
+
const forCapabilities = (tools, n, v, caps) => {
|
|
227
|
+
const withheld = withheldTools(n, caps);
|
|
228
|
+
return tools
|
|
229
|
+
.filter((t) => !withheld.has(t.name))
|
|
230
|
+
.map((t) => {
|
|
231
|
+
const c = { t, n, v, caps };
|
|
232
|
+
let out = t;
|
|
233
|
+
out = tonightHomeList(out, c);
|
|
234
|
+
out = readOnlyList(out, c);
|
|
235
|
+
out = withoutExtras(out, c);
|
|
236
|
+
out = withHourlyRooms(out, c);
|
|
237
|
+
out = withCoupons(out, c);
|
|
238
|
+
out = bookingGuestFields(out, c);
|
|
239
|
+
out = accountOrders(out, c);
|
|
240
|
+
out = bookingsAndCancelWords(out, c);
|
|
241
|
+
return out;
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=tool-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-set.js","sourceRoot":"","sources":["../../src/tools/tool-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAG5E,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAEL,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,gFAAgF;AAChF,gFAAgF;AAChF,gBAAgB;AAChB,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,yEAAyE;AACzE,oEAAoE;AACpE,gFAAgF;AAChF,4EAA4E;AAC5E,8DAA8D;AAE9D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,SAAkB,EAAE,EAAE,CACzD,CAAC;IACC,KAAK;IACL,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,SAAS;CACzB,CAAU,CAAC;AAEd,kFAAkF;AAClF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,SAAkB,EAAE,EAAE,CACzD,CAAC;IACC,KAAK;IACL,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,SAAS;CACzB,CAAU,CAAC;AAEd;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,SAAkB,EAAE,EAAE,CAC5D,CAAC;IACC,KAAK;I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C;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAI5C,eAAO,MAAM,cAAc,GAAU,0BAA0B,QAAQ,KAAG,OAAO,CAAC,UAAU,CAE3F,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { currentTrip } from './current-trip.js';
|
|
2
|
+
import { couponOf } from './pricing.js';
|
|
3
|
+
import { identity } from './session-notes.js';
|
|
4
|
+
export const answerViewTrip = async ({ deps, args, ctx, key }) => {
|
|
5
|
+
return currentTrip(deps, key, identity(deps, ctx, key), key, couponOf(deps, args), ctx);
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=view-trip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-trip.js","sourceRoot":"","sources":["../../src/tools/view-trip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAY,EAAuB,EAAE;IAC9F,OAAO,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1F,CAAC,CAAC"}
|