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