make-mp-data 2.1.11 → 3.0.2

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 (71) hide show
  1. package/README.md +31 -0
  2. package/dungeons/adspend.js +35 -1
  3. package/dungeons/anon.js +25 -1
  4. package/dungeons/array-of-object-lookup.js +201 -0
  5. package/dungeons/benchmark-heavy.js +241 -0
  6. package/dungeons/benchmark-light.js +141 -0
  7. package/dungeons/big.js +10 -9
  8. package/dungeons/business.js +60 -12
  9. package/dungeons/complex.js +35 -1
  10. package/dungeons/copilot.js +383 -0
  11. package/dungeons/education.js +1005 -0
  12. package/dungeons/experiments.js +18 -4
  13. package/dungeons/fintech.js +976 -0
  14. package/dungeons/foobar.js +32 -0
  15. package/dungeons/food.js +988 -0
  16. package/dungeons/funnels.js +38 -1
  17. package/dungeons/gaming.js +26 -5
  18. package/dungeons/media.js +861 -270
  19. package/dungeons/mil.js +31 -3
  20. package/dungeons/mirror.js +33 -1
  21. package/dungeons/retention-cadence.js +211 -0
  22. package/dungeons/rpg.js +1178 -0
  23. package/dungeons/sanity.js +32 -2
  24. package/dungeons/sass.js +923 -0
  25. package/dungeons/scd.js +47 -1
  26. package/dungeons/simple.js +29 -14
  27. package/dungeons/social.js +928 -0
  28. package/dungeons/streaming.js +373 -0
  29. package/dungeons/strict-event-test.js +30 -0
  30. package/dungeons/student-teacher.js +19 -5
  31. package/dungeons/text-generation.js +120 -84
  32. package/dungeons/too-big-events.js +203 -0
  33. package/dungeons/{userAgent.js → user-agent.js} +23 -2
  34. package/entry.js +5 -4
  35. package/index.js +41 -54
  36. package/lib/core/config-validator.js +122 -7
  37. package/lib/core/context.js +7 -14
  38. package/lib/core/storage.js +57 -25
  39. package/lib/generators/adspend.js +12 -12
  40. package/lib/generators/events.js +6 -5
  41. package/lib/generators/funnels.js +32 -10
  42. package/lib/generators/product-lookup.js +262 -0
  43. package/lib/generators/product-names.js +195 -0
  44. package/lib/generators/profiles.js +3 -3
  45. package/lib/generators/scd.js +13 -3
  46. package/lib/generators/text.js +17 -4
  47. package/lib/orchestrators/mixpanel-sender.js +244 -204
  48. package/lib/orchestrators/user-loop.js +54 -16
  49. package/lib/templates/phrases.js +473 -16
  50. package/lib/templates/schema.d.ts +173 -0
  51. package/lib/templates/verbose-schema.js +140 -206
  52. package/lib/utils/chart.js +210 -0
  53. package/lib/utils/function-registry.js +285 -0
  54. package/lib/utils/json-evaluator.js +172 -0
  55. package/lib/utils/logger.js +34 -0
  56. package/lib/utils/utils.js +41 -4
  57. package/package.json +12 -21
  58. package/types.d.ts +15 -5
  59. package/dungeons/ai-chat-analytics-ed.js +0 -274
  60. package/dungeons/money2020-ed-also.js +0 -277
  61. package/dungeons/money2020-ed.js +0 -579
  62. package/lib/generators/text-bak-old.js +0 -1121
  63. package/lib/orchestrators/worker-manager.js +0 -203
  64. package/lib/templates/hooks-instructions.txt +0 -434
  65. package/lib/templates/phrases-bak.js +0 -925
  66. package/lib/templates/prompt (old).txt +0 -98
  67. package/lib/templates/schema-instructions.txt +0 -155
  68. package/lib/templates/scratch-dungeon-template.js +0 -116
  69. package/lib/templates/textQuickTest.js +0 -172
  70. package/lib/utils/ai.js +0 -120
  71. package/lib/utils/project.js +0 -166
@@ -1,8 +1,8 @@
1
1
 
2
2
  import dayjs from 'dayjs';
3
- import utc from 'dayjs/plugin/utc';
3
+ import utc from 'dayjs/plugin/utc.js';
4
4
  import 'dotenv/config';
5
- import * as u from '../lib/utils/utils.js';
5
+ import * as u from "../lib/utils/utils.js";
6
6
  import * as v from 'ak-tools';
7
7
 
8
8
  const SEED = "my-seed";
@@ -34,9 +34,10 @@ const config = {
34
34
  hasAdSpend: false,
35
35
 
36
36
  hasAvatar: true,
37
+ makeChart: false,
37
38
 
38
39
 
39
- batchSize: 1_500_000,
40
+ batchSize: 2_500_000,
40
41
  concurrency: 1,
41
42
  writeToDisk: false,
42
43
 
@@ -95,6 +96,12 @@ const config = {
95
96
 
96
97
  if (type === "event") {
97
98
  const EVENT_TIME = dayjs(record.time);
99
+ // Pattern 1: "variant 1" users spend more money (winning variant)
100
+ if (record.event === "money event" && record["Variant name"] === "variant 1") {
101
+ record.amount = Math.round((record.amount || 50) * 1.5);
102
+ }
103
+ // Pattern 2: "control" users see fewer rare events (simulating lower engagement)
104
+ // handled in "everything" below
98
105
  }
99
106
 
100
107
  if (type === "user") {
@@ -114,7 +121,14 @@ const config = {
114
121
  }
115
122
 
116
123
  if (type === "everything") {
117
-
124
+ // Pattern 3: Control variant users have 30% of their "rare event" events removed
125
+ // to simulate lower engagement in control group
126
+ return record.filter(e => {
127
+ if (e.event === "rare event" && e["Variant name"] === "control" && Math.random() < 0.3) {
128
+ return false;
129
+ }
130
+ return true;
131
+ });
118
132
  }
119
133
 
120
134
  return record;