@benchme/scenarios 0.9.1 → 0.11.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 (138) 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/cuj-v1/accounts.d.ts +14 -0
  8. package/dist/cuj-v1/accounts.js +52 -0
  9. package/dist/cuj-v1/accounts.js.map +1 -0
  10. package/dist/cuj-v1/index.d.ts +10 -0
  11. package/dist/cuj-v1/index.js +21 -0
  12. package/dist/cuj-v1/index.js.map +1 -0
  13. package/dist/guide-v1/index.js +2 -0
  14. package/dist/guide-v1/index.js.map +1 -1
  15. package/dist/index.d.ts +16 -2
  16. package/dist/index.js +18 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/prng.d.ts +7 -0
  19. package/dist/prng.js +12 -0
  20. package/dist/prng.js.map +1 -1
  21. package/dist/scenario.d.ts +78 -0
  22. package/dist/scenario.js.map +1 -1
  23. package/dist/shops-v1/index.js +2 -0
  24. package/dist/shops-v1/index.js.map +1 -1
  25. package/dist/sites/cinema/generate.d.ts +22 -0
  26. package/dist/sites/cinema/generate.js +258 -0
  27. package/dist/sites/cinema/generate.js.map +1 -0
  28. package/dist/sites/cinema/index.d.ts +3 -0
  29. package/dist/sites/cinema/index.js +4 -0
  30. package/dist/sites/cinema/index.js.map +1 -0
  31. package/dist/sites/cinema/rules.d.ts +142 -0
  32. package/dist/sites/cinema/rules.js +191 -0
  33. package/dist/sites/cinema/rules.js.map +1 -0
  34. package/dist/sites/cinema/types.d.ts +93 -0
  35. package/dist/sites/cinema/types.js +2 -0
  36. package/dist/sites/cinema/types.js.map +1 -0
  37. package/dist/sites/clinic/generate.d.ts +28 -0
  38. package/dist/sites/clinic/generate.js +282 -0
  39. package/dist/sites/clinic/generate.js.map +1 -0
  40. package/dist/sites/clinic/index.d.ts +3 -0
  41. package/dist/sites/clinic/index.js +3 -0
  42. package/dist/sites/clinic/index.js.map +1 -0
  43. package/dist/sites/clinic/rules.d.ts +96 -0
  44. package/dist/sites/clinic/rules.js +154 -0
  45. package/dist/sites/clinic/rules.js.map +1 -0
  46. package/dist/sites/clinic/types.d.ts +125 -0
  47. package/dist/sites/clinic/types.js +2 -0
  48. package/dist/sites/clinic/types.js.map +1 -0
  49. package/dist/sites/dining/generate.d.ts +15 -0
  50. package/dist/sites/dining/generate.js +146 -0
  51. package/dist/sites/dining/generate.js.map +1 -0
  52. package/dist/sites/dining/index.d.ts +3 -0
  53. package/dist/sites/dining/index.js +4 -0
  54. package/dist/sites/dining/index.js.map +1 -0
  55. package/dist/sites/dining/rules.d.ts +92 -0
  56. package/dist/sites/dining/rules.js +156 -0
  57. package/dist/sites/dining/rules.js.map +1 -0
  58. package/dist/sites/dining/types.d.ts +69 -0
  59. package/dist/sites/dining/types.js +14 -0
  60. package/dist/sites/dining/types.js.map +1 -0
  61. package/dist/sites/events/generate.d.ts +27 -0
  62. package/dist/sites/events/generate.js +197 -0
  63. package/dist/sites/events/generate.js.map +1 -0
  64. package/dist/sites/events/index.d.ts +3 -0
  65. package/dist/sites/events/index.js +4 -0
  66. package/dist/sites/events/index.js.map +1 -0
  67. package/dist/sites/events/rules.d.ts +99 -0
  68. package/dist/sites/events/rules.js +172 -0
  69. package/dist/sites/events/rules.js.map +1 -0
  70. package/dist/sites/events/types.d.ts +78 -0
  71. package/dist/sites/events/types.js +10 -0
  72. package/dist/sites/events/types.js.map +1 -0
  73. package/dist/sites/flights/generate.d.ts +21 -0
  74. package/dist/sites/flights/generate.js +210 -0
  75. package/dist/sites/flights/generate.js.map +1 -0
  76. package/dist/sites/flights/index.d.ts +3 -0
  77. package/dist/sites/flights/index.js +3 -0
  78. package/dist/sites/flights/index.js.map +1 -0
  79. package/dist/sites/flights/rules.d.ts +79 -0
  80. package/dist/sites/flights/rules.js +125 -0
  81. package/dist/sites/flights/rules.js.map +1 -0
  82. package/dist/sites/flights/types.d.ts +69 -0
  83. package/dist/sites/flights/types.js +2 -0
  84. package/dist/sites/flights/types.js.map +1 -0
  85. package/dist/sites/homes/generate.d.ts +19 -0
  86. package/dist/sites/homes/generate.js +180 -0
  87. package/dist/sites/homes/generate.js.map +1 -0
  88. package/dist/sites/homes/index.d.ts +3 -0
  89. package/dist/sites/homes/index.js +3 -0
  90. package/dist/sites/homes/index.js.map +1 -0
  91. package/dist/sites/homes/rules.d.ts +68 -0
  92. package/dist/sites/homes/rules.js +94 -0
  93. package/dist/sites/homes/rules.js.map +1 -0
  94. package/dist/sites/homes/types.d.ts +62 -0
  95. package/dist/sites/homes/types.js +2 -0
  96. package/dist/sites/homes/types.js.map +1 -0
  97. package/dist/sites/hotels/generate.d.ts +16 -0
  98. package/dist/sites/hotels/generate.js +134 -0
  99. package/dist/sites/hotels/generate.js.map +1 -0
  100. package/dist/sites/pizza/catalog.d.ts +34 -0
  101. package/dist/sites/pizza/catalog.js +65 -0
  102. package/dist/sites/pizza/catalog.js.map +1 -0
  103. package/dist/sites/pizza/generate.d.ts +19 -0
  104. package/dist/sites/pizza/generate.js +203 -0
  105. package/dist/sites/pizza/generate.js.map +1 -0
  106. package/dist/sites/pizza/index.d.ts +4 -0
  107. package/dist/sites/pizza/index.js +4 -0
  108. package/dist/sites/pizza/index.js.map +1 -0
  109. package/dist/sites/pizza/rules.d.ts +134 -0
  110. package/dist/sites/pizza/rules.js +217 -0
  111. package/dist/sites/pizza/rules.js.map +1 -0
  112. package/dist/sites/pizza/types.d.ts +114 -0
  113. package/dist/sites/pizza/types.js +2 -0
  114. package/dist/sites/pizza/types.js.map +1 -0
  115. package/dist/sites/rows.d.ts +14 -0
  116. package/dist/sites/rows.js +45 -0
  117. package/dist/sites/rows.js.map +1 -0
  118. package/dist/sites/sports/generate.d.ts +18 -0
  119. package/dist/sites/sports/generate.js +247 -0
  120. package/dist/sites/sports/generate.js.map +1 -0
  121. package/dist/sites/sports/index.d.ts +3 -0
  122. package/dist/sites/sports/index.js +3 -0
  123. package/dist/sites/sports/index.js.map +1 -0
  124. package/dist/sites/sports/rules.d.ts +110 -0
  125. package/dist/sites/sports/rules.js +139 -0
  126. package/dist/sites/sports/rules.js.map +1 -0
  127. package/dist/sites/sports/types.d.ts +91 -0
  128. package/dist/sites/sports/types.js +8 -0
  129. package/dist/sites/sports/types.js.map +1 -0
  130. package/dist/stays.d.ts +63 -0
  131. package/dist/stays.js +96 -0
  132. package/dist/stays.js.map +1 -0
  133. package/dist/web-v1/index.js +2 -0
  134. package/dist/web-v1/index.js.map +1 -1
  135. package/dist/webmcp-v1/index.d.ts +11 -0
  136. package/dist/webmcp-v1/index.js +26 -0
  137. package/dist/webmcp-v1/index.js.map +1 -0
  138. package/package.json +1 -1
@@ -0,0 +1,110 @@
1
+ import type { SportAddress, SportCategory, SportCustomer, SportOrder, SportOrderLine, SportProduct, SportReturn, SportShippingPolicy, SportVariant } from "./types.js";
2
+ /**
3
+ * The sports site's rules, as pure functions over rows. apps/sports enforces
4
+ * them inside every write's transaction and answers every search with them,
5
+ * and the intent corpus derives its answer keys with them, so the site and the
6
+ * keys cannot disagree about what can be ordered, cancelled or returned.
7
+ */
8
+ /**
9
+ * The site's calendar date. Fixed, never the real today, so a seed means the
10
+ * same orders forever: an order placed through the site is dated this day, and
11
+ * a return is accepted while this day is within the line's return window.
12
+ */
13
+ export declare const SPORTS_TODAY = "2027-06-15";
14
+ /** Seeded orders are placed from this day up to SPORTS_TODAY. */
15
+ export declare const SPORTS_HISTORY_FROM = "2027-01-04";
16
+ export declare const SPORTS_MAX_QTY = 10;
17
+ export declare const SPORTS_MAX_LINES = 8;
18
+ export declare const SPORTS_RETURN_REASONS: readonly ["too small", "too large", "defective", "not as described", "no longer needed"];
19
+ export type SportsProblem = {
20
+ code: string;
21
+ message: string;
22
+ };
23
+ export type SportsLineRequest = {
24
+ sku: string;
25
+ qty: number;
26
+ };
27
+ export type SportsOrderRequest = {
28
+ customerEmail: string;
29
+ addressCode: string;
30
+ lines: SportsLineRequest[];
31
+ };
32
+ export type SportsReturnRequest = {
33
+ orderNo: string;
34
+ sku: string;
35
+ qty: number;
36
+ reason: string;
37
+ };
38
+ export type SportsSearch = {
39
+ query?: string;
40
+ category?: string;
41
+ size?: string;
42
+ colour?: string;
43
+ maxPriceCents?: number;
44
+ maxWeightGrams?: number;
45
+ inStock?: boolean;
46
+ };
47
+ /** One variant a search found, with its product's name, brand and category. */
48
+ export type SportsOffer = {
49
+ sku: string;
50
+ productCode: string;
51
+ productName: string;
52
+ brand: string;
53
+ category: string;
54
+ size: string;
55
+ colour: string;
56
+ weightGrams: number;
57
+ priceCents: number;
58
+ stock: number;
59
+ };
60
+ export type SportsTotals = {
61
+ subtotalCents: number;
62
+ shippingCents: number;
63
+ totalCents: number;
64
+ };
65
+ /** The fee, or nothing once the subtotal reaches the free-shipping threshold. An empty order ships nothing. */
66
+ export declare function sportsShippingCents(policy: SportShippingPolicy, subtotalCents: number): number;
67
+ export declare function sportsOrderTotals(policy: SportShippingPolicy, lines: readonly {
68
+ qty: number;
69
+ unitPriceCents: number;
70
+ }[]): SportsTotals;
71
+ /**
72
+ * Variants matching every given filter, cheapest first (then by SKU). `query`
73
+ * words must all appear in the product's name, brand, category or material;
74
+ * category, size and colour match whole values, ignoring case; `inStock` keeps
75
+ * only variants with at least one unit free.
76
+ */
77
+ export declare function searchSportsVariants(rows: {
78
+ products: readonly SportProduct[];
79
+ variants: readonly SportVariant[];
80
+ }, q: SportsSearch): SportsOffer[];
81
+ /**
82
+ * Why an order cannot be placed: the customer, the address (one of THEIR saved
83
+ * addresses), the lines (1–8 distinct known SKUs, 1–10 of each), then stock —
84
+ * every line must have its quantity free. The rule every order write is held to.
85
+ */
86
+ export declare function sportsOrderProblem(req: SportsOrderRequest, ctx: {
87
+ customer: SportCustomer | null;
88
+ address: SportAddress | null;
89
+ variant: (sku: string) => SportVariant | undefined;
90
+ }): SportsProblem | null;
91
+ /** Only an order still processing (not shipped) can be cancelled. */
92
+ export declare function sportsCancelProblem(order: SportOrder): SportsProblem | null;
93
+ /** The last day a line can be returned: its order's delivery date plus its category's window. */
94
+ export declare function sportsReturnDeadline(deliveredOn: string, returnWindowDays: number): string;
95
+ export declare function sportsReturnedQty(returns: readonly SportReturn[], orderNo: string, sku: string): number;
96
+ /**
97
+ * Why a return cannot be requested: the order and line, the quantity and
98
+ * reason, that the order was delivered, that `today` is no later than the
99
+ * line's last return day, and that the quantity is at most what was bought
100
+ * minus what was already returned.
101
+ */
102
+ export declare function sportsReturnProblem(req: SportsReturnRequest, ctx: {
103
+ order: SportOrder | null;
104
+ line: SportOrderLine | null;
105
+ category: SportCategory | null;
106
+ returns: readonly SportReturn[];
107
+ today?: string;
108
+ }): SportsProblem | null;
109
+ /** What a reorder asks for: the same SKUs and quantities, to the same address unless another is given. A blank address code is one not given. */
110
+ export declare function sportsReorderRequest(order: SportOrder, lines: readonly SportOrderLine[], addressCode?: string): SportsOrderRequest;
@@ -0,0 +1,139 @@
1
+ import { addDays } from "../../stays.js";
2
+ /**
3
+ * The sports site's rules, as pure functions over rows. apps/sports enforces
4
+ * them inside every write's transaction and answers every search with them,
5
+ * and the intent corpus derives its answer keys with them, so the site and the
6
+ * keys cannot disagree about what can be ordered, cancelled or returned.
7
+ */
8
+ /**
9
+ * The site's calendar date. Fixed, never the real today, so a seed means the
10
+ * same orders forever: an order placed through the site is dated this day, and
11
+ * a return is accepted while this day is within the line's return window.
12
+ */
13
+ export const SPORTS_TODAY = "2027-06-15";
14
+ /** Seeded orders are placed from this day up to SPORTS_TODAY. */
15
+ export const SPORTS_HISTORY_FROM = "2027-01-04";
16
+ export const SPORTS_MAX_QTY = 10;
17
+ export const SPORTS_MAX_LINES = 8;
18
+ export const SPORTS_RETURN_REASONS = ["too small", "too large", "defective", "not as described", "no longer needed"];
19
+ const norm = (s) => s.trim().toLowerCase();
20
+ const qtyOk = (n) => Number.isInteger(n) && n >= 1 && n <= SPORTS_MAX_QTY;
21
+ /** The fee, or nothing once the subtotal reaches the free-shipping threshold. An empty order ships nothing. */
22
+ export function sportsShippingCents(policy, subtotalCents) {
23
+ return subtotalCents === 0 || subtotalCents >= policy.freeFromCents ? 0 : policy.feeCents;
24
+ }
25
+ export function sportsOrderTotals(policy, lines) {
26
+ const subtotalCents = lines.reduce((sum, l) => sum + l.qty * l.unitPriceCents, 0);
27
+ const shippingCents = sportsShippingCents(policy, subtotalCents);
28
+ return { subtotalCents, shippingCents, totalCents: subtotalCents + shippingCents };
29
+ }
30
+ /**
31
+ * Variants matching every given filter, cheapest first (then by SKU). `query`
32
+ * words must all appear in the product's name, brand, category or material;
33
+ * category, size and colour match whole values, ignoring case; `inStock` keeps
34
+ * only variants with at least one unit free.
35
+ */
36
+ export function searchSportsVariants(rows, q) {
37
+ const product = new Map(rows.products.map((p) => [p.code, p]));
38
+ const words = norm(q.query ?? "").split(/\s+/).filter(Boolean);
39
+ const out = [];
40
+ for (const v of rows.variants) {
41
+ const p = product.get(v.productCode);
42
+ if (!p)
43
+ continue;
44
+ if (q.category && norm(q.category) !== p.category)
45
+ continue;
46
+ if (q.size && norm(q.size) !== norm(v.size))
47
+ continue;
48
+ if (q.colour && norm(q.colour) !== norm(v.colour))
49
+ continue;
50
+ if (q.maxPriceCents !== undefined && v.priceCents > q.maxPriceCents)
51
+ continue;
52
+ if (q.maxWeightGrams !== undefined && v.weightGrams > q.maxWeightGrams)
53
+ continue;
54
+ if (q.inStock && v.stock < 1)
55
+ continue;
56
+ const text = norm(`${p.name} ${p.brand} ${p.category} ${p.material}`);
57
+ if (!words.every((w) => text.includes(w)))
58
+ continue;
59
+ out.push({ sku: v.sku, productCode: p.code, productName: p.name, brand: p.brand, category: p.category, size: v.size, colour: v.colour, weightGrams: v.weightGrams, priceCents: v.priceCents, stock: v.stock });
60
+ }
61
+ return out.sort((x, y) => x.priceCents - y.priceCents || x.sku.localeCompare(y.sku));
62
+ }
63
+ /**
64
+ * Why an order cannot be placed: the customer, the address (one of THEIR saved
65
+ * addresses), the lines (1–8 distinct known SKUs, 1–10 of each), then stock —
66
+ * every line must have its quantity free. The rule every order write is held to.
67
+ */
68
+ export function sportsOrderProblem(req, ctx) {
69
+ if (!ctx.customer)
70
+ return { code: "UNKNOWN_CUSTOMER", message: `no customer account ${req.customerEmail}` };
71
+ if (!ctx.address || ctx.address.customerEmail !== ctx.customer.email)
72
+ return { code: "NOT_THEIR_ADDRESS", message: `${req.addressCode} is not one of ${ctx.customer.email}'s saved addresses` };
73
+ if (req.lines.length === 0)
74
+ return { code: "NO_LINES", message: "an order needs at least one line" };
75
+ if (req.lines.length > SPORTS_MAX_LINES)
76
+ return { code: "TOO_MANY_LINES", message: `an order has at most ${SPORTS_MAX_LINES} lines` };
77
+ const seen = new Set();
78
+ for (const l of req.lines) {
79
+ if (!qtyOk(l.qty))
80
+ return { code: "BAD_QTY", message: `a line orders 1 to ${SPORTS_MAX_QTY} units, not ${l.qty}` };
81
+ if (seen.has(l.sku))
82
+ return { code: "DUPLICATE_SKU", message: `${l.sku} is on the order twice; order it once with the total quantity` };
83
+ seen.add(l.sku);
84
+ if (!ctx.variant(l.sku))
85
+ return { code: "UNKNOWN_SKU", message: `no variant ${l.sku}` };
86
+ }
87
+ for (const l of req.lines) {
88
+ const v = ctx.variant(l.sku);
89
+ if (v.stock < l.qty)
90
+ return { code: "OUT_OF_STOCK", message: v.stock === 0 ? `${l.sku} is out of stock` : `only ${v.stock} of ${l.sku} in stock, ${l.qty} asked` };
91
+ }
92
+ return null;
93
+ }
94
+ /** Only an order still processing (not shipped) can be cancelled. */
95
+ export function sportsCancelProblem(order) {
96
+ if (order.status === "cancelled")
97
+ return { code: "ALREADY_CANCELLED", message: `order ${order.orderNo} is already cancelled` };
98
+ if (order.status !== "processing")
99
+ return { code: "NOT_CANCELLABLE", message: `order ${order.orderNo} is ${order.status}; only an order that is still processing can be cancelled` };
100
+ return null;
101
+ }
102
+ /** The last day a line can be returned: its order's delivery date plus its category's window. */
103
+ export function sportsReturnDeadline(deliveredOn, returnWindowDays) {
104
+ return addDays(deliveredOn, returnWindowDays);
105
+ }
106
+ export function sportsReturnedQty(returns, orderNo, sku) {
107
+ return returns.filter((r) => r.orderNo === orderNo && r.sku === sku).reduce((sum, r) => sum + r.qty, 0);
108
+ }
109
+ /**
110
+ * Why a return cannot be requested: the order and line, the quantity and
111
+ * reason, that the order was delivered, that `today` is no later than the
112
+ * line's last return day, and that the quantity is at most what was bought
113
+ * minus what was already returned.
114
+ */
115
+ export function sportsReturnProblem(req, ctx) {
116
+ const { order, line } = ctx;
117
+ if (!order)
118
+ return { code: "UNKNOWN_ORDER", message: `no order ${req.orderNo}` };
119
+ if (!line || !ctx.category)
120
+ return { code: "NOT_IN_ORDER", message: `order ${order.orderNo} has no line for ${req.sku}` };
121
+ if (!qtyOk(req.qty))
122
+ return { code: "BAD_QTY", message: `a return is 1 to ${SPORTS_MAX_QTY} units, not ${req.qty}` };
123
+ if (!SPORTS_RETURN_REASONS.includes(req.reason))
124
+ return { code: "BAD_REASON", message: `the reason must be one of: ${SPORTS_RETURN_REASONS.join(", ")}` };
125
+ if (order.status !== "delivered" || !order.deliveredOn)
126
+ return { code: "NOT_DELIVERED", message: `order ${order.orderNo} is ${order.status}; only a delivered order can be returned` };
127
+ const lastDay = sportsReturnDeadline(order.deliveredOn, ctx.category.returnWindowDays);
128
+ if ((ctx.today ?? SPORTS_TODAY) > lastDay)
129
+ return { code: "RETURN_WINDOW_CLOSED", message: `${ctx.category.name} items can be returned for ${ctx.category.returnWindowDays} days after delivery; the last day for order ${order.orderNo} was ${lastDay}` };
130
+ const left = line.qty - sportsReturnedQty(ctx.returns, order.orderNo, line.sku);
131
+ if (req.qty > left)
132
+ return { code: "RETURN_QTY", message: `${left} of ${line.sku} from order ${order.orderNo} can still be returned (bought ${line.qty})` };
133
+ return null;
134
+ }
135
+ /** What a reorder asks for: the same SKUs and quantities, to the same address unless another is given. A blank address code is one not given. */
136
+ export function sportsReorderRequest(order, lines, addressCode) {
137
+ return { customerEmail: order.customerEmail, addressCode: addressCode?.trim() ? addressCode : order.addressCode, lines: lines.filter((l) => l.orderNo === order.orderNo).map((l) => ({ sku: l.sku, qty: l.qty })) };
138
+ }
139
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../../src/sites/sports/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGzC;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AACzC,iEAAiE;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAChD,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,CAAU,CAAC;AAW9H,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACnD,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC;AAElF,+GAA+G;AAC/G,MAAM,UAAU,mBAAmB,CAAC,MAA2B,EAAE,aAAqB;IACpF,OAAO,aAAa,KAAK,CAAC,IAAI,aAAa,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAA2B,E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AAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;AACtN,CAAC"}
@@ -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,UAAU,GAAG,EAAE,CAAC;AAQ7B,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC,MAAM,UAAU,MAAM,CAAC,CAAS;IAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAChC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;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C;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,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;SACzB,CAAC;IACJ,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;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,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,UAAU,EAAE;SAChB,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -0,0 +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.11.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",