hoi4-agent-tools 3.4.1 → 3.5.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 (96) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +26 -18
  3. package/dist/hoi4_agent_tools/core/condition-evaluator.js +41 -2
  4. package/dist/hoi4_agent_tools/core/condition-schema.js +18 -0
  5. package/dist/hoi4_agent_tools/core/configuration.js +10 -0
  6. package/dist/hoi4_agent_tools/core/domain-scan-patterns.js +9 -1
  7. package/dist/hoi4_agent_tools/core/impact-semantic.js +11 -4
  8. package/dist/hoi4_agent_tools/core/scanner.js +1 -1
  9. package/dist/hoi4_agent_tools/core/scenario-model.js +6 -0
  10. package/dist/hoi4_agent_tools/core/scenario-state.js +3 -0
  11. package/dist/hoi4_agent_tools/core/workspace.js +13 -1
  12. package/dist/hoi4_agent_tools/event/graph.js +8 -1
  13. package/dist/hoi4_agent_tools/event/service.js +1 -0
  14. package/dist/hoi4_agent_tools/event/source-analysis.js +1 -1
  15. package/dist/hoi4_agent_tools/focus/render.js +10 -2
  16. package/dist/hoi4_agent_tools/gui/layout.js +58 -11
  17. package/dist/hoi4_agent_tools/gui/scenario.js +3 -1
  18. package/dist/hoi4_agent_tools/gui/source-graph.js +4 -1
  19. package/dist/hoi4_agent_tools/gui/studio.js +32 -10
  20. package/dist/hoi4_agent_tools/map/model.js +121 -12
  21. package/dist/hoi4_agent_tools/map/operations.js +80 -7
  22. package/dist/hoi4_agent_tools/map/service.js +1 -0
  23. package/dist/hoi4_agent_tools/map/validation.js +38 -1
  24. package/dist/hoi4_agent_tools/mcp/server/create-modern-operations.js +18 -1
  25. package/dist/hoi4_agent_tools/mcp/server/create.js +2 -0
  26. package/dist/hoi4_agent_tools/mcp/server/instructions.js +1 -1
  27. package/dist/hoi4_agent_tools/mcp/tools/reference.js +60 -0
  28. package/dist/hoi4_agent_tools/probability/service.js +2 -2
  29. package/dist/hoi4_agent_tools/probability/source-analysis.js +16 -0
  30. package/dist/hoi4_agent_tools/probability/value-evaluator.js +2 -1
  31. package/dist/hoi4_agent_tools/reference/lines.js +52 -0
  32. package/dist/hoi4_agent_tools/reference/operations.js +41 -0
  33. package/dist/hoi4_agent_tools/reference/service.js +427 -0
  34. package/dist/hoi4_agent_tools/reference/source-lookup.js +90 -0
  35. package/dist/hoi4_agent_tools/schemas/analysis.js +2 -0
  36. package/dist/hoi4_agent_tools/schemas/gui-requests.js +1 -1
  37. package/dist/hoi4_agent_tools/schemas/probability-requests.js +1 -1
  38. package/dist/hoi4_agent_tools/schemas/probability.js +26 -2
  39. package/dist/hoi4_agent_tools/schemas/reference.js +160 -0
  40. package/dist/hoi4_agent_tools/technology/render.js +9 -4
  41. package/dist/hoi4_agent_tools/version.js +1 -1
  42. package/docs/README.md +3 -0
  43. package/docs/gui.md +6 -0
  44. package/docs/map.md +8 -0
  45. package/docs/probability.md +7 -0
  46. package/docs/reference.md +32 -0
  47. package/docs/research/reference-benchmark.md +28 -0
  48. package/docs/setup.md +6 -0
  49. package/examples/clients/codex-config.toml +2 -0
  50. package/package.json +4 -2
  51. package/schemas/configuration.schema.json +72 -58
  52. package/schemas/continuous-focus-palette.schema.json +1 -1
  53. package/schemas/custom-weighted-pool.schema.json +1 -1
  54. package/schemas/decision-inspect-input.schema.json +43 -26
  55. package/schemas/event-feature-manifest.schema.json +1 -1
  56. package/schemas/focus-plan.schema.json +1 -1
  57. package/schemas/focus-planning-sidecar.schema.json +1 -1
  58. package/schemas/gui-animation-source.schema.json +1 -1
  59. package/schemas/gui-helper.schema.json +1 -1
  60. package/schemas/gui-scenario.schema.json +102 -75
  61. package/schemas/helper-expansion-request.schema.json +1 -1
  62. package/schemas/helper-expansion-summary.schema.json +1 -1
  63. package/schemas/impact-inspect-input.schema.json +1 -1
  64. package/schemas/map-operation.schema.json +1 -1
  65. package/schemas/mechanic-test-input.schema.json +49 -32
  66. package/schemas/operation-result.schema.json +1 -1
  67. package/schemas/package-check-input.schema.json +1 -1
  68. package/schemas/package-manifest.schema.json +1 -1
  69. package/schemas/probability-analysis-result.schema.json +1 -1
  70. package/schemas/probability-compare-input.schema.json +160 -131
  71. package/schemas/probability-evaluate-input.schema.json +161 -132
  72. package/schemas/probability-inspect-input.schema.json +20 -11
  73. package/schemas/probability-render-input.schema.json +1 -1
  74. package/schemas/probability-scenario-set.schema.json +110 -90
  75. package/schemas/probability-sequence-input.schema.json +154 -134
  76. package/schemas/probability-simulate-input.schema.json +161 -132
  77. package/schemas/probability-sweep-input.schema.json +163 -134
  78. package/schemas/reference-context-input.schema.json +42 -0
  79. package/schemas/reference-read-input.schema.json +41 -0
  80. package/schemas/reference-search-input.schema.json +45 -0
  81. package/schemas/scenario-suite.schema.json +92 -75
  82. package/schemas/scenario-test-input.schema.json +103 -86
  83. package/schemas/shared-scenario.schema.json +39 -22
  84. package/schemas/source-lookup-input.schema.json +61 -0
  85. package/server.json +2 -2
  86. package/docs/images/readme/chaos-meter-ingame.png +0 -0
  87. package/docs/images/readme/chaos-meter-mcp.png +0 -0
  88. package/docs/images/readme/communist-insurgency-ingame.png +0 -0
  89. package/docs/images/readme/communist-insurgency-mcp.png +0 -0
  90. package/docs/images/readme/event-chain-mcp.png +0 -0
  91. package/docs/images/readme/focus-tree-mcp.png +0 -0
  92. package/docs/images/readme/map-mcp.png +0 -0
  93. package/docs/images/readme/probability-mcp.png +0 -0
  94. package/docs/images/readme/settings-advanced-mcp.png +0 -0
  95. package/docs/images/readme/settings-events-mcp.png +0 -0
  96. package/docs/images/readme/technology-tree-mcp.png +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.4.1/schemas/gui-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.5.0/schemas/gui-scenario.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -9,74 +9,80 @@
9
9
  "description": {
10
10
  "$ref": "#/$defs/__schema1"
11
11
  },
12
- "resolution": {
12
+ "date": {
13
13
  "$ref": "#/$defs/__schema2"
14
14
  },
15
+ "controls": {
16
+ "$ref": "#/$defs/__schema3"
17
+ },
18
+ "resolution": {
19
+ "$ref": "#/$defs/__schema6"
20
+ },
15
21
  "uiScale": {
16
- "$ref": "#/$defs/__schema5"
22
+ "$ref": "#/$defs/__schema9"
17
23
  },
18
24
  "state": {
19
- "$ref": "#/$defs/__schema7"
25
+ "$ref": "#/$defs/__schema11"
20
26
  },
21
27
  "language": {
22
- "$ref": "#/$defs/__schema9"
28
+ "$ref": "#/$defs/__schema13"
23
29
  },
24
30
  "animationTimeSeconds": {
25
- "$ref": "#/$defs/__schema10"
31
+ "$ref": "#/$defs/__schema14"
26
32
  },
27
33
  "visibleTimeSeconds": {
28
- "$ref": "#/$defs/__schema11"
34
+ "$ref": "#/$defs/__schema15"
29
35
  },
30
36
  "country": {
31
- "$ref": "#/$defs/__schema12"
37
+ "$ref": "#/$defs/__schema16"
32
38
  },
33
39
  "stateValues": {
34
- "$ref": "#/$defs/__schema14"
40
+ "$ref": "#/$defs/__schema18"
35
41
  },
36
42
  "scopes": {
37
- "$ref": "#/$defs/__schema15"
43
+ "$ref": "#/$defs/__schema19"
38
44
  },
39
45
  "conditionResults": {
40
- "$ref": "#/$defs/__schema18"
46
+ "$ref": "#/$defs/__schema22"
41
47
  },
42
48
  "variables": {
43
- "$ref": "#/$defs/__schema20"
49
+ "$ref": "#/$defs/__schema24"
44
50
  },
45
51
  "flags": {
46
- "$ref": "#/$defs/__schema21"
52
+ "$ref": "#/$defs/__schema25"
47
53
  },
48
54
  "lists": {
49
- "$ref": "#/$defs/__schema22"
55
+ "$ref": "#/$defs/__schema26"
50
56
  },
51
57
  "localisation": {
52
- "$ref": "#/$defs/__schema23"
58
+ "$ref": "#/$defs/__schema27"
53
59
  },
54
60
  "values": {
55
- "$ref": "#/$defs/__schema24"
61
+ "$ref": "#/$defs/__schema28"
56
62
  },
57
63
  "scriptedGui": {
58
- "$ref": "#/$defs/__schema25"
64
+ "$ref": "#/$defs/__schema29"
59
65
  },
60
66
  "visibility": {
61
- "$ref": "#/$defs/__schema26"
67
+ "$ref": "#/$defs/__schema30"
62
68
  },
63
69
  "elementStates": {
64
- "$ref": "#/$defs/__schema27"
70
+ "$ref": "#/$defs/__schema31"
65
71
  },
66
72
  "selectedFrames": {
67
- "$ref": "#/$defs/__schema28"
73
+ "$ref": "#/$defs/__schema32"
68
74
  },
69
75
  "scrollOffsets": {
70
- "$ref": "#/$defs/__schema29"
76
+ "$ref": "#/$defs/__schema33"
71
77
  },
72
78
  "guiCosts": {
73
- "$ref": "#/$defs/__schema30"
79
+ "$ref": "#/$defs/__schema34"
74
80
  },
75
81
  "scriptCosts": {
76
- "$ref": "#/$defs/__schema31"
82
+ "$ref": "#/$defs/__schema35"
77
83
  },
78
84
  "expectations": {
79
- "$ref": "#/$defs/__schema32"
85
+ "$ref": "#/$defs/__schema36"
80
86
  }
81
87
  },
82
88
  "required": [
@@ -95,6 +101,27 @@
95
101
  "maxLength": 500
96
102
  },
97
103
  "__schema2": {
104
+ "type": "string",
105
+ "maxLength": 16
106
+ },
107
+ "__schema3": {
108
+ "type": "object",
109
+ "propertyNames": {
110
+ "$ref": "#/$defs/__schema4"
111
+ },
112
+ "additionalProperties": {
113
+ "$ref": "#/$defs/__schema5"
114
+ }
115
+ },
116
+ "__schema4": {
117
+ "type": "string",
118
+ "pattern": "^[1-9][0-9]{0,8}$"
119
+ },
120
+ "__schema5": {
121
+ "type": "string",
122
+ "pattern": "^[A-Z0-9]{3}$"
123
+ },
124
+ "__schema6": {
98
125
  "default": {
99
126
  "width": 1920,
100
127
  "height": 1080
@@ -102,10 +129,10 @@
102
129
  "type": "object",
103
130
  "properties": {
104
131
  "width": {
105
- "$ref": "#/$defs/__schema3"
132
+ "$ref": "#/$defs/__schema7"
106
133
  },
107
134
  "height": {
108
- "$ref": "#/$defs/__schema4"
135
+ "$ref": "#/$defs/__schema8"
109
136
  }
110
137
  },
111
138
  "required": [
@@ -114,31 +141,31 @@
114
141
  ],
115
142
  "additionalProperties": false
116
143
  },
117
- "__schema3": {
144
+ "__schema7": {
118
145
  "type": "integer",
119
146
  "minimum": 320,
120
147
  "maximum": 16384
121
148
  },
122
- "__schema4": {
149
+ "__schema8": {
123
150
  "type": "integer",
124
151
  "minimum": 200,
125
152
  "maximum": 16384
126
153
  },
127
- "__schema5": {
154
+ "__schema9": {
128
155
  "default": 1,
129
156
  "description": "In-game UI scale. Use 1 for the normal 1920x1080 layout; this changes layout geometry and is not an output-image zoom.",
130
- "$ref": "#/$defs/__schema6"
157
+ "$ref": "#/$defs/__schema10"
131
158
  },
132
- "__schema6": {
159
+ "__schema10": {
133
160
  "type": "number",
134
161
  "minimum": 0.25,
135
162
  "maximum": 4
136
163
  },
137
- "__schema7": {
164
+ "__schema11": {
138
165
  "default": "normal",
139
- "$ref": "#/$defs/__schema8"
166
+ "$ref": "#/$defs/__schema12"
140
167
  },
141
- "__schema8": {
168
+ "__schema12": {
142
169
  "type": "string",
143
170
  "enum": [
144
171
  "normal",
@@ -157,26 +184,26 @@
157
184
  "missing-localisation"
158
185
  ]
159
186
  },
160
- "__schema9": {
187
+ "__schema13": {
161
188
  "default": "l_english",
162
189
  "type": "string",
163
190
  "pattern": "^l_[a-z_]+$"
164
191
  },
165
- "__schema10": {
192
+ "__schema14": {
166
193
  "default": 0,
167
194
  "type": "number",
168
195
  "minimum": 0,
169
196
  "maximum": 86400
170
197
  },
171
- "__schema11": {
198
+ "__schema15": {
172
199
  "type": "number",
173
200
  "minimum": 0,
174
201
  "maximum": 86400
175
202
  },
176
- "__schema12": {
177
- "$ref": "#/$defs/__schema13"
203
+ "__schema16": {
204
+ "$ref": "#/$defs/__schema17"
178
205
  },
179
- "__schema13": {
206
+ "__schema17": {
180
207
  "type": "object",
181
208
  "propertyNames": {
182
209
  "type": "string"
@@ -196,10 +223,10 @@
196
223
  ]
197
224
  }
198
225
  },
199
- "__schema14": {
200
- "$ref": "#/$defs/__schema13"
226
+ "__schema18": {
227
+ "$ref": "#/$defs/__schema17"
201
228
  },
202
- "__schema15": {
229
+ "__schema19": {
203
230
  "type": "object",
204
231
  "propertyNames": {
205
232
  "type": "string",
@@ -239,13 +266,13 @@
239
266
  "additionalProperties": {
240
267
  "anyOf": [
241
268
  {
242
- "$ref": "#/$defs/__schema16"
269
+ "$ref": "#/$defs/__schema20"
243
270
  },
244
271
  {
245
272
  "maxItems": 10000,
246
273
  "type": "array",
247
274
  "items": {
248
- "$ref": "#/$defs/__schema16"
275
+ "$ref": "#/$defs/__schema20"
249
276
  }
250
277
  }
251
278
  ]
@@ -255,7 +282,7 @@
255
282
  "maxItems": 10000,
256
283
  "type": "array",
257
284
  "items": {
258
- "$ref": "#/$defs/__schema17"
285
+ "$ref": "#/$defs/__schema21"
259
286
  }
260
287
  },
261
288
  "eventTargets": {
@@ -286,7 +313,7 @@
286
313
  "additionalProperties": false
287
314
  }
288
315
  },
289
- "__schema16": {
316
+ "__schema20": {
290
317
  "anyOf": [
291
318
  {
292
319
  "type": "string",
@@ -303,18 +330,18 @@
303
330
  }
304
331
  ]
305
332
  },
306
- "__schema17": {
333
+ "__schema21": {
307
334
  "type": "string",
308
335
  "maxLength": 256
309
336
  },
310
- "__schema18": {
337
+ "__schema22": {
311
338
  "maxItems": 10000,
312
339
  "type": "array",
313
340
  "items": {
314
- "$ref": "#/$defs/__schema19"
341
+ "$ref": "#/$defs/__schema23"
315
342
  }
316
343
  },
317
- "__schema19": {
344
+ "__schema23": {
318
345
  "type": "object",
319
346
  "properties": {
320
347
  "token": {
@@ -349,7 +376,7 @@
349
376
  ],
350
377
  "additionalProperties": false
351
378
  },
352
- "__schema20": {
379
+ "__schema24": {
353
380
  "default": {},
354
381
  "type": "object",
355
382
  "propertyNames": {
@@ -359,7 +386,7 @@
359
386
  "type": "number"
360
387
  }
361
388
  },
362
- "__schema21": {
389
+ "__schema25": {
363
390
  "default": {},
364
391
  "type": "object",
365
392
  "propertyNames": {
@@ -369,7 +396,7 @@
369
396
  "type": "boolean"
370
397
  }
371
398
  },
372
- "__schema22": {
399
+ "__schema26": {
373
400
  "default": {},
374
401
  "type": "object",
375
402
  "propertyNames": {
@@ -379,11 +406,11 @@
379
406
  "maxItems": 10000,
380
407
  "type": "array",
381
408
  "items": {
382
- "$ref": "#/$defs/__schema13"
409
+ "$ref": "#/$defs/__schema17"
383
410
  }
384
411
  }
385
412
  },
386
- "__schema23": {
413
+ "__schema27": {
387
414
  "default": {},
388
415
  "type": "object",
389
416
  "propertyNames": {
@@ -393,15 +420,15 @@
393
420
  "type": "string"
394
421
  }
395
422
  },
396
- "__schema24": {
423
+ "__schema28": {
397
424
  "default": {},
398
- "$ref": "#/$defs/__schema13"
425
+ "$ref": "#/$defs/__schema17"
399
426
  },
400
- "__schema25": {
427
+ "__schema29": {
401
428
  "default": {},
402
- "$ref": "#/$defs/__schema13"
429
+ "$ref": "#/$defs/__schema17"
403
430
  },
404
- "__schema26": {
431
+ "__schema30": {
405
432
  "default": {},
406
433
  "type": "object",
407
434
  "propertyNames": {
@@ -411,17 +438,17 @@
411
438
  "type": "boolean"
412
439
  }
413
440
  },
414
- "__schema27": {
441
+ "__schema31": {
415
442
  "default": {},
416
443
  "type": "object",
417
444
  "propertyNames": {
418
445
  "type": "string"
419
446
  },
420
447
  "additionalProperties": {
421
- "$ref": "#/$defs/__schema8"
448
+ "$ref": "#/$defs/__schema12"
422
449
  }
423
450
  },
424
- "__schema28": {
451
+ "__schema32": {
425
452
  "default": {},
426
453
  "type": "object",
427
454
  "propertyNames": {
@@ -433,7 +460,7 @@
433
460
  "maximum": 9007199254740991
434
461
  }
435
462
  },
436
- "__schema29": {
463
+ "__schema33": {
437
464
  "default": {},
438
465
  "type": "object",
439
466
  "propertyNames": {
@@ -444,7 +471,7 @@
444
471
  "minimum": 0
445
472
  }
446
473
  },
447
- "__schema30": {
474
+ "__schema34": {
448
475
  "default": {},
449
476
  "type": "object",
450
477
  "propertyNames": {
@@ -454,7 +481,7 @@
454
481
  "type": "number"
455
482
  }
456
483
  },
457
- "__schema31": {
484
+ "__schema35": {
458
485
  "default": {},
459
486
  "type": "object",
460
487
  "propertyNames": {
@@ -464,7 +491,7 @@
464
491
  "type": "number"
465
492
  }
466
493
  },
467
- "__schema32": {
494
+ "__schema36": {
468
495
  "default": {
469
496
  "visible": [],
470
497
  "hidden": [],
@@ -478,7 +505,7 @@
478
505
  "maxItems": 10000,
479
506
  "type": "array",
480
507
  "items": {
481
- "$ref": "#/$defs/__schema33"
508
+ "$ref": "#/$defs/__schema37"
482
509
  }
483
510
  },
484
511
  "hidden": {
@@ -486,33 +513,33 @@
486
513
  "maxItems": 10000,
487
514
  "type": "array",
488
515
  "items": {
489
- "$ref": "#/$defs/__schema33"
516
+ "$ref": "#/$defs/__schema37"
490
517
  }
491
518
  },
492
519
  "containedBy": {
493
520
  "default": {},
494
521
  "type": "object",
495
522
  "propertyNames": {
496
- "$ref": "#/$defs/__schema33"
523
+ "$ref": "#/$defs/__schema37"
497
524
  },
498
525
  "additionalProperties": {
499
- "$ref": "#/$defs/__schema33"
526
+ "$ref": "#/$defs/__schema37"
500
527
  }
501
528
  },
502
529
  "centeredOn": {
503
530
  "default": {},
504
531
  "type": "object",
505
532
  "propertyNames": {
506
- "$ref": "#/$defs/__schema33"
533
+ "$ref": "#/$defs/__schema37"
507
534
  },
508
535
  "additionalProperties": {
509
- "$ref": "#/$defs/__schema33"
536
+ "$ref": "#/$defs/__schema37"
510
537
  }
511
538
  }
512
539
  },
513
540
  "additionalProperties": false
514
541
  },
515
- "__schema33": {
542
+ "__schema37": {
516
543
  "type": "string",
517
544
  "minLength": 1,
518
545
  "maxLength": 256
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.4.1/schemas/helper-expansion-request.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.5.0/schemas/helper-expansion-request.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/v3.4.1/schemas/helper-expansion-summary.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.5.0/schemas/helper-expansion-summary.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/v3.4.1/schemas/impact-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.5.0/schemas/impact-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/v3.4.1/schemas/map-operation.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.5.0/schemas/map-operation.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "oneOf": [
5
5
  {