hoi4-agent-tools 3.0.8 → 3.0.9

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 (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/hoi4_agent_tools/core/condition-evaluator.js +399 -0
  3. package/dist/hoi4_agent_tools/core/condition-model.js +1 -0
  4. package/dist/hoi4_agent_tools/core/condition-schema.js +42 -0
  5. package/dist/hoi4_agent_tools/core/scenario-state.js +97 -0
  6. package/dist/hoi4_agent_tools/core/shared-request-capacity.js +34 -17
  7. package/dist/hoi4_agent_tools/gui/scenario-conditions.js +119 -0
  8. package/dist/hoi4_agent_tools/gui/scenario-generator.js +59 -73
  9. package/dist/hoi4_agent_tools/gui/scenario.js +3 -0
  10. package/dist/hoi4_agent_tools/gui/studio.js +5 -2
  11. package/dist/hoi4_agent_tools/probability/scenario-state.js +2 -95
  12. package/dist/hoi4_agent_tools/probability/trigger-evaluator.js +1 -287
  13. package/dist/hoi4_agent_tools/version.js +1 -1
  14. package/docs/gui.md +3 -1
  15. package/package.json +1 -1
  16. package/schemas/configuration.schema.json +1 -1
  17. package/schemas/continuous-focus-palette.schema.json +1 -1
  18. package/schemas/custom-weighted-pool.schema.json +1 -1
  19. package/schemas/event-feature-manifest.schema.json +1 -1
  20. package/schemas/focus-plan.schema.json +1 -1
  21. package/schemas/focus-planning-sidecar.schema.json +1 -1
  22. package/schemas/gui-animation-source.schema.json +1 -1
  23. package/schemas/gui-helper.schema.json +1 -1
  24. package/schemas/gui-scenario.schema.json +189 -33
  25. package/schemas/map-operation.schema.json +1 -1
  26. package/schemas/operation-result.schema.json +1 -1
  27. package/schemas/probability-analysis-result.schema.json +1 -1
  28. package/schemas/probability-compare-input.schema.json +1 -1
  29. package/schemas/probability-evaluate-input.schema.json +1 -1
  30. package/schemas/probability-inspect-input.schema.json +1 -1
  31. package/schemas/probability-render-input.schema.json +1 -1
  32. package/schemas/probability-scenario-set.schema.json +1 -1
  33. package/schemas/probability-sequence-input.schema.json +1 -1
  34. package/schemas/probability-simulate-input.schema.json +1 -1
  35. package/schemas/probability-sweep-input.schema.json +1 -1
  36. package/server.json +2 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.8/schemas/gui-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/gui-scenario.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -33,44 +33,50 @@
33
33
  "stateValues": {
34
34
  "$ref": "#/$defs/__schema14"
35
35
  },
36
- "variables": {
36
+ "scopes": {
37
37
  "$ref": "#/$defs/__schema15"
38
38
  },
39
+ "conditionResults": {
40
+ "$ref": "#/$defs/__schema18"
41
+ },
42
+ "variables": {
43
+ "$ref": "#/$defs/__schema20"
44
+ },
39
45
  "flags": {
40
- "$ref": "#/$defs/__schema16"
46
+ "$ref": "#/$defs/__schema21"
41
47
  },
42
48
  "lists": {
43
- "$ref": "#/$defs/__schema17"
49
+ "$ref": "#/$defs/__schema22"
44
50
  },
45
51
  "localisation": {
46
- "$ref": "#/$defs/__schema18"
52
+ "$ref": "#/$defs/__schema23"
47
53
  },
48
54
  "values": {
49
- "$ref": "#/$defs/__schema19"
55
+ "$ref": "#/$defs/__schema24"
50
56
  },
51
57
  "scriptedGui": {
52
- "$ref": "#/$defs/__schema20"
58
+ "$ref": "#/$defs/__schema25"
53
59
  },
54
60
  "visibility": {
55
- "$ref": "#/$defs/__schema21"
61
+ "$ref": "#/$defs/__schema26"
56
62
  },
57
63
  "elementStates": {
58
- "$ref": "#/$defs/__schema22"
64
+ "$ref": "#/$defs/__schema27"
59
65
  },
60
66
  "selectedFrames": {
61
- "$ref": "#/$defs/__schema23"
67
+ "$ref": "#/$defs/__schema28"
62
68
  },
63
69
  "scrollOffsets": {
64
- "$ref": "#/$defs/__schema24"
70
+ "$ref": "#/$defs/__schema29"
65
71
  },
66
72
  "guiCosts": {
67
- "$ref": "#/$defs/__schema25"
73
+ "$ref": "#/$defs/__schema30"
68
74
  },
69
75
  "scriptCosts": {
70
- "$ref": "#/$defs/__schema26"
76
+ "$ref": "#/$defs/__schema31"
71
77
  },
72
78
  "expectations": {
73
- "$ref": "#/$defs/__schema27"
79
+ "$ref": "#/$defs/__schema32"
74
80
  }
75
81
  },
76
82
  "required": [
@@ -194,6 +200,156 @@
194
200
  "$ref": "#/$defs/__schema13"
195
201
  },
196
202
  "__schema15": {
203
+ "type": "object",
204
+ "propertyNames": {
205
+ "type": "string",
206
+ "maxLength": 256
207
+ },
208
+ "additionalProperties": {
209
+ "type": "object",
210
+ "properties": {
211
+ "id": {
212
+ "type": "string",
213
+ "minLength": 1,
214
+ "maxLength": 256
215
+ },
216
+ "type": {
217
+ "type": "string",
218
+ "enum": [
219
+ "country",
220
+ "state",
221
+ "character",
222
+ "unit_leader",
223
+ "operative",
224
+ "strategic_region",
225
+ "province",
226
+ "unknown"
227
+ ]
228
+ },
229
+ "actor": {
230
+ "type": "string",
231
+ "maxLength": 256
232
+ },
233
+ "state": {
234
+ "default": {},
235
+ "type": "object",
236
+ "propertyNames": {
237
+ "type": "string"
238
+ },
239
+ "additionalProperties": {
240
+ "anyOf": [
241
+ {
242
+ "$ref": "#/$defs/__schema16"
243
+ },
244
+ {
245
+ "maxItems": 10000,
246
+ "type": "array",
247
+ "items": {
248
+ "$ref": "#/$defs/__schema16"
249
+ }
250
+ }
251
+ ]
252
+ }
253
+ },
254
+ "flags": {
255
+ "maxItems": 10000,
256
+ "type": "array",
257
+ "items": {
258
+ "$ref": "#/$defs/__schema17"
259
+ }
260
+ },
261
+ "eventTargets": {
262
+ "type": "object",
263
+ "propertyNames": {
264
+ "type": "string"
265
+ },
266
+ "additionalProperties": {
267
+ "type": "string",
268
+ "maxLength": 256
269
+ }
270
+ },
271
+ "weight": {
272
+ "anyOf": [
273
+ {
274
+ "type": "number"
275
+ },
276
+ {
277
+ "type": "string",
278
+ "maxLength": 256
279
+ }
280
+ ]
281
+ }
282
+ },
283
+ "required": [
284
+ "id"
285
+ ],
286
+ "additionalProperties": false
287
+ }
288
+ },
289
+ "__schema16": {
290
+ "anyOf": [
291
+ {
292
+ "type": "string",
293
+ "maxLength": 16384
294
+ },
295
+ {
296
+ "type": "number"
297
+ },
298
+ {
299
+ "type": "boolean"
300
+ },
301
+ {
302
+ "type": "null"
303
+ }
304
+ ]
305
+ },
306
+ "__schema17": {
307
+ "type": "string",
308
+ "maxLength": 256
309
+ },
310
+ "__schema18": {
311
+ "maxItems": 10000,
312
+ "type": "array",
313
+ "items": {
314
+ "$ref": "#/$defs/__schema19"
315
+ }
316
+ },
317
+ "__schema19": {
318
+ "type": "object",
319
+ "properties": {
320
+ "token": {
321
+ "type": "string"
322
+ },
323
+ "sourcePath": {
324
+ "type": "string"
325
+ },
326
+ "state": {
327
+ "type": "string",
328
+ "enum": [
329
+ "true",
330
+ "false",
331
+ "unresolved"
332
+ ]
333
+ },
334
+ "localisationKey": {
335
+ "type": "string"
336
+ },
337
+ "unresolved": {
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string"
341
+ }
342
+ }
343
+ },
344
+ "required": [
345
+ "token",
346
+ "sourcePath",
347
+ "state",
348
+ "unresolved"
349
+ ],
350
+ "additionalProperties": false
351
+ },
352
+ "__schema20": {
197
353
  "default": {},
198
354
  "type": "object",
199
355
  "propertyNames": {
@@ -203,7 +359,7 @@
203
359
  "type": "number"
204
360
  }
205
361
  },
206
- "__schema16": {
362
+ "__schema21": {
207
363
  "default": {},
208
364
  "type": "object",
209
365
  "propertyNames": {
@@ -213,7 +369,7 @@
213
369
  "type": "boolean"
214
370
  }
215
371
  },
216
- "__schema17": {
372
+ "__schema22": {
217
373
  "default": {},
218
374
  "type": "object",
219
375
  "propertyNames": {
@@ -227,7 +383,7 @@
227
383
  }
228
384
  }
229
385
  },
230
- "__schema18": {
386
+ "__schema23": {
231
387
  "default": {},
232
388
  "type": "object",
233
389
  "propertyNames": {
@@ -237,15 +393,15 @@
237
393
  "type": "string"
238
394
  }
239
395
  },
240
- "__schema19": {
396
+ "__schema24": {
241
397
  "default": {},
242
398
  "$ref": "#/$defs/__schema13"
243
399
  },
244
- "__schema20": {
400
+ "__schema25": {
245
401
  "default": {},
246
402
  "$ref": "#/$defs/__schema13"
247
403
  },
248
- "__schema21": {
404
+ "__schema26": {
249
405
  "default": {},
250
406
  "type": "object",
251
407
  "propertyNames": {
@@ -255,7 +411,7 @@
255
411
  "type": "boolean"
256
412
  }
257
413
  },
258
- "__schema22": {
414
+ "__schema27": {
259
415
  "default": {},
260
416
  "type": "object",
261
417
  "propertyNames": {
@@ -265,7 +421,7 @@
265
421
  "$ref": "#/$defs/__schema8"
266
422
  }
267
423
  },
268
- "__schema23": {
424
+ "__schema28": {
269
425
  "default": {},
270
426
  "type": "object",
271
427
  "propertyNames": {
@@ -277,7 +433,7 @@
277
433
  "maximum": 9007199254740991
278
434
  }
279
435
  },
280
- "__schema24": {
436
+ "__schema29": {
281
437
  "default": {},
282
438
  "type": "object",
283
439
  "propertyNames": {
@@ -288,7 +444,7 @@
288
444
  "minimum": 0
289
445
  }
290
446
  },
291
- "__schema25": {
447
+ "__schema30": {
292
448
  "default": {},
293
449
  "type": "object",
294
450
  "propertyNames": {
@@ -298,7 +454,7 @@
298
454
  "type": "number"
299
455
  }
300
456
  },
301
- "__schema26": {
457
+ "__schema31": {
302
458
  "default": {},
303
459
  "type": "object",
304
460
  "propertyNames": {
@@ -308,7 +464,7 @@
308
464
  "type": "number"
309
465
  }
310
466
  },
311
- "__schema27": {
467
+ "__schema32": {
312
468
  "default": {
313
469
  "visible": [],
314
470
  "hidden": [],
@@ -322,7 +478,7 @@
322
478
  "maxItems": 10000,
323
479
  "type": "array",
324
480
  "items": {
325
- "$ref": "#/$defs/__schema28"
481
+ "$ref": "#/$defs/__schema33"
326
482
  }
327
483
  },
328
484
  "hidden": {
@@ -330,33 +486,33 @@
330
486
  "maxItems": 10000,
331
487
  "type": "array",
332
488
  "items": {
333
- "$ref": "#/$defs/__schema28"
489
+ "$ref": "#/$defs/__schema33"
334
490
  }
335
491
  },
336
492
  "containedBy": {
337
493
  "default": {},
338
494
  "type": "object",
339
495
  "propertyNames": {
340
- "$ref": "#/$defs/__schema28"
496
+ "$ref": "#/$defs/__schema33"
341
497
  },
342
498
  "additionalProperties": {
343
- "$ref": "#/$defs/__schema28"
499
+ "$ref": "#/$defs/__schema33"
344
500
  }
345
501
  },
346
502
  "centeredOn": {
347
503
  "default": {},
348
504
  "type": "object",
349
505
  "propertyNames": {
350
- "$ref": "#/$defs/__schema28"
506
+ "$ref": "#/$defs/__schema33"
351
507
  },
352
508
  "additionalProperties": {
353
- "$ref": "#/$defs/__schema28"
509
+ "$ref": "#/$defs/__schema33"
354
510
  }
355
511
  }
356
512
  },
357
513
  "additionalProperties": false
358
514
  },
359
- "__schema28": {
515
+ "__schema33": {
360
516
  "type": "string",
361
517
  "minLength": 1,
362
518
  "maxLength": 256
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.8/schemas/map-operation.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/map-operation.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "oneOf": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.8/schemas/operation-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/operation-result.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.0.8/schemas/probability-analysis-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-analysis-result.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.0.8/schemas/probability-compare-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-compare-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.0.8/schemas/probability-evaluate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-evaluate-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.0.8/schemas/probability-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/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/v3.0.8/schemas/probability-render-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-render-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.0.8/schemas/probability-scenario-set.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-scenario-set.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.0.8/schemas/probability-sequence-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-sequence-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.0.8/schemas/probability-simulate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-simulate-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.0.8/schemas/probability-sweep-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.0.9/schemas/probability-sweep-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.klimPaskov/hoi4-agent-tools",
4
4
  "title": "HOI4 Agent Tools",
5
5
  "description": "Analyze HOI4 events, tech trees, AI weights, and MTTH; build focus trees, GUIs, and maps.",
6
- "version": "3.0.8",
6
+ "version": "3.0.9",
7
7
  "repository": {
8
8
  "url": "https://github.com/klimPaskov/hoi4-agent-tools",
9
9
  "source": "github"
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "hoi4-agent-tools",
16
- "version": "3.0.8",
16
+ "version": "3.0.9",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  }