make-mp-data 2.0.23 → 2.1.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 (38) hide show
  1. package/dungeons/ai-chat-analytics-ed.js +274 -0
  2. package/dungeons/business.js +0 -1
  3. package/dungeons/complex.js +0 -1
  4. package/dungeons/experiments.js +0 -1
  5. package/dungeons/gaming.js +47 -14
  6. package/dungeons/media.js +5 -6
  7. package/dungeons/mil.js +296 -0
  8. package/dungeons/money2020-ed-also.js +277 -0
  9. package/dungeons/money2020-ed.js +579 -0
  10. package/dungeons/sanity.js +0 -1
  11. package/dungeons/scd.js +0 -1
  12. package/dungeons/simple.js +57 -18
  13. package/dungeons/student-teacher.js +0 -1
  14. package/dungeons/text-generation.js +706 -0
  15. package/dungeons/userAgent.js +1 -2
  16. package/entry.js +3 -0
  17. package/index.js +8 -36
  18. package/lib/cli/cli.js +0 -7
  19. package/lib/core/config-validator.js +6 -8
  20. package/lib/generators/adspend.js +1 -1
  21. package/lib/generators/events.js +1 -1
  22. package/lib/generators/funnels.js +293 -242
  23. package/lib/generators/text-bak-old.js +1121 -0
  24. package/lib/generators/text.js +1173 -0
  25. package/lib/orchestrators/mixpanel-sender.js +1 -1
  26. package/lib/templates/abbreviated.d.ts +13 -3
  27. package/lib/templates/defaults.js +311 -169
  28. package/lib/templates/hooks-instructions.txt +434 -0
  29. package/lib/templates/phrases-bak.js +925 -0
  30. package/lib/templates/phrases.js +2066 -0
  31. package/lib/templates/{instructions.txt → schema-instructions.txt} +78 -1
  32. package/lib/templates/scratch-dungeon-template.js +1 -1
  33. package/lib/templates/textQuickTest.js +172 -0
  34. package/lib/utils/ai.js +51 -2
  35. package/lib/utils/utils.js +29 -18
  36. package/package.json +7 -5
  37. package/types.d.ts +319 -4
  38. package/lib/utils/chart.js +0 -206
@@ -0,0 +1,274 @@
1
+
2
+
3
+ import dayjs from "dayjs";
4
+ import utc from "dayjs/plugin/utc.js";
5
+ import "dotenv/config";
6
+ import { weighNumRange, range, date, initChance, exhaust, choose, integer } from "../lib/utils/utils.js";
7
+
8
+ const SEED = "ai-generated-1759889544929";
9
+ dayjs.extend(utc);
10
+ const chance = initChance(SEED);
11
+ const num_users = 1_000;
12
+ const days = 100;
13
+
14
+ /** @typedef {import("../types.js").Dungeon} Dungeon */
15
+
16
+ /** @type {Dungeon} */
17
+ const dungeon = {
18
+ token: "",
19
+ seed: SEED,
20
+ numDays: days,
21
+ numEvents: num_users * 100,
22
+ numUsers: num_users,
23
+ hasAnonIds: false,
24
+ hasSessionIds: false,
25
+ format: "json",
26
+ alsoInferFunnels: false,
27
+ hasLocation: true,
28
+ hasAndroidDevices: false,
29
+ hasIOSDevices: false,
30
+ hasDesktopDevices: true,
31
+ hasBrowser: true,
32
+ hasCampaigns: true,
33
+ isAnonymous: false,
34
+ hasAdSpend: true,
35
+
36
+ hasAvatar: true,
37
+
38
+ batchSize: 1_500_000,
39
+ concurrency: 50,
40
+ writeToDisk: false,
41
+
42
+ // AI-generated schema content:
43
+ funnels: [
44
+ {
45
+ name: "Sign Up",
46
+ sequence: [
47
+ "Sign Up"
48
+ ],
49
+ isFirstFunnel: true,
50
+ conversionRate: 20,
51
+ timeToConvert: 10,
52
+ order: "sequential"
53
+ },
54
+ {
55
+ name: "AI Interaction",
56
+ sequence: [
57
+ "Launch AI",
58
+ "AI Prompt Sent",
59
+ "AI Response Sent",
60
+ "User Feedback",
61
+ "AI Dismissed"
62
+ ],
63
+ isFirstFunnel: false,
64
+ conversionRate: 38,
65
+ timeToConvert: 5,
66
+ order: "sequential",
67
+ weight: 7
68
+ },
69
+ {
70
+ name: "AI Interaction Errors",
71
+ sequence: [
72
+ "Launch AI",
73
+ "AI Prompt Sent",
74
+ "AI Response Sent",
75
+ "API Error",
76
+ "User Feedback",
77
+ "AI Dismissed"
78
+ ],
79
+ isFirstFunnel: false,
80
+ conversionRate: 27,
81
+ timeToConvert: 5,
82
+ order: "sequential",
83
+ weight: 3
84
+ }
85
+ ],
86
+ events: [
87
+ {
88
+ event: "Sign Up",
89
+ isFirstEvent: true,
90
+ weight: 0,
91
+ properties: {
92
+ signup_method: [
93
+ "email",
94
+ "google",
95
+ "github"
96
+ ]
97
+ }
98
+ },
99
+ {
100
+ event: "Purchase",
101
+ weight: 40,
102
+ properties: {
103
+ amount: weighNumRange(20, 500, 0.3),
104
+ currency: [
105
+ "USD",
106
+ "EUR",
107
+ "GBP"
108
+ ],
109
+ item_count: weighNumRange(1, 10)
110
+ }
111
+ },
112
+ {
113
+ event: "Launch AI",
114
+ weight: 2,
115
+ properties: {
116
+ entry_point: [
117
+ "dashboard_widget",
118
+ "header_button",
119
+ "in_app_prompt"
120
+ ]
121
+ }
122
+ },
123
+ {
124
+ event: "AI Prompt Sent",
125
+ weight: 10,
126
+ properties: {
127
+ prompt: [
128
+ "how can I make a dashboard?",
129
+ "what is a funnel?",
130
+ "what drives new users?",
131
+ "show me my top performing campaigns",
132
+ "compare user retention by country"
133
+ ],
134
+ prompt_length: weighNumRange(15, 150)
135
+ }
136
+ },
137
+ {
138
+ event: "AI Response Sent",
139
+ weight: 10,
140
+ properties: {
141
+ cost: weighNumRange(1, 10, 0.2),
142
+ tokens: weighNumRange(100, 1000, 0.4),
143
+ time_to_generate_ms: weighNumRange(1000, 10000, 0.2)
144
+ }
145
+ },
146
+ {
147
+ event: "User Feedback",
148
+ weight: 4,
149
+ properties: {
150
+ feedback: [
151
+ "I love it!",
152
+ "meh...",
153
+ "This sucks",
154
+ "Fine"
155
+ ],
156
+ sentiment: [
157
+ "thumbs up",
158
+ "thumbs down"
159
+ ]
160
+ }
161
+ },
162
+ {
163
+ event: "AI Dismissed",
164
+ weight: 2,
165
+ properties: {
166
+ reason: [
167
+ "finished",
168
+ "clicked_away",
169
+ "new_prompt",
170
+ "error"
171
+ ]
172
+ }
173
+ },
174
+ {
175
+ event: "API Error",
176
+ weight: 2,
177
+ properties: {
178
+ error_code: [
179
+ 400,
180
+ 401,
181
+ 429,
182
+ 500,
183
+ 503
184
+ ],
185
+ error_message: [
186
+ "Bad Request",
187
+ "Unauthorized",
188
+ "Too Many Requests",
189
+ "Internal Server Error",
190
+ "Service Unavailable"
191
+ ]
192
+ }
193
+ }
194
+ ],
195
+ superProps: {
196
+ $os: [
197
+ "Windows",
198
+ "Mac OS X",
199
+ "Linux",
200
+ "Windows",
201
+ "Mac OS X"
202
+ ],
203
+ $browser: [
204
+ "Chrome",
205
+ "Firefox",
206
+ "Safari",
207
+ "Edge",
208
+ "Chrome"
209
+ ],
210
+ $device: [
211
+ "Desktop",
212
+ "Desktop",
213
+ "Desktop",
214
+ "Laptop"
215
+ ],
216
+ utm_source: [
217
+ "$organic",
218
+ "$organic",
219
+ "google",
220
+ "twitter",
221
+ "linkedin",
222
+ "product_hunt"
223
+ ]
224
+ },
225
+ userProps: {
226
+ plan_type: [
227
+ "free",
228
+ "pro",
229
+ "pro",
230
+ "enterprise",
231
+ "free"
232
+ ],
233
+ company_size: [
234
+ "1-10",
235
+ "11-50",
236
+ "51-200",
237
+ "201-1000",
238
+ "1000+"
239
+ ],
240
+ created_date: date(365, true, 'YYYY-MM-DD')
241
+ },
242
+
243
+ hook: function (record, type, meta) {
244
+ const NOW = dayjs();
245
+
246
+ if (type === "event") {
247
+ const EVENT_TIME = dayjs(record.time);
248
+ }
249
+
250
+ if (type === "user") {
251
+
252
+ }
253
+
254
+ if (type === "funnel-post") {
255
+
256
+ }
257
+
258
+ if (type === "funnel-pre") {
259
+
260
+ }
261
+
262
+ if (type === "scd-pre") {
263
+
264
+ }
265
+
266
+ if (type === "everything") {
267
+
268
+ }
269
+
270
+ return record;
271
+ }
272
+ };
273
+
274
+ export default dungeon;
@@ -41,7 +41,6 @@ const config = {
41
41
  hasAdSpend: true,
42
42
 
43
43
  hasAvatar: false,
44
- makeChart: true,
45
44
 
46
45
  batchSize: 500_000,
47
46
  concurrency: 500,
@@ -33,7 +33,6 @@ const config = {
33
33
  hasAdSpend: true,
34
34
 
35
35
  hasAvatar: true,
36
- makeChart: false,
37
36
 
38
37
  batchSize: 500_000,
39
38
  concurrency: 10,
@@ -34,7 +34,6 @@ const config = {
34
34
  hasAdSpend: false,
35
35
 
36
36
  hasAvatar: true,
37
- makeChart: false,
38
37
 
39
38
 
40
39
  batchSize: 1_500_000,
@@ -8,15 +8,15 @@ import * as v from "ak-tools";
8
8
  const SEED = "my-seed";
9
9
  dayjs.extend(utc);
10
10
  const chance = u.initChance(SEED);
11
- const num_users = 25_000;
11
+ const num_users = 12_000;
12
12
  const days = 180;
13
13
 
14
14
  /** @typedef {import("../types.js").Dungeon} Config */
15
15
 
16
16
  /** @type {Config} */
17
17
  const config = {
18
- token: "17f327eeb2217278f5b2c42a54aafe96",
19
- seed: "sdgsdfgdfgkfj dfgkjh",
18
+ token: "",
19
+ seed: "i am gamer face",
20
20
  numDays: days,
21
21
  numEvents: num_users * 90,
22
22
  numUsers: num_users,
@@ -25,21 +25,20 @@ const config = {
25
25
  format: "json",
26
26
  alsoInferFunnels: true,
27
27
  hasLocation: true,
28
- hasAndroidDevices: true,
29
- hasIOSDevices: true,
30
- hasDesktopDevices: true,
28
+ hasAndroidDevices: false,
29
+ hasIOSDevices: false,
30
+ hasDesktopDevices: false,
31
31
  hasBrowser: false,
32
- hasCampaigns: true,
32
+ hasCampaigns: false,
33
33
  isAnonymous: false,
34
34
  hasAdSpend: false,
35
- percentUsersBornInDataset: 35,
35
+ percentUsersBornInDataset: 25,
36
36
 
37
37
  hasAvatar: true,
38
- makeChart: false,
39
38
 
40
39
  batchSize: 1_500_000,
41
40
  concurrency: 1,
42
- writeToDisk: false,
41
+ writeToDisk: true,
43
42
  funnels: [
44
43
  {
45
44
  "sequence": ["app install", "character creation", "join party"],
@@ -105,12 +104,46 @@ const config = {
105
104
  {
106
105
  event: "start quest",
107
106
  weight: 12,
108
- properties: {},
107
+ properties: {
108
+ "quest type": u.pickAWinner([
109
+ "Rescue",
110
+ "Retrieve",
111
+ "Explore",
112
+ "Destroy",
113
+ "Investigate",
114
+ ]),
115
+ "quest difficulty": u.pickAWinner([
116
+ "Easy",
117
+ "Medium",
118
+ "Hard",
119
+ "Legendary",
120
+ ]),
121
+ "quest location": u.pickAWinner([
122
+ "Forest",
123
+ "Dungeon",
124
+ "Mountain",
125
+ "City",
126
+ "Desert",
127
+ ]),
128
+ "party size": u.weighNumRange(1, 6),
129
+ "used hint": u.pickAWinner(["yes", "no"], 0.3),
130
+ "used boost": u.pickAWinner(["yes", "no"], 0.2),
131
+ "level at start": u.weighNumRange(1, 20),
132
+ },
109
133
  },
110
134
  {
111
135
  event: "complete quest",
112
136
  weight: 12,
113
- properties: {},
137
+ properties: {
138
+ "completion time (mins)": u.weighNumRange(5, 120, 1, 30),
139
+ "quest reward (gold)": u.weighNumRange(10, 500, 1, 100),
140
+ "quest success": u.pickAWinner(["yes", "no"], 0.9),
141
+ "used hint": u.pickAWinner(["yes", "no"], 0.3),
142
+ "used boost": u.pickAWinner(["yes", "no"], 0.2),
143
+ "number of deaths": u.weighNumRange(0, 5, 1, 2),
144
+ "level at start": u.weighNumRange(1, 20),
145
+ "level at end": u.weighNumRange(1, 20),
146
+ },
114
147
  },
115
148
  {
116
149
  "event": "gameplay summary",
@@ -173,14 +206,14 @@ const config = {
173
206
  },
174
207
  },
175
208
  {
176
- event: "generic event (common)",
209
+ event: "attack",
177
210
  weight: 5,
178
211
  properties: {
179
212
  generic_prop: u.pickAWinner(["foo", "bar", "baz", "qux"]),
180
213
  }
181
214
  },
182
215
  {
183
- event: "generic event (uncommon)",
216
+ event: "defend",
184
217
  weight: 3,
185
218
  properties: {
186
219
  generic_prop: u.pickAWinner(["foo", "bar", "baz", "qux"]),
package/dungeons/media.js CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  const SEED = "my-seed";
3
3
  import dayjs from 'dayjs';
4
- import utc from 'dayjs/plugin/utc';
4
+ import utc from 'dayjs/plugin/utc.js';
5
5
  dayjs.extend(utc);
6
6
  import 'dotenv/config';
7
7
  import * as u from '../lib/utils/utils.js';
@@ -25,10 +25,10 @@ const channelIds = genIds(100);
25
25
 
26
26
  /** @type {Config} */
27
27
  const config = {
28
- token: "32fd7149e2ac0cc030bda4c4b839b813",
28
+ token: "",
29
29
  seed: `LFG!`, //,
30
30
  numDays: days,
31
- numEvents: num_users * 69,
31
+ numEvents: num_users * 63,
32
32
  numUsers: num_users,
33
33
  hasAnonIds: false,
34
34
  hasSessionIds: false,
@@ -44,11 +44,10 @@ const config = {
44
44
  hasAdSpend: false,
45
45
 
46
46
  hasAvatar: false,
47
- makeChart: false,
48
47
 
49
48
  batchSize: 1_500_000,
50
- concurrency: 1,
51
- writeToDisk: false,
49
+ concurrency: 10,
50
+ writeToDisk: true,
52
51
 
53
52
  funnels: [],
54
53