@ottotheagent/mcp-card-assets 0.6.0 → 0.7.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/README.md +2 -2
- package/package.json +1 -1
- package/room-card.js +2 -2
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# @ottotheagent/mcp-card-assets
|
|
2
2
|
|
|
3
|
-
**Created**: 2026-10-02 | **Last Updated**: 2026-10-
|
|
3
|
+
**Created**: 2026-10-02 | **Last Updated**: 2026-10-05
|
|
4
4
|
|
|
5
5
|
Renderers, logos and photo placeholders for the Otto flight, hotel, room and car cards. Each `render_*` MCP tool returns card data and a snippet. The host's model mounts the card in its own widget sandbox, which loads files only from a few public CDNs, so the assets are served from jsDelivr.
|
|
6
6
|
|
|
7
7
|
## Contents
|
|
8
8
|
|
|
9
9
|
- `flight-card.js`, `hotel-card.js`, `room-card.js` and `car-card.js` each draw one card and expose `OttoFlightCard`, `OttoHotelCard`, `OttoRoomCard` or `OttoCarCard` with `render(rootElement, card)`. Each carries its own CSS and only the icons it uses inline, so the sandbox loads one script per card. The server's snippet loads jsDelivr's minified copy (`*-card.min.js`).
|
|
10
|
-
- Select (Show rooms on the hotel card) sends the pick as the traveler's message through the host's `sendPrompt()`: "Book flight …", "Show rooms at …", "
|
|
10
|
+
- Select (Show rooms on the hotel card) sends the pick as the traveler's message through the host's `sendPrompt()`: "Book flight …", "Show rooms at …", "Select room …" or "Book car …". The message carries no id.
|
|
11
11
|
- `*-card.css` holds each card's CSS as a separate file, for reference.
|
|
12
12
|
- `marks/<IATA>.png` holds airline logos, and `marks/cars/<code>.svg` holds car-company logos.
|
|
13
13
|
- `placeholders/hotel.svg`, `room.svg` and `car.svg` fill the photo plate, because host sandboxes block supplier photos.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ottotheagent/mcp-card-assets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Renderers, styles, logos and photo placeholders for the Otto flight, hotel, room and car cards that Claude draws in its widget sandbox.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"files": [
|
package/room-card.js
CHANGED
|
@@ -165,7 +165,7 @@ function mount(root, card, spec) {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/* Otto room card: OttoRoomCard.render(root, card), card from render_hotel_rooms.
|
|
168
|
-
* Select sends "
|
|
168
|
+
* Select sends "Select room …" as the traveler's message. */
|
|
169
169
|
|
|
170
170
|
// Fact icon → [icon name, text fallback].
|
|
171
171
|
const FACT_ICONS = {
|
|
@@ -236,7 +236,7 @@ function render(root, card) {
|
|
|
236
236
|
mount(root, card, {
|
|
237
237
|
empty: "No room options to show.",
|
|
238
238
|
option,
|
|
239
|
-
message: (item) => `
|
|
239
|
+
message: (item) => `Select room ${describe(item)}`,
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
|