@benchme/scenarios 0.10.0 → 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.
@@ -0,0 +1,14 @@
1
+ import type { SiteAccounts } from "../scenario.js";
2
+ import type { SiteRows } from "../sites/rows.js";
3
+ /** How many people of each site's rows get an account of their own. */
4
+ export declare const ACCOUNTS_PER_SITE = 4;
5
+ /**
6
+ * The accounts a cuj-v1 workspace starts with: on each site, a few of the
7
+ * people its rows already have something for, signed up and verified, each
8
+ * with a password. A task that asks someone to act on their own account says
9
+ * who they are and their password; a task that asks for a new account signs
10
+ * up with an email no account has. Drawn from a stream of their own
11
+ * (`substream(seed, "cuj-v1:accounts:<app>")`), spread across each site's
12
+ * people in email order, so the same seed gives the same accounts forever.
13
+ */
14
+ export declare function siteAccounts(seed: number, rows: SiteRows): SiteAccounts;
@@ -0,0 +1,52 @@
1
+ import { int, pick, substream } from "../prng.js";
2
+ /** How many people of each site's rows get an account of their own. */
3
+ export const ACCOUNTS_PER_SITE = 4;
4
+ const WORDS = ["amber", "birch", "cedar", "delta", "ember", "fjord", "garnet", "harbor", "indigo", "juniper", "kestrel", "linden", "marble", "nectar", "orchid", "pewter"];
5
+ /** A password a person can type: two words and four digits, from the site's own stream. */
6
+ const passwordOf = (rng) => `${pick(rng, WORDS)}-${int(rng, 1000, 9999)}-${pick(rng, WORDS)}`;
7
+ /** People with something on the site, by email, each once, in email order; the first name seen for an email is kept. */
8
+ function people(list) {
9
+ const byEmail = new Map();
10
+ for (const p of list)
11
+ if (!byEmail.has(p.email.toLowerCase()))
12
+ byEmail.set(p.email.toLowerCase(), p.name);
13
+ return [...byEmail].map(([email, name]) => ({ email, name })).sort((a, b) => a.email.localeCompare(b.email));
14
+ }
15
+ /** Who on each site has something to act on: a booking, an order, a viewing, a prescription, a place in the directory. */
16
+ function candidates(rows) {
17
+ return {
18
+ hotels: people(rows.hotels.bookings.filter((b) => b.status === "confirmed").map((b) => ({ email: b.guestEmail, name: b.guestName }))),
19
+ flights: people(rows.flights.bookings.filter((b) => b.status === "confirmed").map((b) => ({ email: b.contactEmail, name: b.passengers[0]?.name ?? b.contactEmail }))),
20
+ dining: people(rows.dining.reservations.filter((r) => r.status === "confirmed").map((r) => ({ email: r.guestEmail, name: r.guestName }))),
21
+ pizza: people(rows.pizza.orders.map((o) => ({ email: o.customerEmail, name: o.customerName }))),
22
+ cinema: people(rows.cinema.bookings.filter((b) => b.status === "confirmed").map((b) => ({ email: b.customerEmail, name: b.customerName }))),
23
+ sports: people(rows.sports.customers),
24
+ homes: people(rows.homes.viewings.filter((v) => v.status === "requested").map((v) => ({ email: v.viewerEmail, name: v.viewerName }))),
25
+ clinic: people(rows.clinic.patients),
26
+ events: people(rows.events.people),
27
+ };
28
+ }
29
+ /**
30
+ * The accounts a cuj-v1 workspace starts with: on each site, a few of the
31
+ * people its rows already have something for, signed up and verified, each
32
+ * with a password. A task that asks someone to act on their own account says
33
+ * who they are and their password; a task that asks for a new account signs
34
+ * up with an email no account has. Drawn from a stream of their own
35
+ * (`substream(seed, "cuj-v1:accounts:<app>")`), spread across each site's
36
+ * people in email order, so the same seed gives the same accounts forever.
37
+ */
38
+ export function siteAccounts(seed, rows) {
39
+ const out = {};
40
+ for (const [app, list] of Object.entries(candidates(rows))) {
41
+ const rng = substream(seed, `cuj-v1:accounts:${app}`);
42
+ const step = Math.max(1, Math.floor(list.length / ACCOUNTS_PER_SITE));
43
+ const chosen = [];
44
+ for (let i = Math.min(int(rng, 0, step - 1), list.length - 1); i < list.length && chosen.length < ACCOUNTS_PER_SITE; i += step) {
45
+ const p = list[i];
46
+ chosen.push({ email: p.email, name: p.name, password: passwordOf(rng) });
47
+ }
48
+ out[app] = chosen;
49
+ }
50
+ return out;
51
+ }
52
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/cuj-v1/accounts.ts"],"names":[],"mappings":"AAAA,OA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AAM,GAAkB,EAAE,CAAC;QACjC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/H,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAoC,CAAC;YACrD,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3E,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IACpB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Scenario } from "../scenario.js";
2
+ /**
3
+ * cuj-v1: critical user journeys on the nine sites of webmcp-v1, in focus
4
+ * areas and at levels (tools/intent-corpus/cuj, docs/scenarios/cuj-v1.md).
5
+ * Its rows are webmcp-v1's at the same seed, row for row; what it adds is a
6
+ * few accounts already signed up on each site (`accounts`), so a journey can
7
+ * begin with someone signing in to their own account. Its workspaces
8
+ * advertise the nine sites and the inbox their sign-up codes land in.
9
+ */
10
+ export declare const cujV1: Scenario;
@@ -0,0 +1,21 @@
1
+ import { SITE_APPS } from "../sites/rows.js";
2
+ import { webmcpV1 } from "../webmcp-v1/index.js";
3
+ import { siteAccounts } from "./accounts.js";
4
+ /**
5
+ * cuj-v1: critical user journeys on the nine sites of webmcp-v1, in focus
6
+ * areas and at levels (tools/intent-corpus/cuj, docs/scenarios/cuj-v1.md).
7
+ * Its rows are webmcp-v1's at the same seed, row for row; what it adds is a
8
+ * few accounts already signed up on each site (`accounts`), so a journey can
9
+ * begin with someone signing in to their own account. Its workspaces
10
+ * advertise the nine sites and the inbox their sign-up codes land in.
11
+ */
12
+ export const cujV1 = {
13
+ key: "cuj-v1",
14
+ description: "Critical user journeys on the nine sites of webmcp-v1 (hotels, flights, restaurants, pizza, cinema, a sports store, homes, clinics, office events), with a few accounts already signed up on each",
15
+ apps: [...SITE_APPS, "mail"],
16
+ generate(seed) {
17
+ const rows = webmcpV1.generate(seed);
18
+ return { ...rows, accounts: siteAccounts(seed, rows) };
19
+ },
20
+ };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cuj-v1/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,KAAK,GAAa;IAC7B,GAAG,EAAE,QAAQ;IACb,WAAW,EAAE,mMAAmM;IAChN,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAY;QACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;IACzD,CAAC;CACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export { shopsV1 } from "./shops-v1/index.js";
5
5
  export { guideV1 } from "./guide-v1/index.js";
6
6
  export { webV1 } from "./web-v1/index.js";
7
7
  export { webmcpV1 } from "./webmcp-v1/index.js";
8
+ export { cujV1 } from "./cuj-v1/index.js";
9
+ export { ACCOUNTS_PER_SITE, siteAccounts } from "./cuj-v1/accounts.js";
8
10
  export { SITE_APPS, noSiteRows, siteRows, type SiteApp, type SiteRows } from "./sites/rows.js";
9
11
  export * from "./sites/flights/index.js";
10
12
  export * from "./sites/dining/index.js";
@@ -17,7 +19,7 @@ export * from "./sites/events/index.js";
17
19
  export { documentsMatching, lowStock, openOrdersFor, openTicketsFor, orderTotalCents, slaBreaches, stockOf } from "./answers.js";
18
20
  export { int, minstd, pick, shuffle, substream, type Rng } from "./prng.js";
19
21
  export { MAX_NIGHTS, STAY_WINDOW, addDays, checkOutOf, fitProblem, isDate, nightsOf, roomsLeft, searchStays, stayProblem, stayTotalCents, type Stay, type StayOffer, type StayProblem, type StayQuery, } from "./stays.js";
20
- export { ScenarioRegistry, UnknownScenarioError, type Agent, type Booking, type BookingStatus, type Comment, type CompanyFacts, type Customer, type Document, type DocumentKind, type Hotel, type HotelRows, type Location, type Order, type OrderLine, type OrderStatus, type Product, type RoomType, type Scenario, type ScenarioRows, type SlaPolicy, type Stock, type Ticket, type TicketPriority, type TicketStatus, type Transfer, type TransferStatus, } from "./scenario.js";
22
+ export { ScenarioRegistry, UnknownScenarioError, type Agent, type Booking, type BookingStatus, type Comment, type CompanyFacts, type Customer, type Document, type DocumentKind, type Hotel, type HotelRows, type Location, type Order, type OrderLine, type OrderStatus, type Product, type RoomType, type Scenario, type ScenarioRows, type SiteAccount, type SiteAccounts, type SlaPolicy, type Stock, type Ticket, type TicketPriority, type TicketStatus, type Transfer, type TransferStatus, } from "./scenario.js";
21
23
  /**
22
24
  * The default registry with every shipped scenario. acme-v1 stays first: the
23
25
  * gateway's robots.txt advertises the shared workspace of the first one.
package/dist/index.js CHANGED
@@ -4,12 +4,15 @@ import { ScenarioRegistry } from "./scenario.js";
4
4
  import { shopsV1 } from "./shops-v1/index.js";
5
5
  import { webV1 } from "./web-v1/index.js";
6
6
  import { webmcpV1 } from "./webmcp-v1/index.js";
7
+ import { cujV1 } from "./cuj-v1/index.js";
7
8
  export { ACME_V1_SIZES, acmeV1 } from "./acme-v1/index.js";
8
9
  export { AMENITIES, HOTEL_SIZES } from "./sites/hotels/generate.js";
9
10
  export { shopsV1 } from "./shops-v1/index.js";
10
11
  export { guideV1 } from "./guide-v1/index.js";
11
12
  export { webV1 } from "./web-v1/index.js";
12
13
  export { webmcpV1 } from "./webmcp-v1/index.js";
14
+ export { cujV1 } from "./cuj-v1/index.js";
15
+ export { ACCOUNTS_PER_SITE, siteAccounts } from "./cuj-v1/accounts.js";
13
16
  export { SITE_APPS, noSiteRows, siteRows } from "./sites/rows.js";
14
17
  export * from "./sites/flights/index.js";
15
18
  export * from "./sites/dining/index.js";
@@ -27,5 +30,5 @@ export { ScenarioRegistry, UnknownScenarioError, } from "./scenario.js";
27
30
  * The default registry with every shipped scenario. acme-v1 stays first: the
28
31
  * gateway's robots.txt advertises the shared workspace of the first one.
29
32
  */
30
- export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1).register(guideV1).register(webV1).register(webmcpV1);
33
+ export const scenarios = new ScenarioRegistry().register(acmeV1).register(shopsV1).register(guideV1).register(webV1).register(webmcpV1).register(cujV1);
31
34
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,E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AAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAY,MAAM,WAAW,CAAC;AAC5E,OAAO,EACL,UAAU,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,UAAU,EACV,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,cAAc,GAKf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GA4BrB,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
@@ -151,6 +151,14 @@ export type CompanyFacts = {
151
151
  employees: number;
152
152
  fiscalYearRevenueCents: number;
153
153
  };
154
+ /** An account a site already has when a workspace starts: signed up and verified, with the password its owner types. */
155
+ export type SiteAccount = {
156
+ email: string;
157
+ name: string;
158
+ password: string;
159
+ };
160
+ /** Accounts by site app (hotels, flights …); a site with none is left out. */
161
+ export type SiteAccounts = Partial<Record<"hotels" | "flights" | "dining" | "pizza" | "cinema" | "sports" | "homes" | "clinic" | "events", SiteAccount[]>>;
154
162
  export type ScenarioRows = {
155
163
  company: CompanyFacts;
156
164
  warehouse: {
@@ -180,6 +188,8 @@ export type ScenarioRows = {
180
188
  pizza: PizzaRows;
181
189
  events: EventRows;
182
190
  clinic: ClinicRows;
191
+ /** Accounts the sites start with (cuj-v1); absent where a scenario seeds none, as every other does. */
192
+ accounts?: SiteAccounts;
183
193
  };
184
194
  /** A scenario is a pure function of its seed: same seed, byte-identical rows. */
185
195
  export interface Scenario {
@@ -1 +1 @@
1
- {"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src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,+EAA+E;AAC/E,MAAM,OAAO,gBAAgB;IACV,KAAK,GAAG,IAAI,GAAG,EAAoB,CAAC;IAErD,QAAQ,CAAC,QAAkB;QACzB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAW;QACb,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC5C,OAAO,CAAC,CAAC;IACX,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benchme/scenarios",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",