@benchme/scenarios 0.9.1 → 0.10.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.
Files changed (132) hide show
  1. package/dist/acme-v1/index.d.ts +2 -1
  2. package/dist/acme-v1/index.js +4 -1
  3. package/dist/acme-v1/index.js.map +1 -1
  4. package/dist/acme-v1/names.d.ts +3 -0
  5. package/dist/acme-v1/names.js +3 -0
  6. package/dist/acme-v1/names.js.map +1 -1
  7. package/dist/guide-v1/index.js +2 -0
  8. package/dist/guide-v1/index.js.map +1 -1
  9. package/dist/index.d.ts +14 -2
  10. package/dist/index.js +15 -2
  11. package/dist/index.js.map +1 -1
  12. package/dist/prng.d.ts +7 -0
  13. package/dist/prng.js +12 -0
  14. package/dist/prng.js.map +1 -1
  15. package/dist/scenario.d.ts +68 -0
  16. package/dist/scenario.js.map +1 -1
  17. package/dist/shops-v1/index.js +2 -0
  18. package/dist/shops-v1/index.js.map +1 -1
  19. package/dist/sites/cinema/generate.d.ts +22 -0
  20. package/dist/sites/cinema/generate.js +258 -0
  21. package/dist/sites/cinema/generate.js.map +1 -0
  22. package/dist/sites/cinema/index.d.ts +3 -0
  23. package/dist/sites/cinema/index.js +4 -0
  24. package/dist/sites/cinema/index.js.map +1 -0
  25. package/dist/sites/cinema/rules.d.ts +142 -0
  26. package/dist/sites/cinema/rules.js +191 -0
  27. package/dist/sites/cinema/rules.js.map +1 -0
  28. package/dist/sites/cinema/types.d.ts +93 -0
  29. package/dist/sites/cinema/types.js +2 -0
  30. package/dist/sites/cinema/types.js.map +1 -0
  31. package/dist/sites/clinic/generate.d.ts +28 -0
  32. package/dist/sites/clinic/generate.js +282 -0
  33. package/dist/sites/clinic/generate.js.map +1 -0
  34. package/dist/sites/clinic/index.d.ts +3 -0
  35. package/dist/sites/clinic/index.js +3 -0
  36. package/dist/sites/clinic/index.js.map +1 -0
  37. package/dist/sites/clinic/rules.d.ts +96 -0
  38. package/dist/sites/clinic/rules.js +154 -0
  39. package/dist/sites/clinic/rules.js.map +1 -0
  40. package/dist/sites/clinic/types.d.ts +125 -0
  41. package/dist/sites/clinic/types.js +2 -0
  42. package/dist/sites/clinic/types.js.map +1 -0
  43. package/dist/sites/dining/generate.d.ts +15 -0
  44. package/dist/sites/dining/generate.js +146 -0
  45. package/dist/sites/dining/generate.js.map +1 -0
  46. package/dist/sites/dining/index.d.ts +3 -0
  47. package/dist/sites/dining/index.js +4 -0
  48. package/dist/sites/dining/index.js.map +1 -0
  49. package/dist/sites/dining/rules.d.ts +92 -0
  50. package/dist/sites/dining/rules.js +156 -0
  51. package/dist/sites/dining/rules.js.map +1 -0
  52. package/dist/sites/dining/types.d.ts +69 -0
  53. package/dist/sites/dining/types.js +14 -0
  54. package/dist/sites/dining/types.js.map +1 -0
  55. package/dist/sites/events/generate.d.ts +27 -0
  56. package/dist/sites/events/generate.js +197 -0
  57. package/dist/sites/events/generate.js.map +1 -0
  58. package/dist/sites/events/index.d.ts +3 -0
  59. package/dist/sites/events/index.js +4 -0
  60. package/dist/sites/events/index.js.map +1 -0
  61. package/dist/sites/events/rules.d.ts +99 -0
  62. package/dist/sites/events/rules.js +172 -0
  63. package/dist/sites/events/rules.js.map +1 -0
  64. package/dist/sites/events/types.d.ts +78 -0
  65. package/dist/sites/events/types.js +10 -0
  66. package/dist/sites/events/types.js.map +1 -0
  67. package/dist/sites/flights/generate.d.ts +21 -0
  68. package/dist/sites/flights/generate.js +210 -0
  69. package/dist/sites/flights/generate.js.map +1 -0
  70. package/dist/sites/flights/index.d.ts +3 -0
  71. package/dist/sites/flights/index.js +3 -0
  72. package/dist/sites/flights/index.js.map +1 -0
  73. package/dist/sites/flights/rules.d.ts +79 -0
  74. package/dist/sites/flights/rules.js +125 -0
  75. package/dist/sites/flights/rules.js.map +1 -0
  76. package/dist/sites/flights/types.d.ts +69 -0
  77. package/dist/sites/flights/types.js +2 -0
  78. package/dist/sites/flights/types.js.map +1 -0
  79. package/dist/sites/homes/generate.d.ts +19 -0
  80. package/dist/sites/homes/generate.js +180 -0
  81. package/dist/sites/homes/generate.js.map +1 -0
  82. package/dist/sites/homes/index.d.ts +3 -0
  83. package/dist/sites/homes/index.js +3 -0
  84. package/dist/sites/homes/index.js.map +1 -0
  85. package/dist/sites/homes/rules.d.ts +68 -0
  86. package/dist/sites/homes/rules.js +94 -0
  87. package/dist/sites/homes/rules.js.map +1 -0
  88. package/dist/sites/homes/types.d.ts +62 -0
  89. package/dist/sites/homes/types.js +2 -0
  90. package/dist/sites/homes/types.js.map +1 -0
  91. package/dist/sites/hotels/generate.d.ts +16 -0
  92. package/dist/sites/hotels/generate.js +134 -0
  93. package/dist/sites/hotels/generate.js.map +1 -0
  94. package/dist/sites/pizza/catalog.d.ts +34 -0
  95. package/dist/sites/pizza/catalog.js +65 -0
  96. package/dist/sites/pizza/catalog.js.map +1 -0
  97. package/dist/sites/pizza/generate.d.ts +19 -0
  98. package/dist/sites/pizza/generate.js +203 -0
  99. package/dist/sites/pizza/generate.js.map +1 -0
  100. package/dist/sites/pizza/index.d.ts +4 -0
  101. package/dist/sites/pizza/index.js +4 -0
  102. package/dist/sites/pizza/index.js.map +1 -0
  103. package/dist/sites/pizza/rules.d.ts +134 -0
  104. package/dist/sites/pizza/rules.js +217 -0
  105. package/dist/sites/pizza/rules.js.map +1 -0
  106. package/dist/sites/pizza/types.d.ts +114 -0
  107. package/dist/sites/pizza/types.js +2 -0
  108. package/dist/sites/pizza/types.js.map +1 -0
  109. package/dist/sites/rows.d.ts +14 -0
  110. package/dist/sites/rows.js +45 -0
  111. package/dist/sites/rows.js.map +1 -0
  112. package/dist/sites/sports/generate.d.ts +18 -0
  113. package/dist/sites/sports/generate.js +247 -0
  114. package/dist/sites/sports/generate.js.map +1 -0
  115. package/dist/sites/sports/index.d.ts +3 -0
  116. package/dist/sites/sports/index.js +3 -0
  117. package/dist/sites/sports/index.js.map +1 -0
  118. package/dist/sites/sports/rules.d.ts +110 -0
  119. package/dist/sites/sports/rules.js +139 -0
  120. package/dist/sites/sports/rules.js.map +1 -0
  121. package/dist/sites/sports/types.d.ts +91 -0
  122. package/dist/sites/sports/types.js +8 -0
  123. package/dist/sites/sports/types.js.map +1 -0
  124. package/dist/stays.d.ts +63 -0
  125. package/dist/stays.js +96 -0
  126. package/dist/stays.js.map +1 -0
  127. package/dist/web-v1/index.js +2 -0
  128. package/dist/web-v1/index.js.map +1 -1
  129. package/dist/webmcp-v1/index.d.ts +11 -0
  130. package/dist/webmcp-v1/index.js +26 -0
  131. package/dist/webmcp-v1/index.js.map +1 -0
  132. package/package.json +1 -1
@@ -0,0 +1,91 @@
1
+ /**
2
+ * The sports retailer site (apps/sports, "Brackenford Sports"): a catalog of
3
+ * products with variants, seeded customer accounts with saved addresses, and
4
+ * their order history — orders, lines and returns. Natural keys only (SKU,
5
+ * ORD-…, RET-…, AD-…), no database ids. Money is cents. Rules: ./rules.ts.
6
+ */
7
+ /** A catalog category and its return policy: a line may be returned up to `returnWindowDays` after its order was delivered. */
8
+ export type SportCategory = {
9
+ key: string;
10
+ name: string;
11
+ returnWindowDays: number;
12
+ };
13
+ /** One fee per order, waived when the order's subtotal reaches `freeFromCents`. */
14
+ export type SportShippingPolicy = {
15
+ feeCents: number;
16
+ freeFromCents: number;
17
+ };
18
+ export type SportProduct = {
19
+ code: string;
20
+ name: string;
21
+ brand: string;
22
+ category: string;
23
+ material: string;
24
+ description: string;
25
+ };
26
+ /** One size and colour of a product, with its own SKU, price, weight and stock (units free to order now). */
27
+ export type SportVariant = {
28
+ sku: string;
29
+ productCode: string;
30
+ size: string;
31
+ colour: string;
32
+ weightGrams: number;
33
+ priceCents: number;
34
+ stock: number;
35
+ };
36
+ export type SportCustomer = {
37
+ email: string;
38
+ name: string;
39
+ };
40
+ export type SportAddress = {
41
+ code: string;
42
+ customerEmail: string;
43
+ label: string;
44
+ line1: string;
45
+ city: string;
46
+ postcode: string;
47
+ isDefault: boolean;
48
+ };
49
+ export type SportOrderStatus = "processing" | "shipped" | "delivered" | "cancelled";
50
+ export type SportOrder = {
51
+ orderNo: string;
52
+ customerEmail: string;
53
+ addressCode: string;
54
+ status: SportOrderStatus;
55
+ /** "YYYY-MM-DD"; orders placed through the site are dated SPORTS_TODAY. */
56
+ placedOn: string;
57
+ shippedOn: string | null;
58
+ deliveredOn: string | null;
59
+ cancelledOn: string | null;
60
+ trackingNo: string | null;
61
+ subtotalCents: number;
62
+ shippingCents: number;
63
+ totalCents: number;
64
+ };
65
+ /** One SKU of an order; an order never carries the same SKU twice. */
66
+ export type SportOrderLine = {
67
+ orderNo: string;
68
+ sku: string;
69
+ qty: number;
70
+ unitPriceCents: number;
71
+ };
72
+ export type SportReturn = {
73
+ returnNo: string;
74
+ orderNo: string;
75
+ sku: string;
76
+ qty: number;
77
+ reason: string;
78
+ requestedOn: string;
79
+ refundCents: number;
80
+ };
81
+ export type SportsRows = {
82
+ categories: SportCategory[];
83
+ shipping: SportShippingPolicy;
84
+ products: SportProduct[];
85
+ variants: SportVariant[];
86
+ customers: SportCustomer[];
87
+ addresses: SportAddress[];
88
+ orders: SportOrder[];
89
+ lines: SportOrderLine[];
90
+ returns: SportReturn[];
91
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The sports retailer site (apps/sports, "Brackenford Sports"): a catalog of
3
+ * products with variants, seeded customer accounts with saved addresses, and
4
+ * their order history — orders, lines and returns. Natural keys only (SKU,
5
+ * ORD-…, RET-…, AD-…), no database ids. Money is cents. Rules: ./rules.ts.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/sites/sports/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,63 @@
1
+ import type { Booking, Hotel, HotelRows, RoomType } from "./scenario.js";
2
+ /**
3
+ * The hotel site's booking rules, as pure functions over rows. apps/hotels
4
+ * enforces them on every write and answers every search with them, and the
5
+ * intent corpus derives its answer keys from them, so the site and the keys
6
+ * cannot disagree about what is bookable or what a stay costs.
7
+ */
8
+ /** The check-in dates the site takes bookings for. Fixed, not "from today", so a seed means the same stays forever. */
9
+ export declare const STAY_WINDOW: {
10
+ readonly first: "2027-01-01";
11
+ readonly last: "2027-12-31";
12
+ };
13
+ export declare const MAX_NIGHTS = 14;
14
+ export type Stay = {
15
+ checkIn: string;
16
+ nights: number;
17
+ adults: number;
18
+ kids: number;
19
+ pets: number;
20
+ lateCheckout: boolean;
21
+ };
22
+ export type StayProblem = {
23
+ code: string;
24
+ message: string;
25
+ };
26
+ export type StayQuery = {
27
+ city: string;
28
+ checkIn: string;
29
+ nights: number;
30
+ adults: number;
31
+ kids: number;
32
+ pets: number;
33
+ maxNightlyCents?: number;
34
+ amenities?: readonly string[];
35
+ };
36
+ /** One hotel's cheapest room that fits a query. `totalCents` includes the pet fee when pets come; late checkout is not part of a search. */
37
+ export type StayOffer = {
38
+ hotelCode: string;
39
+ hotelName: string;
40
+ roomCode: string;
41
+ roomName: string;
42
+ nightlyCents: number;
43
+ totalCents: number;
44
+ roomsLeft: number;
45
+ };
46
+ export declare function isDate(s: string): boolean;
47
+ export declare function addDays(date: string, days: number): string;
48
+ /** The nights a stay occupies, by date: check-in up to the day before check-out. */
49
+ export declare function nightsOf(checkIn: string, nights: number): string[];
50
+ export declare function checkOutOf(checkIn: string, nights: number): string;
51
+ /** Rooms of this type still free on EVERY night of the stay. Cancelled bookings hold nothing. */
52
+ export declare function roomsLeft(room: RoomType, bookings: readonly Booking[], checkIn: string, nights: number): number;
53
+ export declare function stayTotalCents(hotel: Hotel, room: RoomType, stay: Pick<Stay, "nights" | "pets" | "lateCheckout">): number;
54
+ /** Why the room cannot take the party for those nights at all, before availability: dates, length, capacity, pets, late checkout. */
55
+ export declare function fitProblem(hotel: Hotel, room: RoomType, stay: Stay): StayProblem | null;
56
+ /** fitProblem, then whether a room of the type is free every night. The rule every booking write is held to. */
57
+ export declare function stayProblem(hotel: Hotel, room: RoomType, stay: Stay, bookings: readonly Booking[]): StayProblem | null;
58
+ /**
59
+ * Every hotel in the city with all the asked amenities (and allowing pets when
60
+ * pets come) that has a room fitting the party, free every night, at no more
61
+ * than the nightly cap — each hotel's cheapest such room, cheapest first.
62
+ */
63
+ export declare function searchStays(rows: HotelRows, q: StayQuery): StayOffer[];
package/dist/stays.js ADDED
@@ -0,0 +1,96 @@
1
+ /**
2
+ * The hotel site's booking rules, as pure functions over rows. apps/hotels
3
+ * enforces them on every write and answers every search with them, and the
4
+ * intent corpus derives its answer keys from them, so the site and the keys
5
+ * cannot disagree about what is bookable or what a stay costs.
6
+ */
7
+ /** The check-in dates the site takes bookings for. Fixed, not "from today", so a seed means the same stays forever. */
8
+ export const STAY_WINDOW = { first: "2027-01-01", last: "2027-12-31" };
9
+ export const MAX_NIGHTS = 14;
10
+ const DATE = /^\d{4}-\d{2}-\d{2}$/;
11
+ export function isDate(s) {
12
+ if (!DATE.test(s))
13
+ return false;
14
+ const d = new Date(`${s}T00:00:00Z`);
15
+ return !Number.isNaN(d.getTime()) && d.toISOString().slice(0, 10) === s;
16
+ }
17
+ export function addDays(date, days) {
18
+ const d = new Date(`${date}T00:00:00Z`);
19
+ d.setUTCDate(d.getUTCDate() + days);
20
+ return d.toISOString().slice(0, 10);
21
+ }
22
+ /** The nights a stay occupies, by date: check-in up to the day before check-out. */
23
+ export function nightsOf(checkIn, nights) {
24
+ return Array.from({ length: nights }, (_, i) => addDays(checkIn, i));
25
+ }
26
+ export function checkOutOf(checkIn, nights) {
27
+ return addDays(checkIn, nights);
28
+ }
29
+ /** Rooms of this type still free on EVERY night of the stay. Cancelled bookings hold nothing. */
30
+ export function roomsLeft(room, bookings, checkIn, nights) {
31
+ const held = bookings.filter((b) => b.roomCode === room.code && b.status === "confirmed");
32
+ let least = room.rooms;
33
+ for (const night of nightsOf(checkIn, nights)) {
34
+ const taken = held.filter((b) => b.checkIn <= night && night < checkOutOf(b.checkIn, b.nights)).length;
35
+ least = Math.min(least, room.rooms - taken);
36
+ }
37
+ return Math.max(0, least);
38
+ }
39
+ export function stayTotalCents(hotel, room, stay) {
40
+ return room.nightlyCents * stay.nights + (stay.pets > 0 ? (hotel.petFeeCents ?? 0) : 0) + (stay.lateCheckout ? (hotel.lateCheckoutFeeCents ?? 0) : 0);
41
+ }
42
+ /** Why the room cannot take the party for those nights at all, before availability: dates, length, capacity, pets, late checkout. */
43
+ export function fitProblem(hotel, room, stay) {
44
+ if (!isDate(stay.checkIn))
45
+ return { code: "BAD_DATE", message: `check-in ${stay.checkIn} is not a date (YYYY-MM-DD)` };
46
+ if (stay.checkIn < STAY_WINDOW.first || stay.checkIn > STAY_WINDOW.last)
47
+ return { code: "OUTSIDE_WINDOW", message: `bookings are taken for check-in dates from ${STAY_WINDOW.first} to ${STAY_WINDOW.last}` };
48
+ if (!Number.isInteger(stay.nights) || stay.nights < 1 || stay.nights > MAX_NIGHTS)
49
+ return { code: "BAD_NIGHTS", message: `a stay is 1 to ${MAX_NIGHTS} nights` };
50
+ if (stay.adults < 1)
51
+ return { code: "NO_ADULT", message: "a booking needs at least one adult" };
52
+ if (stay.adults > room.maxAdults || stay.kids > room.maxKids)
53
+ return { code: "TOO_MANY_GUESTS", message: `the ${room.name} at ${hotel.name} sleeps at most ${room.maxAdults} adults and ${room.maxKids} children` };
54
+ if (stay.pets > 0 && !hotel.petsAllowed)
55
+ return { code: "NO_PETS", message: `${hotel.name} does not allow pets` };
56
+ if (stay.lateCheckout && !hotel.lateCheckoutUntil)
57
+ return { code: "NO_LATE_CHECKOUT", message: `${hotel.name} does not offer late checkout` };
58
+ return null;
59
+ }
60
+ /** fitProblem, then whether a room of the type is free every night. The rule every booking write is held to. */
61
+ export function stayProblem(hotel, room, stay, bookings) {
62
+ const fit = fitProblem(hotel, room, stay);
63
+ if (fit)
64
+ return fit;
65
+ if (roomsLeft(room, bookings, stay.checkIn, stay.nights) < 1)
66
+ return { code: "SOLD_OUT", message: `no ${room.name} is free at ${hotel.name} for ${stay.nights} night(s) from ${stay.checkIn}` };
67
+ return null;
68
+ }
69
+ /**
70
+ * Every hotel in the city with all the asked amenities (and allowing pets when
71
+ * pets come) that has a room fitting the party, free every night, at no more
72
+ * than the nightly cap — each hotel's cheapest such room, cheapest first.
73
+ */
74
+ export function searchStays(rows, q) {
75
+ const city = q.city.trim().toLowerCase();
76
+ const wanted = (q.amenities ?? []).map((a) => a.trim().toLowerCase()).filter(Boolean);
77
+ const stay = { checkIn: q.checkIn, nights: q.nights, adults: q.adults, kids: q.kids, pets: q.pets, lateCheckout: false };
78
+ const offers = [];
79
+ for (const hotel of rows.hotels) {
80
+ if (hotel.city.toLowerCase() !== city)
81
+ continue;
82
+ if (!wanted.every((a) => hotel.amenities.includes(a)))
83
+ continue;
84
+ const fitting = rows.rooms
85
+ .filter((r) => r.hotelCode === hotel.code && (q.maxNightlyCents === undefined || r.nightlyCents <= q.maxNightlyCents) && !fitProblem(hotel, r, stay))
86
+ .map((r) => ({ room: r, left: roomsLeft(r, rows.bookings, q.checkIn, q.nights) }))
87
+ .filter((x) => x.left > 0)
88
+ .sort((x, y) => x.room.nightlyCents - y.room.nightlyCents || x.room.code.localeCompare(y.room.code));
89
+ const best = fitting[0];
90
+ if (!best)
91
+ continue;
92
+ offers.push({ hotelCode: hotel.code, hotelName: hotel.name, roomCode: best.room.code, roomName: best.room.name, nightlyCents: best.room.nightlyCents, totalCents: stayTotalCents(hotel, best.room, stay), roomsLeft: best.left });
93
+ }
94
+ return offers.sort((x, y) => x.nightlyCents - y.nightlyCents || x.hotelCode.localeCompare(y.hotelCode));
95
+ }
96
+ //# sourceMappingURL=stays.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stays.js","sourceRoot":"","sources":["../src/stays.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,uHAAuH;AACvH,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAW,CAAC;AAChF,MAAM,CAAC,MAAM,UAA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AAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACpO,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1G,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { acmeV1 } from "../acme-v1/index.js";
2
+ import { noSiteRows } from "../sites/rows.js";
2
3
  /**
3
4
  * web-v1: the site network (apps/guide, under /web) — a start page listing four fictional products of one category,
4
5
  * each product's own site, and a chain of recommendation sites. Its pages are a pure function of the workspace's seed,
@@ -16,6 +17,7 @@ export const webV1 = {
16
17
  warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
17
18
  helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
18
19
  vault: { documents: [] },
20
+ ...noSiteRows(),
19
21
  };
20
22
  },
21
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAa;IAC7B,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,2HAA2H;IACxI,IAAI,EAAE,CAAC,KAAK,CAAC;IACb,QAAQ;QACN,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;YACnC,SAA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+1,11 @@
1
+ import type { Scenario } from "../scenario.js";
2
+ /**
3
+ * webmcp-v1: the nine sites shaped on GoogleChromeLabs/webmcp-tools — hotels,
4
+ * flights, restaurants, pizza, cinema, a sports store, homes, clinics and
5
+ * office events — in the six cities of the company's depots. The acme apps are
6
+ * empty; `company` is acme-v1's of seed 1, as in shops-v1. Its workspaces
7
+ * advertise the nine sites and the inbox their sign-up codes land in, and no
8
+ * other scenario's workspaces advertise the sites (the gateway lists them as
9
+ * UNLISTED_APPS).
10
+ */
11
+ export declare const webmcpV1: Scenario;
@@ -0,0 +1,26 @@
1
+ import { acmeV1 } from "../acme-v1/index.js";
2
+ import { SITE_APPS, siteRows } from "../sites/rows.js";
3
+ /**
4
+ * webmcp-v1: the nine sites shaped on GoogleChromeLabs/webmcp-tools — hotels,
5
+ * flights, restaurants, pizza, cinema, a sports store, homes, clinics and
6
+ * office events — in the six cities of the company's depots. The acme apps are
7
+ * empty; `company` is acme-v1's of seed 1, as in shops-v1. Its workspaces
8
+ * advertise the nine sites and the inbox their sign-up codes land in, and no
9
+ * other scenario's workspaces advertise the sites (the gateway lists them as
10
+ * UNLISTED_APPS).
11
+ */
12
+ export const webmcpV1 = {
13
+ key: "webmcp-v1",
14
+ description: "Nine sites shaped on GoogleChromeLabs/webmcp-tools: hotels, flights, restaurants, pizza, cinema, a sports store, homes, clinics and office events, in six cities; the acme apps are empty",
15
+ apps: [...SITE_APPS, "mail"],
16
+ generate(seed) {
17
+ return {
18
+ company: acmeV1.generate(1).company,
19
+ warehouse: { products: [], locations: [], stock: [], customers: [], orders: [], orderLines: [], transfers: [] },
20
+ helpdesk: { agents: [], tickets: [], comments: [], slaPolicies: [] },
21
+ vault: { documents: [] },
22
+ ...siteRows(seed),
23
+ };
24
+ },
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webmcp-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,GAAG,EAAE,WAAW;IAChB,WAAW,EACT,2LAA2L;IAC7L,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAY;QACnB,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO;YACnC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/G,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;YACpE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YACxB,GAAG,QAAQ,CAAC,IAAI,CAAC;SAClB,CAAC;IACJ,CAAC;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benchme/scenarios",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",