@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-media";
|
|
@@ -318,6 +318,10 @@ const config = {
|
|
|
318
318
|
properties: {
|
|
319
319
|
"signup_source": ["organic", "referral", "trial_offer", "ad"],
|
|
320
320
|
"plan_selected": ["free", "standard", "premium"],
|
|
321
|
+
"weekend_viewing": [false],
|
|
322
|
+
"prime_time": [false],
|
|
323
|
+
"kids_profile": [false],
|
|
324
|
+
"ad_fatigue": [false],
|
|
321
325
|
}
|
|
322
326
|
},
|
|
323
327
|
{
|
|
@@ -326,6 +330,10 @@ const config = {
|
|
|
326
330
|
properties: {
|
|
327
331
|
"browse_section": ["home", "trending", "new_releases", "genre", "continue_watching"],
|
|
328
332
|
"genre": ["action", "comedy", "drama", "documentary", "horror", "sci_fi", "animation", "thriller", "romance"],
|
|
333
|
+
"weekend_viewing": [false],
|
|
334
|
+
"prime_time": [false],
|
|
335
|
+
"kids_profile": [false],
|
|
336
|
+
"ad_fatigue": [false],
|
|
329
337
|
}
|
|
330
338
|
},
|
|
331
339
|
{
|
|
@@ -334,62 +342,96 @@ const config = {
|
|
|
334
342
|
properties: {
|
|
335
343
|
"content_type": ["movie", "series", "documentary", "special"],
|
|
336
344
|
"genre": ["action", "comedy", "drama", "documentary", "horror", "sci_fi", "animation", "thriller", "romance"],
|
|
337
|
-
"content_id":
|
|
345
|
+
"content_id": contentIds,
|
|
346
|
+
"blockbuster_release": [false],
|
|
347
|
+
"kids_profile": [false],
|
|
348
|
+
"weekend_viewing": [false],
|
|
349
|
+
"prime_time": [false],
|
|
350
|
+
"ad_fatigue": [false],
|
|
338
351
|
}
|
|
339
352
|
},
|
|
340
353
|
{
|
|
341
354
|
event: "playback started",
|
|
342
355
|
weight: 18,
|
|
343
356
|
properties: {
|
|
344
|
-
"content_id":
|
|
357
|
+
"content_id": contentIds,
|
|
345
358
|
"content_type": ["movie", "series", "documentary", "special"],
|
|
346
359
|
"playback_quality": ["480p", "720p", "1080p", "4k"],
|
|
347
360
|
"subtitle_language": ["none", "english", "spanish", "french", "japanese", "korean"],
|
|
348
|
-
"playback_speed":
|
|
361
|
+
"playback_speed": ["0.5x", "1x", "1x", "1x", "1.25x", "1.5x", "2x"],
|
|
362
|
+
"blockbuster_release": [false],
|
|
363
|
+
"kids_profile": [false],
|
|
364
|
+
"binge_session": [false],
|
|
365
|
+
"weekend_viewing": [false],
|
|
366
|
+
"prime_time": [false],
|
|
367
|
+
"ad_fatigue": [false],
|
|
349
368
|
}
|
|
350
369
|
},
|
|
351
370
|
{
|
|
352
371
|
event: "playback completed",
|
|
353
372
|
weight: 12,
|
|
354
373
|
properties: {
|
|
355
|
-
"content_id":
|
|
374
|
+
"content_id": contentIds,
|
|
356
375
|
"content_type": ["movie", "series", "documentary", "special"],
|
|
357
376
|
"watch_duration_min": u.weighNumRange(5, 180, 0.5, 45),
|
|
358
377
|
"completion_percent": u.weighNumRange(10, 100, 1.5, 85),
|
|
378
|
+
"binge_session": [false],
|
|
379
|
+
"subtitle_user": [false],
|
|
380
|
+
"weekend_viewing": [false],
|
|
381
|
+
"prime_time": [false],
|
|
382
|
+
"kids_profile": [false],
|
|
383
|
+
"ad_fatigue": [false],
|
|
359
384
|
}
|
|
360
385
|
},
|
|
361
386
|
{
|
|
362
387
|
event: "playback paused",
|
|
363
388
|
weight: 10,
|
|
364
389
|
properties: {
|
|
365
|
-
"content_id":
|
|
390
|
+
"content_id": contentIds,
|
|
366
391
|
"pause_reason": ["manual", "ad_break", "buffering", "notification"],
|
|
392
|
+
"weekend_viewing": [false],
|
|
393
|
+
"prime_time": [false],
|
|
394
|
+
"kids_profile": [false],
|
|
395
|
+
"ad_fatigue": [false],
|
|
367
396
|
}
|
|
368
397
|
},
|
|
369
398
|
{
|
|
370
399
|
event: "content rated",
|
|
371
400
|
weight: 6,
|
|
372
401
|
properties: {
|
|
373
|
-
"content_id":
|
|
402
|
+
"content_id": contentIds,
|
|
374
403
|
"rating": u.weighNumRange(1, 5, 2, 4),
|
|
375
404
|
"review_text_length": u.weighNumRange(0, 500, 0.2, 0),
|
|
405
|
+
"blockbuster_release": [false],
|
|
406
|
+
"weekend_viewing": [false],
|
|
407
|
+
"prime_time": [false],
|
|
408
|
+
"kids_profile": [false],
|
|
409
|
+
"ad_fatigue": [false],
|
|
376
410
|
}
|
|
377
411
|
},
|
|
378
412
|
{
|
|
379
413
|
event: "watchlist added",
|
|
380
414
|
weight: 8,
|
|
381
415
|
properties: {
|
|
382
|
-
"content_id":
|
|
416
|
+
"content_id": contentIds,
|
|
383
417
|
"content_type": ["movie", "series", "documentary", "special"],
|
|
384
418
|
"genre": ["action", "comedy", "drama", "documentary", "horror", "sci_fi", "animation", "thriller", "romance"],
|
|
419
|
+
"weekend_viewing": [false],
|
|
420
|
+
"prime_time": [false],
|
|
421
|
+
"kids_profile": [false],
|
|
422
|
+
"ad_fatigue": [false],
|
|
385
423
|
}
|
|
386
424
|
},
|
|
387
425
|
{
|
|
388
426
|
event: "watchlist removed",
|
|
389
427
|
weight: 3,
|
|
390
428
|
properties: {
|
|
391
|
-
"content_id":
|
|
429
|
+
"content_id": contentIds,
|
|
392
430
|
"reason": ["watched", "not_interested", "expired"],
|
|
431
|
+
"weekend_viewing": [false],
|
|
432
|
+
"prime_time": [false],
|
|
433
|
+
"kids_profile": [false],
|
|
434
|
+
"ad_fatigue": [false],
|
|
393
435
|
}
|
|
394
436
|
},
|
|
395
437
|
{
|
|
@@ -399,6 +441,10 @@ const config = {
|
|
|
399
441
|
"search_term": () => chance.word(),
|
|
400
442
|
"results_count": u.weighNumRange(0, 50, 0.5, 15),
|
|
401
443
|
"search_type": ["title", "actor", "director", "genre"],
|
|
444
|
+
"weekend_viewing": [false],
|
|
445
|
+
"prime_time": [false],
|
|
446
|
+
"kids_profile": [false],
|
|
447
|
+
"ad_fatigue": [false],
|
|
402
448
|
}
|
|
403
449
|
},
|
|
404
450
|
{
|
|
@@ -407,6 +453,10 @@ const config = {
|
|
|
407
453
|
properties: {
|
|
408
454
|
"algorithm": ["collaborative_filtering", "content_based", "trending", "editorial"],
|
|
409
455
|
"position": u.weighNumRange(1, 20),
|
|
456
|
+
"weekend_viewing": [false],
|
|
457
|
+
"prime_time": [false],
|
|
458
|
+
"kids_profile": [false],
|
|
459
|
+
"ad_fatigue": [false],
|
|
410
460
|
}
|
|
411
461
|
},
|
|
412
462
|
{
|
|
@@ -414,6 +464,10 @@ const config = {
|
|
|
414
464
|
weight: 4,
|
|
415
465
|
properties: {
|
|
416
466
|
"profile_type": ["main", "kids", "partner", "guest"],
|
|
467
|
+
"weekend_viewing": [false],
|
|
468
|
+
"prime_time": [false],
|
|
469
|
+
"kids_profile": [false],
|
|
470
|
+
"ad_fatigue": [false],
|
|
417
471
|
}
|
|
418
472
|
},
|
|
419
473
|
{
|
|
@@ -422,7 +476,12 @@ const config = {
|
|
|
422
476
|
properties: {
|
|
423
477
|
"ad_type": ["pre_roll", "mid_roll", "banner", "interstitial"],
|
|
424
478
|
"ad_duration_sec": u.weighNumRange(5, 30),
|
|
425
|
-
"skipped":
|
|
479
|
+
"skipped": [false, false, false, true, true],
|
|
480
|
+
"ad_blocked": [false],
|
|
481
|
+
"kids_profile": [false],
|
|
482
|
+
"weekend_viewing": [false],
|
|
483
|
+
"prime_time": [false],
|
|
484
|
+
"ad_fatigue": [false],
|
|
426
485
|
}
|
|
427
486
|
},
|
|
428
487
|
{
|
|
@@ -432,15 +491,23 @@ const config = {
|
|
|
432
491
|
"old_plan": ["free", "standard", "premium"],
|
|
433
492
|
"new_plan": ["free", "standard", "premium"],
|
|
434
493
|
"change_reason": ["upgrade", "downgrade", "cancel", "resubscribe"],
|
|
494
|
+
"weekend_viewing": [false],
|
|
495
|
+
"prime_time": [false],
|
|
496
|
+
"kids_profile": [false],
|
|
497
|
+
"ad_fatigue": [false],
|
|
435
498
|
}
|
|
436
499
|
},
|
|
437
500
|
{
|
|
438
501
|
event: "download started",
|
|
439
502
|
weight: 5,
|
|
440
503
|
properties: {
|
|
441
|
-
"content_id":
|
|
504
|
+
"content_id": contentIds,
|
|
442
505
|
"content_type": ["movie", "series", "documentary", "special"],
|
|
443
506
|
"download_quality": ["720p", "1080p", "4k"],
|
|
507
|
+
"weekend_viewing": [false],
|
|
508
|
+
"prime_time": [false],
|
|
509
|
+
"kids_profile": [false],
|
|
510
|
+
"ad_fatigue": [false],
|
|
444
511
|
}
|
|
445
512
|
},
|
|
446
513
|
{
|
|
@@ -449,6 +516,10 @@ const config = {
|
|
|
449
516
|
properties: {
|
|
450
517
|
"share_method": ["link", "social", "dm", "email"],
|
|
451
518
|
"content_type": ["movie", "series", "documentary", "special"],
|
|
519
|
+
"weekend_viewing": [false],
|
|
520
|
+
"prime_time": [false],
|
|
521
|
+
"kids_profile": [false],
|
|
522
|
+
"ad_fatigue": [false],
|
|
452
523
|
}
|
|
453
524
|
},
|
|
454
525
|
{
|
|
@@ -457,12 +528,16 @@ const config = {
|
|
|
457
528
|
properties: {
|
|
458
529
|
"subtitle_language": ["none", "english", "spanish", "french", "japanese", "korean"],
|
|
459
530
|
"action": ["enabled", "disabled", "changed"],
|
|
531
|
+
"weekend_viewing": [false],
|
|
532
|
+
"prime_time": [false],
|
|
533
|
+
"kids_profile": [false],
|
|
534
|
+
"ad_fatigue": [false],
|
|
460
535
|
}
|
|
461
536
|
},
|
|
462
537
|
],
|
|
463
538
|
|
|
464
539
|
superProps: {
|
|
465
|
-
subscription_plan:
|
|
540
|
+
subscription_plan: ["free", "free", "standard", "standard", "standard", "premium"],
|
|
466
541
|
device_type: ["smart_tv", "mobile", "tablet", "laptop", "desktop"],
|
|
467
542
|
},
|
|
468
543
|
|
|
@@ -473,7 +548,7 @@ const config = {
|
|
|
473
548
|
"avg_session_duration_min": u.weighNumRange(10, 180, 0.5, 45),
|
|
474
549
|
"total_watch_hours": u.weighNumRange(0, 500, 0.8, 50),
|
|
475
550
|
"profiles_count": u.weighNumRange(1, 5),
|
|
476
|
-
"downloads_enabled":
|
|
551
|
+
"downloads_enabled": [false, false, false, true, true],
|
|
477
552
|
},
|
|
478
553
|
|
|
479
554
|
lookupTables: [],
|
|
@@ -497,7 +572,8 @@ const config = {
|
|
|
497
572
|
const DATASET_START = NOW.subtract(days, 'days');
|
|
498
573
|
// FIXED_START is the pre-shift time range start; needed because
|
|
499
574
|
// meta.firstEventTime in funnel-pre is in the FIXED (pre-shift) timeframe
|
|
500
|
-
const
|
|
575
|
+
const FIXED_NOW_UNIX = dayjs('2024-02-02').unix();
|
|
576
|
+
const FIXED_START = dayjs.unix(FIXED_NOW_UNIX).subtract(days, 'days');
|
|
501
577
|
|
|
502
578
|
// ─────────────────────────────────────────────────────────────
|
|
503
579
|
// Hook #1: GENRE FUNNEL CONVERSION (funnel-pre)
|
|
@@ -701,7 +777,9 @@ const config = {
|
|
|
701
777
|
// Add extra viewing events after completions
|
|
702
778
|
if (event.event === "playback completed" && chance.bool({ likelihood: 40 })) {
|
|
703
779
|
const nextContentId = chance.pickone(contentIds);
|
|
780
|
+
const startTemplate = userEvents.find(e => e.event === "playback started");
|
|
704
781
|
const extraStart = {
|
|
782
|
+
...(startTemplate || event),
|
|
705
783
|
event: "playback started",
|
|
706
784
|
time: eventTime.add(chance.integer({ min: 1, max: 5 }), 'minutes').toISOString(),
|
|
707
785
|
user_id: event.user_id,
|
|
@@ -711,7 +789,7 @@ const config = {
|
|
|
711
789
|
binge_session: true,
|
|
712
790
|
};
|
|
713
791
|
const extraComplete = {
|
|
714
|
-
event
|
|
792
|
+
...event,
|
|
715
793
|
time: eventTime.add(chance.integer({ min: 25, max: 60 }), 'minutes').toISOString(),
|
|
716
794
|
user_id: event.user_id,
|
|
717
795
|
content_id: nextContentId,
|
|
@@ -767,7 +845,7 @@ const config = {
|
|
|
767
845
|
const templateEvent = chance.pickone(completionEvents);
|
|
768
846
|
const templateTime = dayjs(templateEvent.time);
|
|
769
847
|
const extraCompletion = {
|
|
770
|
-
|
|
848
|
+
...templateEvent,
|
|
771
849
|
time: templateTime.add(chance.integer({ min: 30, max: 180 }), 'minutes').toISOString(),
|
|
772
850
|
user_id: templateEvent.user_id,
|
|
773
851
|
content_id: chance.pickone(contentIds),
|