hoi4-agent-tools 3.2.0 → 3.3.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 (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +4 -0
  3. package/dist/hoi4_agent_tools/core/analysis-job-operations.js +11 -1
  4. package/dist/hoi4_agent_tools/core/condition-evaluator.js +5 -1
  5. package/dist/hoi4_agent_tools/core/job-worker-host.js +3 -0
  6. package/dist/hoi4_agent_tools/core/operation-tasks.js +7 -0
  7. package/dist/hoi4_agent_tools/core/scenario-model.js +85 -0
  8. package/dist/hoi4_agent_tools/gui/scenario-conditions.js +2 -23
  9. package/dist/hoi4_agent_tools/mcp/server/instructions.js +1 -1
  10. package/dist/hoi4_agent_tools/mcp/server/request-lifecycle.js +3 -0
  11. package/dist/hoi4_agent_tools/mcp/tools/analysis.js +90 -0
  12. package/dist/hoi4_agent_tools/mechanic/assertions.js +112 -0
  13. package/dist/hoi4_agent_tools/mechanic/interpreter.js +619 -0
  14. package/dist/hoi4_agent_tools/mechanic/service.js +145 -0
  15. package/dist/hoi4_agent_tools/mechanic/source.js +89 -0
  16. package/dist/hoi4_agent_tools/package-check/service.js +231 -0
  17. package/dist/hoi4_agent_tools/probability/evaluation.js +3 -1
  18. package/dist/hoi4_agent_tools/scenario-suite/service.js +341 -0
  19. package/dist/hoi4_agent_tools/schemas/scenarios.js +264 -0
  20. package/dist/hoi4_agent_tools/version.js +1 -1
  21. package/docs/README.md +1 -0
  22. package/docs/mechanics.md +70 -0
  23. package/package.json +2 -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/decision-inspect-input.schema.json +1 -1
  28. package/schemas/event-feature-manifest.schema.json +1 -1
  29. package/schemas/focus-plan.schema.json +1 -1
  30. package/schemas/focus-planning-sidecar.schema.json +1 -1
  31. package/schemas/gui-animation-source.schema.json +1 -1
  32. package/schemas/gui-helper.schema.json +1 -1
  33. package/schemas/gui-scenario.schema.json +1 -1
  34. package/schemas/helper-expansion-request.schema.json +1 -1
  35. package/schemas/helper-expansion-summary.schema.json +1 -1
  36. package/schemas/impact-inspect-input.schema.json +1 -1
  37. package/schemas/map-operation.schema.json +1 -1
  38. package/schemas/mechanic-test-input.schema.json +650 -0
  39. package/schemas/operation-result.schema.json +1 -1
  40. package/schemas/package-check-input.schema.json +164 -0
  41. package/schemas/package-manifest.schema.json +142 -0
  42. package/schemas/probability-analysis-result.schema.json +1 -1
  43. package/schemas/probability-compare-input.schema.json +1 -1
  44. package/schemas/probability-evaluate-input.schema.json +1 -1
  45. package/schemas/probability-inspect-input.schema.json +1 -1
  46. package/schemas/probability-render-input.schema.json +1 -1
  47. package/schemas/probability-scenario-set.schema.json +1 -1
  48. package/schemas/probability-sequence-input.schema.json +1 -1
  49. package/schemas/probability-simulate-input.schema.json +1 -1
  50. package/schemas/probability-sweep-input.schema.json +1 -1
  51. package/schemas/scenario-suite.schema.json +1004 -0
  52. package/schemas/scenario-test-input.schema.json +1057 -0
  53. package/schemas/shared-scenario.schema.json +237 -0
  54. package/server.json +2 -2
@@ -0,0 +1,650 @@
1
+ {
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/mechanic-test-input.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "workspaceId": {
7
+ "default": "current",
8
+ "type": "string",
9
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
10
+ },
11
+ "test": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": {
15
+ "$ref": "#/$defs/__schema0"
16
+ },
17
+ "scenario": {
18
+ "type": "object",
19
+ "properties": {
20
+ "id": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 512
24
+ },
25
+ "actor": {
26
+ "type": "string",
27
+ "maxLength": 256
28
+ },
29
+ "date": {
30
+ "type": "string",
31
+ "maxLength": 64
32
+ },
33
+ "state": {
34
+ "$ref": "#/$defs/__schema1"
35
+ },
36
+ "flags": {
37
+ "maxItems": 10000,
38
+ "type": "array",
39
+ "items": {
40
+ "$ref": "#/$defs/__schema5"
41
+ }
42
+ },
43
+ "eventTargets": {
44
+ "type": "object",
45
+ "propertyNames": {
46
+ "type": "string",
47
+ "maxLength": 512
48
+ },
49
+ "additionalProperties": {
50
+ "type": "string",
51
+ "maxLength": 512
52
+ }
53
+ },
54
+ "scopes": {
55
+ "type": "object",
56
+ "propertyNames": {
57
+ "$ref": "#/$defs/__schema6"
58
+ },
59
+ "additionalProperties": {
60
+ "$ref": "#/$defs/__schema7"
61
+ }
62
+ },
63
+ "candidateOverrides": {
64
+ "type": "object",
65
+ "propertyNames": {
66
+ "type": "string",
67
+ "maxLength": 512
68
+ },
69
+ "additionalProperties": {
70
+ "type": "boolean"
71
+ }
72
+ },
73
+ "closedFlags": {
74
+ "type": "boolean"
75
+ },
76
+ "schemaVersion": {
77
+ "type": "string",
78
+ "const": "1.0"
79
+ },
80
+ "globalFlags": {
81
+ "maxItems": 10000,
82
+ "type": "array",
83
+ "items": {
84
+ "$ref": "#/$defs/__schema0"
85
+ }
86
+ },
87
+ "scopeCatalogs": {
88
+ "type": "object",
89
+ "propertyNames": {
90
+ "$ref": "#/$defs/__schema0"
91
+ },
92
+ "additionalProperties": {
93
+ "type": "object",
94
+ "properties": {
95
+ "complete": {
96
+ "type": "boolean"
97
+ },
98
+ "members": {
99
+ "maxItems": 2048,
100
+ "type": "array",
101
+ "items": {
102
+ "$ref": "#/$defs/__schema0"
103
+ }
104
+ }
105
+ },
106
+ "required": [
107
+ "complete",
108
+ "members"
109
+ ],
110
+ "additionalProperties": false
111
+ }
112
+ }
113
+ },
114
+ "required": [
115
+ "id",
116
+ "state",
117
+ "schemaVersion"
118
+ ],
119
+ "additionalProperties": false
120
+ },
121
+ "steps": {
122
+ "minItems": 1,
123
+ "maxItems": 128,
124
+ "type": "array",
125
+ "items": {
126
+ "$ref": "#/$defs/__schema9"
127
+ }
128
+ },
129
+ "assertions": {
130
+ "minItems": 1,
131
+ "maxItems": 256,
132
+ "type": "array",
133
+ "items": {
134
+ "$ref": "#/$defs/__schema10"
135
+ }
136
+ }
137
+ },
138
+ "required": [
139
+ "id",
140
+ "scenario",
141
+ "steps",
142
+ "assertions"
143
+ ],
144
+ "additionalProperties": false
145
+ },
146
+ "expectedRevision": {
147
+ "type": "string",
148
+ "pattern": "^[a-f0-9]{64}$"
149
+ },
150
+ "refresh": {
151
+ "default": false,
152
+ "type": "boolean"
153
+ }
154
+ },
155
+ "required": [
156
+ "test"
157
+ ],
158
+ "additionalProperties": false,
159
+ "$defs": {
160
+ "__schema0": {
161
+ "type": "string",
162
+ "minLength": 1,
163
+ "maxLength": 512
164
+ },
165
+ "__schema1": {
166
+ "type": "object",
167
+ "propertyNames": {
168
+ "$ref": "#/$defs/__schema2"
169
+ },
170
+ "additionalProperties": {
171
+ "$ref": "#/$defs/__schema3"
172
+ }
173
+ },
174
+ "__schema2": {
175
+ "type": "string",
176
+ "minLength": 1,
177
+ "maxLength": 1024
178
+ },
179
+ "__schema3": {
180
+ "anyOf": [
181
+ {
182
+ "$ref": "#/$defs/__schema4"
183
+ },
184
+ {
185
+ "maxItems": 10000,
186
+ "type": "array",
187
+ "items": {
188
+ "$ref": "#/$defs/__schema4"
189
+ }
190
+ }
191
+ ]
192
+ },
193
+ "__schema4": {
194
+ "anyOf": [
195
+ {
196
+ "type": "string",
197
+ "maxLength": 4096
198
+ },
199
+ {
200
+ "type": "number"
201
+ },
202
+ {
203
+ "type": "boolean"
204
+ },
205
+ {
206
+ "type": "null"
207
+ }
208
+ ]
209
+ },
210
+ "__schema5": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 512
214
+ },
215
+ "__schema6": {
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "maxLength": 128
219
+ },
220
+ "__schema7": {
221
+ "type": "object",
222
+ "properties": {
223
+ "id": {
224
+ "type": "string",
225
+ "minLength": 1,
226
+ "maxLength": 512
227
+ },
228
+ "type": {
229
+ "type": "string",
230
+ "enum": [
231
+ "country",
232
+ "state",
233
+ "character",
234
+ "unit_leader",
235
+ "operative",
236
+ "strategic_region",
237
+ "province",
238
+ "unknown"
239
+ ]
240
+ },
241
+ "actor": {
242
+ "type": "string",
243
+ "maxLength": 256
244
+ },
245
+ "state": {
246
+ "$ref": "#/$defs/__schema1"
247
+ },
248
+ "flags": {
249
+ "maxItems": 10000,
250
+ "type": "array",
251
+ "items": {
252
+ "$ref": "#/$defs/__schema8"
253
+ }
254
+ },
255
+ "eventTargets": {
256
+ "type": "object",
257
+ "propertyNames": {
258
+ "type": "string",
259
+ "maxLength": 512
260
+ },
261
+ "additionalProperties": {
262
+ "type": "string",
263
+ "maxLength": 512
264
+ }
265
+ },
266
+ "weight": {
267
+ "anyOf": [
268
+ {
269
+ "type": "number"
270
+ },
271
+ {
272
+ "type": "string",
273
+ "maxLength": 1024
274
+ }
275
+ ]
276
+ }
277
+ },
278
+ "required": [
279
+ "id",
280
+ "state"
281
+ ],
282
+ "additionalProperties": false
283
+ },
284
+ "__schema8": {
285
+ "type": "string",
286
+ "minLength": 1,
287
+ "maxLength": 512
288
+ },
289
+ "__schema9": {
290
+ "oneOf": [
291
+ {
292
+ "type": "object",
293
+ "properties": {
294
+ "kind": {
295
+ "type": "string",
296
+ "const": "effect"
297
+ },
298
+ "source": {
299
+ "type": "object",
300
+ "properties": {
301
+ "kind": {
302
+ "type": "string",
303
+ "enum": [
304
+ "scripted_effect",
305
+ "event_option",
306
+ "decision",
307
+ "focus_reward"
308
+ ]
309
+ },
310
+ "id": {
311
+ "$ref": "#/$defs/__schema0"
312
+ },
313
+ "option": {
314
+ "$ref": "#/$defs/__schema0"
315
+ }
316
+ },
317
+ "required": [
318
+ "kind",
319
+ "id"
320
+ ],
321
+ "additionalProperties": false
322
+ },
323
+ "repeat": {
324
+ "default": 1,
325
+ "type": "integer",
326
+ "minimum": 1,
327
+ "maximum": 8
328
+ }
329
+ },
330
+ "required": [
331
+ "kind",
332
+ "source"
333
+ ],
334
+ "additionalProperties": false
335
+ },
336
+ {
337
+ "type": "object",
338
+ "properties": {
339
+ "kind": {
340
+ "type": "string",
341
+ "const": "advance_days"
342
+ },
343
+ "days": {
344
+ "type": "integer",
345
+ "minimum": 0,
346
+ "maximum": 36500
347
+ }
348
+ },
349
+ "required": [
350
+ "kind",
351
+ "days"
352
+ ],
353
+ "additionalProperties": false
354
+ }
355
+ ]
356
+ },
357
+ "__schema10": {
358
+ "oneOf": [
359
+ {
360
+ "type": "object",
361
+ "properties": {
362
+ "id": {
363
+ "$ref": "#/$defs/__schema0"
364
+ },
365
+ "kind": {
366
+ "type": "string",
367
+ "const": "equals"
368
+ },
369
+ "path": {
370
+ "$ref": "#/$defs/__schema11"
371
+ },
372
+ "expected": {
373
+ "$ref": "#/$defs/__schema12"
374
+ }
375
+ },
376
+ "required": [
377
+ "id",
378
+ "kind",
379
+ "path",
380
+ "expected"
381
+ ],
382
+ "additionalProperties": false
383
+ },
384
+ {
385
+ "type": "object",
386
+ "properties": {
387
+ "id": {
388
+ "$ref": "#/$defs/__schema0"
389
+ },
390
+ "kind": {
391
+ "type": "string",
392
+ "const": "conservation"
393
+ },
394
+ "paths": {
395
+ "minItems": 2,
396
+ "maxItems": 64,
397
+ "type": "array",
398
+ "items": {
399
+ "$ref": "#/$defs/__schema11"
400
+ }
401
+ },
402
+ "tolerance": {
403
+ "default": 0,
404
+ "type": "number",
405
+ "minimum": 0
406
+ }
407
+ },
408
+ "required": [
409
+ "id",
410
+ "kind",
411
+ "paths"
412
+ ],
413
+ "additionalProperties": false
414
+ },
415
+ {
416
+ "type": "object",
417
+ "properties": {
418
+ "id": {
419
+ "$ref": "#/$defs/__schema0"
420
+ },
421
+ "kind": {
422
+ "type": "string",
423
+ "const": "array_alignment"
424
+ },
425
+ "paths": {
426
+ "minItems": 2,
427
+ "maxItems": 32,
428
+ "type": "array",
429
+ "items": {
430
+ "$ref": "#/$defs/__schema11"
431
+ }
432
+ }
433
+ },
434
+ "required": [
435
+ "id",
436
+ "kind",
437
+ "paths"
438
+ ],
439
+ "additionalProperties": false
440
+ },
441
+ {
442
+ "type": "object",
443
+ "properties": {
444
+ "id": {
445
+ "$ref": "#/$defs/__schema0"
446
+ },
447
+ "kind": {
448
+ "type": "string",
449
+ "const": "affordability"
450
+ },
451
+ "balance": {
452
+ "$ref": "#/$defs/__schema11"
453
+ },
454
+ "cost": {
455
+ "type": "number",
456
+ "minimum": 0
457
+ }
458
+ },
459
+ "required": [
460
+ "id",
461
+ "kind",
462
+ "balance",
463
+ "cost"
464
+ ],
465
+ "additionalProperties": false
466
+ },
467
+ {
468
+ "type": "object",
469
+ "properties": {
470
+ "id": {
471
+ "$ref": "#/$defs/__schema0"
472
+ },
473
+ "kind": {
474
+ "type": "string",
475
+ "const": "single_payment"
476
+ },
477
+ "balance": {
478
+ "$ref": "#/$defs/__schema11"
479
+ },
480
+ "cost": {
481
+ "type": "number",
482
+ "minimum": 0
483
+ }
484
+ },
485
+ "required": [
486
+ "id",
487
+ "kind",
488
+ "balance",
489
+ "cost"
490
+ ],
491
+ "additionalProperties": false
492
+ },
493
+ {
494
+ "type": "object",
495
+ "properties": {
496
+ "id": {
497
+ "$ref": "#/$defs/__schema0"
498
+ },
499
+ "kind": {
500
+ "type": "string",
501
+ "const": "repeated_setup"
502
+ },
503
+ "firstStep": {
504
+ "type": "integer",
505
+ "minimum": 0,
506
+ "maximum": 9007199254740991
507
+ },
508
+ "secondStep": {
509
+ "type": "integer",
510
+ "minimum": 0,
511
+ "maximum": 9007199254740991
512
+ }
513
+ },
514
+ "required": [
515
+ "id",
516
+ "kind",
517
+ "firstStep",
518
+ "secondStep"
519
+ ],
520
+ "additionalProperties": false
521
+ },
522
+ {
523
+ "type": "object",
524
+ "properties": {
525
+ "id": {
526
+ "$ref": "#/$defs/__schema0"
527
+ },
528
+ "kind": {
529
+ "type": "string",
530
+ "const": "exclusive_flags"
531
+ },
532
+ "scope": {
533
+ "default": "ROOT",
534
+ "$ref": "#/$defs/__schema0"
535
+ },
536
+ "flags": {
537
+ "minItems": 2,
538
+ "maxItems": 64,
539
+ "type": "array",
540
+ "items": {
541
+ "$ref": "#/$defs/__schema0"
542
+ }
543
+ }
544
+ },
545
+ "required": [
546
+ "id",
547
+ "kind",
548
+ "flags"
549
+ ],
550
+ "additionalProperties": false
551
+ },
552
+ {
553
+ "type": "object",
554
+ "properties": {
555
+ "id": {
556
+ "$ref": "#/$defs/__schema0"
557
+ },
558
+ "kind": {
559
+ "type": "string",
560
+ "const": "cleanup"
561
+ },
562
+ "scope": {
563
+ "default": "ROOT",
564
+ "$ref": "#/$defs/__schema0"
565
+ },
566
+ "flags": {
567
+ "default": [],
568
+ "maxItems": 64,
569
+ "type": "array",
570
+ "items": {
571
+ "$ref": "#/$defs/__schema0"
572
+ }
573
+ },
574
+ "targets": {
575
+ "default": [],
576
+ "maxItems": 64,
577
+ "type": "array",
578
+ "items": {
579
+ "$ref": "#/$defs/__schema0"
580
+ }
581
+ }
582
+ },
583
+ "required": [
584
+ "id",
585
+ "kind"
586
+ ],
587
+ "additionalProperties": false
588
+ },
589
+ {
590
+ "type": "object",
591
+ "properties": {
592
+ "id": {
593
+ "$ref": "#/$defs/__schema0"
594
+ },
595
+ "kind": {
596
+ "type": "string",
597
+ "const": "end_state"
598
+ },
599
+ "path": {
600
+ "$ref": "#/$defs/__schema11"
601
+ },
602
+ "expected": {
603
+ "$ref": "#/$defs/__schema12"
604
+ }
605
+ },
606
+ "required": [
607
+ "id",
608
+ "kind",
609
+ "path",
610
+ "expected"
611
+ ],
612
+ "additionalProperties": false
613
+ }
614
+ ]
615
+ },
616
+ "__schema11": {
617
+ "type": "object",
618
+ "properties": {
619
+ "scope": {
620
+ "default": "ROOT",
621
+ "$ref": "#/$defs/__schema0"
622
+ },
623
+ "key": {
624
+ "$ref": "#/$defs/__schema0"
625
+ }
626
+ },
627
+ "required": [
628
+ "key"
629
+ ],
630
+ "additionalProperties": false
631
+ },
632
+ "__schema12": {
633
+ "anyOf": [
634
+ {
635
+ "type": "string",
636
+ "maxLength": 4096
637
+ },
638
+ {
639
+ "type": "number"
640
+ },
641
+ {
642
+ "type": "boolean"
643
+ },
644
+ {
645
+ "type": "null"
646
+ }
647
+ ]
648
+ }
649
+ }
650
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.2.0/schemas/operation-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/operation-result.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {