hoi4-agent-tools 3.1.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 (74) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +10 -2
  3. package/dist/hoi4_agent_tools/core/analysis-evidence.js +9 -0
  4. package/dist/hoi4_agent_tools/core/analysis-job-operations.js +48 -0
  5. package/dist/hoi4_agent_tools/core/condition-evaluator.js +21 -1
  6. package/dist/hoi4_agent_tools/core/impact-comparison.js +49 -0
  7. package/dist/hoi4_agent_tools/core/impact-graph.js +301 -0
  8. package/dist/hoi4_agent_tools/core/impact-semantic.js +256 -0
  9. package/dist/hoi4_agent_tools/core/job-worker-host.js +5 -0
  10. package/dist/hoi4_agent_tools/core/job-worker.js +2 -0
  11. package/dist/hoi4_agent_tools/core/operation-tasks.js +12 -0
  12. package/dist/hoi4_agent_tools/core/scenario-model.js +85 -0
  13. package/dist/hoi4_agent_tools/core/source-overlay.js +125 -0
  14. package/dist/hoi4_agent_tools/decision/ai.js +104 -0
  15. package/dist/hoi4_agent_tools/decision/comparison.js +106 -0
  16. package/dist/hoi4_agent_tools/decision/cost.js +177 -0
  17. package/dist/hoi4_agent_tools/decision/evaluation.js +256 -0
  18. package/dist/hoi4_agent_tools/decision/lifecycle.js +114 -0
  19. package/dist/hoi4_agent_tools/decision/service.js +172 -0
  20. package/dist/hoi4_agent_tools/decision/source-inventory.js +182 -0
  21. package/dist/hoi4_agent_tools/gui/scenario-conditions.js +2 -23
  22. package/dist/hoi4_agent_tools/impact/scenario-suites.js +74 -0
  23. package/dist/hoi4_agent_tools/impact/service.js +127 -0
  24. package/dist/hoi4_agent_tools/mcp/server/create.js +2 -0
  25. package/dist/hoi4_agent_tools/mcp/server/instructions.js +1 -1
  26. package/dist/hoi4_agent_tools/mcp/server/request-lifecycle.js +5 -0
  27. package/dist/hoi4_agent_tools/mcp/server/task-tool-catalog.js +2 -0
  28. package/dist/hoi4_agent_tools/mcp/tools/analysis.js +155 -0
  29. package/dist/hoi4_agent_tools/mechanic/assertions.js +112 -0
  30. package/dist/hoi4_agent_tools/mechanic/interpreter.js +619 -0
  31. package/dist/hoi4_agent_tools/mechanic/service.js +145 -0
  32. package/dist/hoi4_agent_tools/mechanic/source.js +89 -0
  33. package/dist/hoi4_agent_tools/package-check/service.js +231 -0
  34. package/dist/hoi4_agent_tools/probability/evaluation.js +3 -1
  35. package/dist/hoi4_agent_tools/scenario-suite/service.js +341 -0
  36. package/dist/hoi4_agent_tools/schemas/analysis.js +228 -0
  37. package/dist/hoi4_agent_tools/schemas/scenarios.js +264 -0
  38. package/dist/hoi4_agent_tools/version.js +1 -1
  39. package/docs/README.md +2 -0
  40. package/docs/analysis.md +100 -0
  41. package/docs/jobs.md +2 -1
  42. package/docs/mechanics.md +70 -0
  43. package/package.json +6 -2
  44. package/schemas/configuration.schema.json +1 -1
  45. package/schemas/continuous-focus-palette.schema.json +1 -1
  46. package/schemas/custom-weighted-pool.schema.json +1 -1
  47. package/schemas/decision-inspect-input.schema.json +290 -0
  48. package/schemas/event-feature-manifest.schema.json +1 -1
  49. package/schemas/focus-plan.schema.json +1 -1
  50. package/schemas/focus-planning-sidecar.schema.json +1 -1
  51. package/schemas/gui-animation-source.schema.json +1 -1
  52. package/schemas/gui-helper.schema.json +1 -1
  53. package/schemas/gui-scenario.schema.json +1 -1
  54. package/schemas/helper-expansion-request.schema.json +1 -1
  55. package/schemas/helper-expansion-summary.schema.json +1 -1
  56. package/schemas/impact-inspect-input.schema.json +203 -0
  57. package/schemas/map-operation.schema.json +1 -1
  58. package/schemas/mechanic-test-input.schema.json +650 -0
  59. package/schemas/operation-result.schema.json +1 -1
  60. package/schemas/package-check-input.schema.json +164 -0
  61. package/schemas/package-manifest.schema.json +142 -0
  62. package/schemas/probability-analysis-result.schema.json +1 -1
  63. package/schemas/probability-compare-input.schema.json +1 -1
  64. package/schemas/probability-evaluate-input.schema.json +1 -1
  65. package/schemas/probability-inspect-input.schema.json +1 -1
  66. package/schemas/probability-render-input.schema.json +1 -1
  67. package/schemas/probability-scenario-set.schema.json +1 -1
  68. package/schemas/probability-sequence-input.schema.json +1 -1
  69. package/schemas/probability-simulate-input.schema.json +1 -1
  70. package/schemas/probability-sweep-input.schema.json +1 -1
  71. package/schemas/scenario-suite.schema.json +1004 -0
  72. package/schemas/scenario-test-input.schema.json +1057 -0
  73. package/schemas/shared-scenario.schema.json +237 -0
  74. package/server.json +3 -3
@@ -0,0 +1,290 @@
1
+ {
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/decision-inspect-input.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "workspaceId": {
7
+ "$ref": "#/$defs/__schema0"
8
+ },
9
+ "mode": {
10
+ "$ref": "#/$defs/__schema1"
11
+ },
12
+ "id": {
13
+ "$ref": "#/$defs/__schema2"
14
+ },
15
+ "scenarios": {
16
+ "$ref": "#/$defs/__schema3"
17
+ },
18
+ "proposedSources": {
19
+ "$ref": "#/$defs/__schema13"
20
+ },
21
+ "expectedRevision": {
22
+ "$ref": "#/$defs/__schema15"
23
+ },
24
+ "refresh": {
25
+ "$ref": "#/$defs/__schema16"
26
+ }
27
+ },
28
+ "additionalProperties": false,
29
+ "$defs": {
30
+ "__schema0": {
31
+ "default": "current",
32
+ "type": "string",
33
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
34
+ },
35
+ "__schema1": {
36
+ "default": "inventory",
37
+ "type": "string",
38
+ "enum": [
39
+ "inventory",
40
+ "inspect",
41
+ "compare"
42
+ ]
43
+ },
44
+ "__schema2": {
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 512
48
+ },
49
+ "__schema3": {
50
+ "default": [],
51
+ "maxItems": 64,
52
+ "type": "array",
53
+ "items": {
54
+ "$ref": "#/$defs/__schema4"
55
+ }
56
+ },
57
+ "__schema4": {
58
+ "type": "object",
59
+ "properties": {
60
+ "id": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 512
64
+ },
65
+ "actor": {
66
+ "type": "string",
67
+ "maxLength": 256
68
+ },
69
+ "date": {
70
+ "type": "string",
71
+ "maxLength": 64
72
+ },
73
+ "state": {
74
+ "$ref": "#/$defs/__schema5"
75
+ },
76
+ "flags": {
77
+ "maxItems": 10000,
78
+ "type": "array",
79
+ "items": {
80
+ "$ref": "#/$defs/__schema9"
81
+ }
82
+ },
83
+ "eventTargets": {
84
+ "type": "object",
85
+ "propertyNames": {
86
+ "type": "string",
87
+ "maxLength": 512
88
+ },
89
+ "additionalProperties": {
90
+ "type": "string",
91
+ "maxLength": 512
92
+ }
93
+ },
94
+ "scopes": {
95
+ "type": "object",
96
+ "propertyNames": {
97
+ "$ref": "#/$defs/__schema10"
98
+ },
99
+ "additionalProperties": {
100
+ "$ref": "#/$defs/__schema11"
101
+ }
102
+ },
103
+ "candidateOverrides": {
104
+ "type": "object",
105
+ "propertyNames": {
106
+ "type": "string",
107
+ "maxLength": 512
108
+ },
109
+ "additionalProperties": {
110
+ "type": "boolean"
111
+ }
112
+ },
113
+ "closedFlags": {
114
+ "type": "boolean"
115
+ }
116
+ },
117
+ "required": [
118
+ "id",
119
+ "state"
120
+ ],
121
+ "additionalProperties": false
122
+ },
123
+ "__schema5": {
124
+ "type": "object",
125
+ "propertyNames": {
126
+ "$ref": "#/$defs/__schema6"
127
+ },
128
+ "additionalProperties": {
129
+ "$ref": "#/$defs/__schema7"
130
+ }
131
+ },
132
+ "__schema6": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "maxLength": 1024
136
+ },
137
+ "__schema7": {
138
+ "anyOf": [
139
+ {
140
+ "$ref": "#/$defs/__schema8"
141
+ },
142
+ {
143
+ "maxItems": 10000,
144
+ "type": "array",
145
+ "items": {
146
+ "$ref": "#/$defs/__schema8"
147
+ }
148
+ }
149
+ ]
150
+ },
151
+ "__schema8": {
152
+ "anyOf": [
153
+ {
154
+ "type": "string",
155
+ "maxLength": 4096
156
+ },
157
+ {
158
+ "type": "number"
159
+ },
160
+ {
161
+ "type": "boolean"
162
+ },
163
+ {
164
+ "type": "null"
165
+ }
166
+ ]
167
+ },
168
+ "__schema9": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 512
172
+ },
173
+ "__schema10": {
174
+ "type": "string",
175
+ "minLength": 1,
176
+ "maxLength": 128
177
+ },
178
+ "__schema11": {
179
+ "type": "object",
180
+ "properties": {
181
+ "id": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "maxLength": 512
185
+ },
186
+ "type": {
187
+ "type": "string",
188
+ "enum": [
189
+ "country",
190
+ "state",
191
+ "character",
192
+ "unit_leader",
193
+ "operative",
194
+ "strategic_region",
195
+ "province",
196
+ "unknown"
197
+ ]
198
+ },
199
+ "actor": {
200
+ "type": "string",
201
+ "maxLength": 256
202
+ },
203
+ "state": {
204
+ "$ref": "#/$defs/__schema5"
205
+ },
206
+ "flags": {
207
+ "maxItems": 10000,
208
+ "type": "array",
209
+ "items": {
210
+ "$ref": "#/$defs/__schema12"
211
+ }
212
+ },
213
+ "eventTargets": {
214
+ "type": "object",
215
+ "propertyNames": {
216
+ "type": "string",
217
+ "maxLength": 512
218
+ },
219
+ "additionalProperties": {
220
+ "type": "string",
221
+ "maxLength": 512
222
+ }
223
+ },
224
+ "weight": {
225
+ "anyOf": [
226
+ {
227
+ "type": "number"
228
+ },
229
+ {
230
+ "type": "string",
231
+ "maxLength": 1024
232
+ }
233
+ ]
234
+ }
235
+ },
236
+ "required": [
237
+ "id",
238
+ "state"
239
+ ],
240
+ "additionalProperties": false
241
+ },
242
+ "__schema12": {
243
+ "type": "string",
244
+ "minLength": 1,
245
+ "maxLength": 512
246
+ },
247
+ "__schema13": {
248
+ "minItems": 1,
249
+ "maxItems": 64,
250
+ "type": "array",
251
+ "items": {
252
+ "$ref": "#/$defs/__schema14"
253
+ }
254
+ },
255
+ "__schema14": {
256
+ "type": "object",
257
+ "properties": {
258
+ "relativePath": {
259
+ "type": "string",
260
+ "minLength": 1,
261
+ "maxLength": 1024
262
+ },
263
+ "content": {
264
+ "anyOf": [
265
+ {
266
+ "type": "string",
267
+ "maxLength": 8388608
268
+ },
269
+ {
270
+ "type": "null"
271
+ }
272
+ ]
273
+ }
274
+ },
275
+ "required": [
276
+ "relativePath",
277
+ "content"
278
+ ],
279
+ "additionalProperties": false
280
+ },
281
+ "__schema15": {
282
+ "type": "string",
283
+ "pattern": "^[a-f0-9]{64}$"
284
+ },
285
+ "__schema16": {
286
+ "default": false,
287
+ "type": "boolean"
288
+ }
289
+ }
290
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.1.0/schemas/event-feature-manifest.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/event-feature-manifest.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.1.0/schemas/focus-plan.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/focus-plan.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.1.0/schemas/focus-planning-sidecar.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/focus-planning-sidecar.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.1.0/schemas/gui-animation-source.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/gui-animation-source.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.1.0/schemas/gui-helper.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/gui-helper.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.1.0/schemas/gui-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/gui-scenario.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.1.0/schemas/helper-expansion-request.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.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.1.0/schemas/helper-expansion-summary.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.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": {
@@ -0,0 +1,203 @@
1
+ {
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/impact-inspect-input.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "workspaceId": {
7
+ "$ref": "#/$defs/__schema0"
8
+ },
9
+ "symbols": {
10
+ "$ref": "#/$defs/__schema1"
11
+ },
12
+ "changedFiles": {
13
+ "$ref": "#/$defs/__schema3"
14
+ },
15
+ "scenarioSuites": {
16
+ "$ref": "#/$defs/__schema5"
17
+ },
18
+ "proposedSources": {
19
+ "$ref": "#/$defs/__schema8"
20
+ },
21
+ "maxNodes": {
22
+ "$ref": "#/$defs/__schema10"
23
+ },
24
+ "maxEdges": {
25
+ "$ref": "#/$defs/__schema11"
26
+ },
27
+ "maxDepth": {
28
+ "$ref": "#/$defs/__schema12"
29
+ },
30
+ "expectedRevision": {
31
+ "$ref": "#/$defs/__schema13"
32
+ },
33
+ "refresh": {
34
+ "$ref": "#/$defs/__schema14"
35
+ }
36
+ },
37
+ "additionalProperties": false,
38
+ "$defs": {
39
+ "__schema0": {
40
+ "default": "current",
41
+ "type": "string",
42
+ "pattern": "^[a-z][a-z0-9_-]{0,63}$"
43
+ },
44
+ "__schema1": {
45
+ "default": [],
46
+ "maxItems": 64,
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/$defs/__schema2"
50
+ }
51
+ },
52
+ "__schema2": {
53
+ "type": "object",
54
+ "properties": {
55
+ "kind": {
56
+ "type": "string",
57
+ "enum": [
58
+ "focus_tree",
59
+ "focus",
60
+ "continuous_focus_palette",
61
+ "continuous_focus",
62
+ "decision",
63
+ "decision_category",
64
+ "event",
65
+ "idea",
66
+ "leader",
67
+ "formable",
68
+ "scripted_effect",
69
+ "scripted_trigger",
70
+ "script_constant",
71
+ "mtth_variable",
72
+ "ai_strategy",
73
+ "ai_strategy_plan",
74
+ "sprite",
75
+ "texture",
76
+ "gui_element",
77
+ "scripted_gui",
78
+ "technology",
79
+ "technology_folder",
80
+ "technology_category",
81
+ "technology_tag",
82
+ "equipment",
83
+ "equipment_module",
84
+ "sub_unit",
85
+ "unit_category",
86
+ "building",
87
+ "ability",
88
+ "combat_tactic",
89
+ "doctrine_folder",
90
+ "grand_doctrine",
91
+ "doctrine_track",
92
+ "subdoctrine",
93
+ "localisation",
94
+ "variable",
95
+ "flag",
96
+ "event_target",
97
+ "state",
98
+ "province",
99
+ "province_color",
100
+ "strategic_region",
101
+ "adjacency",
102
+ "supply_node",
103
+ "railway"
104
+ ]
105
+ },
106
+ "id": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "maxLength": 512
110
+ }
111
+ },
112
+ "required": [
113
+ "kind",
114
+ "id"
115
+ ],
116
+ "additionalProperties": false
117
+ },
118
+ "__schema3": {
119
+ "default": [],
120
+ "maxItems": 64,
121
+ "type": "array",
122
+ "items": {
123
+ "$ref": "#/$defs/__schema4"
124
+ }
125
+ },
126
+ "__schema4": {
127
+ "type": "string",
128
+ "minLength": 1,
129
+ "maxLength": 4096
130
+ },
131
+ "__schema5": {
132
+ "default": [],
133
+ "maxItems": 32,
134
+ "type": "array",
135
+ "items": {
136
+ "$ref": "#/$defs/__schema6"
137
+ }
138
+ },
139
+ "__schema6": {
140
+ "$ref": "#/$defs/__schema7"
141
+ },
142
+ "__schema7": {
143
+ "type": "string",
144
+ "minLength": 1,
145
+ "maxLength": 1024
146
+ },
147
+ "__schema8": {
148
+ "minItems": 1,
149
+ "maxItems": 64,
150
+ "type": "array",
151
+ "items": {
152
+ "$ref": "#/$defs/__schema9"
153
+ }
154
+ },
155
+ "__schema9": {
156
+ "type": "object",
157
+ "properties": {
158
+ "relativePath": {
159
+ "$ref": "#/$defs/__schema7"
160
+ },
161
+ "content": {
162
+ "anyOf": [
163
+ {
164
+ "type": "string",
165
+ "maxLength": 8388608
166
+ },
167
+ {
168
+ "type": "null"
169
+ }
170
+ ]
171
+ }
172
+ },
173
+ "required": [
174
+ "relativePath",
175
+ "content"
176
+ ],
177
+ "additionalProperties": false
178
+ },
179
+ "__schema10": {
180
+ "type": "integer",
181
+ "minimum": 1,
182
+ "maximum": 50000
183
+ },
184
+ "__schema11": {
185
+ "type": "integer",
186
+ "minimum": 1,
187
+ "maximum": 100000
188
+ },
189
+ "__schema12": {
190
+ "type": "integer",
191
+ "minimum": 1,
192
+ "maximum": 64
193
+ },
194
+ "__schema13": {
195
+ "type": "string",
196
+ "pattern": "^[a-f0-9]{64}$"
197
+ },
198
+ "__schema14": {
199
+ "default": false,
200
+ "type": "boolean"
201
+ }
202
+ }
203
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.1.0/schemas/map-operation.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.3.0/schemas/map-operation.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "oneOf": [
5
5
  {