make-mp-data 2.1.11 → 3.0.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.
Files changed (76) hide show
  1. package/README.md +31 -0
  2. package/dungeons/adspend.js +2 -2
  3. package/dungeons/ai-chat-analytics-ed.js +3 -2
  4. package/dungeons/anon.js +2 -2
  5. package/dungeons/array-of-object-loopup.js +181 -0
  6. package/dungeons/benchmark-heavy.js +241 -0
  7. package/dungeons/benchmark-light.js +141 -0
  8. package/dungeons/big.js +9 -8
  9. package/dungeons/business.js +2 -1
  10. package/dungeons/clinch-agi.js +632 -0
  11. package/dungeons/complex.js +3 -2
  12. package/dungeons/copilot.js +383 -0
  13. package/dungeons/ecommerce-store.js +0 -0
  14. package/dungeons/experiments.js +5 -4
  15. package/dungeons/foobar.js +1 -1
  16. package/dungeons/funnels.js +2 -2
  17. package/dungeons/gaming.js +3 -2
  18. package/dungeons/harness/harness-education.js +988 -0
  19. package/dungeons/harness/harness-fintech.js +976 -0
  20. package/dungeons/harness/harness-food.js +985 -0
  21. package/dungeons/harness/harness-gaming.js +1178 -0
  22. package/dungeons/harness/harness-media.js +961 -0
  23. package/dungeons/harness/harness-sass.js +923 -0
  24. package/dungeons/harness/harness-social.js +928 -0
  25. package/dungeons/kurby.js +211 -0
  26. package/dungeons/media.js +5 -4
  27. package/dungeons/mil.js +4 -3
  28. package/dungeons/mirror.js +2 -2
  29. package/dungeons/money2020-ed.js +8 -7
  30. package/dungeons/sanity.js +3 -2
  31. package/dungeons/scd.js +3 -2
  32. package/dungeons/simple.js +30 -15
  33. package/dungeons/strict-event-test.js +30 -0
  34. package/dungeons/student-teacher.js +3 -2
  35. package/dungeons/text-generation.js +84 -85
  36. package/dungeons/too-big-events.js +166 -0
  37. package/dungeons/uday-schema.json +220 -0
  38. package/dungeons/userAgent.js +4 -3
  39. package/index.js +41 -54
  40. package/lib/core/config-validator.js +122 -7
  41. package/lib/core/context.js +7 -14
  42. package/lib/core/storage.js +57 -25
  43. package/lib/generators/adspend.js +12 -12
  44. package/lib/generators/events.js +6 -5
  45. package/lib/generators/funnels.js +32 -10
  46. package/lib/generators/product-lookup.js +262 -0
  47. package/lib/generators/product-names.js +195 -0
  48. package/lib/generators/profiles.js +3 -3
  49. package/lib/generators/scd.js +13 -3
  50. package/lib/generators/text.js +17 -4
  51. package/lib/orchestrators/mixpanel-sender.js +244 -204
  52. package/lib/orchestrators/user-loop.js +54 -16
  53. package/lib/templates/funnels-instructions.txt +272 -0
  54. package/lib/templates/hook-examples.json +187 -0
  55. package/lib/templates/hooks-instructions.txt +295 -8
  56. package/lib/templates/phrases.js +473 -16
  57. package/lib/templates/refine-instructions.txt +485 -0
  58. package/lib/templates/schema-instructions.txt +239 -109
  59. package/lib/templates/schema.d.ts +173 -0
  60. package/lib/templates/verbose-schema.js +140 -206
  61. package/lib/utils/ai.js +853 -77
  62. package/lib/utils/chart.js +210 -0
  63. package/lib/utils/function-registry.js +285 -0
  64. package/lib/utils/json-evaluator.js +172 -0
  65. package/lib/utils/logger.js +38 -0
  66. package/lib/utils/mixpanel.js +101 -0
  67. package/lib/utils/project.js +3 -2
  68. package/lib/utils/utils.js +41 -4
  69. package/package.json +15 -21
  70. package/types.d.ts +15 -5
  71. package/lib/generators/text-bak-old.js +0 -1121
  72. package/lib/orchestrators/worker-manager.js +0 -203
  73. package/lib/templates/phrases-bak.js +0 -925
  74. package/lib/templates/prompt (old).txt +0 -98
  75. package/lib/templates/scratch-dungeon-template.js +0 -116
  76. package/lib/templates/textQuickTest.js +0 -172
package/dungeons/big.js CHANGED
@@ -1,34 +1,35 @@
1
1
  import Chance from 'chance';
2
2
  import dayjs from 'dayjs';
3
- import utc from 'dayjs/plugin/utc';
3
+ import utc from 'dayjs/plugin/utc.js';
4
4
  import { uid, comma, makeName } from 'ak-tools';
5
- import { pickAWinner, weighNumRange, integer, date, choose } from '../lib/utils/utils.js';
5
+ import { pickAWinner, weighNumRange, integer, date, choose } from "../lib/utils/utils.js";
6
6
 
7
7
  const seed = "lets go big";
8
8
  const chance = new Chance();
9
9
  dayjs.extend(utc);
10
10
 
11
11
 
12
- const eventsPerQuarter = 5_000_000_000 // ~5 billion
13
- const numQuarters = 8; // 24 months
14
- const parallelism = 5000;
15
- const totalEvents = Math.floor((eventsPerQuarter * numQuarters) / parallelism);
12
+ const eventsPerQuarter = 10_000_000 // 50M
13
+ const numQuarters = 4; // 12 months
14
+ // const parallelism = 5000;
15
+ const totalEvents = Math.floor((eventsPerQuarter * numQuarters));
16
16
  const eventPerUser = 500;
17
17
  const totalUsers = Math.floor(totalEvents / eventPerUser);
18
18
  const totalDays = (numQuarters * 90) + 10;
19
19
 
20
20
  /** @type {import('../types').Dungeon} */
21
21
  const config = {
22
- token: "",
22
+ // token: process.env.MASTER_PROJECT_TOKEN || "",
23
23
  seed: seed,
24
24
  numDays: totalDays,
25
25
  numEvents: totalEvents,
26
26
  numUsers: totalUsers,
27
+ strictEventCount: true,
27
28
  format: 'json', //csv or json
28
29
  region: "US",
29
30
  hasAnonIds: false, //if true, anonymousIds are created for each user
30
31
  hasSessionIds: false, //if true, hasSessionIds are created for each user
31
- hasLocation: true,
32
+ hasLocation: false,
32
33
  hasAndroidDevices: false,
33
34
  alsoInferFunnels: false,
34
35
  batchSize: 2_000_000,
@@ -22,7 +22,7 @@ const USERS = EVENTS / 100
22
22
 
23
23
  /** @type {import('../types.js').Dungeon} */
24
24
  const config = {
25
- token: "",
25
+ token: process.env.MASTER_PROJECT_TOKEN || "",
26
26
  seed: "it's business time...",
27
27
  numDays: 90, //how many days worth of data
28
28
  numEvents: EVENTS, //how many events
@@ -41,6 +41,7 @@ const config = {
41
41
  hasAdSpend: true,
42
42
 
43
43
  hasAvatar: false,
44
+ makeChart: true,
44
45
 
45
46
  batchSize: 500_000,
46
47
  concurrency: 500,