hoi4-agent-tools 2.7.0 → 2.8.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/CHANGELOG.md +7 -0
  2. package/README.md +1 -1
  3. package/dist/hoi4_agent_tools/mcp/tools/probability.js +9 -0
  4. package/dist/hoi4_agent_tools/probability/adapters.js +5 -0
  5. package/dist/hoi4_agent_tools/probability/evaluation.js +6 -1
  6. package/dist/hoi4_agent_tools/probability/scenario-state.js +165 -0
  7. package/dist/hoi4_agent_tools/probability/scope-pools.js +199 -0
  8. package/dist/hoi4_agent_tools/probability/simulation.js +4 -3
  9. package/dist/hoi4_agent_tools/probability/sweep.js +6 -2
  10. package/dist/hoi4_agent_tools/probability/trigger-evaluator.js +35 -28
  11. package/dist/hoi4_agent_tools/probability/value-evaluator.js +4 -0
  12. package/dist/hoi4_agent_tools/schemas/probability.js +90 -0
  13. package/dist/hoi4_agent_tools/version.js +1 -1
  14. package/docs/probability.md +46 -0
  15. package/docs/research/probability-adapter-evidence.md +2 -1
  16. package/examples/probability/scoped-dynamic-pools-evaluate-input.json +50 -0
  17. package/package.json +1 -1
  18. package/schemas/configuration.schema.json +1 -1
  19. package/schemas/continuous-focus-palette.schema.json +1 -1
  20. package/schemas/custom-weighted-pool.schema.json +1 -1
  21. package/schemas/event-feature-manifest.schema.json +1 -1
  22. package/schemas/focus-plan.schema.json +1 -1
  23. package/schemas/focus-planning-sidecar.schema.json +1 -1
  24. package/schemas/gui-animation-source.schema.json +1 -1
  25. package/schemas/gui-helper.schema.json +1 -1
  26. package/schemas/gui-scenario.schema.json +1 -1
  27. package/schemas/map-operation.schema.json +1 -1
  28. package/schemas/operation-result.schema.json +1 -1
  29. package/schemas/probability-analysis-result.schema.json +175 -66
  30. package/schemas/probability-compare-input.schema.json +251 -66
  31. package/schemas/probability-evaluate-input.schema.json +252 -67
  32. package/schemas/probability-inspect-input.schema.json +1 -1
  33. package/schemas/probability-render-input.schema.json +1 -1
  34. package/schemas/probability-scenario-set.schema.json +231 -46
  35. package/schemas/probability-sequence-input.schema.json +273 -88
  36. package/schemas/probability-simulate-input.schema.json +252 -67
  37. package/schemas/probability-sweep-input.schema.json +254 -69
  38. package/server.json +2 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v2.7.0/schemas/probability-compare-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v2.8.0/schemas/probability-compare-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -60,7 +60,7 @@
60
60
  "maxItems": 100000,
61
61
  "type": "array",
62
62
  "items": {
63
- "$ref": "#/$defs/__schema43"
63
+ "$ref": "#/$defs/__schema56"
64
64
  }
65
65
  },
66
66
  "horizonDays": {
@@ -72,7 +72,7 @@
72
72
  "maxItems": 100000,
73
73
  "type": "array",
74
74
  "items": {
75
- "$ref": "#/$defs/__schema44"
75
+ "$ref": "#/$defs/__schema57"
76
76
  }
77
77
  },
78
78
  "diagnosticThresholds": {
@@ -118,7 +118,7 @@
118
118
  "maxItems": 10,
119
119
  "type": "array",
120
120
  "items": {
121
- "$ref": "#/$defs/__schema52"
121
+ "$ref": "#/$defs/__schema65"
122
122
  }
123
123
  },
124
124
  "refresh": {
@@ -227,17 +227,23 @@
227
227
  "eventTargets": {
228
228
  "$ref": "#/$defs/__schema19"
229
229
  },
230
- "candidateOverrides": {
230
+ "scopes": {
231
231
  "$ref": "#/$defs/__schema20"
232
232
  },
233
+ "scopePools": {
234
+ "$ref": "#/$defs/__schema23"
235
+ },
236
+ "candidateOverrides": {
237
+ "$ref": "#/$defs/__schema33"
238
+ },
233
239
  "uncertainInputs": {
234
- "$ref": "#/$defs/__schema21"
240
+ "$ref": "#/$defs/__schema34"
235
241
  },
236
242
  "correlations": {
237
- "$ref": "#/$defs/__schema37"
243
+ "$ref": "#/$defs/__schema50"
238
244
  },
239
245
  "schedule": {
240
- "$ref": "#/$defs/__schema39"
246
+ "$ref": "#/$defs/__schema52"
241
247
  }
242
248
  },
243
249
  "required": [
@@ -337,36 +343,215 @@
337
343
  "type": "object",
338
344
  "propertyNames": {
339
345
  "type": "string",
346
+ "minLength": 1,
340
347
  "maxLength": 512
341
348
  },
342
349
  "additionalProperties": {
343
- "type": "boolean"
350
+ "$ref": "#/$defs/__schema21"
344
351
  }
345
352
  },
346
353
  "__schema21": {
354
+ "type": "object",
355
+ "properties": {
356
+ "id": {
357
+ "type": "string",
358
+ "minLength": 1,
359
+ "maxLength": 512
360
+ },
361
+ "type": {
362
+ "type": "string",
363
+ "enum": [
364
+ "country",
365
+ "state",
366
+ "character",
367
+ "unit_leader",
368
+ "operative",
369
+ "strategic_region",
370
+ "province",
371
+ "unknown"
372
+ ]
373
+ },
374
+ "actor": {
375
+ "type": "string",
376
+ "maxLength": 256
377
+ },
378
+ "state": {
379
+ "default": {},
380
+ "type": "object",
381
+ "propertyNames": {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "maxLength": 1024
385
+ },
386
+ "additionalProperties": {
387
+ "$ref": "#/$defs/__schema15"
388
+ }
389
+ },
390
+ "flags": {
391
+ "maxItems": 100000,
392
+ "type": "array",
393
+ "items": {
394
+ "$ref": "#/$defs/__schema22"
395
+ }
396
+ },
397
+ "eventTargets": {
398
+ "type": "object",
399
+ "propertyNames": {
400
+ "type": "string",
401
+ "maxLength": 512
402
+ },
403
+ "additionalProperties": {
404
+ "type": "string",
405
+ "maxLength": 512
406
+ }
407
+ },
408
+ "weight": {
409
+ "anyOf": [
410
+ {
411
+ "type": "number",
412
+ "minimum": 0
413
+ },
414
+ {
415
+ "type": "string",
416
+ "minLength": 1,
417
+ "maxLength": 1024
418
+ }
419
+ ]
420
+ }
421
+ },
422
+ "required": [
423
+ "id"
424
+ ],
425
+ "additionalProperties": false
426
+ },
427
+ "__schema22": {
428
+ "type": "string",
429
+ "minLength": 1,
430
+ "maxLength": 512
431
+ },
432
+ "__schema23": {
433
+ "maxItems": 100000,
434
+ "type": "array",
435
+ "items": {
436
+ "$ref": "#/$defs/__schema24"
437
+ }
438
+ },
439
+ "__schema24": {
440
+ "type": "object",
441
+ "properties": {
442
+ "id": {
443
+ "$ref": "#/$defs/__schema25"
444
+ },
445
+ "bindAs": {
446
+ "$ref": "#/$defs/__schema26"
447
+ },
448
+ "selection": {
449
+ "$ref": "#/$defs/__schema27"
450
+ },
451
+ "complete": {
452
+ "$ref": "#/$defs/__schema28"
453
+ },
454
+ "filter": {
455
+ "$ref": "#/$defs/__schema29"
456
+ },
457
+ "candidates": {
458
+ "$ref": "#/$defs/__schema32"
459
+ }
460
+ },
461
+ "required": [
462
+ "id",
463
+ "candidates"
464
+ ],
465
+ "additionalProperties": false
466
+ },
467
+ "__schema25": {
468
+ "type": "string",
469
+ "minLength": 1,
470
+ "maxLength": 512
471
+ },
472
+ "__schema26": {
473
+ "default": "THIS",
474
+ "type": "string",
475
+ "minLength": 1,
476
+ "maxLength": 512
477
+ },
478
+ "__schema27": {
479
+ "default": "enumeration",
480
+ "type": "string",
481
+ "enum": [
482
+ "enumeration",
483
+ "uniform",
484
+ "proportional_categorical"
485
+ ]
486
+ },
487
+ "__schema28": {
488
+ "default": false,
489
+ "type": "boolean"
490
+ },
491
+ "__schema29": {
492
+ "type": "object",
493
+ "properties": {
494
+ "inlineClausewitz": {
495
+ "$ref": "#/$defs/__schema30"
496
+ },
497
+ "scriptedTrigger": {
498
+ "$ref": "#/$defs/__schema31"
499
+ }
500
+ },
501
+ "additionalProperties": false
502
+ },
503
+ "__schema30": {
504
+ "type": "string",
505
+ "minLength": 1,
506
+ "maxLength": 1048576
507
+ },
508
+ "__schema31": {
509
+ "type": "string",
510
+ "minLength": 1,
511
+ "maxLength": 512
512
+ },
513
+ "__schema32": {
514
+ "minItems": 1,
515
+ "maxItems": 100000,
516
+ "type": "array",
517
+ "items": {
518
+ "$ref": "#/$defs/__schema21"
519
+ }
520
+ },
521
+ "__schema33": {
522
+ "type": "object",
523
+ "propertyNames": {
524
+ "type": "string",
525
+ "maxLength": 512
526
+ },
527
+ "additionalProperties": {
528
+ "type": "boolean"
529
+ }
530
+ },
531
+ "__schema34": {
347
532
  "maxItems": 10000,
348
533
  "type": "array",
349
534
  "items": {
350
- "$ref": "#/$defs/__schema22"
535
+ "$ref": "#/$defs/__schema35"
351
536
  }
352
537
  },
353
- "__schema22": {
538
+ "__schema35": {
354
539
  "type": "object",
355
540
  "properties": {
356
541
  "path": {
357
- "$ref": "#/$defs/__schema23"
542
+ "$ref": "#/$defs/__schema36"
358
543
  },
359
544
  "range": {
360
- "$ref": "#/$defs/__schema24"
545
+ "$ref": "#/$defs/__schema37"
361
546
  },
362
547
  "alternatives": {
363
- "$ref": "#/$defs/__schema25"
548
+ "$ref": "#/$defs/__schema38"
364
549
  },
365
550
  "distribution": {
366
- "$ref": "#/$defs/__schema26"
551
+ "$ref": "#/$defs/__schema39"
367
552
  },
368
553
  "unresolved": {
369
- "$ref": "#/$defs/__schema36"
554
+ "$ref": "#/$defs/__schema49"
370
555
  }
371
556
  },
372
557
  "required": [
@@ -374,12 +559,12 @@
374
559
  ],
375
560
  "additionalProperties": false
376
561
  },
377
- "__schema23": {
562
+ "__schema36": {
378
563
  "type": "string",
379
564
  "minLength": 1,
380
565
  "maxLength": 1024
381
566
  },
382
- "__schema24": {
567
+ "__schema37": {
383
568
  "type": "object",
384
569
  "properties": {
385
570
  "min": {
@@ -395,7 +580,7 @@
395
580
  ],
396
581
  "additionalProperties": false
397
582
  },
398
- "__schema25": {
583
+ "__schema38": {
399
584
  "minItems": 1,
400
585
  "maxItems": 100000,
401
586
  "type": "array",
@@ -403,32 +588,32 @@
403
588
  "$ref": "#/$defs/__schema16"
404
589
  }
405
590
  },
406
- "__schema26": {
591
+ "__schema39": {
407
592
  "type": "object",
408
593
  "properties": {
409
594
  "kind": {
410
- "$ref": "#/$defs/__schema27"
595
+ "$ref": "#/$defs/__schema40"
411
596
  },
412
597
  "min": {
413
- "$ref": "#/$defs/__schema28"
598
+ "$ref": "#/$defs/__schema41"
414
599
  },
415
600
  "max": {
416
- "$ref": "#/$defs/__schema29"
601
+ "$ref": "#/$defs/__schema42"
417
602
  },
418
603
  "mode": {
419
- "$ref": "#/$defs/__schema30"
604
+ "$ref": "#/$defs/__schema43"
420
605
  },
421
606
  "mean": {
422
- "$ref": "#/$defs/__schema31"
607
+ "$ref": "#/$defs/__schema44"
423
608
  },
424
609
  "stddev": {
425
- "$ref": "#/$defs/__schema32"
610
+ "$ref": "#/$defs/__schema45"
426
611
  },
427
612
  "values": {
428
- "$ref": "#/$defs/__schema33"
613
+ "$ref": "#/$defs/__schema46"
429
614
  },
430
615
  "probabilities": {
431
- "$ref": "#/$defs/__schema34"
616
+ "$ref": "#/$defs/__schema47"
432
617
  }
433
618
  },
434
619
  "required": [
@@ -436,7 +621,7 @@
436
621
  ],
437
622
  "additionalProperties": false
438
623
  },
439
- "__schema27": {
624
+ "__schema40": {
440
625
  "type": "string",
441
626
  "enum": [
442
627
  "uniform",
@@ -447,23 +632,23 @@
447
632
  "empirical"
448
633
  ]
449
634
  },
450
- "__schema28": {
635
+ "__schema41": {
451
636
  "type": "number"
452
637
  },
453
- "__schema29": {
638
+ "__schema42": {
454
639
  "type": "number"
455
640
  },
456
- "__schema30": {
641
+ "__schema43": {
457
642
  "type": "number"
458
643
  },
459
- "__schema31": {
644
+ "__schema44": {
460
645
  "type": "number"
461
646
  },
462
- "__schema32": {
647
+ "__schema45": {
463
648
  "type": "number",
464
649
  "exclusiveMinimum": 0
465
650
  },
466
- "__schema33": {
651
+ "__schema46": {
467
652
  "minItems": 1,
468
653
  "maxItems": 100000,
469
654
  "type": "array",
@@ -471,31 +656,31 @@
471
656
  "$ref": "#/$defs/__schema16"
472
657
  }
473
658
  },
474
- "__schema34": {
659
+ "__schema47": {
475
660
  "minItems": 1,
476
661
  "maxItems": 100000,
477
662
  "type": "array",
478
663
  "items": {
479
- "$ref": "#/$defs/__schema35"
664
+ "$ref": "#/$defs/__schema48"
480
665
  }
481
666
  },
482
- "__schema35": {
667
+ "__schema48": {
483
668
  "type": "number",
484
669
  "minimum": 0,
485
670
  "maximum": 1
486
671
  },
487
- "__schema36": {
672
+ "__schema49": {
488
673
  "type": "boolean",
489
674
  "const": true
490
675
  },
491
- "__schema37": {
676
+ "__schema50": {
492
677
  "maxItems": 10000,
493
678
  "type": "array",
494
679
  "items": {
495
- "$ref": "#/$defs/__schema38"
680
+ "$ref": "#/$defs/__schema51"
496
681
  }
497
682
  },
498
- "__schema38": {
683
+ "__schema51": {
499
684
  "type": "object",
500
685
  "properties": {
501
686
  "left": {
@@ -521,14 +706,14 @@
521
706
  ],
522
707
  "additionalProperties": false
523
708
  },
524
- "__schema39": {
709
+ "__schema52": {
525
710
  "maxItems": 100000,
526
711
  "type": "array",
527
712
  "items": {
528
- "$ref": "#/$defs/__schema40"
713
+ "$ref": "#/$defs/__schema53"
529
714
  }
530
715
  },
531
- "__schema40": {
716
+ "__schema53": {
532
717
  "type": "object",
533
718
  "properties": {
534
719
  "atDay": {
@@ -549,14 +734,14 @@
549
734
  "maxItems": 100000,
550
735
  "type": "array",
551
736
  "items": {
552
- "$ref": "#/$defs/__schema41"
737
+ "$ref": "#/$defs/__schema54"
553
738
  }
554
739
  },
555
740
  "addFlags": {
556
741
  "maxItems": 100000,
557
742
  "type": "array",
558
743
  "items": {
559
- "$ref": "#/$defs/__schema42"
744
+ "$ref": "#/$defs/__schema55"
560
745
  }
561
746
  }
562
747
  },
@@ -566,42 +751,42 @@
566
751
  ],
567
752
  "additionalProperties": false
568
753
  },
569
- "__schema41": {
754
+ "__schema54": {
570
755
  "type": "string",
571
756
  "maxLength": 512
572
757
  },
573
- "__schema42": {
758
+ "__schema55": {
574
759
  "type": "string",
575
760
  "maxLength": 512
576
761
  },
577
- "__schema43": {
762
+ "__schema56": {
578
763
  "type": "string",
579
764
  "minLength": 1,
580
765
  "maxLength": 512
581
766
  },
582
- "__schema44": {
767
+ "__schema57": {
583
768
  "type": "object",
584
769
  "properties": {
585
770
  "id": {
586
- "$ref": "#/$defs/__schema45"
771
+ "$ref": "#/$defs/__schema58"
587
772
  },
588
773
  "label": {
589
- "$ref": "#/$defs/__schema46"
774
+ "$ref": "#/$defs/__schema59"
590
775
  },
591
776
  "scenarioId": {
592
- "$ref": "#/$defs/__schema47"
777
+ "$ref": "#/$defs/__schema60"
593
778
  },
594
779
  "candidateId": {
595
- "$ref": "#/$defs/__schema48"
780
+ "$ref": "#/$defs/__schema61"
596
781
  },
597
782
  "metric": {
598
- "$ref": "#/$defs/__schema49"
783
+ "$ref": "#/$defs/__schema62"
599
784
  },
600
785
  "min": {
601
- "$ref": "#/$defs/__schema50"
786
+ "$ref": "#/$defs/__schema63"
602
787
  },
603
788
  "max": {
604
- "$ref": "#/$defs/__schema51"
789
+ "$ref": "#/$defs/__schema64"
605
790
  }
606
791
  },
607
792
  "required": [
@@ -611,26 +796,26 @@
611
796
  ],
612
797
  "additionalProperties": false
613
798
  },
614
- "__schema45": {
799
+ "__schema58": {
615
800
  "type": "string",
616
801
  "minLength": 1,
617
802
  "maxLength": 512
618
803
  },
619
- "__schema46": {
804
+ "__schema59": {
620
805
  "type": "string",
621
806
  "maxLength": 4096
622
807
  },
623
- "__schema47": {
808
+ "__schema60": {
624
809
  "type": "string",
625
810
  "minLength": 1,
626
811
  "maxLength": 512
627
812
  },
628
- "__schema48": {
813
+ "__schema61": {
629
814
  "type": "string",
630
815
  "minLength": 1,
631
816
  "maxLength": 512
632
817
  },
633
- "__schema49": {
818
+ "__schema62": {
634
819
  "type": "string",
635
820
  "enum": [
636
821
  "conditional_probability",
@@ -639,13 +824,13 @@
639
824
  "effective_mtth_days"
640
825
  ]
641
826
  },
642
- "__schema50": {
827
+ "__schema63": {
643
828
  "type": "number"
644
829
  },
645
- "__schema51": {
830
+ "__schema64": {
646
831
  "type": "number"
647
832
  },
648
- "__schema52": {
833
+ "__schema65": {
649
834
  "type": "string",
650
835
  "enum": [
651
836
  "json",