@ak--47/dungeon-master 1.0.0 → 1.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.
- package/README.md +7 -7
- package/dungeons/technical/ad-spend-schema.json +128 -0
- package/dungeons/technical/ad-spend.js +116 -0
- package/dungeons/technical/anonymous-users-schema.json +91 -0
- package/dungeons/technical/anonymous-users.js +102 -0
- package/dungeons/technical/array-of-object-lookup-schema.json +191 -0
- package/dungeons/{array-of-object-lookup.js → technical/array-of-object-lookup.js} +11 -4
- package/dungeons/technical/experiments-schema.json +197 -0
- package/dungeons/technical/experiments.js +168 -0
- package/dungeons/technical/foobar-schema.json +362 -0
- package/dungeons/{foobar.js → technical/foobar.js} +2 -2
- package/dungeons/technical/group-analytics-schema.json +149 -0
- package/dungeons/technical/group-analytics.js +151 -0
- package/dungeons/technical/mirror-strategies-schema.json +84 -0
- package/dungeons/technical/mirror-strategies.js +126 -0
- package/dungeons/technical/nested-objects-schema.json +145 -0
- package/dungeons/technical/nested-objects.js +207 -0
- package/dungeons/technical/retention-cadence-schema.json +37 -0
- package/dungeons/{retention-cadence.js → technical/retention-cadence.js} +1 -1
- package/dungeons/technical/sanity-schema.json +185 -0
- package/dungeons/{sanity.js → technical/sanity.js} +3 -2
- package/dungeons/technical/scale-test-schema.json +70 -0
- package/dungeons/technical/scale-test.js +90 -0
- package/dungeons/technical/scd-schema.json +270 -0
- package/dungeons/{scd.js → technical/scd.js} +19 -10
- package/dungeons/technical/simple-schema.json +278 -0
- package/dungeons/{simple.js → technical/simple.js} +6 -6
- package/dungeons/technical/simplest-schema.json +635 -0
- package/dungeons/{simplest.js → technical/simplest.js} +6 -6
- package/dungeons/technical/text-generation-schema.json +1059 -0
- package/dungeons/{text-generation.js → technical/text-generation.js} +23 -9
- package/dungeons/vertical/community-schema.json +557 -0
- package/dungeons/vertical/community.js +788 -0
- package/dungeons/vertical/devtools-schema.json +580 -0
- package/dungeons/vertical/devtools.js +837 -0
- package/dungeons/vertical/ecommerce-schema.json +586 -0
- package/dungeons/{ecommerce.js → vertical/ecommerce.js} +34 -3
- package/dungeons/vertical/education-schema.json +697 -0
- package/dungeons/{education.js → vertical/education.js} +54 -36
- package/dungeons/vertical/fintech-schema.json +563 -0
- package/dungeons/{fintech.js → vertical/fintech.js} +91 -53
- package/dungeons/vertical/fitness-schema.json +508 -0
- package/dungeons/vertical/fitness.js +802 -0
- package/dungeons/vertical/food-delivery-schema.json +678 -0
- package/dungeons/{food.js → vertical/food-delivery.js} +51 -23
- package/dungeons/vertical/gaming-schema.json +394 -0
- package/dungeons/{gaming.js → vertical/gaming.js} +9 -7
- package/dungeons/vertical/healthcare-schema.json +527 -0
- package/dungeons/vertical/healthcare.js +769 -0
- package/dungeons/vertical/insurance-application-schema.json +466 -0
- package/dungeons/{insurance-application.js → vertical/insurance-application.js} +33 -29
- package/dungeons/vertical/logistics-schema.json +552 -0
- package/dungeons/vertical/logistics.js +793 -0
- package/dungeons/vertical/marketplace-schema.json +511 -0
- package/dungeons/vertical/marketplace.js +844 -0
- package/dungeons/vertical/media-schema.json +787 -0
- package/dungeons/{media.js → vertical/media.js} +94 -16
- package/dungeons/vertical/rpg-schema.json +654 -0
- package/dungeons/{rpg.js → vertical/rpg.js} +78 -57
- package/dungeons/vertical/sass-schema.json +653 -0
- package/dungeons/{sass.js → vertical/sass.js} +49 -23
- package/dungeons/vertical/social-schema.json +552 -0
- package/dungeons/{social.js → vertical/social.js} +60 -14
- package/dungeons/vertical/travel-schema.json +558 -0
- package/dungeons/vertical/travel.js +736 -0
- package/index.js +19 -15
- package/lib/core/config-validator.js +286 -1
- package/lib/core/context.js +7 -5
- package/lib/generators/adspend.js +3 -3
- package/lib/generators/events.js +141 -14
- package/lib/generators/funnels.js +67 -7
- package/lib/generators/text.js +2 -2
- package/lib/orchestrators/user-loop.js +441 -22
- package/lib/templates/soup-presets.js +2 -2
- package/lib/utils/utils.js +4 -5
- package/package.json +4 -3
- package/scripts/dungeon-to-json.mjs +163 -0
- package/scripts/extract-dungeon-schema.mjs +297 -0
- package/scripts/json-to-dungeon.mjs +200 -0
- package/scripts/run-dungeon.mjs +76 -0
- package/scripts/run-many.mjs +118 -0
- package/scripts/verify-runner.mjs +42 -0
- package/types.d.ts +313 -1
- package/dungeons/array-of-object-lookup-schema.json +0 -327
- package/dungeons/ecommerce-schema.json +0 -462
- package/dungeons/education-schema.json +0 -2409
- package/dungeons/fintech-schema.json +0 -14034
- package/dungeons/foobar-schema.json +0 -403
- package/dungeons/food-delivery-schema.json +0 -192
- package/dungeons/food-delivery.js +0 -602
- package/dungeons/food-schema.json +0 -1152
- package/dungeons/gaming-schema.json +0 -1270
- package/dungeons/insurance-application-schema.json +0 -204
- package/dungeons/media-schema.json +0 -906
- package/dungeons/retention-cadence-schema.json +0 -78
- package/dungeons/rpg-schema.json +0 -4526
- package/dungeons/sanity-schema.json +0 -255
- package/dungeons/sass-schema.json +0 -1291
- package/dungeons/scd-schema.json +0 -919
- package/dungeons/simple-schema.json +0 -608
- package/dungeons/simplest-schema.json +0 -1418
- package/dungeons/social-schema.json +0 -1118
- package/dungeons/text-generation-schema.json +0 -3096
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
2
|
import utc from "dayjs/plugin/utc.js";
|
|
3
3
|
import "dotenv/config";
|
|
4
|
-
import * as u from "
|
|
4
|
+
import * as u from "../../lib/utils/utils.js";
|
|
5
5
|
import * as v from "ak-tools";
|
|
6
6
|
|
|
7
7
|
const SEED = "harness-social";
|
|
@@ -253,6 +253,7 @@ const config = {
|
|
|
253
253
|
properties: {
|
|
254
254
|
"signup_method": ["email", "google", "apple", "sso"],
|
|
255
255
|
"referred_by": ["organic", "friend", "ad", "influencer"],
|
|
256
|
+
"toxic_user": [false],
|
|
256
257
|
}
|
|
257
258
|
},
|
|
258
259
|
{
|
|
@@ -261,8 +262,13 @@ const config = {
|
|
|
261
262
|
properties: {
|
|
262
263
|
"post_type": ["text", "image", "video", "poll", "link"],
|
|
263
264
|
"character_count": u.weighNumRange(1, 280),
|
|
264
|
-
"has_media":
|
|
265
|
+
"has_media": [false, false, false, true, true],
|
|
265
266
|
"hashtag_count": u.weighNumRange(0, 10, 0.5),
|
|
267
|
+
"weekend_surge": [false],
|
|
268
|
+
"weekend_duplicate": [false],
|
|
269
|
+
"monetized_creator": [false],
|
|
270
|
+
"follow_back_effect": [false],
|
|
271
|
+
"toxic_user": [false],
|
|
266
272
|
}
|
|
267
273
|
},
|
|
268
274
|
{
|
|
@@ -272,6 +278,11 @@ const config = {
|
|
|
272
278
|
"post_type": ["text", "image", "video", "poll", "link"],
|
|
273
279
|
"view_duration_sec": u.weighNumRange(1, 120, 0.3, 5),
|
|
274
280
|
"source": ["feed", "explore", "search", "profile", "notification"],
|
|
281
|
+
"engagement_bait": [false],
|
|
282
|
+
"trending_reengagement": [false],
|
|
283
|
+
"viral_cascade": [false],
|
|
284
|
+
"monetized_creator": [false],
|
|
285
|
+
"toxic_user": [false],
|
|
275
286
|
}
|
|
276
287
|
},
|
|
277
288
|
{
|
|
@@ -279,6 +290,8 @@ const config = {
|
|
|
279
290
|
weight: 18,
|
|
280
291
|
properties: {
|
|
281
292
|
"post_type": ["text", "image", "video", "poll", "link"],
|
|
293
|
+
"viral_cascade": [false],
|
|
294
|
+
"toxic_user": [false],
|
|
282
295
|
}
|
|
283
296
|
},
|
|
284
297
|
{
|
|
@@ -286,6 +299,8 @@ const config = {
|
|
|
286
299
|
weight: 6,
|
|
287
300
|
properties: {
|
|
288
301
|
"share_destination": ["repost", "dm", "external", "copy_link"],
|
|
302
|
+
"viral_cascade": [false],
|
|
303
|
+
"toxic_user": [false],
|
|
289
304
|
}
|
|
290
305
|
},
|
|
291
306
|
{
|
|
@@ -293,7 +308,9 @@ const config = {
|
|
|
293
308
|
weight: 10,
|
|
294
309
|
properties: {
|
|
295
310
|
"comment_length": u.weighNumRange(1, 500, 0.3, 20),
|
|
296
|
-
"has_mention":
|
|
311
|
+
"has_mention": [true, false, false],
|
|
312
|
+
"follow_back_effect": [false],
|
|
313
|
+
"toxic_user": [false],
|
|
297
314
|
}
|
|
298
315
|
},
|
|
299
316
|
{
|
|
@@ -301,6 +318,7 @@ const config = {
|
|
|
301
318
|
weight: 8,
|
|
302
319
|
properties: {
|
|
303
320
|
"discovery_source": ["suggested", "search", "post", "profile", "mutual"],
|
|
321
|
+
"toxic_user": [false],
|
|
304
322
|
}
|
|
305
323
|
},
|
|
306
324
|
{
|
|
@@ -308,6 +326,7 @@ const config = {
|
|
|
308
326
|
weight: 2,
|
|
309
327
|
properties: {
|
|
310
328
|
"reason": ["content_quality", "too_frequent", "lost_interest", "offensive"],
|
|
329
|
+
"toxic_user": [false],
|
|
311
330
|
}
|
|
312
331
|
},
|
|
313
332
|
{
|
|
@@ -316,7 +335,8 @@ const config = {
|
|
|
316
335
|
properties: {
|
|
317
336
|
"story_type": ["photo", "video", "text"],
|
|
318
337
|
"view_duration_sec": u.weighNumRange(1, 30, 0.5, 5),
|
|
319
|
-
"completed":
|
|
338
|
+
"completed": [false, false, true, true, true],
|
|
339
|
+
"toxic_user": [false],
|
|
320
340
|
}
|
|
321
341
|
},
|
|
322
342
|
{
|
|
@@ -324,8 +344,12 @@ const config = {
|
|
|
324
344
|
weight: 5,
|
|
325
345
|
properties: {
|
|
326
346
|
"story_type": ["photo", "video", "text"],
|
|
327
|
-
"has_filter":
|
|
328
|
-
"has_sticker":
|
|
347
|
+
"has_filter": [true, false],
|
|
348
|
+
"has_sticker": [false, false, true],
|
|
349
|
+
"weekend_surge": [false],
|
|
350
|
+
"weekend_duplicate": [false],
|
|
351
|
+
"monetized_creator": [false],
|
|
352
|
+
"toxic_user": [false],
|
|
329
353
|
}
|
|
330
354
|
},
|
|
331
355
|
{
|
|
@@ -334,6 +358,7 @@ const config = {
|
|
|
334
358
|
properties: {
|
|
335
359
|
"search_type": ["users", "hashtags", "posts"],
|
|
336
360
|
"results_count": u.weighNumRange(0, 50, 0.5, 10),
|
|
361
|
+
"toxic_user": [false],
|
|
337
362
|
}
|
|
338
363
|
},
|
|
339
364
|
{
|
|
@@ -341,7 +366,8 @@ const config = {
|
|
|
341
366
|
weight: 12,
|
|
342
367
|
properties: {
|
|
343
368
|
"notification_type": ["like", "follow", "comment", "mention", "trending"],
|
|
344
|
-
"clicked":
|
|
369
|
+
"clicked": [false, false, false, true, true],
|
|
370
|
+
"toxic_user": [false],
|
|
345
371
|
}
|
|
346
372
|
},
|
|
347
373
|
{
|
|
@@ -350,6 +376,7 @@ const config = {
|
|
|
350
376
|
properties: {
|
|
351
377
|
"message_type": ["text", "image", "voice", "link"],
|
|
352
378
|
"conversation_length": u.weighNumRange(1, 100),
|
|
379
|
+
"toxic_user": [false],
|
|
353
380
|
}
|
|
354
381
|
},
|
|
355
382
|
{
|
|
@@ -359,6 +386,7 @@ const config = {
|
|
|
359
386
|
"ad_format": ["feed_native", "story", "banner", "video"],
|
|
360
387
|
"ad_category": ["retail", "tech", "food", "finance", "entertainment"],
|
|
361
388
|
"view_duration_sec": u.weighNumRange(1, 30, 0.3),
|
|
389
|
+
"toxic_user": [false],
|
|
362
390
|
}
|
|
363
391
|
},
|
|
364
392
|
{
|
|
@@ -367,6 +395,7 @@ const config = {
|
|
|
367
395
|
properties: {
|
|
368
396
|
"ad_format": ["feed_native", "story", "banner", "video"],
|
|
369
397
|
"ad_category": ["retail", "tech", "food", "finance", "entertainment"],
|
|
398
|
+
"toxic_user": [false],
|
|
370
399
|
}
|
|
371
400
|
},
|
|
372
401
|
{
|
|
@@ -375,6 +404,7 @@ const config = {
|
|
|
375
404
|
properties: {
|
|
376
405
|
"report_type": ["spam", "harassment", "misinformation", "hate_speech", "other"],
|
|
377
406
|
"content_type": ["post", "comment", "user", "dm"],
|
|
407
|
+
"toxic_user": [false],
|
|
378
408
|
}
|
|
379
409
|
},
|
|
380
410
|
{
|
|
@@ -382,6 +412,7 @@ const config = {
|
|
|
382
412
|
weight: 3,
|
|
383
413
|
properties: {
|
|
384
414
|
"field_updated": ["bio", "avatar", "display_name", "privacy_settings", "interests"],
|
|
415
|
+
"toxic_user": [false],
|
|
385
416
|
}
|
|
386
417
|
},
|
|
387
418
|
{
|
|
@@ -389,7 +420,8 @@ const config = {
|
|
|
389
420
|
weight: 2,
|
|
390
421
|
properties: {
|
|
391
422
|
"tier": ["basic", "premium", "vip"],
|
|
392
|
-
"price_usd":
|
|
423
|
+
"price_usd": [4.99, 9.99, 19.99],
|
|
424
|
+
"toxic_user": [false],
|
|
393
425
|
}
|
|
394
426
|
},
|
|
395
427
|
],
|
|
@@ -403,7 +435,7 @@ const config = {
|
|
|
403
435
|
"follower_count": u.weighNumRange(0, 10000, 0.2, 50),
|
|
404
436
|
"following_count": u.weighNumRange(0, 5000, 0.3, 100),
|
|
405
437
|
"bio_length": u.weighNumRange(0, 160),
|
|
406
|
-
"verified":
|
|
438
|
+
"verified": [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true],
|
|
407
439
|
"content_niche": ["lifestyle", "tech", "food", "fitness", "travel", "comedy", "news", "art"],
|
|
408
440
|
},
|
|
409
441
|
|
|
@@ -416,7 +448,7 @@ const config = {
|
|
|
416
448
|
"name": () => `${chance.word()} ${chance.pickone(["Hub", "Circle", "Squad", "Zone", "Space"])}`,
|
|
417
449
|
"member_count": u.weighNumRange(50, 5000, 0.3, 200),
|
|
418
450
|
"category": ["technology", "entertainment", "sports", "politics", "art", "science"],
|
|
419
|
-
"is_moderated":
|
|
451
|
+
"is_moderated": [false, false, false, true, true, true, true, true, true, true],
|
|
420
452
|
}
|
|
421
453
|
},
|
|
422
454
|
|
|
@@ -536,8 +568,13 @@ const config = {
|
|
|
536
568
|
const viralShares = chance.integer({ min: 10, max: 20 });
|
|
537
569
|
const injected = [];
|
|
538
570
|
|
|
571
|
+
const viewTemplate = userEvents.find(e => e.event === "post viewed");
|
|
572
|
+
const likeTemplate = userEvents.find(e => e.event === "post liked");
|
|
573
|
+
const shareTemplate = userEvents.find(e => e.event === "post shared");
|
|
574
|
+
|
|
539
575
|
for (let i = 0; i < viralViews; i++) {
|
|
540
576
|
injected.push({
|
|
577
|
+
...(viewTemplate || event),
|
|
541
578
|
event: "post viewed",
|
|
542
579
|
time: eventTime.add(chance.integer({ min: 1, max: 180 }), 'minutes').toISOString(),
|
|
543
580
|
user_id: event.user_id,
|
|
@@ -545,10 +582,13 @@ const config = {
|
|
|
545
582
|
source: chance.pickone(["feed", "explore", "search"]),
|
|
546
583
|
view_duration_sec: chance.integer({ min: 5, max: 90 }),
|
|
547
584
|
viral_cascade: true,
|
|
585
|
+
engagement_bait: false,
|
|
586
|
+
trending_reengagement: false,
|
|
548
587
|
});
|
|
549
588
|
}
|
|
550
589
|
for (let i = 0; i < viralLikes; i++) {
|
|
551
590
|
injected.push({
|
|
591
|
+
...(likeTemplate || event),
|
|
552
592
|
event: "post liked",
|
|
553
593
|
time: eventTime.add(chance.integer({ min: 2, max: 240 }), 'minutes').toISOString(),
|
|
554
594
|
user_id: event.user_id,
|
|
@@ -558,6 +598,7 @@ const config = {
|
|
|
558
598
|
}
|
|
559
599
|
for (let i = 0; i < viralShares; i++) {
|
|
560
600
|
injected.push({
|
|
601
|
+
...(shareTemplate || event),
|
|
561
602
|
event: "post shared",
|
|
562
603
|
time: eventTime.add(chance.integer({ min: 5, max: 300 }), 'minutes').toISOString(),
|
|
563
604
|
user_id: event.user_id,
|
|
@@ -574,8 +615,9 @@ const config = {
|
|
|
574
615
|
// Users with 5+ follows become prolific creators
|
|
575
616
|
if (followReceivedCount >= 5 && event.event === "post created") {
|
|
576
617
|
if (chance.bool({ likelihood: 50 })) {
|
|
618
|
+
const commentTemplate = userEvents.find(e => e.event === "comment posted");
|
|
577
619
|
const duplicatePost = {
|
|
578
|
-
event
|
|
620
|
+
...event,
|
|
579
621
|
time: eventTime.add(chance.integer({ min: 30, max: 240 }), 'minutes').toISOString(),
|
|
580
622
|
user_id: event.user_id,
|
|
581
623
|
post_type: chance.pickone(["text", "image", "video"]),
|
|
@@ -585,6 +627,7 @@ const config = {
|
|
|
585
627
|
follow_back_effect: true,
|
|
586
628
|
};
|
|
587
629
|
const extraComment = {
|
|
630
|
+
...(commentTemplate || event),
|
|
588
631
|
event: "comment posted",
|
|
589
632
|
time: eventTime.add(chance.integer({ min: 10, max: 120 }), 'minutes').toISOString(),
|
|
590
633
|
user_id: event.user_id,
|
|
@@ -602,7 +645,7 @@ const config = {
|
|
|
602
645
|
// Triple frequency: add 2 extra posts for each existing one
|
|
603
646
|
for (let i = 0; i < 2; i++) {
|
|
604
647
|
const extraPost = {
|
|
605
|
-
event
|
|
648
|
+
...event,
|
|
606
649
|
time: eventTime.add(chance.integer({ min: 1, max: 12 }), 'hours').toISOString(),
|
|
607
650
|
user_id: event.user_id,
|
|
608
651
|
post_type: chance.pickone(["text", "image", "video", "link"]),
|
|
@@ -618,7 +661,7 @@ const config = {
|
|
|
618
661
|
// Also triple story creation
|
|
619
662
|
for (let i = 0; i < 2; i++) {
|
|
620
663
|
const extraStory = {
|
|
621
|
-
event
|
|
664
|
+
...event,
|
|
622
665
|
time: eventTime.add(chance.integer({ min: 1, max: 8 }), 'hours').toISOString(),
|
|
623
666
|
user_id: event.user_id,
|
|
624
667
|
story_type: chance.pickone(["photo", "video", "text"]),
|
|
@@ -633,13 +676,16 @@ const config = {
|
|
|
633
676
|
if (hasCreatorSubscription && event.event === "post viewed") {
|
|
634
677
|
if (chance.bool({ likelihood: 25 })) {
|
|
635
678
|
const analyticsView = {
|
|
636
|
-
event
|
|
679
|
+
...event,
|
|
637
680
|
time: eventTime.add(chance.integer({ min: 1, max: 30 }), 'minutes').toISOString(),
|
|
638
681
|
user_id: event.user_id,
|
|
639
682
|
post_type: event.post_type || "text",
|
|
640
683
|
source: "profile",
|
|
641
684
|
view_duration_sec: chance.integer({ min: 10, max: 60 }),
|
|
642
685
|
monetized_creator: true,
|
|
686
|
+
engagement_bait: false,
|
|
687
|
+
trending_reengagement: false,
|
|
688
|
+
viral_cascade: false,
|
|
643
689
|
};
|
|
644
690
|
userEvents.splice(idx + 1, 0, analyticsView);
|
|
645
691
|
}
|