hoi4-agent-tools 2.6.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 (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/dist/hoi4_agent_tools/gui/assets.js +15 -3
  4. package/dist/hoi4_agent_tools/gui/layout.js +270 -75
  5. package/dist/hoi4_agent_tools/gui/renderer.js +185 -22
  6. package/dist/hoi4_agent_tools/gui/source-graph.js +40 -11
  7. package/dist/hoi4_agent_tools/gui/studio.js +35 -7
  8. package/dist/hoi4_agent_tools/mcp/tools/probability.js +9 -0
  9. package/dist/hoi4_agent_tools/probability/adapters.js +5 -0
  10. package/dist/hoi4_agent_tools/probability/evaluation.js +6 -1
  11. package/dist/hoi4_agent_tools/probability/scenario-state.js +165 -0
  12. package/dist/hoi4_agent_tools/probability/scope-pools.js +199 -0
  13. package/dist/hoi4_agent_tools/probability/simulation.js +4 -3
  14. package/dist/hoi4_agent_tools/probability/sweep.js +6 -2
  15. package/dist/hoi4_agent_tools/probability/trigger-evaluator.js +35 -28
  16. package/dist/hoi4_agent_tools/probability/value-evaluator.js +4 -0
  17. package/dist/hoi4_agent_tools/schemas/probability.js +90 -0
  18. package/dist/hoi4_agent_tools/version.js +1 -1
  19. package/docs/gui.md +5 -1
  20. package/docs/probability.md +46 -0
  21. package/docs/research/probability-adapter-evidence.md +2 -1
  22. package/examples/probability/scoped-dynamic-pools-evaluate-input.json +50 -0
  23. package/package.json +1 -1
  24. package/schemas/configuration.schema.json +1 -1
  25. package/schemas/continuous-focus-palette.schema.json +1 -1
  26. package/schemas/custom-weighted-pool.schema.json +1 -1
  27. package/schemas/event-feature-manifest.schema.json +1 -1
  28. package/schemas/focus-plan.schema.json +1 -1
  29. package/schemas/focus-planning-sidecar.schema.json +1 -1
  30. package/schemas/gui-animation-source.schema.json +1 -1
  31. package/schemas/gui-helper.schema.json +1 -1
  32. package/schemas/gui-scenario.schema.json +1 -1
  33. package/schemas/map-operation.schema.json +1 -1
  34. package/schemas/operation-result.schema.json +1 -1
  35. package/schemas/probability-analysis-result.schema.json +175 -66
  36. package/schemas/probability-compare-input.schema.json +251 -66
  37. package/schemas/probability-evaluate-input.schema.json +252 -67
  38. package/schemas/probability-inspect-input.schema.json +1 -1
  39. package/schemas/probability-render-input.schema.json +1 -1
  40. package/schemas/probability-scenario-set.schema.json +231 -46
  41. package/schemas/probability-sequence-input.schema.json +273 -88
  42. package/schemas/probability-simulate-input.schema.json +252 -67
  43. package/schemas/probability-sweep-input.schema.json +254 -69
  44. package/server.json +2 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v2.6.0/schemas/probability-simulate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v2.8.0/schemas/probability-simulate-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": {
@@ -254,17 +254,23 @@
254
254
  "eventTargets": {
255
255
  "$ref": "#/$defs/__schema18"
256
256
  },
257
- "candidateOverrides": {
257
+ "scopes": {
258
258
  "$ref": "#/$defs/__schema19"
259
259
  },
260
+ "scopePools": {
261
+ "$ref": "#/$defs/__schema22"
262
+ },
263
+ "candidateOverrides": {
264
+ "$ref": "#/$defs/__schema32"
265
+ },
260
266
  "uncertainInputs": {
261
- "$ref": "#/$defs/__schema20"
267
+ "$ref": "#/$defs/__schema33"
262
268
  },
263
269
  "correlations": {
264
- "$ref": "#/$defs/__schema36"
270
+ "$ref": "#/$defs/__schema49"
265
271
  },
266
272
  "schedule": {
267
- "$ref": "#/$defs/__schema38"
273
+ "$ref": "#/$defs/__schema51"
268
274
  }
269
275
  },
270
276
  "required": [
@@ -364,36 +370,215 @@
364
370
  "type": "object",
365
371
  "propertyNames": {
366
372
  "type": "string",
373
+ "minLength": 1,
367
374
  "maxLength": 512
368
375
  },
369
376
  "additionalProperties": {
370
- "type": "boolean"
377
+ "$ref": "#/$defs/__schema20"
371
378
  }
372
379
  },
373
380
  "__schema20": {
381
+ "type": "object",
382
+ "properties": {
383
+ "id": {
384
+ "type": "string",
385
+ "minLength": 1,
386
+ "maxLength": 512
387
+ },
388
+ "type": {
389
+ "type": "string",
390
+ "enum": [
391
+ "country",
392
+ "state",
393
+ "character",
394
+ "unit_leader",
395
+ "operative",
396
+ "strategic_region",
397
+ "province",
398
+ "unknown"
399
+ ]
400
+ },
401
+ "actor": {
402
+ "type": "string",
403
+ "maxLength": 256
404
+ },
405
+ "state": {
406
+ "default": {},
407
+ "type": "object",
408
+ "propertyNames": {
409
+ "type": "string",
410
+ "minLength": 1,
411
+ "maxLength": 1024
412
+ },
413
+ "additionalProperties": {
414
+ "$ref": "#/$defs/__schema14"
415
+ }
416
+ },
417
+ "flags": {
418
+ "maxItems": 100000,
419
+ "type": "array",
420
+ "items": {
421
+ "$ref": "#/$defs/__schema21"
422
+ }
423
+ },
424
+ "eventTargets": {
425
+ "type": "object",
426
+ "propertyNames": {
427
+ "type": "string",
428
+ "maxLength": 512
429
+ },
430
+ "additionalProperties": {
431
+ "type": "string",
432
+ "maxLength": 512
433
+ }
434
+ },
435
+ "weight": {
436
+ "anyOf": [
437
+ {
438
+ "type": "number",
439
+ "minimum": 0
440
+ },
441
+ {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "maxLength": 1024
445
+ }
446
+ ]
447
+ }
448
+ },
449
+ "required": [
450
+ "id"
451
+ ],
452
+ "additionalProperties": false
453
+ },
454
+ "__schema21": {
455
+ "type": "string",
456
+ "minLength": 1,
457
+ "maxLength": 512
458
+ },
459
+ "__schema22": {
460
+ "maxItems": 100000,
461
+ "type": "array",
462
+ "items": {
463
+ "$ref": "#/$defs/__schema23"
464
+ }
465
+ },
466
+ "__schema23": {
467
+ "type": "object",
468
+ "properties": {
469
+ "id": {
470
+ "$ref": "#/$defs/__schema24"
471
+ },
472
+ "bindAs": {
473
+ "$ref": "#/$defs/__schema25"
474
+ },
475
+ "selection": {
476
+ "$ref": "#/$defs/__schema26"
477
+ },
478
+ "complete": {
479
+ "$ref": "#/$defs/__schema27"
480
+ },
481
+ "filter": {
482
+ "$ref": "#/$defs/__schema28"
483
+ },
484
+ "candidates": {
485
+ "$ref": "#/$defs/__schema31"
486
+ }
487
+ },
488
+ "required": [
489
+ "id",
490
+ "candidates"
491
+ ],
492
+ "additionalProperties": false
493
+ },
494
+ "__schema24": {
495
+ "type": "string",
496
+ "minLength": 1,
497
+ "maxLength": 512
498
+ },
499
+ "__schema25": {
500
+ "default": "THIS",
501
+ "type": "string",
502
+ "minLength": 1,
503
+ "maxLength": 512
504
+ },
505
+ "__schema26": {
506
+ "default": "enumeration",
507
+ "type": "string",
508
+ "enum": [
509
+ "enumeration",
510
+ "uniform",
511
+ "proportional_categorical"
512
+ ]
513
+ },
514
+ "__schema27": {
515
+ "default": false,
516
+ "type": "boolean"
517
+ },
518
+ "__schema28": {
519
+ "type": "object",
520
+ "properties": {
521
+ "inlineClausewitz": {
522
+ "$ref": "#/$defs/__schema29"
523
+ },
524
+ "scriptedTrigger": {
525
+ "$ref": "#/$defs/__schema30"
526
+ }
527
+ },
528
+ "additionalProperties": false
529
+ },
530
+ "__schema29": {
531
+ "type": "string",
532
+ "minLength": 1,
533
+ "maxLength": 1048576
534
+ },
535
+ "__schema30": {
536
+ "type": "string",
537
+ "minLength": 1,
538
+ "maxLength": 512
539
+ },
540
+ "__schema31": {
541
+ "minItems": 1,
542
+ "maxItems": 100000,
543
+ "type": "array",
544
+ "items": {
545
+ "$ref": "#/$defs/__schema20"
546
+ }
547
+ },
548
+ "__schema32": {
549
+ "type": "object",
550
+ "propertyNames": {
551
+ "type": "string",
552
+ "maxLength": 512
553
+ },
554
+ "additionalProperties": {
555
+ "type": "boolean"
556
+ }
557
+ },
558
+ "__schema33": {
374
559
  "maxItems": 10000,
375
560
  "type": "array",
376
561
  "items": {
377
- "$ref": "#/$defs/__schema21"
562
+ "$ref": "#/$defs/__schema34"
378
563
  }
379
564
  },
380
- "__schema21": {
565
+ "__schema34": {
381
566
  "type": "object",
382
567
  "properties": {
383
568
  "path": {
384
- "$ref": "#/$defs/__schema22"
569
+ "$ref": "#/$defs/__schema35"
385
570
  },
386
571
  "range": {
387
- "$ref": "#/$defs/__schema23"
572
+ "$ref": "#/$defs/__schema36"
388
573
  },
389
574
  "alternatives": {
390
- "$ref": "#/$defs/__schema24"
575
+ "$ref": "#/$defs/__schema37"
391
576
  },
392
577
  "distribution": {
393
- "$ref": "#/$defs/__schema25"
578
+ "$ref": "#/$defs/__schema38"
394
579
  },
395
580
  "unresolved": {
396
- "$ref": "#/$defs/__schema35"
581
+ "$ref": "#/$defs/__schema48"
397
582
  }
398
583
  },
399
584
  "required": [
@@ -401,12 +586,12 @@
401
586
  ],
402
587
  "additionalProperties": false
403
588
  },
404
- "__schema22": {
589
+ "__schema35": {
405
590
  "type": "string",
406
591
  "minLength": 1,
407
592
  "maxLength": 1024
408
593
  },
409
- "__schema23": {
594
+ "__schema36": {
410
595
  "type": "object",
411
596
  "properties": {
412
597
  "min": {
@@ -422,7 +607,7 @@
422
607
  ],
423
608
  "additionalProperties": false
424
609
  },
425
- "__schema24": {
610
+ "__schema37": {
426
611
  "minItems": 1,
427
612
  "maxItems": 100000,
428
613
  "type": "array",
@@ -430,32 +615,32 @@
430
615
  "$ref": "#/$defs/__schema15"
431
616
  }
432
617
  },
433
- "__schema25": {
618
+ "__schema38": {
434
619
  "type": "object",
435
620
  "properties": {
436
621
  "kind": {
437
- "$ref": "#/$defs/__schema26"
622
+ "$ref": "#/$defs/__schema39"
438
623
  },
439
624
  "min": {
440
- "$ref": "#/$defs/__schema27"
625
+ "$ref": "#/$defs/__schema40"
441
626
  },
442
627
  "max": {
443
- "$ref": "#/$defs/__schema28"
628
+ "$ref": "#/$defs/__schema41"
444
629
  },
445
630
  "mode": {
446
- "$ref": "#/$defs/__schema29"
631
+ "$ref": "#/$defs/__schema42"
447
632
  },
448
633
  "mean": {
449
- "$ref": "#/$defs/__schema30"
634
+ "$ref": "#/$defs/__schema43"
450
635
  },
451
636
  "stddev": {
452
- "$ref": "#/$defs/__schema31"
637
+ "$ref": "#/$defs/__schema44"
453
638
  },
454
639
  "values": {
455
- "$ref": "#/$defs/__schema32"
640
+ "$ref": "#/$defs/__schema45"
456
641
  },
457
642
  "probabilities": {
458
- "$ref": "#/$defs/__schema33"
643
+ "$ref": "#/$defs/__schema46"
459
644
  }
460
645
  },
461
646
  "required": [
@@ -463,7 +648,7 @@
463
648
  ],
464
649
  "additionalProperties": false
465
650
  },
466
- "__schema26": {
651
+ "__schema39": {
467
652
  "type": "string",
468
653
  "enum": [
469
654
  "uniform",
@@ -474,23 +659,23 @@
474
659
  "empirical"
475
660
  ]
476
661
  },
477
- "__schema27": {
662
+ "__schema40": {
478
663
  "type": "number"
479
664
  },
480
- "__schema28": {
665
+ "__schema41": {
481
666
  "type": "number"
482
667
  },
483
- "__schema29": {
668
+ "__schema42": {
484
669
  "type": "number"
485
670
  },
486
- "__schema30": {
671
+ "__schema43": {
487
672
  "type": "number"
488
673
  },
489
- "__schema31": {
674
+ "__schema44": {
490
675
  "type": "number",
491
676
  "exclusiveMinimum": 0
492
677
  },
493
- "__schema32": {
678
+ "__schema45": {
494
679
  "minItems": 1,
495
680
  "maxItems": 100000,
496
681
  "type": "array",
@@ -498,31 +683,31 @@
498
683
  "$ref": "#/$defs/__schema15"
499
684
  }
500
685
  },
501
- "__schema33": {
686
+ "__schema46": {
502
687
  "minItems": 1,
503
688
  "maxItems": 100000,
504
689
  "type": "array",
505
690
  "items": {
506
- "$ref": "#/$defs/__schema34"
691
+ "$ref": "#/$defs/__schema47"
507
692
  }
508
693
  },
509
- "__schema34": {
694
+ "__schema47": {
510
695
  "type": "number",
511
696
  "minimum": 0,
512
697
  "maximum": 1
513
698
  },
514
- "__schema35": {
699
+ "__schema48": {
515
700
  "type": "boolean",
516
701
  "const": true
517
702
  },
518
- "__schema36": {
703
+ "__schema49": {
519
704
  "maxItems": 10000,
520
705
  "type": "array",
521
706
  "items": {
522
- "$ref": "#/$defs/__schema37"
707
+ "$ref": "#/$defs/__schema50"
523
708
  }
524
709
  },
525
- "__schema37": {
710
+ "__schema50": {
526
711
  "type": "object",
527
712
  "properties": {
528
713
  "left": {
@@ -548,14 +733,14 @@
548
733
  ],
549
734
  "additionalProperties": false
550
735
  },
551
- "__schema38": {
736
+ "__schema51": {
552
737
  "maxItems": 100000,
553
738
  "type": "array",
554
739
  "items": {
555
- "$ref": "#/$defs/__schema39"
740
+ "$ref": "#/$defs/__schema52"
556
741
  }
557
742
  },
558
- "__schema39": {
743
+ "__schema52": {
559
744
  "type": "object",
560
745
  "properties": {
561
746
  "atDay": {
@@ -576,14 +761,14 @@
576
761
  "maxItems": 100000,
577
762
  "type": "array",
578
763
  "items": {
579
- "$ref": "#/$defs/__schema40"
764
+ "$ref": "#/$defs/__schema53"
580
765
  }
581
766
  },
582
767
  "addFlags": {
583
768
  "maxItems": 100000,
584
769
  "type": "array",
585
770
  "items": {
586
- "$ref": "#/$defs/__schema41"
771
+ "$ref": "#/$defs/__schema54"
587
772
  }
588
773
  }
589
774
  },
@@ -593,20 +778,20 @@
593
778
  ],
594
779
  "additionalProperties": false
595
780
  },
596
- "__schema40": {
781
+ "__schema53": {
597
782
  "type": "string",
598
783
  "maxLength": 512
599
784
  },
600
- "__schema41": {
785
+ "__schema54": {
601
786
  "type": "string",
602
787
  "maxLength": 512
603
788
  },
604
- "__schema42": {
789
+ "__schema55": {
605
790
  "type": "string",
606
791
  "minLength": 1,
607
792
  "maxLength": 512
608
793
  },
609
- "__schema43": {
794
+ "__schema56": {
610
795
  "type": "string",
611
796
  "enum": [
612
797
  "conditional_probability",
@@ -615,29 +800,29 @@
615
800
  "effective_mtth_days"
616
801
  ]
617
802
  },
618
- "__schema44": {
803
+ "__schema57": {
619
804
  "type": "object",
620
805
  "properties": {
621
806
  "id": {
622
- "$ref": "#/$defs/__schema45"
807
+ "$ref": "#/$defs/__schema58"
623
808
  },
624
809
  "label": {
625
- "$ref": "#/$defs/__schema46"
810
+ "$ref": "#/$defs/__schema59"
626
811
  },
627
812
  "scenarioId": {
628
- "$ref": "#/$defs/__schema47"
813
+ "$ref": "#/$defs/__schema60"
629
814
  },
630
815
  "candidateId": {
631
- "$ref": "#/$defs/__schema48"
816
+ "$ref": "#/$defs/__schema61"
632
817
  },
633
818
  "metric": {
634
- "$ref": "#/$defs/__schema43"
819
+ "$ref": "#/$defs/__schema56"
635
820
  },
636
821
  "min": {
637
- "$ref": "#/$defs/__schema49"
822
+ "$ref": "#/$defs/__schema62"
638
823
  },
639
824
  "max": {
640
- "$ref": "#/$defs/__schema50"
825
+ "$ref": "#/$defs/__schema63"
641
826
  }
642
827
  },
643
828
  "required": [
@@ -647,32 +832,32 @@
647
832
  ],
648
833
  "additionalProperties": false
649
834
  },
650
- "__schema45": {
835
+ "__schema58": {
651
836
  "type": "string",
652
837
  "minLength": 1,
653
838
  "maxLength": 512
654
839
  },
655
- "__schema46": {
840
+ "__schema59": {
656
841
  "type": "string",
657
842
  "maxLength": 4096
658
843
  },
659
- "__schema47": {
844
+ "__schema60": {
660
845
  "type": "string",
661
846
  "minLength": 1,
662
847
  "maxLength": 512
663
848
  },
664
- "__schema48": {
849
+ "__schema61": {
665
850
  "type": "string",
666
851
  "minLength": 1,
667
852
  "maxLength": 512
668
853
  },
669
- "__schema49": {
854
+ "__schema62": {
670
855
  "type": "number"
671
856
  },
672
- "__schema50": {
857
+ "__schema63": {
673
858
  "type": "number"
674
859
  },
675
- "__schema51": {
860
+ "__schema64": {
676
861
  "type": "string",
677
862
  "enum": [
678
863
  "json",