@curless/hotel-storefront 0.20.0 → 0.21.1
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/__tests__/card-contract.test.js +14 -0
- package/dist/__tests__/card-contract.test.js.map +1 -1
- package/dist/__tests__/demo-hotels.test.js +34 -1
- package/dist/__tests__/demo-hotels.test.js.map +1 -1
- package/dist/__tests__/present.test.js +37 -0
- package/dist/__tests__/present.test.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/demo-hotels.d.ts +14 -0
- package/dist/demo-hotels.d.ts.map +1 -1
- package/dist/demo-hotels.js +46 -1
- package/dist/demo-hotels.js.map +1 -1
- package/dist/present.d.ts +27 -0
- package/dist/present.d.ts.map +1 -1
- package/dist/present.js +34 -1
- package/dist/present.js.map +1 -1
- package/dist/server.d.ts +8 -8
- package/dist/server.js +2 -2
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +11 -1
- package/dist/surface.js.map +1 -1
- package/dist/tools.d.ts +24 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +21 -2
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/server.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const PROTOCOL_VERSION = "2025-06-18";
|
|
|
16
16
|
* number. Found by reading the boot banner of a container that had just been
|
|
17
17
|
* deployed (2026-09-22): seventeen tools listed, and "0.7.0" above them.
|
|
18
18
|
*/
|
|
19
|
-
export declare const VERSION = "0.
|
|
19
|
+
export declare const VERSION = "0.21.1";
|
|
20
20
|
/**
|
|
21
21
|
* The card's resource URI.
|
|
22
22
|
*
|
|
@@ -25,7 +25,7 @@ export declare const VERSION = "0.20.0";
|
|
|
25
25
|
* connector went storefront-v35 → v40 in a single day of UI work for exactly
|
|
26
26
|
* this reason.
|
|
27
27
|
*/
|
|
28
|
-
export declare const CARD_URI = "ui://curless/hotel/booking-
|
|
28
|
+
export declare const CARD_URI = "ui://curless/hotel/booking-v36.html";
|
|
29
29
|
/**
|
|
30
30
|
* ⚠️ `text/html;profile=mcp-app`, not `text/html+skybridge`. The MIME is how a
|
|
31
31
|
* host recognises this resource as a card at all; the plausible near-miss made
|
|
@@ -41,10 +41,10 @@ export declare const CARD_MIME = "text/html;profile=mcp-app";
|
|
|
41
41
|
*/
|
|
42
42
|
export declare const UI_META: {
|
|
43
43
|
readonly ui: {
|
|
44
|
-
readonly resourceUri: "ui://curless/hotel/booking-
|
|
44
|
+
readonly resourceUri: "ui://curless/hotel/booking-v36.html";
|
|
45
45
|
};
|
|
46
|
-
readonly 'ui/resourceUri': "ui://curless/hotel/booking-
|
|
47
|
-
readonly 'openai/outputTemplate': "ui://curless/hotel/booking-
|
|
46
|
+
readonly 'ui/resourceUri': "ui://curless/hotel/booking-v36.html";
|
|
47
|
+
readonly 'openai/outputTemplate': "ui://curless/hotel/booking-v36.html";
|
|
48
48
|
readonly 'openai/widgetAccessible': true;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
@@ -63,14 +63,14 @@ export declare const widgetMeta: (imageDomains: string[]) => {
|
|
|
63
63
|
csp: {
|
|
64
64
|
resourceDomains: string[];
|
|
65
65
|
};
|
|
66
|
-
resourceUri: "ui://curless/hotel/booking-
|
|
66
|
+
resourceUri: "ui://curless/hotel/booking-v36.html";
|
|
67
67
|
};
|
|
68
68
|
'openai/widgetCSP': {
|
|
69
69
|
connect_domains: never[];
|
|
70
70
|
resource_domains: string[];
|
|
71
71
|
};
|
|
72
|
-
'ui/resourceUri': "ui://curless/hotel/booking-
|
|
73
|
-
'openai/outputTemplate': "ui://curless/hotel/booking-
|
|
72
|
+
'ui/resourceUri': "ui://curless/hotel/booking-v36.html";
|
|
73
|
+
'openai/outputTemplate': "ui://curless/hotel/booking-v36.html";
|
|
74
74
|
'openai/widgetAccessible': true;
|
|
75
75
|
};
|
|
76
76
|
/** The trip snapshot that rides beside every answer, for the card's header. */
|
package/dist/server.js
CHANGED
|
@@ -30,7 +30,7 @@ export const PROTOCOL_VERSION = '2025-06-18';
|
|
|
30
30
|
* number. Found by reading the boot banner of a container that had just been
|
|
31
31
|
* deployed (2026-09-22): seventeen tools listed, and "0.7.0" above them.
|
|
32
32
|
*/
|
|
33
|
-
export const VERSION = '0.
|
|
33
|
+
export const VERSION = '0.21.1';
|
|
34
34
|
/**
|
|
35
35
|
* The card's resource URI.
|
|
36
36
|
*
|
|
@@ -39,7 +39,7 @@ export const VERSION = '0.20.0';
|
|
|
39
39
|
* connector went storefront-v35 → v40 in a single day of UI work for exactly
|
|
40
40
|
* this reason.
|
|
41
41
|
*/
|
|
42
|
-
export const CARD_URI = 'ui://curless/hotel/booking-
|
|
42
|
+
export const CARD_URI = 'ui://curless/hotel/booking-v36.html';
|
|
43
43
|
/**
|
|
44
44
|
* ⚠️ `text/html;profile=mcp-app`, not `text/html+skybridge`. The MIME is how a
|
|
45
45
|
* host recognises this resource as a card at all; the plausible near-miss made
|
package/dist/surface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAY3D;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAY3D;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,aAAa,KAAG,MAuFxD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,EACzE,OAAO,SAAS,CAAC,EAAE,EACnB,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,SAAS,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClD,YAAW,WAAW,CAAC,MAAM,CAAa;;;;;;;;;;;;;;;KAexC,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;CAIb,CAAC;AAEX,6DAA6D;AAC7D,eAAO,MAAM,aAAa,GAAI,OAAO,aAAa,KAAG,WAAW,CAAC,MAAM,CAkBnE,CAAC"}
|
package/dist/surface.js
CHANGED
|
@@ -79,7 +79,17 @@ export const buildInstructions = (brand) => {
|
|
|
79
79
|
// day-by-day plan needs a base, so asked to plan a city with no hotel
|
|
80
80
|
// chosen, the model listed four and asked on one run and proposed one on
|
|
81
81
|
// the next (2026-09-18). Neither is wrong; flipping between them is.
|
|
82
|
-
|
|
82
|
+
//
|
|
83
|
+
// ⚠️ SETTLED ON PROPOSING ONE, IN ONE CARD (robin, 2026-09-29: 「这个行程推荐
|
|
84
|
+
// 问题很大,会发一堆东西,和 claude 的行程推荐不一样」). "Plan Shanghai, 1-7
|
|
85
|
+
// January" drew a list, two hotels, a comparison and then a timeline the
|
|
86
|
+
// model drew itself - five cards, four of them research. A plan is the one
|
|
87
|
+
// card; the pick is the model's, said as a pick, with the other there.
|
|
88
|
+
`A day-by-day plan needs a ${v.noun} to be based at. When the guest asked for a plan without naming one, pick the one that fits what they said, say in one sentence why, and name one alternative in a sentence; the plan is where they see your pick, and nothing on it is booked, so the choice is still theirs.`,
|
|
89
|
+
// ⚠️ ONE PLAN, ONE CARD. Each call to a tool here draws a card, so looking
|
|
90
|
+
// hotels up before planning put them all above the plan; and a timeline the
|
|
91
|
+
// model draws itself is a second, unchecked copy of the plan beside ours.
|
|
92
|
+
`A plan is ONE ${t.itinerary} call: no ${t.listHotels}, ${t.getHotel} or ${t.compare} before it, since each of them draws its own card above the plan, and it reads every price itself. Put the day's moments in each day's \`plan\` - when, and what - and the ${v.noun} in its \`items\`. The card is the plan: do not draw a timeline, a table or another picture of the same days yourself.`,
|
|
83
93
|
// ⚠️ THE PLAN'S SHAPE IS ITS NIGHTS. The server reads a hotel named on
|
|
84
94
|
// consecutive days as one stay of that many nights - so a hotel left off
|
|
85
95
|
// the second of two nights is a one-night stay on the card.
|
package/dist/surface.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAsB,MAAM,YAAY,CAAC;AAE3D,+EAA+E;AAC/E,yEAAyE;AACzE,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,4CAA4C;AAE5C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAoB,EAAU,EAAE;IAChE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC;IACrC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,QAAQ,CAAC;IAC7D,OAAO;QACL,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,mDAAmD,CAAC,CAAC,UAAU,+GAA+G;QACxM,oBAAoB,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,IAAI,2GAA2G;QACtJ,2EAA2E;QAC3E,GAAG,CAAC,CAAC,CAAC,IAAI;YACR,CAAC,CAAC;gBACE,MAAM,SAAS,4FAA4F;aAC5G;YACH,CAAC,CAAC,EAAE,CAAC;QACP,4EAA4E;QAC5E,uEAAuE;QACvE,kEAAkE;QAClE,yEAAyE;QACzE,yEAAyE;QACzE,qDAAqD;QACrD,oBAAoB,CAAC,CAAC,UA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AAI,EAAE,UAAU,EAAE;aAC/D;SACF;QACH,CAAC,CAAC,EAAE,CAAC;IACT,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC/F,CAAC,CAAC,CAAC;AAEL;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,yHAAyH;CACnH,CAAC;AAEX,6DAA6D;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAoB,EAAuB,EAAE,CACzE,IAAI,GAAG,CAAC;IACN,KAAK,CAAC,KAAK,CAAC,SAAS;IACrB,KAAK,CAAC,KAAK,CAAC,QAAQ;IACpB,KAAK,CAAC,KAAK,CAAC,SAAS;IACrB,KAAK,CAAC,KAAK,CAAC,cAAc;IAC1B,KAAK,CAAC,KAAK,CAAC,mBAAmB;IAC/B,KAAK,CAAC,KAAK,CAAC,aAAa;IACzB,0EAA0E;IAC1E,8DAA8D;IAC9D,KAAK,CAAC,KAAK,CAAC,YAAY;IACxB,KAAK,CAAC,KAAK,CAAC,aAAa;IACzB,KAAK,CAAC,KAAK,CAAC,aAAa;IACzB,0CAA0C;IAC1C,KAAK,CAAC,KAAK,CAAC,UAAU;IACtB,0EAA0E;IAC1E,8BAA8B;IAC9B,KAAK,CAAC,KAAK,CAAC,SAAS;CACtB,CAAC,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -539,7 +539,7 @@ export declare const buildTools: (n: ToolNames, v: Vocabulary) => readonly [{
|
|
|
539
539
|
};
|
|
540
540
|
}, {
|
|
541
541
|
readonly name: `show_${string}itinerary`;
|
|
542
|
-
readonly description: `A day-by-day plan as one card: each day carries its own label, an optional note, and the ${string} and add-ons attached to it, with their details filled in from their own records. Each
|
|
542
|
+
readonly description: `A day-by-day plan as one card: each day carries its own label, an optional note, the moments of the day in order, and the ${string} and add-ons attached to it, with their details filled in from their own records - a ${string} 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 card says how many of each. Nothing is added to the trip.`;
|
|
543
543
|
readonly annotations: {
|
|
544
544
|
readonly title: string;
|
|
545
545
|
readonly readOnlyHint: true;
|
|
@@ -589,6 +589,29 @@ export declare const buildTools: (n: ToolNames, v: Vocabulary) => readonly [{
|
|
|
589
589
|
readonly maxItems: 6;
|
|
590
590
|
readonly description: `${string} and add-ons for that day, by name or id`;
|
|
591
591
|
};
|
|
592
|
+
readonly plan: {
|
|
593
|
+
readonly type: "array";
|
|
594
|
+
readonly maxItems: 5;
|
|
595
|
+
readonly description: "The day in order, in your own words: when, and what happens then. Nothing in it is booked or priced";
|
|
596
|
+
readonly items: {
|
|
597
|
+
readonly type: "object";
|
|
598
|
+
readonly properties: {
|
|
599
|
+
readonly time: {
|
|
600
|
+
readonly type: "string";
|
|
601
|
+
readonly description: "When in the day, e.g. \"Afternoon\" or \"19:00\"";
|
|
602
|
+
};
|
|
603
|
+
readonly what: {
|
|
604
|
+
readonly type: "string";
|
|
605
|
+
readonly description: "What happens then, in a few words";
|
|
606
|
+
};
|
|
607
|
+
readonly note: {
|
|
608
|
+
readonly type: "string";
|
|
609
|
+
readonly description: "One line more, optional";
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
readonly required: readonly ["what"];
|
|
613
|
+
};
|
|
614
|
+
};
|
|
592
615
|
};
|
|
593
616
|
readonly required: readonly ["label"];
|
|
594
617
|
};
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,S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
|
|
|
3
3
|
import { FACILITIES } from './facilities.js';
|
|
4
4
|
import { DESCRIPTION_MAX, POLICY_MAX, hotelText } from './fence.js';
|
|
5
5
|
import { formatMoney, money, multiplyMoney, toMinor } from './money.js';
|
|
6
|
-
import { MAX_COMPARED, MAX_CONS, MAX_DAYS, MAX_ITEMS_PER_DAY, MAX_PROS, buildItinerary, compareHotels, } from './present.js';
|
|
6
|
+
import { MAX_COMPARED, MAX_CONS, MAX_DAYS, MAX_ITEMS_PER_DAY, MAX_MOMENTS, MAX_PROS, buildItinerary, compareHotels, } from './present.js';
|
|
7
7
|
import { regionOf } from './regions.js';
|
|
8
8
|
import { MAX_EXTRA_QUANTITY, MAX_ROOMS_PER_LINE, clampCount, tripKey, } from './trip.js';
|
|
9
9
|
import { DEMO_NOTE } from './vocab.js';
|
|
@@ -425,7 +425,7 @@ export const buildTools = (n, v) => {
|
|
|
425
425
|
},
|
|
426
426
|
{
|
|
427
427
|
name: n.itinerary,
|
|
428
|
-
description: `A day-by-day plan as one card: each day carries its own label, an optional note, and the ${v.nounPlural} and add-ons attached to it, with their details filled in from their own records. Each
|
|
428
|
+
description: `A day-by-day plan as one card: 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 card says how many of each. Nothing is added to the trip.`,
|
|
429
429
|
annotations: reads(`Lay out a ${v.brand} itinerary`, open),
|
|
430
430
|
inputSchema: {
|
|
431
431
|
type: 'object',
|
|
@@ -449,6 +449,23 @@ export const buildTools = (n, v) => {
|
|
|
449
449
|
maxItems: MAX_ITEMS_PER_DAY,
|
|
450
450
|
description: `${v.nounPlural} and add-ons for that day, by name or id`,
|
|
451
451
|
},
|
|
452
|
+
plan: {
|
|
453
|
+
type: 'array',
|
|
454
|
+
maxItems: MAX_MOMENTS,
|
|
455
|
+
description: 'The day in order, in your own words: when, and what happens then. Nothing in it is booked or priced',
|
|
456
|
+
items: {
|
|
457
|
+
type: 'object',
|
|
458
|
+
properties: {
|
|
459
|
+
time: {
|
|
460
|
+
type: 'string',
|
|
461
|
+
description: 'When in the day, e.g. "Afternoon" or "19:00"',
|
|
462
|
+
},
|
|
463
|
+
what: { type: 'string', description: 'What happens then, in a few words' },
|
|
464
|
+
note: { type: 'string', description: 'One line more, optional' },
|
|
465
|
+
},
|
|
466
|
+
required: ['what'],
|
|
467
|
+
},
|
|
468
|
+
},
|
|
452
469
|
},
|
|
453
470
|
required: ['label'],
|
|
454
471
|
},
|
|
@@ -2605,11 +2622,13 @@ const answerTool = async (deps, name, rawArgs, ctx) => {
|
|
|
2605
2622
|
label: str(d.label),
|
|
2606
2623
|
note: typeof d.note === 'string' ? d.note : undefined,
|
|
2607
2624
|
items: d.items ?? [],
|
|
2625
|
+
...(Array.isArray(d.plan) ? { plan: d.plan } : {}),
|
|
2608
2626
|
})), {
|
|
2609
2627
|
title: str(args.title),
|
|
2610
2628
|
stay: asStay(args),
|
|
2611
2629
|
trip: deps.trips.read(key),
|
|
2612
2630
|
bookings: await deps.backend.listBookings(identity(deps, ctx, key, args), 50),
|
|
2631
|
+
who: identity(deps, ctx, key),
|
|
2613
2632
|
});
|
|
2614
2633
|
if (plan.days.length === 0) {
|
|
2615
2634
|
return {
|