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-sequence-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v2.8.0/schemas/probability-sequence-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -64,28 +64,28 @@
64
64
  "type": "object",
65
65
  "properties": {
66
66
  "schemaVersion": {
67
- "$ref": "#/$defs/__schema35"
67
+ "$ref": "#/$defs/__schema48"
68
68
  },
69
69
  "id": {
70
- "$ref": "#/$defs/__schema36"
70
+ "$ref": "#/$defs/__schema49"
71
71
  },
72
72
  "description": {
73
- "$ref": "#/$defs/__schema37"
73
+ "$ref": "#/$defs/__schema50"
74
74
  },
75
75
  "selection": {
76
- "$ref": "#/$defs/__schema38"
76
+ "$ref": "#/$defs/__schema51"
77
77
  },
78
78
  "state": {
79
- "$ref": "#/$defs/__schema39"
79
+ "$ref": "#/$defs/__schema52"
80
80
  },
81
81
  "candidates": {
82
- "$ref": "#/$defs/__schema40"
82
+ "$ref": "#/$defs/__schema53"
83
83
  },
84
84
  "recovery": {
85
- "$ref": "#/$defs/__schema42"
85
+ "$ref": "#/$defs/__schema55"
86
86
  },
87
87
  "transitions": {
88
- "$ref": "#/$defs/__schema44"
88
+ "$ref": "#/$defs/__schema57"
89
89
  }
90
90
  },
91
91
  "required": [
@@ -129,7 +129,7 @@
129
129
  "maxItems": 100000,
130
130
  "type": "array",
131
131
  "items": {
132
- "$ref": "#/$defs/__schema47"
132
+ "$ref": "#/$defs/__schema60"
133
133
  }
134
134
  },
135
135
  "diagnosticThresholds": {
@@ -175,7 +175,7 @@
175
175
  "maxItems": 10,
176
176
  "type": "array",
177
177
  "items": {
178
- "$ref": "#/$defs/__schema55"
178
+ "$ref": "#/$defs/__schema68"
179
179
  }
180
180
  }
181
181
  },
@@ -213,17 +213,23 @@
213
213
  "eventTargets": {
214
214
  "$ref": "#/$defs/__schema11"
215
215
  },
216
- "candidateOverrides": {
216
+ "scopes": {
217
217
  "$ref": "#/$defs/__schema12"
218
218
  },
219
+ "scopePools": {
220
+ "$ref": "#/$defs/__schema15"
221
+ },
222
+ "candidateOverrides": {
223
+ "$ref": "#/$defs/__schema25"
224
+ },
219
225
  "uncertainInputs": {
220
- "$ref": "#/$defs/__schema13"
226
+ "$ref": "#/$defs/__schema26"
221
227
  },
222
228
  "correlations": {
223
- "$ref": "#/$defs/__schema29"
229
+ "$ref": "#/$defs/__schema42"
224
230
  },
225
231
  "schedule": {
226
- "$ref": "#/$defs/__schema31"
232
+ "$ref": "#/$defs/__schema44"
227
233
  }
228
234
  },
229
235
  "required": [
@@ -323,36 +329,215 @@
323
329
  "type": "object",
324
330
  "propertyNames": {
325
331
  "type": "string",
332
+ "minLength": 1,
326
333
  "maxLength": 512
327
334
  },
328
335
  "additionalProperties": {
329
- "type": "boolean"
336
+ "$ref": "#/$defs/__schema13"
330
337
  }
331
338
  },
332
339
  "__schema13": {
340
+ "type": "object",
341
+ "properties": {
342
+ "id": {
343
+ "type": "string",
344
+ "minLength": 1,
345
+ "maxLength": 512
346
+ },
347
+ "type": {
348
+ "type": "string",
349
+ "enum": [
350
+ "country",
351
+ "state",
352
+ "character",
353
+ "unit_leader",
354
+ "operative",
355
+ "strategic_region",
356
+ "province",
357
+ "unknown"
358
+ ]
359
+ },
360
+ "actor": {
361
+ "type": "string",
362
+ "maxLength": 256
363
+ },
364
+ "state": {
365
+ "default": {},
366
+ "type": "object",
367
+ "propertyNames": {
368
+ "type": "string",
369
+ "minLength": 1,
370
+ "maxLength": 1024
371
+ },
372
+ "additionalProperties": {
373
+ "$ref": "#/$defs/__schema7"
374
+ }
375
+ },
376
+ "flags": {
377
+ "maxItems": 100000,
378
+ "type": "array",
379
+ "items": {
380
+ "$ref": "#/$defs/__schema14"
381
+ }
382
+ },
383
+ "eventTargets": {
384
+ "type": "object",
385
+ "propertyNames": {
386
+ "type": "string",
387
+ "maxLength": 512
388
+ },
389
+ "additionalProperties": {
390
+ "type": "string",
391
+ "maxLength": 512
392
+ }
393
+ },
394
+ "weight": {
395
+ "anyOf": [
396
+ {
397
+ "type": "number",
398
+ "minimum": 0
399
+ },
400
+ {
401
+ "type": "string",
402
+ "minLength": 1,
403
+ "maxLength": 1024
404
+ }
405
+ ]
406
+ }
407
+ },
408
+ "required": [
409
+ "id"
410
+ ],
411
+ "additionalProperties": false
412
+ },
413
+ "__schema14": {
414
+ "type": "string",
415
+ "minLength": 1,
416
+ "maxLength": 512
417
+ },
418
+ "__schema15": {
419
+ "maxItems": 100000,
420
+ "type": "array",
421
+ "items": {
422
+ "$ref": "#/$defs/__schema16"
423
+ }
424
+ },
425
+ "__schema16": {
426
+ "type": "object",
427
+ "properties": {
428
+ "id": {
429
+ "$ref": "#/$defs/__schema17"
430
+ },
431
+ "bindAs": {
432
+ "$ref": "#/$defs/__schema18"
433
+ },
434
+ "selection": {
435
+ "$ref": "#/$defs/__schema19"
436
+ },
437
+ "complete": {
438
+ "$ref": "#/$defs/__schema20"
439
+ },
440
+ "filter": {
441
+ "$ref": "#/$defs/__schema21"
442
+ },
443
+ "candidates": {
444
+ "$ref": "#/$defs/__schema24"
445
+ }
446
+ },
447
+ "required": [
448
+ "id",
449
+ "candidates"
450
+ ],
451
+ "additionalProperties": false
452
+ },
453
+ "__schema17": {
454
+ "type": "string",
455
+ "minLength": 1,
456
+ "maxLength": 512
457
+ },
458
+ "__schema18": {
459
+ "default": "THIS",
460
+ "type": "string",
461
+ "minLength": 1,
462
+ "maxLength": 512
463
+ },
464
+ "__schema19": {
465
+ "default": "enumeration",
466
+ "type": "string",
467
+ "enum": [
468
+ "enumeration",
469
+ "uniform",
470
+ "proportional_categorical"
471
+ ]
472
+ },
473
+ "__schema20": {
474
+ "default": false,
475
+ "type": "boolean"
476
+ },
477
+ "__schema21": {
478
+ "type": "object",
479
+ "properties": {
480
+ "inlineClausewitz": {
481
+ "$ref": "#/$defs/__schema22"
482
+ },
483
+ "scriptedTrigger": {
484
+ "$ref": "#/$defs/__schema23"
485
+ }
486
+ },
487
+ "additionalProperties": false
488
+ },
489
+ "__schema22": {
490
+ "type": "string",
491
+ "minLength": 1,
492
+ "maxLength": 1048576
493
+ },
494
+ "__schema23": {
495
+ "type": "string",
496
+ "minLength": 1,
497
+ "maxLength": 512
498
+ },
499
+ "__schema24": {
500
+ "minItems": 1,
501
+ "maxItems": 100000,
502
+ "type": "array",
503
+ "items": {
504
+ "$ref": "#/$defs/__schema13"
505
+ }
506
+ },
507
+ "__schema25": {
508
+ "type": "object",
509
+ "propertyNames": {
510
+ "type": "string",
511
+ "maxLength": 512
512
+ },
513
+ "additionalProperties": {
514
+ "type": "boolean"
515
+ }
516
+ },
517
+ "__schema26": {
333
518
  "maxItems": 10000,
334
519
  "type": "array",
335
520
  "items": {
336
- "$ref": "#/$defs/__schema14"
521
+ "$ref": "#/$defs/__schema27"
337
522
  }
338
523
  },
339
- "__schema14": {
524
+ "__schema27": {
340
525
  "type": "object",
341
526
  "properties": {
342
527
  "path": {
343
- "$ref": "#/$defs/__schema15"
528
+ "$ref": "#/$defs/__schema28"
344
529
  },
345
530
  "range": {
346
- "$ref": "#/$defs/__schema16"
531
+ "$ref": "#/$defs/__schema29"
347
532
  },
348
533
  "alternatives": {
349
- "$ref": "#/$defs/__schema17"
534
+ "$ref": "#/$defs/__schema30"
350
535
  },
351
536
  "distribution": {
352
- "$ref": "#/$defs/__schema18"
537
+ "$ref": "#/$defs/__schema31"
353
538
  },
354
539
  "unresolved": {
355
- "$ref": "#/$defs/__schema28"
540
+ "$ref": "#/$defs/__schema41"
356
541
  }
357
542
  },
358
543
  "required": [
@@ -360,12 +545,12 @@
360
545
  ],
361
546
  "additionalProperties": false
362
547
  },
363
- "__schema15": {
548
+ "__schema28": {
364
549
  "type": "string",
365
550
  "minLength": 1,
366
551
  "maxLength": 1024
367
552
  },
368
- "__schema16": {
553
+ "__schema29": {
369
554
  "type": "object",
370
555
  "properties": {
371
556
  "min": {
@@ -381,7 +566,7 @@
381
566
  ],
382
567
  "additionalProperties": false
383
568
  },
384
- "__schema17": {
569
+ "__schema30": {
385
570
  "minItems": 1,
386
571
  "maxItems": 100000,
387
572
  "type": "array",
@@ -389,32 +574,32 @@
389
574
  "$ref": "#/$defs/__schema8"
390
575
  }
391
576
  },
392
- "__schema18": {
577
+ "__schema31": {
393
578
  "type": "object",
394
579
  "properties": {
395
580
  "kind": {
396
- "$ref": "#/$defs/__schema19"
581
+ "$ref": "#/$defs/__schema32"
397
582
  },
398
583
  "min": {
399
- "$ref": "#/$defs/__schema20"
584
+ "$ref": "#/$defs/__schema33"
400
585
  },
401
586
  "max": {
402
- "$ref": "#/$defs/__schema21"
587
+ "$ref": "#/$defs/__schema34"
403
588
  },
404
589
  "mode": {
405
- "$ref": "#/$defs/__schema22"
590
+ "$ref": "#/$defs/__schema35"
406
591
  },
407
592
  "mean": {
408
- "$ref": "#/$defs/__schema23"
593
+ "$ref": "#/$defs/__schema36"
409
594
  },
410
595
  "stddev": {
411
- "$ref": "#/$defs/__schema24"
596
+ "$ref": "#/$defs/__schema37"
412
597
  },
413
598
  "values": {
414
- "$ref": "#/$defs/__schema25"
599
+ "$ref": "#/$defs/__schema38"
415
600
  },
416
601
  "probabilities": {
417
- "$ref": "#/$defs/__schema26"
602
+ "$ref": "#/$defs/__schema39"
418
603
  }
419
604
  },
420
605
  "required": [
@@ -422,7 +607,7 @@
422
607
  ],
423
608
  "additionalProperties": false
424
609
  },
425
- "__schema19": {
610
+ "__schema32": {
426
611
  "type": "string",
427
612
  "enum": [
428
613
  "uniform",
@@ -433,23 +618,23 @@
433
618
  "empirical"
434
619
  ]
435
620
  },
436
- "__schema20": {
621
+ "__schema33": {
437
622
  "type": "number"
438
623
  },
439
- "__schema21": {
624
+ "__schema34": {
440
625
  "type": "number"
441
626
  },
442
- "__schema22": {
627
+ "__schema35": {
443
628
  "type": "number"
444
629
  },
445
- "__schema23": {
630
+ "__schema36": {
446
631
  "type": "number"
447
632
  },
448
- "__schema24": {
633
+ "__schema37": {
449
634
  "type": "number",
450
635
  "exclusiveMinimum": 0
451
636
  },
452
- "__schema25": {
637
+ "__schema38": {
453
638
  "minItems": 1,
454
639
  "maxItems": 100000,
455
640
  "type": "array",
@@ -457,31 +642,31 @@
457
642
  "$ref": "#/$defs/__schema8"
458
643
  }
459
644
  },
460
- "__schema26": {
645
+ "__schema39": {
461
646
  "minItems": 1,
462
647
  "maxItems": 100000,
463
648
  "type": "array",
464
649
  "items": {
465
- "$ref": "#/$defs/__schema27"
650
+ "$ref": "#/$defs/__schema40"
466
651
  }
467
652
  },
468
- "__schema27": {
653
+ "__schema40": {
469
654
  "type": "number",
470
655
  "minimum": 0,
471
656
  "maximum": 1
472
657
  },
473
- "__schema28": {
658
+ "__schema41": {
474
659
  "type": "boolean",
475
660
  "const": true
476
661
  },
477
- "__schema29": {
662
+ "__schema42": {
478
663
  "maxItems": 10000,
479
664
  "type": "array",
480
665
  "items": {
481
- "$ref": "#/$defs/__schema30"
666
+ "$ref": "#/$defs/__schema43"
482
667
  }
483
668
  },
484
- "__schema30": {
669
+ "__schema43": {
485
670
  "type": "object",
486
671
  "properties": {
487
672
  "left": {
@@ -507,14 +692,14 @@
507
692
  ],
508
693
  "additionalProperties": false
509
694
  },
510
- "__schema31": {
695
+ "__schema44": {
511
696
  "maxItems": 100000,
512
697
  "type": "array",
513
698
  "items": {
514
- "$ref": "#/$defs/__schema32"
699
+ "$ref": "#/$defs/__schema45"
515
700
  }
516
701
  },
517
- "__schema32": {
702
+ "__schema45": {
518
703
  "type": "object",
519
704
  "properties": {
520
705
  "atDay": {
@@ -535,14 +720,14 @@
535
720
  "maxItems": 100000,
536
721
  "type": "array",
537
722
  "items": {
538
- "$ref": "#/$defs/__schema33"
723
+ "$ref": "#/$defs/__schema46"
539
724
  }
540
725
  },
541
726
  "addFlags": {
542
727
  "maxItems": 100000,
543
728
  "type": "array",
544
729
  "items": {
545
- "$ref": "#/$defs/__schema34"
730
+ "$ref": "#/$defs/__schema47"
546
731
  }
547
732
  }
548
733
  },
@@ -552,29 +737,29 @@
552
737
  ],
553
738
  "additionalProperties": false
554
739
  },
555
- "__schema33": {
740
+ "__schema46": {
556
741
  "type": "string",
557
742
  "maxLength": 512
558
743
  },
559
- "__schema34": {
744
+ "__schema47": {
560
745
  "type": "string",
561
746
  "maxLength": 512
562
747
  },
563
- "__schema35": {
748
+ "__schema48": {
564
749
  "default": "1.0",
565
750
  "type": "string",
566
751
  "const": "1.0"
567
752
  },
568
- "__schema36": {
753
+ "__schema49": {
569
754
  "type": "string",
570
755
  "minLength": 1,
571
756
  "maxLength": 512
572
757
  },
573
- "__schema37": {
758
+ "__schema50": {
574
759
  "type": "string",
575
760
  "maxLength": 8192
576
761
  },
577
- "__schema38": {
762
+ "__schema51": {
578
763
  "type": "object",
579
764
  "properties": {
580
765
  "mode": {
@@ -617,7 +802,7 @@
617
802
  ],
618
803
  "additionalProperties": false
619
804
  },
620
- "__schema39": {
805
+ "__schema52": {
621
806
  "type": "object",
622
807
  "propertyNames": {
623
808
  "type": "string",
@@ -627,15 +812,15 @@
627
812
  "$ref": "#/$defs/__schema8"
628
813
  }
629
814
  },
630
- "__schema40": {
815
+ "__schema53": {
631
816
  "minItems": 1,
632
817
  "maxItems": 100000,
633
818
  "type": "array",
634
819
  "items": {
635
- "$ref": "#/$defs/__schema41"
820
+ "$ref": "#/$defs/__schema54"
636
821
  }
637
822
  },
638
- "__schema41": {
823
+ "__schema54": {
639
824
  "type": "object",
640
825
  "properties": {
641
826
  "id": {
@@ -687,14 +872,14 @@
687
872
  ],
688
873
  "additionalProperties": false
689
874
  },
690
- "__schema42": {
875
+ "__schema55": {
691
876
  "maxItems": 100000,
692
877
  "type": "array",
693
878
  "items": {
694
- "$ref": "#/$defs/__schema43"
879
+ "$ref": "#/$defs/__schema56"
695
880
  }
696
881
  },
697
- "__schema43": {
882
+ "__schema56": {
698
883
  "type": "object",
699
884
  "properties": {
700
885
  "cadence": {
@@ -740,14 +925,14 @@
740
925
  ],
741
926
  "additionalProperties": false
742
927
  },
743
- "__schema44": {
928
+ "__schema57": {
744
929
  "maxItems": 100000,
745
930
  "type": "array",
746
931
  "items": {
747
- "$ref": "#/$defs/__schema45"
932
+ "$ref": "#/$defs/__schema58"
748
933
  }
749
934
  },
750
- "__schema45": {
935
+ "__schema58": {
751
936
  "type": "object",
752
937
  "properties": {
753
938
  "when": {
@@ -758,7 +943,7 @@
758
943
  "maxItems": 100000,
759
944
  "type": "array",
760
945
  "items": {
761
- "$ref": "#/$defs/__schema46"
946
+ "$ref": "#/$defs/__schema59"
762
947
  }
763
948
  }
764
949
  },
@@ -768,7 +953,7 @@
768
953
  ],
769
954
  "additionalProperties": false
770
955
  },
771
- "__schema46": {
956
+ "__schema59": {
772
957
  "type": "object",
773
958
  "properties": {
774
959
  "operation": {
@@ -801,29 +986,29 @@
801
986
  ],
802
987
  "additionalProperties": false
803
988
  },
804
- "__schema47": {
989
+ "__schema60": {
805
990
  "type": "object",
806
991
  "properties": {
807
992
  "id": {
808
- "$ref": "#/$defs/__schema48"
993
+ "$ref": "#/$defs/__schema61"
809
994
  },
810
995
  "label": {
811
- "$ref": "#/$defs/__schema49"
996
+ "$ref": "#/$defs/__schema62"
812
997
  },
813
998
  "scenarioId": {
814
- "$ref": "#/$defs/__schema50"
999
+ "$ref": "#/$defs/__schema63"
815
1000
  },
816
1001
  "candidateId": {
817
- "$ref": "#/$defs/__schema51"
1002
+ "$ref": "#/$defs/__schema64"
818
1003
  },
819
1004
  "metric": {
820
- "$ref": "#/$defs/__schema52"
1005
+ "$ref": "#/$defs/__schema65"
821
1006
  },
822
1007
  "min": {
823
- "$ref": "#/$defs/__schema53"
1008
+ "$ref": "#/$defs/__schema66"
824
1009
  },
825
1010
  "max": {
826
- "$ref": "#/$defs/__schema54"
1011
+ "$ref": "#/$defs/__schema67"
827
1012
  }
828
1013
  },
829
1014
  "required": [
@@ -833,26 +1018,26 @@
833
1018
  ],
834
1019
  "additionalProperties": false
835
1020
  },
836
- "__schema48": {
1021
+ "__schema61": {
837
1022
  "type": "string",
838
1023
  "minLength": 1,
839
1024
  "maxLength": 512
840
1025
  },
841
- "__schema49": {
1026
+ "__schema62": {
842
1027
  "type": "string",
843
1028
  "maxLength": 4096
844
1029
  },
845
- "__schema50": {
1030
+ "__schema63": {
846
1031
  "type": "string",
847
1032
  "minLength": 1,
848
1033
  "maxLength": 512
849
1034
  },
850
- "__schema51": {
1035
+ "__schema64": {
851
1036
  "type": "string",
852
1037
  "minLength": 1,
853
1038
  "maxLength": 512
854
1039
  },
855
- "__schema52": {
1040
+ "__schema65": {
856
1041
  "type": "string",
857
1042
  "enum": [
858
1043
  "conditional_probability",
@@ -861,13 +1046,13 @@
861
1046
  "effective_mtth_days"
862
1047
  ]
863
1048
  },
864
- "__schema53": {
1049
+ "__schema66": {
865
1050
  "type": "number"
866
1051
  },
867
- "__schema54": {
1052
+ "__schema67": {
868
1053
  "type": "number"
869
1054
  },
870
- "__schema55": {
1055
+ "__schema68": {
871
1056
  "type": "string",
872
1057
  "enum": [
873
1058
  "json",