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-scenario-set.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v2.8.0/schemas/probability-scenario-set.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -79,17 +79,23 @@
79
79
  "eventTargets": {
80
80
  "$ref": "#/$defs/__schema11"
81
81
  },
82
- "candidateOverrides": {
82
+ "scopes": {
83
83
  "$ref": "#/$defs/__schema12"
84
84
  },
85
+ "scopePools": {
86
+ "$ref": "#/$defs/__schema15"
87
+ },
88
+ "candidateOverrides": {
89
+ "$ref": "#/$defs/__schema25"
90
+ },
85
91
  "uncertainInputs": {
86
- "$ref": "#/$defs/__schema13"
92
+ "$ref": "#/$defs/__schema26"
87
93
  },
88
94
  "correlations": {
89
- "$ref": "#/$defs/__schema29"
95
+ "$ref": "#/$defs/__schema42"
90
96
  },
91
97
  "schedule": {
92
- "$ref": "#/$defs/__schema31"
98
+ "$ref": "#/$defs/__schema44"
93
99
  }
94
100
  },
95
101
  "required": [
@@ -189,36 +195,215 @@
189
195
  "type": "object",
190
196
  "propertyNames": {
191
197
  "type": "string",
198
+ "minLength": 1,
192
199
  "maxLength": 512
193
200
  },
194
201
  "additionalProperties": {
195
- "type": "boolean"
202
+ "$ref": "#/$defs/__schema13"
196
203
  }
197
204
  },
198
205
  "__schema13": {
206
+ "type": "object",
207
+ "properties": {
208
+ "id": {
209
+ "type": "string",
210
+ "minLength": 1,
211
+ "maxLength": 512
212
+ },
213
+ "type": {
214
+ "type": "string",
215
+ "enum": [
216
+ "country",
217
+ "state",
218
+ "character",
219
+ "unit_leader",
220
+ "operative",
221
+ "strategic_region",
222
+ "province",
223
+ "unknown"
224
+ ]
225
+ },
226
+ "actor": {
227
+ "type": "string",
228
+ "maxLength": 256
229
+ },
230
+ "state": {
231
+ "default": {},
232
+ "type": "object",
233
+ "propertyNames": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "maxLength": 1024
237
+ },
238
+ "additionalProperties": {
239
+ "$ref": "#/$defs/__schema7"
240
+ }
241
+ },
242
+ "flags": {
243
+ "maxItems": 100000,
244
+ "type": "array",
245
+ "items": {
246
+ "$ref": "#/$defs/__schema14"
247
+ }
248
+ },
249
+ "eventTargets": {
250
+ "type": "object",
251
+ "propertyNames": {
252
+ "type": "string",
253
+ "maxLength": 512
254
+ },
255
+ "additionalProperties": {
256
+ "type": "string",
257
+ "maxLength": 512
258
+ }
259
+ },
260
+ "weight": {
261
+ "anyOf": [
262
+ {
263
+ "type": "number",
264
+ "minimum": 0
265
+ },
266
+ {
267
+ "type": "string",
268
+ "minLength": 1,
269
+ "maxLength": 1024
270
+ }
271
+ ]
272
+ }
273
+ },
274
+ "required": [
275
+ "id"
276
+ ],
277
+ "additionalProperties": false
278
+ },
279
+ "__schema14": {
280
+ "type": "string",
281
+ "minLength": 1,
282
+ "maxLength": 512
283
+ },
284
+ "__schema15": {
285
+ "maxItems": 100000,
286
+ "type": "array",
287
+ "items": {
288
+ "$ref": "#/$defs/__schema16"
289
+ }
290
+ },
291
+ "__schema16": {
292
+ "type": "object",
293
+ "properties": {
294
+ "id": {
295
+ "$ref": "#/$defs/__schema17"
296
+ },
297
+ "bindAs": {
298
+ "$ref": "#/$defs/__schema18"
299
+ },
300
+ "selection": {
301
+ "$ref": "#/$defs/__schema19"
302
+ },
303
+ "complete": {
304
+ "$ref": "#/$defs/__schema20"
305
+ },
306
+ "filter": {
307
+ "$ref": "#/$defs/__schema21"
308
+ },
309
+ "candidates": {
310
+ "$ref": "#/$defs/__schema24"
311
+ }
312
+ },
313
+ "required": [
314
+ "id",
315
+ "candidates"
316
+ ],
317
+ "additionalProperties": false
318
+ },
319
+ "__schema17": {
320
+ "type": "string",
321
+ "minLength": 1,
322
+ "maxLength": 512
323
+ },
324
+ "__schema18": {
325
+ "default": "THIS",
326
+ "type": "string",
327
+ "minLength": 1,
328
+ "maxLength": 512
329
+ },
330
+ "__schema19": {
331
+ "default": "enumeration",
332
+ "type": "string",
333
+ "enum": [
334
+ "enumeration",
335
+ "uniform",
336
+ "proportional_categorical"
337
+ ]
338
+ },
339
+ "__schema20": {
340
+ "default": false,
341
+ "type": "boolean"
342
+ },
343
+ "__schema21": {
344
+ "type": "object",
345
+ "properties": {
346
+ "inlineClausewitz": {
347
+ "$ref": "#/$defs/__schema22"
348
+ },
349
+ "scriptedTrigger": {
350
+ "$ref": "#/$defs/__schema23"
351
+ }
352
+ },
353
+ "additionalProperties": false
354
+ },
355
+ "__schema22": {
356
+ "type": "string",
357
+ "minLength": 1,
358
+ "maxLength": 1048576
359
+ },
360
+ "__schema23": {
361
+ "type": "string",
362
+ "minLength": 1,
363
+ "maxLength": 512
364
+ },
365
+ "__schema24": {
366
+ "minItems": 1,
367
+ "maxItems": 100000,
368
+ "type": "array",
369
+ "items": {
370
+ "$ref": "#/$defs/__schema13"
371
+ }
372
+ },
373
+ "__schema25": {
374
+ "type": "object",
375
+ "propertyNames": {
376
+ "type": "string",
377
+ "maxLength": 512
378
+ },
379
+ "additionalProperties": {
380
+ "type": "boolean"
381
+ }
382
+ },
383
+ "__schema26": {
199
384
  "maxItems": 10000,
200
385
  "type": "array",
201
386
  "items": {
202
- "$ref": "#/$defs/__schema14"
387
+ "$ref": "#/$defs/__schema27"
203
388
  }
204
389
  },
205
- "__schema14": {
390
+ "__schema27": {
206
391
  "type": "object",
207
392
  "properties": {
208
393
  "path": {
209
- "$ref": "#/$defs/__schema15"
394
+ "$ref": "#/$defs/__schema28"
210
395
  },
211
396
  "range": {
212
- "$ref": "#/$defs/__schema16"
397
+ "$ref": "#/$defs/__schema29"
213
398
  },
214
399
  "alternatives": {
215
- "$ref": "#/$defs/__schema17"
400
+ "$ref": "#/$defs/__schema30"
216
401
  },
217
402
  "distribution": {
218
- "$ref": "#/$defs/__schema18"
403
+ "$ref": "#/$defs/__schema31"
219
404
  },
220
405
  "unresolved": {
221
- "$ref": "#/$defs/__schema28"
406
+ "$ref": "#/$defs/__schema41"
222
407
  }
223
408
  },
224
409
  "required": [
@@ -226,12 +411,12 @@
226
411
  ],
227
412
  "additionalProperties": false
228
413
  },
229
- "__schema15": {
414
+ "__schema28": {
230
415
  "type": "string",
231
416
  "minLength": 1,
232
417
  "maxLength": 1024
233
418
  },
234
- "__schema16": {
419
+ "__schema29": {
235
420
  "type": "object",
236
421
  "properties": {
237
422
  "min": {
@@ -247,7 +432,7 @@
247
432
  ],
248
433
  "additionalProperties": false
249
434
  },
250
- "__schema17": {
435
+ "__schema30": {
251
436
  "minItems": 1,
252
437
  "maxItems": 100000,
253
438
  "type": "array",
@@ -255,32 +440,32 @@
255
440
  "$ref": "#/$defs/__schema8"
256
441
  }
257
442
  },
258
- "__schema18": {
443
+ "__schema31": {
259
444
  "type": "object",
260
445
  "properties": {
261
446
  "kind": {
262
- "$ref": "#/$defs/__schema19"
447
+ "$ref": "#/$defs/__schema32"
263
448
  },
264
449
  "min": {
265
- "$ref": "#/$defs/__schema20"
450
+ "$ref": "#/$defs/__schema33"
266
451
  },
267
452
  "max": {
268
- "$ref": "#/$defs/__schema21"
453
+ "$ref": "#/$defs/__schema34"
269
454
  },
270
455
  "mode": {
271
- "$ref": "#/$defs/__schema22"
456
+ "$ref": "#/$defs/__schema35"
272
457
  },
273
458
  "mean": {
274
- "$ref": "#/$defs/__schema23"
459
+ "$ref": "#/$defs/__schema36"
275
460
  },
276
461
  "stddev": {
277
- "$ref": "#/$defs/__schema24"
462
+ "$ref": "#/$defs/__schema37"
278
463
  },
279
464
  "values": {
280
- "$ref": "#/$defs/__schema25"
465
+ "$ref": "#/$defs/__schema38"
281
466
  },
282
467
  "probabilities": {
283
- "$ref": "#/$defs/__schema26"
468
+ "$ref": "#/$defs/__schema39"
284
469
  }
285
470
  },
286
471
  "required": [
@@ -288,7 +473,7 @@
288
473
  ],
289
474
  "additionalProperties": false
290
475
  },
291
- "__schema19": {
476
+ "__schema32": {
292
477
  "type": "string",
293
478
  "enum": [
294
479
  "uniform",
@@ -299,23 +484,23 @@
299
484
  "empirical"
300
485
  ]
301
486
  },
302
- "__schema20": {
487
+ "__schema33": {
303
488
  "type": "number"
304
489
  },
305
- "__schema21": {
490
+ "__schema34": {
306
491
  "type": "number"
307
492
  },
308
- "__schema22": {
493
+ "__schema35": {
309
494
  "type": "number"
310
495
  },
311
- "__schema23": {
496
+ "__schema36": {
312
497
  "type": "number"
313
498
  },
314
- "__schema24": {
499
+ "__schema37": {
315
500
  "type": "number",
316
501
  "exclusiveMinimum": 0
317
502
  },
318
- "__schema25": {
503
+ "__schema38": {
319
504
  "minItems": 1,
320
505
  "maxItems": 100000,
321
506
  "type": "array",
@@ -323,31 +508,31 @@
323
508
  "$ref": "#/$defs/__schema8"
324
509
  }
325
510
  },
326
- "__schema26": {
511
+ "__schema39": {
327
512
  "minItems": 1,
328
513
  "maxItems": 100000,
329
514
  "type": "array",
330
515
  "items": {
331
- "$ref": "#/$defs/__schema27"
516
+ "$ref": "#/$defs/__schema40"
332
517
  }
333
518
  },
334
- "__schema27": {
519
+ "__schema40": {
335
520
  "type": "number",
336
521
  "minimum": 0,
337
522
  "maximum": 1
338
523
  },
339
- "__schema28": {
524
+ "__schema41": {
340
525
  "type": "boolean",
341
526
  "const": true
342
527
  },
343
- "__schema29": {
528
+ "__schema42": {
344
529
  "maxItems": 10000,
345
530
  "type": "array",
346
531
  "items": {
347
- "$ref": "#/$defs/__schema30"
532
+ "$ref": "#/$defs/__schema43"
348
533
  }
349
534
  },
350
- "__schema30": {
535
+ "__schema43": {
351
536
  "type": "object",
352
537
  "properties": {
353
538
  "left": {
@@ -373,14 +558,14 @@
373
558
  ],
374
559
  "additionalProperties": false
375
560
  },
376
- "__schema31": {
561
+ "__schema44": {
377
562
  "maxItems": 100000,
378
563
  "type": "array",
379
564
  "items": {
380
- "$ref": "#/$defs/__schema32"
565
+ "$ref": "#/$defs/__schema45"
381
566
  }
382
567
  },
383
- "__schema32": {
568
+ "__schema45": {
384
569
  "type": "object",
385
570
  "properties": {
386
571
  "atDay": {
@@ -401,14 +586,14 @@
401
586
  "maxItems": 100000,
402
587
  "type": "array",
403
588
  "items": {
404
- "$ref": "#/$defs/__schema33"
589
+ "$ref": "#/$defs/__schema46"
405
590
  }
406
591
  },
407
592
  "addFlags": {
408
593
  "maxItems": 100000,
409
594
  "type": "array",
410
595
  "items": {
411
- "$ref": "#/$defs/__schema34"
596
+ "$ref": "#/$defs/__schema47"
412
597
  }
413
598
  }
414
599
  },
@@ -418,11 +603,11 @@
418
603
  ],
419
604
  "additionalProperties": false
420
605
  },
421
- "__schema33": {
606
+ "__schema46": {
422
607
  "type": "string",
423
608
  "maxLength": 512
424
609
  },
425
- "__schema34": {
610
+ "__schema47": {
426
611
  "type": "string",
427
612
  "maxLength": 512
428
613
  }