hoi4-agent-tools 3.10.0 → 4.0.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 (150) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/README.md +115 -147
  3. package/dist/bin/http.js +10 -0
  4. package/dist/bin/setup.js +3 -2
  5. package/dist/bin/stdio.js +10 -0
  6. package/dist/hoi4_agent_tools/core/artifacts.js +40 -5
  7. package/dist/hoi4_agent_tools/core/canonical.js +18 -4
  8. package/dist/hoi4_agent_tools/core/configuration.js +7 -0
  9. package/dist/hoi4_agent_tools/core/domain-scan-patterns.js +12 -0
  10. package/dist/hoi4_agent_tools/core/domain-tools.js +65 -0
  11. package/dist/hoi4_agent_tools/core/domain-validation.js +5 -2
  12. package/dist/hoi4_agent_tools/core/engine.js +29 -2
  13. package/dist/hoi4_agent_tools/core/index.js +2 -2
  14. package/dist/hoi4_agent_tools/core/job-executor.js +14 -1
  15. package/dist/hoi4_agent_tools/core/job-operation-registration.js +15 -7
  16. package/dist/hoi4_agent_tools/core/job-store.js +78 -5
  17. package/dist/hoi4_agent_tools/core/job-transactions.js +31 -2
  18. package/dist/hoi4_agent_tools/core/job-worker-host.js +215 -116
  19. package/dist/hoi4_agent_tools/core/job-worker.js +90 -36
  20. package/dist/hoi4_agent_tools/core/operation-result.js +123 -10
  21. package/dist/hoi4_agent_tools/core/operation-tasks.js +49 -89
  22. package/dist/hoi4_agent_tools/core/persistent-analysis-cache.js +25 -21
  23. package/dist/hoi4_agent_tools/core/server-registry.js +22 -5
  24. package/dist/hoi4_agent_tools/core/shared-request-capacity.js +26 -1
  25. package/dist/hoi4_agent_tools/core/source/cache.js +20 -10
  26. package/dist/hoi4_agent_tools/core/source/lexer.js +11 -3
  27. package/dist/hoi4_agent_tools/core/transactions.js +114 -23
  28. package/dist/hoi4_agent_tools/core/workspace.js +84 -8
  29. package/dist/hoi4_agent_tools/decision/ai.js +1 -1
  30. package/dist/hoi4_agent_tools/decision/service.js +28 -0
  31. package/dist/hoi4_agent_tools/decision/source-inventory.js +7 -5
  32. package/dist/hoi4_agent_tools/event/job-operations.js +9 -5
  33. package/dist/hoi4_agent_tools/event/operations.js +14 -1
  34. package/dist/hoi4_agent_tools/focus/job-operations.js +1 -2
  35. package/dist/hoi4_agent_tools/focus/tool-operations.js +1 -1
  36. package/dist/hoi4_agent_tools/gui/validators.js +8 -6
  37. package/dist/hoi4_agent_tools/map/bmp.js +1 -1
  38. package/dist/hoi4_agent_tools/map/derived.js +748 -0
  39. package/dist/hoi4_agent_tools/map/job-operations.js +7 -3
  40. package/dist/hoi4_agent_tools/map/model.js +103 -0
  41. package/dist/hoi4_agent_tools/map/operations.js +427 -58
  42. package/dist/hoi4_agent_tools/map/references.js +483 -0
  43. package/dist/hoi4_agent_tools/map/service.js +136 -61
  44. package/dist/hoi4_agent_tools/map/tool-operations.js +2 -1
  45. package/dist/hoi4_agent_tools/map/validation.js +3 -0
  46. package/dist/hoi4_agent_tools/map/world.js +1280 -0
  47. package/dist/hoi4_agent_tools/mcp/server/argument-errors.js +72 -0
  48. package/dist/hoi4_agent_tools/mcp/server/create-modern-operations.js +23 -5
  49. package/dist/hoi4_agent_tools/mcp/server/create.js +7 -0
  50. package/dist/hoi4_agent_tools/mcp/server/request-lifecycle.js +24 -30
  51. package/dist/hoi4_agent_tools/mcp/server/tool-listing.js +45 -0
  52. package/dist/hoi4_agent_tools/mcp/tools/analysis.js +25 -5
  53. package/dist/hoi4_agent_tools/mcp/tools/event.js +18 -29
  54. package/dist/hoi4_agent_tools/mcp/tools/focus.js +4 -12
  55. package/dist/hoi4_agent_tools/mcp/tools/gui.js +3 -3
  56. package/dist/hoi4_agent_tools/mcp/tools/job.js +2 -2
  57. package/dist/hoi4_agent_tools/mcp/tools/map.js +13 -16
  58. package/dist/hoi4_agent_tools/mcp/tools/probability.js +42 -48
  59. package/dist/hoi4_agent_tools/mcp/tools/reference.js +22 -5
  60. package/dist/hoi4_agent_tools/mcp/tools/technology.js +16 -29
  61. package/dist/hoi4_agent_tools/mcp/transports/http.js +28 -4
  62. package/dist/hoi4_agent_tools/mcp/transports/stdio-lifetime.js +31 -8
  63. package/dist/hoi4_agent_tools/probability/job-operations.js +4 -9
  64. package/dist/hoi4_agent_tools/probability/operations.js +175 -13
  65. package/dist/hoi4_agent_tools/probability/source-analysis.js +24 -1
  66. package/dist/hoi4_agent_tools/reference/error-log.js +359 -0
  67. package/dist/hoi4_agent_tools/reference/known-mistakes.js +307 -0
  68. package/dist/hoi4_agent_tools/reference/known-mistakes.json +154 -0
  69. package/dist/hoi4_agent_tools/reference/mod-index.js +101 -0
  70. package/dist/hoi4_agent_tools/reference/operations.js +88 -19
  71. package/dist/hoi4_agent_tools/reference/player-text.js +4 -3
  72. package/dist/hoi4_agent_tools/reference/script-validation.js +19 -1
  73. package/dist/hoi4_agent_tools/reference/service.js +6 -0
  74. package/dist/hoi4_agent_tools/schemas/event.js +78 -19
  75. package/dist/hoi4_agent_tools/schemas/focus-requests.js +10 -0
  76. package/dist/hoi4_agent_tools/schemas/lenient-arguments.js +266 -0
  77. package/dist/hoi4_agent_tools/schemas/map-requests.js +63 -20
  78. package/dist/hoi4_agent_tools/schemas/map.js +122 -3
  79. package/dist/hoi4_agent_tools/schemas/mod-tools.js +181 -0
  80. package/dist/hoi4_agent_tools/schemas/probability-requests.js +119 -9
  81. package/dist/hoi4_agent_tools/schemas/reference.js +13 -0
  82. package/dist/hoi4_agent_tools/schemas/scenarios.js +1 -3
  83. package/dist/hoi4_agent_tools/schemas/script-validation.js +13 -6
  84. package/dist/hoi4_agent_tools/schemas/technology.js +79 -21
  85. package/dist/hoi4_agent_tools/technology/job-operations.js +3 -4
  86. package/dist/hoi4_agent_tools/technology/operations.js +14 -1
  87. package/dist/hoi4_agent_tools/version.js +1 -1
  88. package/docs/README.md +7 -4
  89. package/docs/analysis.md +13 -0
  90. package/docs/configuration.md +281 -0
  91. package/docs/development.md +24 -2
  92. package/docs/events.md +27 -3
  93. package/docs/examples.md +6 -6
  94. package/docs/focus.md +125 -4
  95. package/docs/gui.md +98 -17
  96. package/docs/helper-expansion.md +8 -8
  97. package/docs/http.md +3 -1
  98. package/docs/jobs.md +19 -13
  99. package/docs/map.md +197 -6
  100. package/docs/mechanics.md +4 -0
  101. package/docs/probability.md +42 -15
  102. package/docs/reference.md +71 -4
  103. package/docs/setup.md +44 -11
  104. package/docs/technology.md +26 -1
  105. package/docs/third-party-notices.md +11 -0
  106. package/docs/tools.md +151 -42
  107. package/docs/troubleshooting.md +61 -0
  108. package/examples/clients/codex-config.toml +5 -2
  109. package/examples/clients/generic.json +2 -2
  110. package/examples/config/config.json +7 -0
  111. package/npm-shrinkwrap.json +151 -156
  112. package/package.json +13 -8
  113. package/schemas/configuration.schema.json +144 -128
  114. package/schemas/continuous-focus-palette.schema.json +1 -1
  115. package/schemas/custom-weighted-pool.schema.json +1 -1
  116. package/schemas/decision-inspect-input.schema.json +1 -1
  117. package/schemas/error-log-input.schema.json +55 -0
  118. package/schemas/event-feature-manifest.schema.json +1 -1
  119. package/schemas/focus-plan.schema.json +1 -1
  120. package/schemas/focus-planning-sidecar.schema.json +1 -1
  121. package/schemas/gui-animation-source.schema.json +1 -1
  122. package/schemas/gui-helper.schema.json +1 -1
  123. package/schemas/gui-scenario.schema.json +1 -1
  124. package/schemas/helper-expansion-request.schema.json +1 -1
  125. package/schemas/helper-expansion-summary.schema.json +1 -1
  126. package/schemas/impact-inspect-input.schema.json +1 -1
  127. package/schemas/map-operation.schema.json +597 -126
  128. package/schemas/mechanic-test-input.schema.json +1 -1
  129. package/schemas/mod-index-input.schema.json +51 -0
  130. package/schemas/operation-result.schema.json +2 -2
  131. package/schemas/package-check-input.schema.json +1 -1
  132. package/schemas/package-manifest.schema.json +1 -1
  133. package/schemas/probability-analysis-result.schema.json +1 -1
  134. package/schemas/probability-compare-input.schema.json +1 -1
  135. package/schemas/probability-evaluate-input.schema.json +1 -1
  136. package/schemas/probability-inspect-input.schema.json +1 -1
  137. package/schemas/probability-render-input.schema.json +1 -1
  138. package/schemas/probability-scenario-set.schema.json +1 -1
  139. package/schemas/probability-sequence-input.schema.json +1 -1
  140. package/schemas/probability-simulate-input.schema.json +1 -1
  141. package/schemas/probability-sweep-input.schema.json +1 -1
  142. package/schemas/reference-context-input.schema.json +1 -1
  143. package/schemas/reference-read-input.schema.json +1 -1
  144. package/schemas/reference-search-input.schema.json +1 -1
  145. package/schemas/scenario-suite.schema.json +3 -5
  146. package/schemas/scenario-test-input.schema.json +3 -5
  147. package/schemas/script-validate-input.schema.json +1 -1
  148. package/schemas/shared-scenario.schema.json +1 -1
  149. package/schemas/source-lookup-input.schema.json +1 -1
  150. package/server.json +3 -3
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.10.0/schemas/map-operation.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.0.0/schemas/map-operation.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "oneOf": [
5
5
  {
@@ -30,60 +30,71 @@
30
30
  }
31
31
  },
32
32
  "distribution": {
33
- "type": "object",
34
- "properties": {
35
- "stateValues": {
36
- "type": "string",
37
- "const": "retain-in-current-states"
38
- },
39
- "ownership": {
40
- "type": "string",
41
- "const": "retain-in-current-states"
42
- },
43
- "provinceBuildings": {
44
- "type": "string",
45
- "const": "follow-province"
46
- },
47
- "victoryPoints": {
48
- "type": "string",
49
- "const": "follow-province"
50
- },
51
- "ports": {
52
- "type": "string",
53
- "const": "follow-province"
54
- },
55
- "supplyNodes": {
56
- "type": "string",
57
- "const": "follow-province"
58
- },
59
- "railways": {
60
- "type": "string",
61
- "const": "follow-province"
62
- },
63
- "positions": {
33
+ "anyOf": [
34
+ {
64
35
  "type": "string",
65
- "const": "follow-province"
36
+ "const": "proportional"
66
37
  },
67
- "strategicRegion": {
68
- "type": "string",
69
- "enum": [
70
- "require-same",
71
- "move-to-target-region"
72
- ]
38
+ {
39
+ "type": "object",
40
+ "properties": {
41
+ "stateValues": {
42
+ "type": "string",
43
+ "enum": [
44
+ "retain-in-current-states",
45
+ "proportional-by-land-pixels"
46
+ ]
47
+ },
48
+ "ownership": {
49
+ "type": "string",
50
+ "const": "retain-in-current-states"
51
+ },
52
+ "provinceBuildings": {
53
+ "type": "string",
54
+ "const": "follow-province"
55
+ },
56
+ "victoryPoints": {
57
+ "type": "string",
58
+ "const": "follow-province"
59
+ },
60
+ "ports": {
61
+ "type": "string",
62
+ "const": "follow-province"
63
+ },
64
+ "supplyNodes": {
65
+ "type": "string",
66
+ "const": "follow-province"
67
+ },
68
+ "railways": {
69
+ "type": "string",
70
+ "const": "follow-province"
71
+ },
72
+ "positions": {
73
+ "type": "string",
74
+ "const": "follow-province"
75
+ },
76
+ "strategicRegion": {
77
+ "type": "string",
78
+ "enum": [
79
+ "require-same",
80
+ "move-to-target-region"
81
+ ]
82
+ }
83
+ },
84
+ "required": [
85
+ "stateValues",
86
+ "ownership",
87
+ "provinceBuildings",
88
+ "victoryPoints",
89
+ "ports",
90
+ "supplyNodes",
91
+ "railways",
92
+ "positions",
93
+ "strategicRegion"
94
+ ],
95
+ "additionalProperties": false
73
96
  }
74
- },
75
- "required": [
76
- "stateValues",
77
- "ownership",
78
- "provinceBuildings",
79
- "victoryPoints",
80
- "ports",
81
- "supplyNodes",
82
- "railways",
83
- "positions",
84
- "strategicRegion"
85
- ],
86
- "additionalProperties": false
97
+ ]
87
98
  }
88
99
  },
89
100
  "required": [
@@ -91,8 +102,7 @@
91
102
  "kind",
92
103
  "sourceStateId",
93
104
  "targetStateId",
94
- "provinceIds",
95
- "distribution"
105
+ "provinceIds"
96
106
  ],
97
107
  "additionalProperties": false
98
108
  },
@@ -314,6 +324,13 @@
314
324
  },
315
325
  "distribution": {
316
326
  "$ref": "#/$defs/__schema12"
327
+ },
328
+ "remapReferences": {
329
+ "type": "string",
330
+ "enum": [
331
+ "refuse",
332
+ "override"
333
+ ]
317
334
  }
318
335
  },
319
336
  "required": [
@@ -360,6 +377,9 @@
360
377
  },
361
378
  "distribution": {
362
379
  "$ref": "#/$defs/__schema26"
380
+ },
381
+ "remapReferences": {
382
+ "$ref": "#/$defs/__schema27"
363
383
  }
364
384
  },
365
385
  "required": [
@@ -394,6 +414,20 @@
394
414
  "$ref": "#/$defs/__schema2"
395
415
  },
396
416
  "distribution": {
417
+ "default": {
418
+ "stateValues": "sum-into-target",
419
+ "ownership": "retain-target",
420
+ "controller": "retain-target",
421
+ "cores": "union",
422
+ "claims": "union",
423
+ "victoryPoints": "follow-province",
424
+ "provinceBuildings": "follow-province",
425
+ "ports": "follow-province",
426
+ "supplyNodes": "follow-province",
427
+ "railways": "follow-province",
428
+ "positions": "follow-province",
429
+ "strategicRegion": "require-same"
430
+ },
397
431
  "type": "object",
398
432
  "properties": {
399
433
  "stateValues": {
@@ -460,14 +494,20 @@
460
494
  "strategicRegion"
461
495
  ],
462
496
  "additionalProperties": false
497
+ },
498
+ "remapReferences": {
499
+ "type": "string",
500
+ "enum": [
501
+ "refuse",
502
+ "override"
503
+ ]
463
504
  }
464
505
  },
465
506
  "required": [
466
507
  "id",
467
508
  "kind",
468
509
  "sourceStateIds",
469
- "targetStateId",
470
- "distribution"
510
+ "targetStateId"
471
511
  ],
472
512
  "additionalProperties": false
473
513
  },
@@ -491,13 +531,13 @@
491
531
  "$ref": "#/$defs/__schema3"
492
532
  },
493
533
  "geometry": {
494
- "$ref": "#/$defs/__schema27"
534
+ "$ref": "#/$defs/__schema28"
495
535
  },
496
536
  "definition": {
497
- "$ref": "#/$defs/__schema41"
537
+ "$ref": "#/$defs/__schema42"
498
538
  },
499
539
  "distribution": {
500
- "$ref": "#/$defs/__schema45"
540
+ "$ref": "#/$defs/__schema46"
501
541
  }
502
542
  },
503
543
  "required": [
@@ -530,10 +570,10 @@
530
570
  "$ref": "#/$defs/__schema3"
531
571
  },
532
572
  "geometry": {
533
- "$ref": "#/$defs/__schema27"
573
+ "$ref": "#/$defs/__schema28"
534
574
  },
535
575
  "definition": {
536
- "$ref": "#/$defs/__schema41"
576
+ "$ref": "#/$defs/__schema42"
537
577
  },
538
578
  "distribution": {
539
579
  "anyOf": [
@@ -542,7 +582,7 @@
542
582
  "const": "inherit-source"
543
583
  },
544
584
  {
545
- "$ref": "#/$defs/__schema45"
585
+ "$ref": "#/$defs/__schema46"
546
586
  }
547
587
  ]
548
588
  }
@@ -580,7 +620,7 @@
580
620
  "$ref": "#/$defs/__schema3"
581
621
  },
582
622
  "distribution": {
583
- "$ref": "#/$defs/__schema46"
623
+ "$ref": "#/$defs/__schema47"
584
624
  }
585
625
  },
586
626
  "required": [
@@ -612,7 +652,7 @@
612
652
  "$ref": "#/$defs/__schema3"
613
653
  },
614
654
  "distribution": {
615
- "$ref": "#/$defs/__schema46"
655
+ "$ref": "#/$defs/__schema47"
616
656
  }
617
657
  },
618
658
  "required": [
@@ -641,11 +681,11 @@
641
681
  "$ref": "#/$defs/__schema3"
642
682
  },
643
683
  "changes": {
644
- "$ref": "#/$defs/__schema42"
684
+ "$ref": "#/$defs/__schema43"
645
685
  },
646
686
  "distribution": {
647
687
  "description": "Required complete dependency policy when changes.type crosses land/sea/lake",
648
- "$ref": "#/$defs/__schema47"
688
+ "$ref": "#/$defs/__schema48"
649
689
  }
650
690
  },
651
691
  "required": [
@@ -712,22 +752,293 @@
712
752
  "$ref": "#/$defs/__schema1"
713
753
  },
714
754
  "kind": {
715
- "$ref": "#/$defs/__schema48"
755
+ "type": "string",
756
+ "const": "create_world"
716
757
  },
717
- "entity": {
758
+ "width": {
759
+ "default": 1024,
760
+ "type": "integer",
761
+ "minimum": 256,
762
+ "maximum": 8192,
763
+ "multipleOf": 256
764
+ },
765
+ "height": {
766
+ "default": 512,
767
+ "type": "integer",
768
+ "minimum": 256,
769
+ "maximum": 4096,
770
+ "multipleOf": 256
771
+ },
772
+ "seed": {
773
+ "default": 1,
774
+ "type": "integer",
775
+ "minimum": 0,
776
+ "maximum": 2147483647
777
+ },
778
+ "landCoverage": {
779
+ "default": 0.35,
780
+ "type": "number",
781
+ "minimum": 0.05,
782
+ "maximum": 0.9
783
+ },
784
+ "continents": {
785
+ "default": 3,
786
+ "type": "integer",
787
+ "minimum": 1,
788
+ "maximum": 12
789
+ },
790
+ "landPolygons": {
791
+ "description": "Land outlines in top-left pixel coordinates; omit for generated continents.",
718
792
  "$ref": "#/$defs/__schema49"
719
793
  },
794
+ "landProvincePixels": {
795
+ "default": 400,
796
+ "type": "integer",
797
+ "minimum": 60,
798
+ "maximum": 50000
799
+ },
800
+ "seaProvincePixels": {
801
+ "default": 2500,
802
+ "type": "integer",
803
+ "minimum": 200,
804
+ "maximum": 200000
805
+ },
806
+ "provincesPerState": {
807
+ "default": 5,
808
+ "type": "integer",
809
+ "minimum": 1,
810
+ "maximum": 64
811
+ },
812
+ "landProvincesPerRegion": {
813
+ "default": 25,
814
+ "type": "integer",
815
+ "minimum": 2,
816
+ "maximum": 400
817
+ },
818
+ "seaProvincesPerRegion": {
819
+ "default": 10,
820
+ "type": "integer",
821
+ "minimum": 1,
822
+ "maximum": 200
823
+ },
824
+ "countries": {
825
+ "minItems": 1,
826
+ "maxItems": 200,
827
+ "type": "array",
828
+ "items": {
829
+ "$ref": "#/$defs/__schema51"
830
+ }
831
+ },
832
+ "continentNames": {
833
+ "maxItems": 12,
834
+ "type": "array",
835
+ "items": {
836
+ "$ref": "#/$defs/__schema52"
837
+ }
838
+ },
839
+ "startDate": {
840
+ "default": "1936.1.1",
841
+ "type": "string",
842
+ "pattern": "^\\d{3,4}\\.\\d{1,2}\\.\\d{1,2}$"
843
+ },
844
+ "rivers": {
845
+ "default": 8,
846
+ "type": "integer",
847
+ "minimum": 0,
848
+ "maximum": 500
849
+ },
850
+ "replaceBaseGame": {
851
+ "default": true,
852
+ "description": "Add replace_path for the base game states, countries, units, strategic regions, supply areas and bookmarks to descriptor.mod.",
853
+ "$ref": "#/$defs/__schema53"
854
+ }
855
+ },
856
+ "required": [
857
+ "id",
858
+ "kind",
859
+ "countries"
860
+ ],
861
+ "additionalProperties": false
862
+ },
863
+ {
864
+ "type": "object",
865
+ "properties": {
866
+ "id": {
867
+ "$ref": "#/$defs/__schema0"
868
+ },
869
+ "summary": {
870
+ "$ref": "#/$defs/__schema1"
871
+ },
872
+ "kind": {
873
+ "type": "string",
874
+ "const": "remap_map_references"
875
+ },
876
+ "entity": {
877
+ "type": "string",
878
+ "enum": [
879
+ "province",
880
+ "state",
881
+ "strategic-region"
882
+ ]
883
+ },
884
+ "mapping": {
885
+ "minItems": 1,
886
+ "maxItems": 1000,
887
+ "type": "array",
888
+ "items": {
889
+ "$ref": "#/$defs/__schema54"
890
+ }
891
+ },
892
+ "readOnlySources": {
893
+ "default": "refuse",
894
+ "description": "override copies game or dependency files that need the change into the mod.",
895
+ "$ref": "#/$defs/__schema59"
896
+ },
897
+ "pathPrefixes": {
898
+ "maxItems": 32,
899
+ "type": "array",
900
+ "items": {
901
+ "$ref": "#/$defs/__schema60"
902
+ }
903
+ }
904
+ },
905
+ "required": [
906
+ "id",
907
+ "kind",
908
+ "entity",
909
+ "mapping"
910
+ ],
911
+ "additionalProperties": false
912
+ },
913
+ {
914
+ "type": "object",
915
+ "properties": {
916
+ "id": {
917
+ "$ref": "#/$defs/__schema0"
918
+ },
919
+ "summary": {
920
+ "$ref": "#/$defs/__schema1"
921
+ },
922
+ "kind": {
923
+ "type": "string",
924
+ "const": "regenerate_map_positions"
925
+ },
926
+ "positions": {
927
+ "default": [
928
+ "buildings",
929
+ "units",
930
+ "weather"
931
+ ],
932
+ "minItems": 1,
933
+ "maxItems": 3,
934
+ "type": "array",
935
+ "items": {
936
+ "$ref": "#/$defs/__schema61"
937
+ }
938
+ },
939
+ "stateIds": {
940
+ "maxItems": 10000,
941
+ "type": "array",
942
+ "items": {
943
+ "$ref": "#/$defs/__schema2"
944
+ }
945
+ },
946
+ "provinceIds": {
947
+ "maxItems": 100000,
948
+ "type": "array",
949
+ "items": {
950
+ "$ref": "#/$defs/__schema3"
951
+ }
952
+ },
953
+ "regionIds": {
954
+ "maxItems": 10000,
955
+ "type": "array",
956
+ "items": {
957
+ "$ref": "#/$defs/__schema62"
958
+ }
959
+ },
960
+ "mode": {
961
+ "default": "missing",
962
+ "description": "missing adds only absent positions; replace rewrites them for the selection.",
963
+ "$ref": "#/$defs/__schema63"
964
+ }
965
+ },
966
+ "required": [
967
+ "id",
968
+ "kind"
969
+ ],
970
+ "additionalProperties": false
971
+ },
972
+ {
973
+ "type": "object",
974
+ "properties": {
975
+ "id": {
976
+ "$ref": "#/$defs/__schema0"
977
+ },
978
+ "summary": {
979
+ "$ref": "#/$defs/__schema1"
980
+ },
981
+ "kind": {
982
+ "type": "string",
983
+ "const": "rebuild_supply"
984
+ },
985
+ "stateIds": {
986
+ "maxItems": 10000,
987
+ "type": "array",
988
+ "items": {
989
+ "$ref": "#/$defs/__schema2"
990
+ }
991
+ },
992
+ "mode": {
993
+ "default": "connect",
994
+ "description": "connect adds a supply node to each selected state without one and links unconnected nodes by railway; replace rebuilds the whole network.",
995
+ "$ref": "#/$defs/__schema64"
996
+ },
997
+ "railwayLevel": {
998
+ "default": 1,
999
+ "type": "integer",
1000
+ "minimum": 1,
1001
+ "maximum": 5
1002
+ },
1003
+ "capitalRailwayLevel": {
1004
+ "default": 3,
1005
+ "type": "integer",
1006
+ "minimum": 1,
1007
+ "maximum": 5
1008
+ }
1009
+ },
1010
+ "required": [
1011
+ "id",
1012
+ "kind"
1013
+ ],
1014
+ "additionalProperties": false
1015
+ },
1016
+ {
1017
+ "type": "object",
1018
+ "properties": {
1019
+ "id": {
1020
+ "$ref": "#/$defs/__schema0"
1021
+ },
1022
+ "summary": {
1023
+ "$ref": "#/$defs/__schema1"
1024
+ },
1025
+ "kind": {
1026
+ "$ref": "#/$defs/__schema65"
1027
+ },
1028
+ "entity": {
1029
+ "$ref": "#/$defs/__schema66"
1030
+ },
720
1031
  "fromId": {
721
- "$ref": "#/$defs/__schema50"
1032
+ "$ref": "#/$defs/__schema67"
722
1033
  },
723
1034
  "toId": {
724
- "$ref": "#/$defs/__schema51"
1035
+ "$ref": "#/$defs/__schema68"
725
1036
  },
726
1037
  "collision": {
727
- "$ref": "#/$defs/__schema52"
1038
+ "$ref": "#/$defs/__schema69"
728
1039
  },
729
1040
  "renameLocalisation": {
730
- "$ref": "#/$defs/__schema53"
1041
+ "$ref": "#/$defs/__schema70"
731
1042
  }
732
1043
  },
733
1044
  "required": [
@@ -980,7 +1291,7 @@
980
1291
  "minLength": 1
981
1292
  },
982
1293
  "occurrence": {
983
- "$ref": "#/$defs/__schema54"
1294
+ "$ref": "#/$defs/__schema71"
984
1295
  }
985
1296
  },
986
1297
  "required": [
@@ -1061,7 +1372,7 @@
1061
1372
  "minLength": 1
1062
1373
  },
1063
1374
  "occurrence": {
1064
- "$ref": "#/$defs/__schema54"
1375
+ "$ref": "#/$defs/__schema71"
1065
1376
  }
1066
1377
  },
1067
1378
  "required": [
@@ -1103,7 +1414,7 @@
1103
1414
  "maximum": 9007199254740991
1104
1415
  },
1105
1416
  "occurrence": {
1106
- "$ref": "#/$defs/__schema54"
1417
+ "$ref": "#/$defs/__schema71"
1107
1418
  }
1108
1419
  },
1109
1420
  "required": [
@@ -1184,7 +1495,7 @@
1184
1495
  "maximum": 9007199254740991
1185
1496
  },
1186
1497
  "occurrence": {
1187
- "$ref": "#/$defs/__schema54"
1498
+ "$ref": "#/$defs/__schema71"
1188
1499
  }
1189
1500
  },
1190
1501
  "required": [
@@ -1226,7 +1537,7 @@
1226
1537
  "type": "string"
1227
1538
  },
1228
1539
  "occurrence": {
1229
- "$ref": "#/$defs/__schema54"
1540
+ "$ref": "#/$defs/__schema71"
1230
1541
  }
1231
1542
  },
1232
1543
  "required": [
@@ -1299,7 +1610,7 @@
1299
1610
  "type": "string"
1300
1611
  },
1301
1612
  "occurrence": {
1302
- "$ref": "#/$defs/__schema54"
1613
+ "$ref": "#/$defs/__schema71"
1303
1614
  }
1304
1615
  },
1305
1616
  "required": [
@@ -1857,6 +2168,13 @@
1857
2168
  ]
1858
2169
  },
1859
2170
  "__schema27": {
2171
+ "type": "string",
2172
+ "enum": [
2173
+ "refuse",
2174
+ "override"
2175
+ ]
2176
+ },
2177
+ "__schema28": {
1860
2178
  "oneOf": [
1861
2179
  {
1862
2180
  "type": "object",
@@ -1870,7 +2188,7 @@
1870
2188
  "maxItems": 1000000,
1871
2189
  "type": "array",
1872
2190
  "items": {
1873
- "$ref": "#/$defs/__schema28"
2191
+ "$ref": "#/$defs/__schema29"
1874
2192
  },
1875
2193
  "description": "Exact coordinates to recolor; at most 1000000 pixels per operation"
1876
2194
  }
@@ -1885,16 +2203,16 @@
1885
2203
  "type": "object",
1886
2204
  "properties": {
1887
2205
  "kind": {
1888
- "$ref": "#/$defs/__schema29"
2206
+ "$ref": "#/$defs/__schema30"
1889
2207
  },
1890
2208
  "origin": {
1891
- "$ref": "#/$defs/__schema28"
2209
+ "$ref": "#/$defs/__schema29"
1892
2210
  },
1893
2211
  "width": {
1894
- "$ref": "#/$defs/__schema30"
2212
+ "$ref": "#/$defs/__schema31"
1895
2213
  },
1896
2214
  "height": {
1897
- "$ref": "#/$defs/__schema31"
2215
+ "$ref": "#/$defs/__schema32"
1898
2216
  }
1899
2217
  },
1900
2218
  "required": [
@@ -1909,25 +2227,25 @@
1909
2227
  "type": "object",
1910
2228
  "properties": {
1911
2229
  "kind": {
1912
- "$ref": "#/$defs/__schema32"
2230
+ "$ref": "#/$defs/__schema33"
1913
2231
  },
1914
2232
  "width": {
1915
- "$ref": "#/$defs/__schema33"
2233
+ "$ref": "#/$defs/__schema34"
1916
2234
  },
1917
2235
  "height": {
1918
- "$ref": "#/$defs/__schema34"
2236
+ "$ref": "#/$defs/__schema35"
1919
2237
  },
1920
2238
  "origin": {
1921
- "$ref": "#/$defs/__schema28"
2239
+ "$ref": "#/$defs/__schema29"
1922
2240
  },
1923
2241
  "selectedPixelCount": {
1924
- "$ref": "#/$defs/__schema35"
2242
+ "$ref": "#/$defs/__schema36"
1925
2243
  },
1926
2244
  "sha256": {
1927
- "$ref": "#/$defs/__schema36"
2245
+ "$ref": "#/$defs/__schema37"
1928
2246
  },
1929
2247
  "data": {
1930
- "$ref": "#/$defs/__schema37"
2248
+ "$ref": "#/$defs/__schema38"
1931
2249
  }
1932
2250
  },
1933
2251
  "required": [
@@ -1945,13 +2263,13 @@
1945
2263
  "type": "object",
1946
2264
  "properties": {
1947
2265
  "kind": {
1948
- "$ref": "#/$defs/__schema38"
2266
+ "$ref": "#/$defs/__schema39"
1949
2267
  },
1950
2268
  "fillRule": {
1951
- "$ref": "#/$defs/__schema39"
2269
+ "$ref": "#/$defs/__schema40"
1952
2270
  },
1953
2271
  "points": {
1954
- "$ref": "#/$defs/__schema40"
2272
+ "$ref": "#/$defs/__schema41"
1955
2273
  }
1956
2274
  },
1957
2275
  "required": [
@@ -1964,7 +2282,7 @@
1964
2282
  }
1965
2283
  ]
1966
2284
  },
1967
- "__schema28": {
2285
+ "__schema29": {
1968
2286
  "type": "object",
1969
2287
  "properties": {
1970
2288
  "x": {
@@ -1984,68 +2302,68 @@
1984
2302
  ],
1985
2303
  "additionalProperties": false
1986
2304
  },
1987
- "__schema29": {
2305
+ "__schema30": {
1988
2306
  "type": "string",
1989
2307
  "const": "rectangle"
1990
2308
  },
1991
- "__schema30": {
2309
+ "__schema31": {
1992
2310
  "type": "integer",
1993
2311
  "exclusiveMinimum": 0,
1994
2312
  "maximum": 16384
1995
2313
  },
1996
- "__schema31": {
2314
+ "__schema32": {
1997
2315
  "type": "integer",
1998
2316
  "exclusiveMinimum": 0,
1999
2317
  "maximum": 16384
2000
2318
  },
2001
- "__schema32": {
2319
+ "__schema33": {
2002
2320
  "type": "string",
2003
2321
  "const": "mask"
2004
2322
  },
2005
- "__schema33": {
2323
+ "__schema34": {
2006
2324
  "type": "integer",
2007
2325
  "exclusiveMinimum": 0,
2008
2326
  "maximum": 16384
2009
2327
  },
2010
- "__schema34": {
2328
+ "__schema35": {
2011
2329
  "type": "integer",
2012
2330
  "exclusiveMinimum": 0,
2013
2331
  "maximum": 16384
2014
2332
  },
2015
- "__schema35": {
2333
+ "__schema36": {
2016
2334
  "type": "integer",
2017
2335
  "exclusiveMinimum": 0,
2018
2336
  "maximum": 1000000,
2019
2337
  "description": "Declared selected cells; at most 1000000 pixels per operation"
2020
2338
  },
2021
- "__schema36": {
2339
+ "__schema37": {
2022
2340
  "type": "string",
2023
2341
  "pattern": "^[a-f0-9]{64}$"
2024
2342
  },
2025
- "__schema37": {
2343
+ "__schema38": {
2026
2344
  "type": "string",
2027
2345
  "minLength": 4,
2028
2346
  "maxLength": 30000000
2029
2347
  },
2030
- "__schema38": {
2348
+ "__schema39": {
2031
2349
  "type": "string",
2032
2350
  "const": "polygon"
2033
2351
  },
2034
- "__schema39": {
2352
+ "__schema40": {
2035
2353
  "type": "string",
2036
2354
  "const": "even-odd",
2037
2355
  "description": "Required deterministic polygon fill rule used for pixel-center sampling"
2038
2356
  },
2039
- "__schema40": {
2357
+ "__schema41": {
2040
2358
  "minItems": 3,
2041
2359
  "maxItems": 4096,
2042
2360
  "type": "array",
2043
2361
  "items": {
2044
- "$ref": "#/$defs/__schema28"
2362
+ "$ref": "#/$defs/__schema29"
2045
2363
  },
2046
2364
  "description": "Integer raster-boundary coordinates; runtime bounds are x from 0 through raster width and y from 0 through raster height"
2047
2365
  },
2048
- "__schema41": {
2366
+ "__schema42": {
2049
2367
  "oneOf": [
2050
2368
  {
2051
2369
  "type": "object",
@@ -2055,7 +2373,7 @@
2055
2373
  "const": "inherit-source"
2056
2374
  },
2057
2375
  "overrides": {
2058
- "$ref": "#/$defs/__schema42"
2376
+ "$ref": "#/$defs/__schema43"
2059
2377
  }
2060
2378
  },
2061
2379
  "required": [
@@ -2074,10 +2392,10 @@
2074
2392
  "type": "object",
2075
2393
  "properties": {
2076
2394
  "color": {
2077
- "$ref": "#/$defs/__schema43"
2395
+ "$ref": "#/$defs/__schema44"
2078
2396
  },
2079
2397
  "type": {
2080
- "$ref": "#/$defs/__schema44"
2398
+ "$ref": "#/$defs/__schema45"
2081
2399
  },
2082
2400
  "coastal": {
2083
2401
  "type": "boolean"
@@ -2109,14 +2427,14 @@
2109
2427
  }
2110
2428
  ]
2111
2429
  },
2112
- "__schema42": {
2430
+ "__schema43": {
2113
2431
  "type": "object",
2114
2432
  "properties": {
2115
2433
  "color": {
2116
- "$ref": "#/$defs/__schema43"
2434
+ "$ref": "#/$defs/__schema44"
2117
2435
  },
2118
2436
  "type": {
2119
- "$ref": "#/$defs/__schema44"
2437
+ "$ref": "#/$defs/__schema45"
2120
2438
  },
2121
2439
  "coastal": {
2122
2440
  "type": "boolean"
@@ -2133,7 +2451,7 @@
2133
2451
  },
2134
2452
  "additionalProperties": false
2135
2453
  },
2136
- "__schema43": {
2454
+ "__schema44": {
2137
2455
  "type": "object",
2138
2456
  "properties": {
2139
2457
  "r": {
@@ -2159,7 +2477,7 @@
2159
2477
  ],
2160
2478
  "additionalProperties": false
2161
2479
  },
2162
- "__schema44": {
2480
+ "__schema45": {
2163
2481
  "type": "string",
2164
2482
  "enum": [
2165
2483
  "land",
@@ -2167,7 +2485,7 @@
2167
2485
  "lake"
2168
2486
  ]
2169
2487
  },
2170
- "__schema45": {
2488
+ "__schema46": {
2171
2489
  "type": "object",
2172
2490
  "properties": {
2173
2491
  "state": {
@@ -2228,7 +2546,7 @@
2228
2546
  ],
2229
2547
  "additionalProperties": false
2230
2548
  },
2231
- "__schema46": {
2549
+ "__schema47": {
2232
2550
  "type": "object",
2233
2551
  "properties": {
2234
2552
  "membership": {
@@ -2256,7 +2574,7 @@
2256
2574
  ],
2257
2575
  "additionalProperties": false
2258
2576
  },
2259
- "__schema47": {
2577
+ "__schema48": {
2260
2578
  "type": "object",
2261
2579
  "properties": {
2262
2580
  "stateMembership": {
@@ -2395,11 +2713,164 @@
2395
2713
  ],
2396
2714
  "additionalProperties": false
2397
2715
  },
2398
- "__schema48": {
2716
+ "__schema49": {
2717
+ "maxItems": 64,
2718
+ "type": "array",
2719
+ "items": {
2720
+ "$ref": "#/$defs/__schema50"
2721
+ }
2722
+ },
2723
+ "__schema50": {
2724
+ "minItems": 3,
2725
+ "maxItems": 10000,
2726
+ "type": "array",
2727
+ "items": {
2728
+ "$ref": "#/$defs/__schema29"
2729
+ }
2730
+ },
2731
+ "__schema51": {
2732
+ "type": "object",
2733
+ "properties": {
2734
+ "tag": {
2735
+ "type": "string",
2736
+ "pattern": "^[A-Z][A-Z0-9]{2}$"
2737
+ },
2738
+ "name": {
2739
+ "type": "string",
2740
+ "minLength": 1,
2741
+ "maxLength": 64
2742
+ },
2743
+ "adjective": {
2744
+ "type": "string",
2745
+ "minLength": 1,
2746
+ "maxLength": 64
2747
+ },
2748
+ "color": {
2749
+ "$ref": "#/$defs/__schema44"
2750
+ },
2751
+ "share": {
2752
+ "type": "number",
2753
+ "minimum": 0.05,
2754
+ "maximum": 100
2755
+ },
2756
+ "ideology": {
2757
+ "type": "string",
2758
+ "enum": [
2759
+ "democratic",
2760
+ "communism",
2761
+ "fascism",
2762
+ "neutrality"
2763
+ ]
2764
+ }
2765
+ },
2766
+ "required": [
2767
+ "tag",
2768
+ "name"
2769
+ ],
2770
+ "additionalProperties": false
2771
+ },
2772
+ "__schema52": {
2773
+ "type": "string",
2774
+ "minLength": 1,
2775
+ "maxLength": 64
2776
+ },
2777
+ "__schema53": {
2778
+ "type": "boolean"
2779
+ },
2780
+ "__schema54": {
2781
+ "type": "object",
2782
+ "properties": {
2783
+ "from": {
2784
+ "type": "integer",
2785
+ "minimum": 0,
2786
+ "maximum": 9007199254740991
2787
+ },
2788
+ "to": {
2789
+ "anyOf": [
2790
+ {
2791
+ "$ref": "#/$defs/__schema55"
2792
+ },
2793
+ {
2794
+ "$ref": "#/$defs/__schema56"
2795
+ },
2796
+ {
2797
+ "$ref": "#/$defs/__schema58"
2798
+ }
2799
+ ],
2800
+ "description": "One ID replaces; several IDs copy the referencing assignment once per ID; null removes it."
2801
+ }
2802
+ },
2803
+ "required": [
2804
+ "from",
2805
+ "to"
2806
+ ],
2807
+ "additionalProperties": false
2808
+ },
2809
+ "__schema55": {
2810
+ "type": "integer",
2811
+ "minimum": 0,
2812
+ "maximum": 9007199254740991
2813
+ },
2814
+ "__schema56": {
2815
+ "minItems": 1,
2816
+ "maxItems": 16,
2817
+ "type": "array",
2818
+ "items": {
2819
+ "$ref": "#/$defs/__schema57"
2820
+ }
2821
+ },
2822
+ "__schema57": {
2823
+ "type": "integer",
2824
+ "minimum": 0,
2825
+ "maximum": 9007199254740991
2826
+ },
2827
+ "__schema58": {
2828
+ "type": "null"
2829
+ },
2830
+ "__schema59": {
2831
+ "type": "string",
2832
+ "enum": [
2833
+ "refuse",
2834
+ "override"
2835
+ ]
2836
+ },
2837
+ "__schema60": {
2838
+ "type": "string",
2839
+ "minLength": 1,
2840
+ "maxLength": 256
2841
+ },
2842
+ "__schema61": {
2843
+ "type": "string",
2844
+ "enum": [
2845
+ "buildings",
2846
+ "units",
2847
+ "weather"
2848
+ ]
2849
+ },
2850
+ "__schema62": {
2851
+ "type": "integer",
2852
+ "exclusiveMinimum": 0,
2853
+ "maximum": 9007199254740991
2854
+ },
2855
+ "__schema63": {
2856
+ "type": "string",
2857
+ "enum": [
2858
+ "missing",
2859
+ "replace"
2860
+ ]
2861
+ },
2862
+ "__schema64": {
2863
+ "type": "string",
2864
+ "enum": [
2865
+ "connect",
2866
+ "replace"
2867
+ ]
2868
+ },
2869
+ "__schema65": {
2399
2870
  "type": "string",
2400
2871
  "const": "renumber_map_entity"
2401
2872
  },
2402
- "__schema49": {
2873
+ "__schema66": {
2403
2874
  "type": "string",
2404
2875
  "enum": [
2405
2876
  "province",
@@ -2407,17 +2878,17 @@
2407
2878
  "strategic-region"
2408
2879
  ]
2409
2880
  },
2410
- "__schema50": {
2881
+ "__schema67": {
2411
2882
  "type": "integer",
2412
2883
  "minimum": 0,
2413
2884
  "maximum": 9007199254740991
2414
2885
  },
2415
- "__schema51": {
2886
+ "__schema68": {
2416
2887
  "type": "integer",
2417
2888
  "minimum": 0,
2418
2889
  "maximum": 9007199254740991
2419
2890
  },
2420
- "__schema52": {
2891
+ "__schema69": {
2421
2892
  "default": "swap",
2422
2893
  "type": "string",
2423
2894
  "enum": [
@@ -2425,11 +2896,11 @@
2425
2896
  "reject"
2426
2897
  ]
2427
2898
  },
2428
- "__schema53": {
2899
+ "__schema70": {
2429
2900
  "default": true,
2430
2901
  "type": "boolean"
2431
2902
  },
2432
- "__schema54": {
2903
+ "__schema71": {
2433
2904
  "type": "integer",
2434
2905
  "minimum": 0,
2435
2906
  "maximum": 9007199254740991