@curless/hotel-storefront 0.75.0 → 0.75.2
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/account/index.d.ts +12 -3
- package/dist/account/index.d.ts.map +1 -1
- package/dist/account/index.js +38 -1
- package/dist/account/index.js.map +1 -1
- package/dist/account/member-login.d.ts +6 -1
- package/dist/account/member-login.d.ts.map +1 -1
- package/dist/account/member-login.js +1 -1
- package/dist/account/member-login.js.map +1 -1
- package/dist/backend.d.ts +21 -1
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js.map +1 -1
- 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/choices.d.ts +16 -17
- package/dist/choices.d.ts.map +1 -1
- package/dist/choices.js +18 -43
- package/dist/choices.js.map +1 -1
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/huazhu/backend.d.ts +16 -1
- package/dist/huazhu/backend.d.ts.map +1 -1
- package/dist/huazhu/backend.js +39 -4
- package/dist/huazhu/backend.js.map +1 -1
- package/dist/huazhu/catalog.d.ts +9 -1
- package/dist/huazhu/catalog.d.ts.map +1 -1
- package/dist/huazhu/catalog.js +33 -3
- package/dist/huazhu/catalog.js.map +1 -1
- package/dist/huazhu/english.d.ts +12 -1
- package/dist/huazhu/english.d.ts.map +1 -1
- package/dist/huazhu/english.js +55 -4
- package/dist/huazhu/english.js.map +1 -1
- package/dist/huazhu/make.d.ts.map +1 -1
- package/dist/huazhu/make.js +14 -0
- package/dist/huazhu/make.js.map +1 -1
- package/dist/legal.d.ts.map +1 -1
- package/dist/legal.js +7 -6
- package/dist/legal.js.map +1 -1
- package/dist/otaless/backend.d.ts +6 -0
- package/dist/otaless/backend.d.ts.map +1 -1
- package/dist/otaless/backend.js +86 -7
- package/dist/otaless/backend.js.map +1 -1
- package/dist/otaless/booking.d.ts +29 -7
- package/dist/otaless/booking.d.ts.map +1 -1
- package/dist/otaless/booking.js +179 -34
- package/dist/otaless/booking.js.map +1 -1
- package/dist/present.d.ts.map +1 -1
- package/dist/present.js +3 -5
- package/dist/present.js.map +1 -1
- package/dist/server.d.ts +21 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +340 -24
- package/dist/server.js.map +1 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +30 -13
- package/dist/surface.js.map +1 -1
- package/dist/tools.d.ts +18 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +166 -78
- package/dist/tools.js.map +1 -1
- package/dist/trip-ids.d.ts +44 -0
- package/dist/trip-ids.d.ts.map +1 -1
- package/dist/trip-ids.js +105 -1
- package/dist/trip-ids.js.map +1 -1
- package/dist/types.d.ts +16 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/tools.d.ts
CHANGED
|
@@ -1119,7 +1119,13 @@ export declare const buildTools: (n: ToolNames, v: Vocabulary, caps?: BackendCap
|
|
|
1119
1119
|
readonly required: readonly ["booking", "addon"];
|
|
1120
1120
|
};
|
|
1121
1121
|
})[];
|
|
1122
|
-
/**
|
|
1122
|
+
/**
|
|
1123
|
+
* The most hotels a list priced for tonight by default holds on one page
|
|
1124
|
+
* (`listsTonight`, 0.75.1, 总线程 11-18): every one is a price asked of the group - two
|
|
1125
|
+
* calls, and its products - so a guest who named no nights waits for twelve at most, and
|
|
1126
|
+
* the rest come with the next page. A `limit` above it is taken as this.
|
|
1127
|
+
*/
|
|
1128
|
+
export declare const TONIGHT_PAGE_MAX = 12;
|
|
1123
1129
|
/**
|
|
1124
1130
|
* The list tool where the deployment is one hotel in all (2026-10-15, Huazhu's
|
|
1125
1131
|
* test system): asked with no place it answers with that hotel's page, not
|
|
@@ -1300,6 +1306,11 @@ export type ToolContext = {
|
|
|
1300
1306
|
* answer is as it always was.
|
|
1301
1307
|
*/
|
|
1302
1308
|
noCards?: boolean;
|
|
1309
|
+
/**
|
|
1310
|
+
* The list asking itself again for tonight, nights nobody named (`listsTonight`): the
|
|
1311
|
+
* backend prices the page alone (`SearchAsked.pricePageOnly`). Set by the list alone.
|
|
1312
|
+
*/
|
|
1313
|
+
pricePageOnly?: true;
|
|
1303
1314
|
/**
|
|
1304
1315
|
* The caller is the server's own one-time terms page, which needs the terms'
|
|
1305
1316
|
* `ref` and text in the answer's `meta` whatever the client is (it never
|
|
@@ -1630,6 +1641,12 @@ export declare const NOTE_PASSED = "A note from the guest was passed to the hote
|
|
|
1630
1641
|
* the structure (2026-10-28). Listed and marked as the group sells them; the
|
|
1631
1642
|
* card says no more than 预付 on them (robin, 2026-10-30), so the assistant is
|
|
1632
1643
|
* the one who knows - and says it when the guest wants one.
|
|
1644
|
+
*
|
|
1645
|
+
* ⚠️ WHEN THE GUEST WANTS ONE, NEVER BEFORE (0.75.1, robin 11-18 on 华住生产: 「这两段话去掉
|
|
1646
|
+
* 吧,预订按钮给我加上,但是跳转的时候再提示暂时还不能预订」): a list or a page says nothing of
|
|
1647
|
+
* it - no sentence first, no "not booked here" on a price (0.65.0 said it before anything was
|
|
1648
|
+
* chosen). The card says it when Reserve is pressed; the assistant when the guest asks to
|
|
1649
|
+
* book one, or when it goes to book one (and the booking is refused, with the same ways on).
|
|
1633
1650
|
*/
|
|
1634
1651
|
export declare const notSoldHereWords: (group: string) => string;
|
|
1635
1652
|
/**
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,KAAK,mBAAmB,EAazB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAa1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiB7C,OAAO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,OAAO,CAAA;CAAE,CAAC,GAAG,SA2qDC,CAAC;AAE5C,eAAO,MAAM,UAAU,GACrB,MAAM,QAAQ,EACd,MAAM,MAAM,EACZ,SAAS,OAAO,EAChB,KAAK,WAAW,KACf,OAAO,CAAC,UAAU,CAsDpB,CAAC;AAsBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,oPACuN,CAAC;AAEpP;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,2aAC+Y,CAAC;AAE3a,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,kOACgM,CAAC;AAElO;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;;;CAKV,CAAC;AAEX;;;;;;GAMG;AACH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAMrC,eAAO,MAAM,cAAc,gxBAA8xB,CAAC"}
|
package/dist/tools.js
CHANGED
|
@@ -111,6 +111,23 @@ export const LOOK_UP_MAX = 6;
|
|
|
111
111
|
*/
|
|
112
112
|
export const buildTools = (n, v, caps = FULL_CAPABILITIES) => forCapabilities(allTools(n, v), n, v, caps);
|
|
113
113
|
/** The tool names a backend with these capabilities leaves out. */
|
|
114
|
+
/** The list tool's sentence on what it answers asked with no place - every deployment's. */
|
|
115
|
+
const PLACES_SENTENCE = /Asked with no place[\s\S]*?themselves\. /;
|
|
116
|
+
/** The same, where a list without dates is priced for tonight (`listsTonight`) - see `tonightHomeSentence`. */
|
|
117
|
+
const TONIGHT_HOME_SENTENCE = /Asked with no place, it answers with the cities[\s\S]*?asked to see every one\. /;
|
|
118
|
+
/**
|
|
119
|
+
* The most hotels a list priced for tonight by default holds on one page
|
|
120
|
+
* (`listsTonight`, 0.75.1, 总线程 11-18): every one is a price asked of the group - two
|
|
121
|
+
* calls, and its products - so a guest who named no nights waits for twelve at most, and
|
|
122
|
+
* the rest come with the next page. A `limit` above it is taken as this.
|
|
123
|
+
*/
|
|
124
|
+
export const TONIGHT_PAGE_MAX = 12;
|
|
125
|
+
/**
|
|
126
|
+
* What the list tool answers asked with no place, where a list without dates is priced
|
|
127
|
+
* for tonight and there are too many hotels for one page (Huazhu's production, 88 on
|
|
128
|
+
* 2026-11-18): the cities to choose from - the home - and never `all` for it.
|
|
129
|
+
*/
|
|
130
|
+
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. `;
|
|
114
131
|
/**
|
|
115
132
|
* The list tool where the deployment is one hotel in all (2026-10-15, Huazhu's
|
|
116
133
|
* test system): asked with no place it answers with that hotel's page, not
|
|
@@ -130,7 +147,9 @@ export const homeListing = (t, brand, count) => {
|
|
|
130
147
|
return t;
|
|
131
148
|
const home = count === 1 ? `it answers with that ${v.noun}'s own page` : 'it lists every one of them';
|
|
132
149
|
const one = `This deployment has ${count === 1 ? 'ONE' : count} ${count === 1 ? v.noun : v.nounPlural} in all: 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. `;
|
|
133
|
-
|
|
150
|
+
// The places sentence as every deployment has it, or as one priced for tonight has it
|
|
151
|
+
// (`tonightHomeSentence`): either way, this one is said instead.
|
|
152
|
+
const places = new RegExp(`${TONIGHT_HOME_SENTENCE.source}|${PLACES_SENTENCE.source}`);
|
|
134
153
|
const schema = t.inputSchema;
|
|
135
154
|
const all = schema?.properties?.all;
|
|
136
155
|
return {
|
|
@@ -224,6 +243,32 @@ const forCapabilities = (tools, n, v, caps) => {
|
|
|
224
243
|
.filter((t) => !withheld.has(t.name))
|
|
225
244
|
.map((t) => {
|
|
226
245
|
let out = t;
|
|
246
|
+
// ⚠️ A BIG DEPLOYMENT PRICED FOR TONIGHT HAS A HOME OF CITIES, AND `all` IS NOT IT
|
|
247
|
+
// (robin 11-18, 华住生产 at 88 hotels: 「华住首页改成城市选择的吧」 - and a list of all 88,
|
|
248
|
+
// 「选好日期看价格」 on each, was not what opening Huazhu should be). The sentence a
|
|
249
|
+
// deployment of a few has instead is `homeListing`'s, which replaces this one.
|
|
250
|
+
if (caps.listsTonight && !v.market && t.name === n.listHotels) {
|
|
251
|
+
const schema = out.inputSchema;
|
|
252
|
+
const all = schema?.properties?.all;
|
|
253
|
+
out = {
|
|
254
|
+
...out,
|
|
255
|
+
description: out.description.replace(PLACES_SENTENCE, tonightHomeSentence(v)),
|
|
256
|
+
...(schema && all
|
|
257
|
+
? {
|
|
258
|
+
inputSchema: {
|
|
259
|
+
...schema,
|
|
260
|
+
properties: {
|
|
261
|
+
...schema.properties,
|
|
262
|
+
all: {
|
|
263
|
+
...all,
|
|
264
|
+
description: `True lists every ${v.noun} itself, a page at a time - only for a guest who asked to see every one. With nothing named the answer is the cities to choose from, and \`all\` is not the way to it`,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
}
|
|
269
|
+
: {}),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
227
272
|
// ⚠️ NOTHING TO BOOK, SO NO "TO BOOK" (2026-11-09 audit, T3): a read-only
|
|
228
273
|
// deployment's list is for looking through and picking one.
|
|
229
274
|
if (caps.readOnly && t.name === n.listHotels) {
|
|
@@ -387,9 +432,21 @@ const forCapabilities = (tools, n, v, caps) => {
|
|
|
387
432
|
: `none of it is sent to ${v.brand} or holds a real room`}. ${caps.prepaid
|
|
388
433
|
? 'A rate marked paid in advance is booked on its own, and not at once: the answer gives a card page where no real money moves and the time it is paid by, and the stay is booked once it is paid - no card is collected here. Every other rate is paid by nobody.'
|
|
389
434
|
: 'No payment is taken and no card is collected.'} All of the trip is booked or none of it. Preferences - a bed type, a floor, a late arrival - ride along on the booking as requests.`
|
|
390
|
-
: `Books the trip's rooms with ${v.brand} for a named guest: each stay becomes the hotel's own reservation, with its own confirmation code, paid at the hotel. No payment is taken here and no card is collected. All of the trip is booked or none of it. Preferences - a bed type, a floor, a late arrival - ride along on the booking as requests the desk tries to meet.`,
|
|
435
|
+
: `Books the trip's rooms with ${v.brand} for a named guest: each stay becomes the hotel's own reservation, with its own confirmation code, paid at the hotel. No payment is taken here and no card is collected. All of the trip is booked or none of it. Only rates paid at the hotel can be booked here. Preferences - a bed type, a floor, a late arrival - ride along on the booking as requests the desk tries to meet.`,
|
|
391
436
|
};
|
|
392
437
|
}
|
|
438
|
+
// The card's own step books the same way, and the same is true of it (总线程 11-18,
|
|
439
|
+
// 华住上架). Only where nothing is paid in advance, and not in a test or a demonstration.
|
|
440
|
+
if (t.name === n.bookPicked &&
|
|
441
|
+
caps.booking === 'pay-at-hotel' &&
|
|
442
|
+
!caps.prepaid &&
|
|
443
|
+
!v.market &&
|
|
444
|
+
!v.test &&
|
|
445
|
+
!v.demo)
|
|
446
|
+
out = {
|
|
447
|
+
...out,
|
|
448
|
+
description: `${out.description} Only rates paid at the hotel can be booked here.`,
|
|
449
|
+
};
|
|
393
450
|
}
|
|
394
451
|
// ⚠️ ORDERS ARE THE ACCOUNT'S (0.75.0, T5/T6; OpenAI: only the data that is needed).
|
|
395
452
|
// Old chats and old cards may still send `email`, `requests`, `arrivingAt` or `notes`:
|
|
@@ -3166,9 +3223,9 @@ const LABEL_WORDS = {
|
|
|
3166
3223
|
const labelWords = (r) => {
|
|
3167
3224
|
const words = [
|
|
3168
3225
|
...(r.labels ?? []).map((l) => LABEL_WORDS[l]),
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3226
|
+
// Paid in advance, and nothing more - not "not booked here" (0.75.1, robin 11-18:
|
|
3227
|
+
// that is said when the guest wants one - `notSoldHereWords`).
|
|
3228
|
+
...(r.payment === 'prepaid' ? ['paid in advance'] : []),
|
|
3172
3229
|
];
|
|
3173
3230
|
return words.length ? ` [${words.join(', ')}]` : '';
|
|
3174
3231
|
};
|
|
@@ -3212,8 +3269,14 @@ const OWN_WHY = {
|
|
|
3212
3269
|
* the structure (2026-10-28). Listed and marked as the group sells them; the
|
|
3213
3270
|
* card says no more than 预付 on them (robin, 2026-10-30), so the assistant is
|
|
3214
3271
|
* the one who knows - and says it when the guest wants one.
|
|
3272
|
+
*
|
|
3273
|
+
* ⚠️ WHEN THE GUEST WANTS ONE, NEVER BEFORE (0.75.1, robin 11-18 on 华住生产: 「这两段话去掉
|
|
3274
|
+
* 吧,预订按钮给我加上,但是跳转的时候再提示暂时还不能预订」): a list or a page says nothing of
|
|
3275
|
+
* it - no sentence first, no "not booked here" on a price (0.65.0 said it before anything was
|
|
3276
|
+
* chosen). The card says it when Reserve is pressed; the assistant when the guest asks to
|
|
3277
|
+
* book one, or when it goes to book one (and the booking is refused, with the same ways on).
|
|
3215
3278
|
*/
|
|
3216
|
-
export const notSoldHereWords = (group) => `Rates marked paid in advance are listed as ${group} sells them, but a stay paid in advance cannot be booked here yet; only rates paid at the hotel can be.
|
|
3279
|
+
export const notSoldHereWords = (group) => `Rates marked paid in advance are listed as ${group} sells them, but a stay paid in advance cannot be booked here yet; only rates paid at the hotel can be. Do not bring that up on your own - show the rates as they are, paid in advance, with nothing said of booking them here. Only when the guest wants one - asks to book it, or you go to book it - say so plainly - nothing is booked or charged - and ${waysOnWords(group, 'a rate paid at the hotel, where this answer lists one')}`;
|
|
3217
3280
|
/**
|
|
3218
3281
|
* Where a guest goes from a rate paid in advance (总线程 11-09, Manus on Huazhu:
|
|
3219
3282
|
* 「选最便宜那个」 was answered "it cannot be booked here" and nothing more,
|
|
@@ -3403,7 +3466,7 @@ readOnly = false) => {
|
|
|
3403
3466
|
};
|
|
3404
3467
|
const pay = readOnly
|
|
3405
3468
|
? { said: '', tags: [] }
|
|
3406
|
-
: paymentOf(rows.map(({ r }) => payOf(r)), 'room'
|
|
3469
|
+
: paymentOf(rows.map(({ r }) => payOf(r)), 'room');
|
|
3407
3470
|
const lowest = Math.min(...rows.map(({ r }) => r.stayTotal.minor));
|
|
3408
3471
|
const apart = {
|
|
3409
3472
|
cheapest: setsApart(rows.map(({ r }) => !r.hourly && r.stayTotal.minor === lowest)),
|
|
@@ -3485,7 +3548,8 @@ readOnly = false) => {
|
|
|
3485
3548
|
said,
|
|
3486
3549
|
blocks,
|
|
3487
3550
|
ids: rows.map(({ r }) => r.id),
|
|
3488
|
-
|
|
3551
|
+
// How it is paid, for the model too (0.75.1: no "not booked here" before the guest wants one).
|
|
3552
|
+
notes: rows.map(({ r }) => (readOnly ? '' : r.notSoldHere ? 'paid in advance' : '')),
|
|
3489
3553
|
};
|
|
3490
3554
|
};
|
|
3491
3555
|
/**
|
|
@@ -3493,7 +3557,7 @@ readOnly = false) => {
|
|
|
3493
3557
|
* id on each line - "— room `x`" - the model was to copy the line and drop its
|
|
3494
3558
|
* end, and on Manus it rewrote the lines and dropped the numbers instead. The
|
|
3495
3559
|
* choices are the guest's as they stand; this line is the model's - and it
|
|
3496
|
-
* marks each one
|
|
3560
|
+
* marks each one paid in advance too (P1-5), where the choices may say it once
|
|
3497
3561
|
* for all.
|
|
3498
3562
|
*/
|
|
3499
3563
|
const idsByNumber = (what, ids, from = 1, notes = []) => `${what} ids by number, for your calls - never for the guest: ${ids
|
|
@@ -3541,10 +3605,10 @@ numbers) => {
|
|
|
3541
3605
|
* The lead, what the rooms share and the choices - in the text and, word for
|
|
3542
3606
|
* word, in `roomChoices`.
|
|
3543
3607
|
*
|
|
3544
|
-
*
|
|
3545
|
-
*
|
|
3546
|
-
*
|
|
3547
|
-
*
|
|
3608
|
+
* `before`: what is said before the list (other arrivals that cost less). Since 0.75.1
|
|
3609
|
+
* (robin 11-18) that rates paid in advance cannot be booked here is not among it: it was
|
|
3610
|
+
* first since robin's Manus run (11-06, via 总线程), and now it is said when the guest wants
|
|
3611
|
+
* one (`notSoldHereWords`).
|
|
3548
3612
|
*/
|
|
3549
3613
|
const roomChoicesOf = (rooms, roomsWanted, when, before, group, readOnly = false) => {
|
|
3550
3614
|
const c = roomChoicesBlock(rooms, roomsWanted, group, readOnly);
|
|
@@ -3558,12 +3622,6 @@ const roomChoicesOf = (rooms, roomsWanted, when, before, group, readOnly = false
|
|
|
3558
3622
|
`\n${idsByNumber('Room', c.ids, 1, c.notes)}`,
|
|
3559
3623
|
];
|
|
3560
3624
|
};
|
|
3561
|
-
/** What is said before the rooms where some - or all - of them are paid in advance and not booked here. */
|
|
3562
|
-
const notSoldFirst = (rooms, notSold) => !notSold
|
|
3563
|
-
? ''
|
|
3564
|
-
: rooms.length > 0 && rooms.every((r) => r.notSoldHere)
|
|
3565
|
-
? `Every rate here for these nights is paid in advance, so none of them can be booked here yet and none is paid at the hotel - the sentence before the rooms says so; keep it first. ${notSold}`
|
|
3566
|
-
: `${notSold} The sentence before the rooms says which are not bookable here; keep it before them.`;
|
|
3567
3625
|
/**
|
|
3568
3626
|
* What a hotel's rooms look like to the assistant for the nights: one line per
|
|
3569
3627
|
* type, and with filters only the rates that meet ALL of them. None meeting
|
|
@@ -3578,8 +3636,8 @@ when, enough, roomsWanted, terms, noCards,
|
|
|
3578
3636
|
/** The nights as the guest reads them - weekdays first - for a client that draws no card. */
|
|
3579
3637
|
saidWhen,
|
|
3580
3638
|
/**
|
|
3581
|
-
* What is said before the list to a client that draws no card:
|
|
3582
|
-
*
|
|
3639
|
+
* What is said before the list to a client that draws no card: other arrivals
|
|
3640
|
+
* that cost less (`dateFlex`).
|
|
3583
3641
|
*/
|
|
3584
3642
|
before,
|
|
3585
3643
|
/** The group a stay paid in advance is booked with instead - see `paymentOf`. */
|
|
@@ -5500,7 +5558,7 @@ const hotelChoicesBlock = (hotels,
|
|
|
5500
5558
|
offset,
|
|
5501
5559
|
/** The group a hotel is with, in a market - its name is ours, not the backend's code. */
|
|
5502
5560
|
groupOf,
|
|
5503
|
-
/** The group a
|
|
5561
|
+
/** The deployment's group, where a hotel's own is not known. */
|
|
5504
5562
|
group,
|
|
5505
5563
|
/** Nothing can be booked here (`capabilities.readOnly`): said once, and no payment told apart. */
|
|
5506
5564
|
readOnly = false) => {
|
|
@@ -5536,7 +5594,7 @@ readOnly = false) => {
|
|
|
5536
5594
|
const cancel = spreadOf(priced.map(cancelOf));
|
|
5537
5595
|
const pay = readOnly
|
|
5538
5596
|
? { said: '', tags: [] }
|
|
5539
|
-
: paymentOf(priced.map((h) => payOf(h.forStay ?? {})), 'hotel'
|
|
5597
|
+
: paymentOf(priced.map((h) => payOf(h.forStay ?? {})), 'hotel');
|
|
5540
5598
|
const payTag = (h) => (h.forStay ? (pay.tags[priced.indexOf(h)] ?? '') : '');
|
|
5541
5599
|
// The cheapest, in one currency, and the best rated - among more than one.
|
|
5542
5600
|
const priceOf = (h) => h.forStay?.total ?? h.fromNightly;
|
|
@@ -5644,7 +5702,8 @@ readOnly = false) => {
|
|
|
5644
5702
|
return {
|
|
5645
5703
|
said,
|
|
5646
5704
|
blocks,
|
|
5647
|
-
|
|
5705
|
+
// How its price is paid (0.75.1: no "not booked here" before the guest wants one).
|
|
5706
|
+
notes: hotels.map((h) => !readOnly && h.forStay?.notSoldHere ? 'its price is paid in advance' : ''),
|
|
5648
5707
|
};
|
|
5649
5708
|
};
|
|
5650
5709
|
/**
|
|
@@ -5688,11 +5747,8 @@ const comparedInWords = (c) => {
|
|
|
5688
5747
|
: p.refundable
|
|
5689
5748
|
? 'no free cancellation'
|
|
5690
5749
|
: 'non-refundable',
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
? 'paid in advance - not booked here'
|
|
5694
|
-
: 'paid in advance'
|
|
5695
|
-
: '',
|
|
5750
|
+
// Paid in advance, and nothing more (0.75.1 - `notSoldHereWords`).
|
|
5751
|
+
p.payment === 'prepaid' ? 'paid in advance' : '',
|
|
5696
5752
|
p.breakfast ? 'breakfast included' : 'no breakfast',
|
|
5697
5753
|
]
|
|
5698
5754
|
.filter(Boolean)
|
|
@@ -6779,6 +6835,8 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
6779
6835
|
? Math.max(1, Math.min(MAX_ROOMS_PER_LINE, Math.floor(args.rooms)))
|
|
6780
6836
|
: undefined,
|
|
6781
6837
|
filters: filtersOf(args),
|
|
6838
|
+
// Tonight by default: the page alone is priced (`listsTonight`, below).
|
|
6839
|
+
...(ctx.pricePageOnly ? { pricePageOnly: true } : {}),
|
|
6782
6840
|
};
|
|
6783
6841
|
// A group as a guest names it, to the id the market files it under.
|
|
6784
6842
|
const named = ask.filters?.supplier ? groupNamed(deps, ask.filters.supplier) : undefined;
|
|
@@ -7012,32 +7070,61 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7012
7070
|
// per hotel (six at most). A group of many still chooses a city first and
|
|
7013
7071
|
// lists twenty at a time without prices, a market its group; rooms by the
|
|
7014
7072
|
// hour are today's by their own rule; dates the model gave are used as given.
|
|
7015
|
-
|
|
7073
|
+
//
|
|
7074
|
+
// ⚠️ AND IN A DEPLOYMENT PRICED FOR TONIGHT, AT ANY SIZE (`listsTonight`, 0.75.1 -
|
|
7075
|
+
// robin 11-18 at Huazhu's 88: 「怎么变成要选日期了,不是默认当天的吗」). Its home is still
|
|
7076
|
+
// the cities to choose from, unpriced (`choosing`); every list - a city, words, a brand,
|
|
7077
|
+
// a filter, `all` - is tonight's, priced: this page only, at most TONIGHT_PAGE_MAX,
|
|
7078
|
+
// through the group's own limit on calls and its minute of kept prices. A hotel whose
|
|
7079
|
+
// price cannot be read is listed without one, said as that (`noRoomsForStayCode`
|
|
7080
|
+
// 'unreachable'); a list that cannot be priced at all is the list as it was.
|
|
7081
|
+
const tonightLists = !fitsOnePage &&
|
|
7082
|
+
!choosing &&
|
|
7083
|
+
deps.backend.capabilities?.listsTonight === true &&
|
|
7084
|
+
!deps.backend.suppliers &&
|
|
7085
|
+
!deps.vocab.market;
|
|
7086
|
+
if ((fitsOnePage || tonightLists) &&
|
|
7087
|
+
!ask.stay &&
|
|
7088
|
+
!ask.filters?.hourly &&
|
|
7089
|
+
hotels.length &&
|
|
7090
|
+
today?.min) {
|
|
7016
7091
|
const tonight = {
|
|
7017
7092
|
checkIn: today.min,
|
|
7018
7093
|
checkOut: addDays(today.min, 1),
|
|
7019
7094
|
guests: guestsOf(args),
|
|
7020
7095
|
};
|
|
7021
|
-
const
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
// ⚠️ TO A CLIENT THAT DRAWS NO CARD, THE OTHER NIGHTS ARE NAMED BY THEIR
|
|
7027
|
-
// DATES (robin 11-06): the card has a date bar to change; in words it is
|
|
7028
|
-
// the reply's first sentence - see `stayDefaultWords`.
|
|
7029
|
-
const stayDefault = ctx.noCards
|
|
7030
|
-
? stayDefaultWords(tonight.checkIn, tonight.guests, roomCount, 'hotels')
|
|
7031
|
-
: `No dates were asked for, so this opens on tonight by default: ${tonight.checkIn} to ${tonight.checkOut} (one night, on the hotels' own date), ${tonight.guests} ${tonight.guests === 1 ? 'guest' : 'guests'}, ${roomCount === 1 ? 'one room' : `${roomCount} rooms`} - every price here is for that night. Say so: the prices shown are tonight's, and the guest can change the dates on the card or name others. Do not ask for dates before showing them.`;
|
|
7032
|
-
// Right after what is here - "every one, and no others" stays the first thing said.
|
|
7033
|
-
const inAll = String(priced.structured.inAll ?? '');
|
|
7034
|
-
return {
|
|
7035
|
-
...priced,
|
|
7036
|
-
structured: { ...priced.structured, stayDefault },
|
|
7037
|
-
text: inAll && priced.text.startsWith(inAll)
|
|
7038
|
-
? `${inAll} ${stayDefault}${priced.text.slice(inAll.length)}`
|
|
7039
|
-
: `${stayDefault}\n\n${priced.text}`,
|
|
7096
|
+
const pageAsked = typeof args.limit === 'number' ? args.limit : DEFAULT_PAGE;
|
|
7097
|
+
const tonightArgs = {
|
|
7098
|
+
...args,
|
|
7099
|
+
...tonight,
|
|
7100
|
+
...(tonightLists ? { limit: Math.min(pageAsked, TONIGHT_PAGE_MAX) } : {}),
|
|
7040
7101
|
};
|
|
7102
|
+
// Where the deployment is priced for tonight at any size, a list that could not be
|
|
7103
|
+
// priced at all is the list as it was - never no list (a deployment of a few as before).
|
|
7104
|
+
const priced = tonightLists
|
|
7105
|
+
? await answerTool(deps, t.listHotels, tonightArgs, { ...ctx, pricePageOnly: true }).then((a) => (a.isError ? undefined : a), () => undefined)
|
|
7106
|
+
: await answerTool(deps, t.listHotels, tonightArgs, ctx);
|
|
7107
|
+
if (priced) {
|
|
7108
|
+
// ⚠️ THE ROOMS ASKED FOR, not "one room" (2026-11-03 review, C12): `rooms: 2`
|
|
7109
|
+
// rides along into the priced list, and every price in it is two rooms'.
|
|
7110
|
+
const roomCount = ask.rooms ?? 1;
|
|
7111
|
+
// In both, in the same words: the model reads the structure.
|
|
7112
|
+
// ⚠️ TO A CLIENT THAT DRAWS NO CARD, THE OTHER NIGHTS ARE NAMED BY THEIR
|
|
7113
|
+
// DATES (robin 11-06): the card has a date bar to change; in words it is
|
|
7114
|
+
// the reply's first sentence - see `stayDefaultWords`.
|
|
7115
|
+
const stayDefault = ctx.noCards
|
|
7116
|
+
? stayDefaultWords(tonight.checkIn, tonight.guests, roomCount, 'hotels')
|
|
7117
|
+
: `No dates were asked for, so this opens on tonight by default: ${tonight.checkIn} to ${tonight.checkOut} (one night, on the hotels' own date), ${tonight.guests} ${tonight.guests === 1 ? 'guest' : 'guests'}, ${roomCount === 1 ? 'one room' : `${roomCount} rooms`} - every price here is for that night. Say so: the prices shown are tonight's, and the guest can change the dates on the card or name others. Do not ask for dates before showing them.`;
|
|
7118
|
+
// Right after what is here - "every one, and no others" stays the first thing said.
|
|
7119
|
+
const inAll = String(priced.structured.inAll ?? '');
|
|
7120
|
+
return {
|
|
7121
|
+
...priced,
|
|
7122
|
+
structured: { ...priced.structured, stayDefault },
|
|
7123
|
+
text: inAll && priced.text.startsWith(inAll)
|
|
7124
|
+
? `${inAll} ${stayDefault}${priced.text.slice(inAll.length)}`
|
|
7125
|
+
: `${stayDefault}\n\n${priced.text}`,
|
|
7126
|
+
};
|
|
7127
|
+
}
|
|
7041
7128
|
}
|
|
7042
7129
|
// ⚠️ ONE HOTEL IS NO CHOICE OF PLACES (robin, 2026-10-15: 「现在只有杭州一家
|
|
7043
7130
|
// 了,首页也要改」). Huazhu's test system has one hotel, and "where to?" over
|
|
@@ -7128,11 +7215,23 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7128
7215
|
}, new Map())
|
|
7129
7216
|
.values(),
|
|
7130
7217
|
].sort((a, b) => b.count - a.count);
|
|
7218
|
+
// The places page counts a group asked only with a place where it is known to have hotels (0.75.1).
|
|
7219
|
+
const placesTotal = total + (answer.elsewhere ?? 0);
|
|
7220
|
+
// ⚠️ ONE COUNTRY IS A CHOICE OF CITIES (robin 11-18, Huazhu's 88 in 32 cities, all in
|
|
7221
|
+
// China: 「华住首页改成城市选择的吧」). "88 hotels in 32 cities across 1 country, to choose
|
|
7222
|
+
// from by region, country and city - Asia: China (88)" named no city the guest could
|
|
7223
|
+
// choose. Where a list is priced for tonight (`listsTonight`), every city, counted - with
|
|
7224
|
+
// a card and without - and what choosing one does.
|
|
7225
|
+
const cityHome = deps.backend.capabilities?.listsTonight === true &&
|
|
7226
|
+
!deps.backend.suppliers &&
|
|
7227
|
+
!deps.vocab.market &&
|
|
7228
|
+
countries.length === 1 &&
|
|
7229
|
+
facets.cities.length > 1;
|
|
7131
7230
|
return {
|
|
7132
7231
|
structured: {
|
|
7133
7232
|
view: 'destinations',
|
|
7134
7233
|
...common(deps, key),
|
|
7135
|
-
total,
|
|
7234
|
+
total: placesTotal,
|
|
7136
7235
|
regions,
|
|
7137
7236
|
ask: { ...stayArgs },
|
|
7138
7237
|
...(ask.stay ? { stay: ask.stay } : {}),
|
|
@@ -7152,7 +7251,9 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7152
7251
|
// groups that did not answer, by name; no places, no plans.
|
|
7153
7252
|
text: total === 0
|
|
7154
7253
|
? `There are no ${n} to show right now.${degraded.said ? ` ${degraded.said}` : ''}`
|
|
7155
|
-
:
|
|
7254
|
+
: cityHome
|
|
7255
|
+
? `${placesTotal} ${branded(deps.vocab, n)} in ${facets.cities.length} cities, to choose from by city: ${every(facets.cities)}. A city lists its ${n}, priced for tonight unless other nights are named; \`all\` lists every one, a page at a time - only for a guest who asked to see every one. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`
|
|
7256
|
+
: `${placesTotal} ${branded(deps.vocab, n)} in ${facets.cities.length} cities across ${countries.length} ${countries.length === 1 ? 'country' : 'countries'}, to choose from by region, country and city - ${regions.map((r) => `${r.name}: ${ctx.noCards ? everyWithCities(r.countries) : every(r.countries)}`).join('; ')}. A city or a country lists its ${n}. ${degraded.said ? `${degraded.said} ` : ''}${forPlans}`,
|
|
7156
7257
|
};
|
|
7157
7258
|
}
|
|
7158
7259
|
if (hotels.length === 0) {
|
|
@@ -7393,20 +7494,12 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7393
7494
|
: '',
|
|
7394
7495
|
].filter(Boolean);
|
|
7395
7496
|
// A price on the list that is not booked here (`notSoldHere`): said as on
|
|
7396
|
-
// the hotel's page, in both - see `notSoldHereWords`.
|
|
7497
|
+
// the hotel's page, in both - see `notSoldHereWords`. ⚠️ NOT FIRST ANY MORE (0.75.1,
|
|
7498
|
+
// robin 11-18): 0.58.2 had a list whose every price was one say so before the list
|
|
7499
|
+
// (总线程 11-09, Manus: 「选最便宜那个」 met "it cannot be booked here" and nothing more);
|
|
7500
|
+
// now it is said when the guest wants one, with the ways on - as on the hotel's page.
|
|
7397
7501
|
const notSoldOn = hotels.find((h) => h.forStay?.notSoldHere);
|
|
7398
|
-
|
|
7399
|
-
// Huazhu's production): one hotel, its one price paid in advance, and the
|
|
7400
|
-
// guest's 「选最便宜那个」 met "it cannot be booked here" and nothing more.
|
|
7401
|
-
const pricedHere = hotels.filter((h) => h.forStay);
|
|
7402
|
-
const allPrepaid = pricedHere.length > 0 && pricedHere.every((h) => h.forStay?.notSoldHere);
|
|
7403
|
-
const notSold = notSoldOn
|
|
7404
|
-
? `${allPrepaid
|
|
7405
|
-
? `Every price in this list is a rate paid in advance, which cannot be booked here - say that first, before the list. A ${deps.vocab.noun}'s own page (${deps.tools.getHotel}) lists the rates it has paid at the hotel, if it has any. `
|
|
7406
|
-
: ''}${notSoldHereWords(groupNameOf(deps, notSoldOn.id))}`
|
|
7407
|
-
: '';
|
|
7408
|
-
if (notSold)
|
|
7409
|
-
priceNotes.push(notSold);
|
|
7502
|
+
const notSold = notSoldOn ? notSoldHereWords(groupNameOf(deps, notSoldOn.id)) : '';
|
|
7410
7503
|
// To a client that draws no card, the hotels as numbered lines - numbered
|
|
7411
7504
|
// across pages, so "the 23rd" on the second page is still one hotel. In the
|
|
7412
7505
|
// text and, word for word, in the structure (`hotelChoices`).
|
|
@@ -7534,6 +7627,8 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7534
7627
|
widened?.found ? `Nothing matched ${widened.from}, so this is ${widened.to}.` : '',
|
|
7535
7628
|
degraded.said,
|
|
7536
7629
|
hotelChoices ? `\n${LIST_NOT_DRAWN}\n${hotelChoices}\n` : '',
|
|
7630
|
+
// After the hotels, never before them: for when the guest wants one (0.75.1).
|
|
7631
|
+
notSold,
|
|
7537
7632
|
ctx.drawsCards && hotels.length ? ON_CARD.hotels : '',
|
|
7538
7633
|
forPlans,
|
|
7539
7634
|
]
|
|
@@ -7751,14 +7846,9 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7751
7846
|
? `${flex.text} (That is the cheapest room of any kind, not only one with ${termWords(terms)}.)`
|
|
7752
7847
|
: flex.text;
|
|
7753
7848
|
// ⚠️ BEFORE THE LIST, NOT AFTER IT (总线程 11-06, robin's Manus run): "arriving
|
|
7754
|
-
// the 18th is ¥253 less", last in the answer, was never passed on
|
|
7755
|
-
//
|
|
7756
|
-
const before =
|
|
7757
|
-
notSoldFirst(choosable, notSold),
|
|
7758
|
-
flexSaid ? `${flexSaid} Say that in one sentence before the list too.` : '',
|
|
7759
|
-
]
|
|
7760
|
-
.filter(Boolean)
|
|
7761
|
-
.join(' ');
|
|
7849
|
+
// the 18th is ¥253 less", last in the answer, was never passed on. (Rates not booked
|
|
7850
|
+
// here are no longer said before it - 0.75.1, `notSoldHereWords`.)
|
|
7851
|
+
const before = flexSaid ? `${flexSaid} Say that in one sentence before the list too.` : '';
|
|
7762
7852
|
const saidWhen = byTheHour
|
|
7763
7853
|
? `today, ${dayWords(stay.checkIn)}, ${stay.guests} ${stay.guests === 1 ? 'guest' : 'guests'}`
|
|
7764
7854
|
: `${stayDayWords(stay.checkIn, stay.checkOut)}, ${stay.guests} ${stay.guests === 1 ? 'guest' : 'guests'}${roomsWanted > 1 ? `, ${roomsWanted} rooms` : ''}`;
|
|
@@ -7807,7 +7897,8 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
7807
7897
|
`${offerCount(rs)} for ${ctx.noCards ? `${stayDayWords(stay.checkIn, stay.checkOut)}, ${stay.checkIn} to ${stay.checkOut}` : `${stay.checkIn} to ${stay.checkOut}`}, ${stay.guests} guests${roomsWanted > 1 ? `, ${roomsWanted} rooms` : ''}`, byTheHour ? `today, ${stay.checkIn}` : `${stay.checkIn} to ${stay.checkOut}`, enough, roomsWanted, terms, ctx.noCards, saidWhen, before, groupNameOf(deps, h.id), !!notBookable),
|
|
7808
7898
|
// Said before the list to a client that draws no card (`before`).
|
|
7809
7899
|
ctx.noCards && choosable.length ? '' : flexSaid,
|
|
7810
|
-
|
|
7900
|
+
// After the rooms, never before them: for when the guest wants one (0.75.1).
|
|
7901
|
+
notSold,
|
|
7811
7902
|
ctx.drawsCards && enough.length ? ON_CARD.rooms : '',
|
|
7812
7903
|
]
|
|
7813
7904
|
.filter(Boolean)
|
|
@@ -9033,11 +9124,8 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
9033
9124
|
: ctx.noCards && x.freeCancellationUntil
|
|
9034
9125
|
? `free to cancel until ${freeUntilText(x)}`
|
|
9035
9126
|
: '',
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
? 'paid in advance - not booked here'
|
|
9039
|
-
: 'paid in advance'
|
|
9040
|
-
: '',
|
|
9127
|
+
// Paid in advance, and nothing more (0.75.1 - `notSoldHereWords`).
|
|
9128
|
+
x.payment === 'prepaid' ? 'paid in advance' : '',
|
|
9041
9129
|
]
|
|
9042
9130
|
.filter(Boolean)
|
|
9043
9131
|
.join(', ');
|