hoi4-agent-tools 0.2.0 → 1.0.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 (428) hide show
  1. package/CHANGELOG.md +12 -118
  2. package/README.md +35 -127
  3. package/SECURITY.md +5 -7
  4. package/dist/bin/http.js +0 -1
  5. package/dist/bin/setup.js +141 -92
  6. package/dist/bin/stdio.js +0 -1
  7. package/dist/hoi4_agent_tools/core/artifacts.js +0 -1
  8. package/dist/hoi4_agent_tools/core/canonical.js +0 -1
  9. package/dist/hoi4_agent_tools/core/configuration.js +28 -28
  10. package/dist/hoi4_agent_tools/core/diagnostic-collector.js +0 -1
  11. package/dist/hoi4_agent_tools/core/diagnostics.js +0 -1
  12. package/dist/hoi4_agent_tools/core/diff.js +0 -1
  13. package/dist/hoi4_agent_tools/core/engine.js +6 -21
  14. package/dist/hoi4_agent_tools/core/image-diff.js +0 -1
  15. package/dist/hoi4_agent_tools/core/index.js +0 -1
  16. package/dist/hoi4_agent_tools/core/render-budget.js +0 -1
  17. package/dist/hoi4_agent_tools/core/result.js +0 -1
  18. package/dist/hoi4_agent_tools/core/scanner.js +0 -1
  19. package/dist/hoi4_agent_tools/core/server-state.js +0 -1
  20. package/dist/hoi4_agent_tools/core/source/encoding.js +0 -1
  21. package/dist/hoi4_agent_tools/core/source/index.js +0 -1
  22. package/dist/hoi4_agent_tools/core/source/lexer.js +0 -1
  23. package/dist/hoi4_agent_tools/core/source/limits.js +0 -1
  24. package/dist/hoi4_agent_tools/core/source/localisation.js +0 -1
  25. package/dist/hoi4_agent_tools/core/source/parser.js +0 -1
  26. package/dist/hoi4_agent_tools/core/source/rewrite.js +0 -1
  27. package/dist/hoi4_agent_tools/core/svg-text.js +0 -1
  28. package/dist/hoi4_agent_tools/core/transaction-limits.js +0 -1
  29. package/dist/hoi4_agent_tools/core/transactions.js +2 -30
  30. package/dist/hoi4_agent_tools/core/workspace.js +112 -396
  31. package/dist/hoi4_agent_tools/focus/compiler.js +0 -1
  32. package/dist/hoi4_agent_tools/focus/continuous-render.js +0 -1
  33. package/dist/hoi4_agent_tools/focus/drift.js +0 -1
  34. package/dist/hoi4_agent_tools/focus/geometry.js +0 -1
  35. package/dist/hoi4_agent_tools/focus/importer.js +0 -1
  36. package/dist/hoi4_agent_tools/focus/index.js +0 -1
  37. package/dist/hoi4_agent_tools/focus/layout.js +0 -1
  38. package/dist/hoi4_agent_tools/focus/limits.js +0 -1
  39. package/dist/hoi4_agent_tools/focus/lint.js +0 -1
  40. package/dist/hoi4_agent_tools/focus/model.js +0 -1
  41. package/dist/hoi4_agent_tools/focus/native-effects.js +0 -1
  42. package/dist/hoi4_agent_tools/focus/planning.js +0 -1
  43. package/dist/hoi4_agent_tools/focus/presentation.js +0 -1
  44. package/dist/hoi4_agent_tools/focus/render.js +0 -1
  45. package/dist/hoi4_agent_tools/focus/service.js +7 -8
  46. package/dist/hoi4_agent_tools/focus/source-update.js +1 -2
  47. package/dist/hoi4_agent_tools/gui/animation-manifest.js +0 -1
  48. package/dist/hoi4_agent_tools/gui/assets.js +0 -1
  49. package/dist/hoi4_agent_tools/gui/dds.js +0 -1
  50. package/dist/hoi4_agent_tools/gui/helpers.js +1 -2
  51. package/dist/hoi4_agent_tools/gui/index.js +0 -1
  52. package/dist/hoi4_agent_tools/gui/layout.js +0 -1
  53. package/dist/hoi4_agent_tools/gui/limits.js +0 -1
  54. package/dist/hoi4_agent_tools/gui/renderer.js +0 -1
  55. package/dist/hoi4_agent_tools/gui/scenario.js +0 -1
  56. package/dist/hoi4_agent_tools/gui/source-graph.js +0 -1
  57. package/dist/hoi4_agent_tools/gui/source-patch.js +1 -2
  58. package/dist/hoi4_agent_tools/gui/studio.js +247 -104
  59. package/dist/hoi4_agent_tools/gui/tga.js +0 -1
  60. package/dist/hoi4_agent_tools/gui/types.js +0 -1
  61. package/dist/hoi4_agent_tools/gui/validators.js +0 -1
  62. package/dist/hoi4_agent_tools/map/bmp.js +0 -1
  63. package/dist/hoi4_agent_tools/map/diagnostic-limit.js +0 -1
  64. package/dist/hoi4_agent_tools/map/index.js +0 -1
  65. package/dist/hoi4_agent_tools/map/limits.js +2 -1
  66. package/dist/hoi4_agent_tools/map/model.js +0 -1
  67. package/dist/hoi4_agent_tools/map/operations.js +0 -1
  68. package/dist/hoi4_agent_tools/map/render.js +0 -1
  69. package/dist/hoi4_agent_tools/map/service.js +171 -33
  70. package/dist/hoi4_agent_tools/map/validation.js +0 -1
  71. package/dist/hoi4_agent_tools/mcp/resources/register.js +61 -187
  72. package/dist/hoi4_agent_tools/mcp/security/auth.js +1 -2
  73. package/dist/hoi4_agent_tools/mcp/server/base-tools.js +24 -750
  74. package/dist/hoi4_agent_tools/mcp/server/create.js +3 -12
  75. package/dist/hoi4_agent_tools/mcp/server/output-schemas.js +0 -71
  76. package/dist/hoi4_agent_tools/mcp/server/progress.js +0 -1
  77. package/dist/hoi4_agent_tools/mcp/server/result.js +24 -30
  78. package/dist/hoi4_agent_tools/mcp/server/transaction-execution.js +10 -14
  79. package/dist/hoi4_agent_tools/mcp/tools/focus.js +219 -275
  80. package/dist/hoi4_agent_tools/mcp/tools/gui.js +149 -250
  81. package/dist/hoi4_agent_tools/mcp/tools/map.js +256 -337
  82. package/dist/hoi4_agent_tools/mcp/tools/mods.js +54 -0
  83. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js +0 -1
  84. package/dist/hoi4_agent_tools/mcp/transports/event-store.js +0 -1
  85. package/dist/hoi4_agent_tools/mcp/transports/http.js +1 -12
  86. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js +0 -1
  87. package/dist/hoi4_agent_tools/runtime.js +5 -2
  88. package/dist/hoi4_agent_tools/schemas/common.js +1 -2
  89. package/dist/hoi4_agent_tools/schemas/focus.js +0 -1
  90. package/dist/hoi4_agent_tools/schemas/map.js +0 -1
  91. package/dist/hoi4_agent_tools/schemas/transaction.js +0 -1
  92. package/dist/hoi4_agent_tools/version.js +1 -2
  93. package/docs/README.md +8 -21
  94. package/docs/development.md +22 -0
  95. package/docs/focus.md +40 -0
  96. package/docs/gui.md +37 -0
  97. package/docs/http.md +53 -0
  98. package/docs/map.md +39 -0
  99. package/docs/setup.md +39 -0
  100. package/package.json +10 -11
  101. package/server.json +3 -12
  102. package/dist/bin/http.d.ts +0 -3
  103. package/dist/bin/http.d.ts.map +0 -1
  104. package/dist/bin/http.js.map +0 -1
  105. package/dist/bin/setup.d.ts +0 -3
  106. package/dist/bin/setup.d.ts.map +0 -1
  107. package/dist/bin/setup.js.map +0 -1
  108. package/dist/bin/stdio.d.ts +0 -3
  109. package/dist/bin/stdio.d.ts.map +0 -1
  110. package/dist/bin/stdio.js.map +0 -1
  111. package/dist/hoi4_agent_tools/core/artifacts.d.ts +0 -117
  112. package/dist/hoi4_agent_tools/core/artifacts.d.ts.map +0 -1
  113. package/dist/hoi4_agent_tools/core/artifacts.js.map +0 -1
  114. package/dist/hoi4_agent_tools/core/canonical.d.ts +0 -13
  115. package/dist/hoi4_agent_tools/core/canonical.d.ts.map +0 -1
  116. package/dist/hoi4_agent_tools/core/canonical.js.map +0 -1
  117. package/dist/hoi4_agent_tools/core/configuration.d.ts +0 -138
  118. package/dist/hoi4_agent_tools/core/configuration.d.ts.map +0 -1
  119. package/dist/hoi4_agent_tools/core/configuration.js.map +0 -1
  120. package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts +0 -18
  121. package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts.map +0 -1
  122. package/dist/hoi4_agent_tools/core/diagnostic-collector.js.map +0 -1
  123. package/dist/hoi4_agent_tools/core/diagnostics.d.ts +0 -26
  124. package/dist/hoi4_agent_tools/core/diagnostics.d.ts.map +0 -1
  125. package/dist/hoi4_agent_tools/core/diagnostics.js.map +0 -1
  126. package/dist/hoi4_agent_tools/core/diff.d.ts +0 -22
  127. package/dist/hoi4_agent_tools/core/diff.d.ts.map +0 -1
  128. package/dist/hoi4_agent_tools/core/diff.js.map +0 -1
  129. package/dist/hoi4_agent_tools/core/engine.d.ts +0 -57
  130. package/dist/hoi4_agent_tools/core/engine.d.ts.map +0 -1
  131. package/dist/hoi4_agent_tools/core/engine.js.map +0 -1
  132. package/dist/hoi4_agent_tools/core/image-diff.d.ts +0 -14
  133. package/dist/hoi4_agent_tools/core/image-diff.d.ts.map +0 -1
  134. package/dist/hoi4_agent_tools/core/image-diff.js.map +0 -1
  135. package/dist/hoi4_agent_tools/core/index.d.ts +0 -64
  136. package/dist/hoi4_agent_tools/core/index.d.ts.map +0 -1
  137. package/dist/hoi4_agent_tools/core/index.js.map +0 -1
  138. package/dist/hoi4_agent_tools/core/index.public.d.ts +0 -16
  139. package/dist/hoi4_agent_tools/core/index.public.d.ts.map +0 -1
  140. package/dist/hoi4_agent_tools/core/index.public.js +0 -16
  141. package/dist/hoi4_agent_tools/core/index.public.js.map +0 -1
  142. package/dist/hoi4_agent_tools/core/render-budget.d.ts +0 -51
  143. package/dist/hoi4_agent_tools/core/render-budget.d.ts.map +0 -1
  144. package/dist/hoi4_agent_tools/core/render-budget.js.map +0 -1
  145. package/dist/hoi4_agent_tools/core/result.d.ts +0 -45
  146. package/dist/hoi4_agent_tools/core/result.d.ts.map +0 -1
  147. package/dist/hoi4_agent_tools/core/result.js.map +0 -1
  148. package/dist/hoi4_agent_tools/core/scanner.d.ts +0 -28
  149. package/dist/hoi4_agent_tools/core/scanner.d.ts.map +0 -1
  150. package/dist/hoi4_agent_tools/core/scanner.js.map +0 -1
  151. package/dist/hoi4_agent_tools/core/server-state.d.ts +0 -31
  152. package/dist/hoi4_agent_tools/core/server-state.d.ts.map +0 -1
  153. package/dist/hoi4_agent_tools/core/server-state.js.map +0 -1
  154. package/dist/hoi4_agent_tools/core/source/encoding.d.ts +0 -10
  155. package/dist/hoi4_agent_tools/core/source/encoding.d.ts.map +0 -1
  156. package/dist/hoi4_agent_tools/core/source/encoding.js.map +0 -1
  157. package/dist/hoi4_agent_tools/core/source/index.d.ts +0 -7
  158. package/dist/hoi4_agent_tools/core/source/index.d.ts.map +0 -1
  159. package/dist/hoi4_agent_tools/core/source/index.js.map +0 -1
  160. package/dist/hoi4_agent_tools/core/source/lexer.d.ts +0 -30
  161. package/dist/hoi4_agent_tools/core/source/lexer.d.ts.map +0 -1
  162. package/dist/hoi4_agent_tools/core/source/lexer.js.map +0 -1
  163. package/dist/hoi4_agent_tools/core/source/limits.d.ts +0 -21
  164. package/dist/hoi4_agent_tools/core/source/limits.d.ts.map +0 -1
  165. package/dist/hoi4_agent_tools/core/source/limits.js.map +0 -1
  166. package/dist/hoi4_agent_tools/core/source/localisation.d.ts +0 -20
  167. package/dist/hoi4_agent_tools/core/source/localisation.d.ts.map +0 -1
  168. package/dist/hoi4_agent_tools/core/source/localisation.js.map +0 -1
  169. package/dist/hoi4_agent_tools/core/source/parser.d.ts +0 -44
  170. package/dist/hoi4_agent_tools/core/source/parser.d.ts.map +0 -1
  171. package/dist/hoi4_agent_tools/core/source/parser.js.map +0 -1
  172. package/dist/hoi4_agent_tools/core/source/rewrite.d.ts +0 -10
  173. package/dist/hoi4_agent_tools/core/source/rewrite.d.ts.map +0 -1
  174. package/dist/hoi4_agent_tools/core/source/rewrite.js.map +0 -1
  175. package/dist/hoi4_agent_tools/core/svg-text.d.ts +0 -34
  176. package/dist/hoi4_agent_tools/core/svg-text.d.ts.map +0 -1
  177. package/dist/hoi4_agent_tools/core/svg-text.js.map +0 -1
  178. package/dist/hoi4_agent_tools/core/transaction-limits.d.ts +0 -9
  179. package/dist/hoi4_agent_tools/core/transaction-limits.d.ts.map +0 -1
  180. package/dist/hoi4_agent_tools/core/transaction-limits.js.map +0 -1
  181. package/dist/hoi4_agent_tools/core/transactions.d.ts +0 -164
  182. package/dist/hoi4_agent_tools/core/transactions.d.ts.map +0 -1
  183. package/dist/hoi4_agent_tools/core/transactions.js.map +0 -1
  184. package/dist/hoi4_agent_tools/core/workspace.d.ts +0 -68
  185. package/dist/hoi4_agent_tools/core/workspace.d.ts.map +0 -1
  186. package/dist/hoi4_agent_tools/core/workspace.js.map +0 -1
  187. package/dist/hoi4_agent_tools/focus/compiler.d.ts +0 -10
  188. package/dist/hoi4_agent_tools/focus/compiler.d.ts.map +0 -1
  189. package/dist/hoi4_agent_tools/focus/compiler.js.map +0 -1
  190. package/dist/hoi4_agent_tools/focus/continuous-render.d.ts +0 -32
  191. package/dist/hoi4_agent_tools/focus/continuous-render.d.ts.map +0 -1
  192. package/dist/hoi4_agent_tools/focus/continuous-render.js.map +0 -1
  193. package/dist/hoi4_agent_tools/focus/drift.d.ts +0 -22
  194. package/dist/hoi4_agent_tools/focus/drift.d.ts.map +0 -1
  195. package/dist/hoi4_agent_tools/focus/drift.js.map +0 -1
  196. package/dist/hoi4_agent_tools/focus/geometry.d.ts +0 -17
  197. package/dist/hoi4_agent_tools/focus/geometry.d.ts.map +0 -1
  198. package/dist/hoi4_agent_tools/focus/geometry.js.map +0 -1
  199. package/dist/hoi4_agent_tools/focus/importer.d.ts +0 -9
  200. package/dist/hoi4_agent_tools/focus/importer.d.ts.map +0 -1
  201. package/dist/hoi4_agent_tools/focus/importer.js.map +0 -1
  202. package/dist/hoi4_agent_tools/focus/index.d.ts +0 -14
  203. package/dist/hoi4_agent_tools/focus/index.d.ts.map +0 -1
  204. package/dist/hoi4_agent_tools/focus/index.js.map +0 -1
  205. package/dist/hoi4_agent_tools/focus/layout.d.ts +0 -5
  206. package/dist/hoi4_agent_tools/focus/layout.d.ts.map +0 -1
  207. package/dist/hoi4_agent_tools/focus/layout.js.map +0 -1
  208. package/dist/hoi4_agent_tools/focus/limits.d.ts +0 -9
  209. package/dist/hoi4_agent_tools/focus/limits.d.ts.map +0 -1
  210. package/dist/hoi4_agent_tools/focus/limits.js.map +0 -1
  211. package/dist/hoi4_agent_tools/focus/lint.d.ts +0 -14
  212. package/dist/hoi4_agent_tools/focus/lint.d.ts.map +0 -1
  213. package/dist/hoi4_agent_tools/focus/lint.js.map +0 -1
  214. package/dist/hoi4_agent_tools/focus/model.d.ts +0 -307
  215. package/dist/hoi4_agent_tools/focus/model.d.ts.map +0 -1
  216. package/dist/hoi4_agent_tools/focus/model.js.map +0 -1
  217. package/dist/hoi4_agent_tools/focus/native-effects.d.ts +0 -9
  218. package/dist/hoi4_agent_tools/focus/native-effects.d.ts.map +0 -1
  219. package/dist/hoi4_agent_tools/focus/native-effects.js.map +0 -1
  220. package/dist/hoi4_agent_tools/focus/planning.d.ts +0 -15
  221. package/dist/hoi4_agent_tools/focus/planning.d.ts.map +0 -1
  222. package/dist/hoi4_agent_tools/focus/planning.js.map +0 -1
  223. package/dist/hoi4_agent_tools/focus/presentation.d.ts +0 -24
  224. package/dist/hoi4_agent_tools/focus/presentation.d.ts.map +0 -1
  225. package/dist/hoi4_agent_tools/focus/presentation.js.map +0 -1
  226. package/dist/hoi4_agent_tools/focus/render.d.ts +0 -39
  227. package/dist/hoi4_agent_tools/focus/render.d.ts.map +0 -1
  228. package/dist/hoi4_agent_tools/focus/render.js.map +0 -1
  229. package/dist/hoi4_agent_tools/focus/service.d.ts +0 -82
  230. package/dist/hoi4_agent_tools/focus/service.d.ts.map +0 -1
  231. package/dist/hoi4_agent_tools/focus/service.js.map +0 -1
  232. package/dist/hoi4_agent_tools/focus/source-update.d.ts +0 -6
  233. package/dist/hoi4_agent_tools/focus/source-update.d.ts.map +0 -1
  234. package/dist/hoi4_agent_tools/focus/source-update.js.map +0 -1
  235. package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts +0 -37
  236. package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts.map +0 -1
  237. package/dist/hoi4_agent_tools/gui/animation-manifest.js.map +0 -1
  238. package/dist/hoi4_agent_tools/gui/assets.d.ts +0 -71
  239. package/dist/hoi4_agent_tools/gui/assets.d.ts.map +0 -1
  240. package/dist/hoi4_agent_tools/gui/assets.js.map +0 -1
  241. package/dist/hoi4_agent_tools/gui/dds.d.ts +0 -17
  242. package/dist/hoi4_agent_tools/gui/dds.d.ts.map +0 -1
  243. package/dist/hoi4_agent_tools/gui/dds.js.map +0 -1
  244. package/dist/hoi4_agent_tools/gui/helpers.d.ts +0 -101
  245. package/dist/hoi4_agent_tools/gui/helpers.d.ts.map +0 -1
  246. package/dist/hoi4_agent_tools/gui/helpers.js.map +0 -1
  247. package/dist/hoi4_agent_tools/gui/index.d.ts +0 -15
  248. package/dist/hoi4_agent_tools/gui/index.d.ts.map +0 -1
  249. package/dist/hoi4_agent_tools/gui/index.js.map +0 -1
  250. package/dist/hoi4_agent_tools/gui/layout.d.ts +0 -6
  251. package/dist/hoi4_agent_tools/gui/layout.d.ts.map +0 -1
  252. package/dist/hoi4_agent_tools/gui/layout.js.map +0 -1
  253. package/dist/hoi4_agent_tools/gui/limits.d.ts +0 -25
  254. package/dist/hoi4_agent_tools/gui/limits.d.ts.map +0 -1
  255. package/dist/hoi4_agent_tools/gui/limits.js.map +0 -1
  256. package/dist/hoi4_agent_tools/gui/renderer.d.ts +0 -18
  257. package/dist/hoi4_agent_tools/gui/renderer.d.ts.map +0 -1
  258. package/dist/hoi4_agent_tools/gui/renderer.js.map +0 -1
  259. package/dist/hoi4_agent_tools/gui/scenario.d.ts +0 -66
  260. package/dist/hoi4_agent_tools/gui/scenario.d.ts.map +0 -1
  261. package/dist/hoi4_agent_tools/gui/scenario.js.map +0 -1
  262. package/dist/hoi4_agent_tools/gui/source-graph.d.ts +0 -7
  263. package/dist/hoi4_agent_tools/gui/source-graph.d.ts.map +0 -1
  264. package/dist/hoi4_agent_tools/gui/source-graph.js.map +0 -1
  265. package/dist/hoi4_agent_tools/gui/source-patch.d.ts +0 -13
  266. package/dist/hoi4_agent_tools/gui/source-patch.d.ts.map +0 -1
  267. package/dist/hoi4_agent_tools/gui/source-patch.js.map +0 -1
  268. package/dist/hoi4_agent_tools/gui/studio.d.ts +0 -86
  269. package/dist/hoi4_agent_tools/gui/studio.d.ts.map +0 -1
  270. package/dist/hoi4_agent_tools/gui/studio.js.map +0 -1
  271. package/dist/hoi4_agent_tools/gui/tga.d.ts +0 -16
  272. package/dist/hoi4_agent_tools/gui/tga.d.ts.map +0 -1
  273. package/dist/hoi4_agent_tools/gui/tga.js.map +0 -1
  274. package/dist/hoi4_agent_tools/gui/types.d.ts +0 -322
  275. package/dist/hoi4_agent_tools/gui/types.d.ts.map +0 -1
  276. package/dist/hoi4_agent_tools/gui/types.js.map +0 -1
  277. package/dist/hoi4_agent_tools/gui/validators.d.ts +0 -8
  278. package/dist/hoi4_agent_tools/gui/validators.d.ts.map +0 -1
  279. package/dist/hoi4_agent_tools/gui/validators.js.map +0 -1
  280. package/dist/hoi4_agent_tools/map/bmp.d.ts +0 -62
  281. package/dist/hoi4_agent_tools/map/bmp.d.ts.map +0 -1
  282. package/dist/hoi4_agent_tools/map/bmp.js.map +0 -1
  283. package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts +0 -5
  284. package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts.map +0 -1
  285. package/dist/hoi4_agent_tools/map/diagnostic-limit.js.map +0 -1
  286. package/dist/hoi4_agent_tools/map/index.d.ts +0 -8
  287. package/dist/hoi4_agent_tools/map/index.d.ts.map +0 -1
  288. package/dist/hoi4_agent_tools/map/index.js.map +0 -1
  289. package/dist/hoi4_agent_tools/map/limits.d.ts +0 -13
  290. package/dist/hoi4_agent_tools/map/limits.d.ts.map +0 -1
  291. package/dist/hoi4_agent_tools/map/limits.js.map +0 -1
  292. package/dist/hoi4_agent_tools/map/model.d.ts +0 -269
  293. package/dist/hoi4_agent_tools/map/model.d.ts.map +0 -1
  294. package/dist/hoi4_agent_tools/map/model.js.map +0 -1
  295. package/dist/hoi4_agent_tools/map/operations.d.ts +0 -401
  296. package/dist/hoi4_agent_tools/map/operations.d.ts.map +0 -1
  297. package/dist/hoi4_agent_tools/map/operations.js.map +0 -1
  298. package/dist/hoi4_agent_tools/map/render.d.ts +0 -90
  299. package/dist/hoi4_agent_tools/map/render.d.ts.map +0 -1
  300. package/dist/hoi4_agent_tools/map/render.js.map +0 -1
  301. package/dist/hoi4_agent_tools/map/service.d.ts +0 -81
  302. package/dist/hoi4_agent_tools/map/service.d.ts.map +0 -1
  303. package/dist/hoi4_agent_tools/map/service.js.map +0 -1
  304. package/dist/hoi4_agent_tools/map/validation.d.ts +0 -23
  305. package/dist/hoi4_agent_tools/map/validation.d.ts.map +0 -1
  306. package/dist/hoi4_agent_tools/map/validation.js.map +0 -1
  307. package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts +0 -4
  308. package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts.map +0 -1
  309. package/dist/hoi4_agent_tools/mcp/prompts/register.js +0 -72
  310. package/dist/hoi4_agent_tools/mcp/prompts/register.js.map +0 -1
  311. package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts +0 -9
  312. package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts.map +0 -1
  313. package/dist/hoi4_agent_tools/mcp/registry/metadata.js +0 -10
  314. package/dist/hoi4_agent_tools/mcp/registry/metadata.js.map +0 -1
  315. package/dist/hoi4_agent_tools/mcp/resources/register.d.ts +0 -5
  316. package/dist/hoi4_agent_tools/mcp/resources/register.d.ts.map +0 -1
  317. package/dist/hoi4_agent_tools/mcp/resources/register.js.map +0 -1
  318. package/dist/hoi4_agent_tools/mcp/security/auth.d.ts +0 -24
  319. package/dist/hoi4_agent_tools/mcp/security/auth.d.ts.map +0 -1
  320. package/dist/hoi4_agent_tools/mcp/security/auth.js.map +0 -1
  321. package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts +0 -47
  322. package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts.map +0 -1
  323. package/dist/hoi4_agent_tools/mcp/server/base-tools.js.map +0 -1
  324. package/dist/hoi4_agent_tools/mcp/server/create.d.ts +0 -5
  325. package/dist/hoi4_agent_tools/mcp/server/create.d.ts.map +0 -1
  326. package/dist/hoi4_agent_tools/mcp/server/create.js.map +0 -1
  327. package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts +0 -138
  328. package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts.map +0 -1
  329. package/dist/hoi4_agent_tools/mcp/server/output-schemas.js.map +0 -1
  330. package/dist/hoi4_agent_tools/mcp/server/progress.d.ts +0 -8
  331. package/dist/hoi4_agent_tools/mcp/server/progress.d.ts.map +0 -1
  332. package/dist/hoi4_agent_tools/mcp/server/progress.js.map +0 -1
  333. package/dist/hoi4_agent_tools/mcp/server/result.d.ts +0 -232
  334. package/dist/hoi4_agent_tools/mcp/server/result.d.ts.map +0 -1
  335. package/dist/hoi4_agent_tools/mcp/server/result.js.map +0 -1
  336. package/dist/hoi4_agent_tools/mcp/server/transaction-execution.d.ts +0 -31
  337. package/dist/hoi4_agent_tools/mcp/server/transaction-execution.d.ts.map +0 -1
  338. package/dist/hoi4_agent_tools/mcp/server/transaction-execution.js.map +0 -1
  339. package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts +0 -5
  340. package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts.map +0 -1
  341. package/dist/hoi4_agent_tools/mcp/tools/focus.js.map +0 -1
  342. package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts +0 -117
  343. package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts.map +0 -1
  344. package/dist/hoi4_agent_tools/mcp/tools/gui.js.map +0 -1
  345. package/dist/hoi4_agent_tools/mcp/tools/map.d.ts +0 -5
  346. package/dist/hoi4_agent_tools/mcp/tools/map.d.ts.map +0 -1
  347. package/dist/hoi4_agent_tools/mcp/tools/map.js.map +0 -1
  348. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts +0 -58
  349. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts.map +0 -1
  350. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js.map +0 -1
  351. package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts +0 -26
  352. package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts.map +0 -1
  353. package/dist/hoi4_agent_tools/mcp/transports/event-store.js.map +0 -1
  354. package/dist/hoi4_agent_tools/mcp/transports/http.d.ts +0 -28
  355. package/dist/hoi4_agent_tools/mcp/transports/http.d.ts.map +0 -1
  356. package/dist/hoi4_agent_tools/mcp/transports/http.js.map +0 -1
  357. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts +0 -15
  358. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts.map +0 -1
  359. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js.map +0 -1
  360. package/dist/hoi4_agent_tools/runtime.d.ts +0 -4
  361. package/dist/hoi4_agent_tools/runtime.d.ts.map +0 -1
  362. package/dist/hoi4_agent_tools/runtime.js.map +0 -1
  363. package/dist/hoi4_agent_tools/schemas/common.d.ts +0 -74
  364. package/dist/hoi4_agent_tools/schemas/common.d.ts.map +0 -1
  365. package/dist/hoi4_agent_tools/schemas/common.js.map +0 -1
  366. package/dist/hoi4_agent_tools/schemas/focus.d.ts +0 -784
  367. package/dist/hoi4_agent_tools/schemas/focus.d.ts.map +0 -1
  368. package/dist/hoi4_agent_tools/schemas/focus.js.map +0 -1
  369. package/dist/hoi4_agent_tools/schemas/index.d.ts +0 -5
  370. package/dist/hoi4_agent_tools/schemas/index.d.ts.map +0 -1
  371. package/dist/hoi4_agent_tools/schemas/index.js +0 -5
  372. package/dist/hoi4_agent_tools/schemas/index.js.map +0 -1
  373. package/dist/hoi4_agent_tools/schemas/map.d.ts +0 -654
  374. package/dist/hoi4_agent_tools/schemas/map.d.ts.map +0 -1
  375. package/dist/hoi4_agent_tools/schemas/map.js.map +0 -1
  376. package/dist/hoi4_agent_tools/schemas/transaction.d.ts +0 -259
  377. package/dist/hoi4_agent_tools/schemas/transaction.d.ts.map +0 -1
  378. package/dist/hoi4_agent_tools/schemas/transaction.js.map +0 -1
  379. package/dist/hoi4_agent_tools/version.d.ts +0 -6
  380. package/dist/hoi4_agent_tools/version.d.ts.map +0 -1
  381. package/dist/hoi4_agent_tools/version.js.map +0 -1
  382. package/dist/index.d.ts +0 -3
  383. package/dist/index.d.ts.map +0 -1
  384. package/dist/index.js +0 -3
  385. package/dist/index.js.map +0 -1
  386. package/docs/adr/0001-runtime-and-language.md +0 -16
  387. package/docs/adr/0002-lossless-source-model.md +0 -18
  388. package/docs/adr/0003-image-and-font-codecs.md +0 -18
  389. package/docs/adr/0004-focus-layout.md +0 -16
  390. package/docs/adr/0005-offline-rendering.md +0 -18
  391. package/docs/adr/0006-mcp-sdk-and-protocol.md +0 -16
  392. package/docs/adr/0007-storage-and-transactions.md +0 -24
  393. package/docs/adr/0008-test-strategy.md +0 -18
  394. package/docs/adr/0009-packaging-and-registry.md +0 -16
  395. package/docs/adr/0010-unsupported-and-refusal-policy.md +0 -18
  396. package/docs/adr/0011-http-security.md +0 -16
  397. package/docs/adr/0012-autonomous-rewrites.md +0 -55
  398. package/docs/adr/README.md +0 -14
  399. package/docs/agent-integration.md +0 -146
  400. package/docs/architecture.md +0 -76
  401. package/docs/artifacts.md +0 -136
  402. package/docs/compatibility.md +0 -33
  403. package/docs/completion-report.md +0 -122
  404. package/docs/configuration.md +0 -305
  405. package/docs/focus-workflow.md +0 -197
  406. package/docs/gui-workflow.md +0 -125
  407. package/docs/limitations.md +0 -32
  408. package/docs/map-workflow.md +0 -95
  409. package/docs/performance.md +0 -117
  410. package/docs/release.md +0 -222
  411. package/docs/research/mcp-2026-07-10.md +0 -52
  412. package/docs/research/source-ledger.md +0 -68
  413. package/docs/security.md +0 -145
  414. package/docs/self-hosting.md +0 -170
  415. package/docs/testing.md +0 -43
  416. package/docs/third-party-notices.md +0 -11
  417. package/docs/transactions.md +0 -180
  418. package/docs/troubleshooting.md +0 -54
  419. package/schemas/configuration.schema.json +0 -795
  420. package/schemas/continuous-focus-palette.schema.json +0 -325
  421. package/schemas/focus-plan.schema.json +0 -927
  422. package/schemas/focus-planning-sidecar.schema.json +0 -379
  423. package/schemas/gui-animation-source.schema.json +0 -176
  424. package/schemas/gui-helper.schema.json +0 -301
  425. package/schemas/gui-scenario.schema.json +0 -298
  426. package/schemas/map-operation.schema.json +0 -2284
  427. package/schemas/operation-result.schema.json +0 -344
  428. package/schemas/transaction-manifest.schema.json +0 -685
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod/v4';
2
+ import { compareCodeUnits } from '../../core/canonical.js';
3
+ import { emptyServiceResult } from '../../core/result.js';
4
+ import { nonNegativeIntegerSchema } from '../server/output-schemas.js';
5
+ import { errorResult, strictOperationResultSchema, toolResult } from '../server/result.js';
6
+ const modsOutputSchema = strictOperationResultSchema(z
7
+ .object({
8
+ count: nonNegativeIntegerSchema,
9
+ mods: z
10
+ .array(z
11
+ .object({
12
+ id: z.string().min(1).max(64),
13
+ name: z.string().min(1).max(256),
14
+ writable: z.boolean(),
15
+ })
16
+ .strict())
17
+ .max(1_000),
18
+ })
19
+ .strict());
20
+ export function registerModsTool(server, engine, context) {
21
+ server.registerTool('hoi4.mods', {
22
+ title: 'List available HOI4 mods',
23
+ description: 'List the configured HOI4 mods available for focus-tree, GUI, and map inspection, rendering, creation, and cleanup.',
24
+ inputSchema: z.object({ workspaceId: z.string().min(1).max(64).optional() }).strict(),
25
+ outputSchema: modsOutputSchema,
26
+ annotations: {
27
+ readOnlyHint: true,
28
+ destructiveHint: false,
29
+ idempotentHint: true,
30
+ openWorldHint: false,
31
+ },
32
+ }, ({ workspaceId }) => {
33
+ try {
34
+ const mods = (workspaceId === undefined
35
+ ? engine.list(context.principal)
36
+ : [engine.status(workspaceId, context.principal)])
37
+ .filter(({ kind }) => kind === 'mod')
38
+ .sort((left, right) => compareCodeUnits(left.id, right.id));
39
+ const result = emptyServiceResult(workspaceId ?? '', {
40
+ count: mods.length,
41
+ mods: mods.map(({ id, name, writable }) => ({
42
+ id,
43
+ name,
44
+ writable,
45
+ })),
46
+ });
47
+ result.code = 'MODS_LISTED';
48
+ return toolResult(result);
49
+ }
50
+ catch (error) {
51
+ return errorResult(error, workspaceId ?? '');
52
+ }
53
+ });
54
+ }
@@ -178,4 +178,3 @@ export class BoundedStdioServerTransport {
178
178
  });
179
179
  }
180
180
  }
181
- //# sourceMappingURL=bounded-stdio.js.map
@@ -83,4 +83,3 @@ export class SharedEventStoreBudget {
83
83
  this.#bytes = Math.max(0, this.#bytes - bytes);
84
84
  }
85
85
  }
86
- //# sourceMappingURL=event-store.js.map
@@ -10,17 +10,7 @@ import { MCP_PROTOCOL_VERSION } from '../../version.js';
10
10
  import { authenticate, bearerChallenge, HttpAuthError, protectedResourceMetadata, validateHttpDeployment, } from '../security/auth.js';
11
11
  import { BoundedEventStore, SharedEventStoreBudget } from './event-store.js';
12
12
  import { FinalProtocolTransport } from './protocol-gate.js';
13
- const WRITE_SCOPED_TOOLS = new Set([
14
- 'hoi4.project_register',
15
- 'hoi4.focus_plan_changes',
16
- 'hoi4.focus_rewrite',
17
- 'hoi4.gui_plan_changes',
18
- 'hoi4.gui_rewrite',
19
- 'hoi4.map_plan',
20
- 'hoi4.map_rewrite',
21
- 'hoi4.transaction_apply',
22
- 'hoi4.transaction_rollback',
23
- ]);
13
+ const WRITE_SCOPED_TOOLS = new Set(['hoi4.focus_rewrite', 'hoi4.gui_rewrite', 'hoi4.map_rewrite']);
24
14
  const MCP_ALLOWED_METHODS = 'GET, POST, DELETE';
25
15
  const SINGLETON_SECURITY_HEADERS = new Set([
26
16
  'authorization',
@@ -744,4 +734,3 @@ export async function startHttpServer(engine, configuration, serverFactory) {
744
734
  },
745
735
  };
746
736
  }
747
- //# sourceMappingURL=http.js.map
@@ -48,4 +48,3 @@ export class FinalProtocolTransport {
48
48
  this.inner.setProtocolVersion?.(version);
49
49
  }
50
50
  }
51
- //# sourceMappingURL=protocol-gate.js.map
@@ -4,6 +4,10 @@ import { loadConfiguration } from './core/configuration.js';
4
4
  import { CoreEngine } from './core/engine.js';
5
5
  import { ServiceError } from './core/result.js';
6
6
  import { WorkspaceResolver } from './core/workspace.js';
7
+ export function defaultConfigurationPath() {
8
+ const configRoot = process.env.APPDATA ?? process.env.XDG_CONFIG_HOME ?? path.join(homedir(), '.config');
9
+ return path.join(configRoot, 'hoi4-agent-tools', 'config.json');
10
+ }
7
11
  export function configurationPath(arguments_ = process.argv.slice(2)) {
8
12
  const index = arguments_.indexOf('--config');
9
13
  if (index >= 0) {
@@ -15,7 +19,7 @@ export function configurationPath(arguments_ = process.argv.slice(2)) {
15
19
  }
16
20
  if (process.env.HOI4_AGENT_CONFIG !== undefined)
17
21
  return path.resolve(process.env.HOI4_AGENT_CONFIG);
18
- return path.join(homedir(), '.config', 'hoi4-agent-tools', 'config.json');
22
+ return defaultConfigurationPath();
19
23
  }
20
24
  export async function createEngine(configPath = configurationPath()) {
21
25
  const configuration = await loadConfiguration(configPath);
@@ -24,4 +28,3 @@ export async function createEngine(configPath = configurationPath()) {
24
28
  await engine.initialize();
25
29
  return engine;
26
30
  }
27
- //# sourceMappingURL=runtime.js.map
@@ -37,7 +37,7 @@ export const diagnosticSchema = z
37
37
  'design',
38
38
  'rendering',
39
39
  'security',
40
- 'transaction',
40
+ 'validation',
41
41
  'map',
42
42
  'configuration',
43
43
  ]),
@@ -48,4 +48,3 @@ export const diagnosticSchema = z
48
48
  details: z.record(z.string().max(256), z.unknown()).optional(),
49
49
  })
50
50
  .strict();
51
- //# sourceMappingURL=common.js.map
@@ -341,4 +341,3 @@ export const focusLayoutSchema = z
341
341
  layoutHash: z.string().regex(/^[a-f0-9]{64}$/u),
342
342
  })
343
343
  .strict();
344
- //# sourceMappingURL=focus.js.map
@@ -567,4 +567,3 @@ export const mapAllocationRequestSchema = z.discriminatedUnion('kind', [
567
567
  })
568
568
  .strict(),
569
569
  ]);
570
- //# sourceMappingURL=map.js.map
@@ -101,4 +101,3 @@ export const transactionManifestSchema = z
101
101
  failure: z.object({ code: identifierSchema, message: summarySchema }).strict().optional(),
102
102
  })
103
103
  .strict();
104
- //# sourceMappingURL=transaction.js.map
@@ -1,7 +1,6 @@
1
1
  import { LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/sdk/types.js';
2
2
  export const PACKAGE_NAME = 'hoi4-agent-tools';
3
- export const PACKAGE_VERSION = '0.2.0';
3
+ export const PACKAGE_VERSION = '1.0.0';
4
4
  export const MCP_PROTOCOL_VERSION = LATEST_PROTOCOL_VERSION;
5
5
  export const CONFIG_VERSION = 1;
6
6
  export const TRANSACTION_VERSION = 1;
7
- //# sourceMappingURL=version.js.map
package/docs/README.md CHANGED
@@ -1,23 +1,10 @@
1
1
  # Documentation
2
2
 
3
- - [Architecture and shared engine](architecture.md)
4
- - [Architecture decisions](adr/README.md)
5
- - [Configuration and workspace registration](configuration.md)
6
- - [Agent integration and autonomous tool selection](agent-integration.md)
7
- - [Security and threat model](security.md)
8
- - [Autonomous rewrites, transactions, and recovery](transactions.md)
9
- - [Focus Tree Workbench](focus-workflow.md)
10
- - [Scripted GUI Studio](gui-workflow.md)
11
- - [Agent Nudger map workflow](map-workflow.md)
12
- - [Artifact resources](artifacts.md)
13
- - [Self-hosted Streamable HTTP](self-hosting.md)
14
- - [Testing, fixtures, and local integration](testing.md)
15
- - [Performance benchmark](performance.md)
16
- - [Compatibility and versioning](compatibility.md)
17
- - [Known limitations](limitations.md)
18
- - [Third-party notices](third-party-notices.md)
19
- - [Troubleshooting](troubleshooting.md)
20
- - [0.1.7 completion report](completion-report.md)
21
- - [Release and MCP Registry publication](release.md)
22
- - [HOI4 research ledger](research/source-ledger.md)
23
- - [MCP research review](research/mcp-2026-07-10.md)
3
+ - [Setup](setup.md): install the server, configure HOI4 paths, and connect an MCP client.
4
+ - [Focus trees](focus.md): inspect, create, render, and clean national or continuous focus content.
5
+ - [Scripted GUIs](gui.md): inspect linked UI source, render states, and create or repair GUIs.
6
+ - [Maps](map.md): inspect and edit provinces, states, regions, adjacency, supply, and railways.
7
+ - [HTTP](http.md): run the MCP server for shared or remote access.
8
+ - [Development](development.md): build, test, and contribute.
9
+
10
+ For vulnerability reporting, see the repository [Security Policy](../SECURITY.md).
@@ -0,0 +1,22 @@
1
+ # Development
2
+
3
+ Install dependencies and run the complete project check:
4
+
5
+ ```bash
6
+ npm ci
7
+ npm run check
8
+ ```
9
+
10
+ `npm run check` runs formatting, type checks, tests, fixture checks, schema generation checks, build checks, and package validation. Use narrower commands during iteration:
11
+
12
+ ```bash
13
+ npm run test
14
+ npm run test:coverage
15
+ npm run fixtures:check
16
+ npm run build
17
+ npm run inspector
18
+ ```
19
+
20
+ Keep changes focused and include tests for behavior changes. CI fixtures must be synthetic and project-owned; never commit installed-game or third-party-mod content. Public tool or schema changes require compatibility review and a versioned release.
21
+
22
+ See the package [Security Policy](../SECURITY.md) for private vulnerability reporting.
package/docs/focus.md ADDED
@@ -0,0 +1,40 @@
1
+ # Focus trees
2
+
3
+ Use `hoi4.focus_inspect`, `hoi4.focus_render`, and `hoi4.focus_rewrite` for national focus trees and continuous focus palettes. Start with `hoi4.mods` when the mod ID is not known.
4
+
5
+ ## Create a tree
6
+
7
+ A complete plan should include:
8
+
9
+ - tree ID and country assignment;
10
+ - branch and lane groups;
11
+ - exact prerequisites and mutual exclusions;
12
+ - availability, visibility, bypass, and route locks;
13
+ - rewards and links to decisions, events, ideas, characters, or scripted helpers;
14
+ - focus positions, convergence points, and shared support branches;
15
+ - titles, descriptions, icons, filters, and AI behavior.
16
+
17
+ For a missing target, call `hoi4.focus_rewrite` with `createIfMissing: true`. Review the proposed and final artifacts returned by the rewrite, then inspect and render the result. Do not call a tree complete with placeholder rewards, missing localisation, missing icons, or absent AI choices.
18
+
19
+ ## Clean an existing tree
20
+
21
+ 1. Inspect the tree and read its diagnostics.
22
+ 2. Render the current layout before changing coordinates.
23
+ 3. Keep prerequisites, mutual exclusions, availability, bypasses, rewards, icons, localisation, and AI behavior unless the task explicitly changes them.
24
+ 4. Group branches and lanes by their gameplay role. Existing coordinates remain fixed until movable focuses are marked for automatic placement; keep only deliberate anchors fixed.
25
+ 5. Submit the complete plan to `hoi4.focus_rewrite` and review its proposed layout for overlaps, connector crossings, branch spacing, and route readability.
26
+ 6. Inspect and render the result.
27
+
28
+ A cleanup should not change gameplay relationships to improve the picture. One `prerequisite` block containing several focus IDs is an OR group; several prerequisite blocks are AND requirements.
29
+
30
+ ## Layout metadata and unsupported script
31
+
32
+ Branch names, lane assignments, working labels, and other planning-only data may be stored in a `.focus-plan.json` file beside the focus source. HOI4 does not load that file.
33
+
34
+ If malformed or unsupported script makes a requested change ambiguous, the rewrite stops and explains the blocker instead of guessing.
35
+
36
+ ## What inspection checks
37
+
38
+ Inspection and rendering can report missing references, invalid prerequisite structure, duplicate or overlapping positions, route conflicts, missing localisation or sprites, weak terminal branches, repeated rewards, and missing AI metadata. Renders are offline review artifacts, not game screenshots.
39
+
40
+ National trees with 200 or more focuses render review PNGs at half scale by default so large agent workflows stay responsive. Pass an explicit `reviewScale` from `0.25` through `1` when a different raster size is needed; HTML, SVG, JSON, layout, and diagnostics remain complete.
package/docs/gui.md ADDED
@@ -0,0 +1,37 @@
1
+ # Scripted GUIs
2
+
3
+ Use `hoi4.gui_inspect`, `hoi4.gui_render`, and `hoi4.gui_rewrite` for `.gui`, `.gfx`, `common/scripted_guis`, localisation, sprites, fonts, and linked decision entry points. Start with `hoi4.mods` when the mod ID is not known.
4
+
5
+ ## Create a GUI
6
+
7
+ `hoi4.gui_rewrite` can work from supported source, targeted patches, or structured helpers. Source and helper rewrites may include one bounded text package: the main `.gui` plus additional interface `.gui`/`.gfx`, configured GFX `.gfx`, `common/scripted_guis/*.txt`, and localisation `.yml` files. The package is path-checked, parsed, linked, rendered, validated, and applied together in one rewrite. Existing text encodings are retained, while localisation is always written as UTF-8 with BOM.
8
+
9
+ A package may contain at most 32 text files and 16 MiB of encoded source in total. Paths are compared portably, so aliases that differ only by letter case are rejected.
10
+
11
+ Helpers cover common layouts such as anchors, rows, columns, stacks, grids, cards, tabs, scroll lists, meters, status panels, modals, and overlays. They compile to ordinary HOI4 GUI source; the finished mod has no runtime dependency on this server. Binary textures, fonts, and other art are referenced from `.gfx`/GUI source and must already exist in the workspace; the rewrite input does not upload binary art.
12
+
13
+ Before writing:
14
+
15
+ - define the root window, parent/context, element IDs, and dimensions;
16
+ - register sprites, textures, fonts, and localisation used on screen;
17
+ - provide button triggers, effects, scripted-GUI properties, dynamic-list wiring, and AI behavior where required;
18
+ - render the important states and resolutions;
19
+ - keep click regions aligned with visible controls.
20
+
21
+ Rewrite once, then inspect and render the result.
22
+
23
+ ## Clean an existing GUI
24
+
25
+ 1. Inspect the root window and its linked GUI, GFX, scripted-GUI, and localisation source.
26
+ 2. Render the normal state and the states relevant to the task, such as hover, selected, disabled, warning, empty list, full list, minimum value, maximum value, or long text.
27
+ 3. Check common resolutions and UI scales when positioning or clipping can change.
28
+ 4. Fix the existing mod-owned file with targeted patches, a complete supported source replacement, or a structured helper replacement.
29
+ 5. Rewrite once, then inspect and render the result.
30
+
31
+ Inspection checks missing assets and localisation, invalid sizes, overlap, clipping, overflow, conflicting click regions, invisible blockers, broken parents or contexts, list-row cuts, state conflicts, trigger/effect gaps, and resolution drift.
32
+
33
+ ## Offline preview limits
34
+
35
+ The renderer does not run the game engine. Each render includes a fidelity report that separates fields it models from fields it approximates, ignores, cannot resolve, or does not support. Treat that report as part of the review.
36
+
37
+ A rewrite stops if malformed or unsupported GUI script makes the requested change ambiguous. Runtime animation, masking, tiling, hardcoded controls, and dynamic values may require exact game precedents even when a useful offline preview is available.
package/docs/http.md ADDED
@@ -0,0 +1,53 @@
1
+ # HTTP
2
+
3
+ Local MCP clients should use the default stdio registration. Use `hoi4-agent-tools-http` only when the server must be reached by another process or machine.
4
+
5
+ The HTTP server exposes the MCP endpoint at `/mcp`.
6
+
7
+ JSON request bodies default to and are capped at 64 MiB. This leaves transport-envelope headroom for the bounded 16 MiB GUI text package and a maximum canonical map mask while the two-request concurrency ceiling keeps aggregate body bytes at or below 128 MiB.
8
+
9
+ Resumable event history defaults to 2 MiB per session within the 16 MiB global store, enough to retain one framed 1 MiB artifact-resource chunk.
10
+
11
+ ## Loopback
12
+
13
+ Keep the listener on `127.0.0.1`, configure a long random bearer token through an environment variable named by the HTTP config, and allow only the client origins you use. Do not place tokens in the config file or command line.
14
+
15
+ Add an HTTP section to a config created by setup:
16
+
17
+ ```json
18
+ {
19
+ "version": 1,
20
+ "serverStateRoot": "/var/lib/hoi4-agent-tools/state",
21
+ "modRoots": ["/projects/hoi4-mods"],
22
+ "workspaceStorageRoot": "/var/lib/hoi4-agent-tools/workspaces",
23
+ "http": {
24
+ "host": "127.0.0.1",
25
+ "port": 3210,
26
+ "allowedOrigins": ["https://agent.example"],
27
+ "tokens": [
28
+ {
29
+ "principal": "local-agent",
30
+ "tokenEnv": "HOI4_AGENT_HTTP_TOKEN",
31
+ "allowDiscoveredMods": true
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ ```
37
+
38
+ Set `HOI4_AGENT_HTTP_TOKEN` to a random value of at least 32 characters, then run `hoi4-agent-tools-http --config PATH`. `allowDiscoveredMods` grants that principal only the mod IDs created by discovery beneath `modRoots`; it never grants unrelated explicit workspaces. For narrower remote access, define the permitted mods as explicit `workspaces`, list those IDs in `workspaceIds`, and omit `allowDiscoveredMods`.
39
+
40
+ ## Shared or remote access
41
+
42
+ A non-loopback deployment needs:
43
+
44
+ - HTTPS at a trusted reverse proxy;
45
+ - OAuth/OIDC token validation;
46
+ - an exact origin allowlist;
47
+ - explicit user-to-mod grants;
48
+ - narrow mounted mod and game paths;
49
+ - request, connection, and session limits.
50
+
51
+ Do not expose a developer home directory or a whole game library. The installed game and dependencies should be mounted read-only. Use separate server instances for teams that should not share operating-system access.
52
+
53
+ The server never launches Hearts of Iron IV and does not need a desktop or Steam session. See the repository [Security Policy](../SECURITY.md) before exposing HTTP beyond loopback.
package/docs/map.md ADDED
@@ -0,0 +1,39 @@
1
+ # Maps
2
+
3
+ Use `hoi4.map_inspect`, `hoi4.map_render`, and `hoi4.map_rewrite` for provinces, states, strategic regions, adjacency, supply nodes, railways, positions, ownership, cores, claims, resources, buildings, and localisation. Start with `hoi4.mods` when the mod ID is not known.
4
+
5
+ ## Create or reshape map content
6
+
7
+ Map changes may add, split, merge, remove, or redefine provinces and states; update strategic regions; edit normal or special adjacency; and update supply, railway, building, unit, or weather positions.
8
+
9
+ Geometry must be exact. Use existing province IDs, integer polygon boundaries with the required fill rule, a validated raster mask, or explicit pixels. Natural-language geography can guide an agent, but it is not rewrite geometry.
10
+
11
+ Pass up to 32 `provinceIds` to `hoi4.map_inspect` to receive a linked exact-geometry JSON artifact. It records the active map dimensions, unknown IDs, and each known province as maximal `[y, startX, endXExclusive]` runs sorted in top-left raster order. Derive a bounded pixel subset or mask from those runs before calling `hoi4.map_rewrite`; row runs are inspection evidence, not a rewrite geometry kind.
12
+
13
+ For state or province moves, splits, merges, removals, or type changes, explicitly state what happens to applicable data:
14
+
15
+ - state membership and strategic region membership;
16
+ - manpower, resources, buildings, and victory points;
17
+ - owner, controller, cores, and claims;
18
+ - ports, supply nodes, and railways;
19
+ - building, unit, weather, and entity positions;
20
+ - normal and special adjacency;
21
+ - state localisation.
22
+
23
+ Build one ordered list of exact operations, call `hoi4.map_rewrite`, and review its before, proposed, and changed-area evidence. Then inspect and render the result.
24
+
25
+ ## Inspect and clean a map
26
+
27
+ 1. Inspect the affected map area and read reference diagnostics.
28
+ 2. Render a baseline with the relevant province, state, region, terrain, coastline, supply, railway, ownership, or building overlays.
29
+ 3. Build one ordered list of exact repair operations.
30
+ 4. Supply every required geometry and data-movement choice.
31
+ 5. Rewrite, then inspect and render the result.
32
+
33
+ Common cleanup work includes duplicate IDs or colors, bitmap/definition mismatches, invalid state or region membership, broken adjacency, missing localisation, disconnected province geometry, invalid ports or victory points, and stale supply or railway references.
34
+
35
+ The map tools do not infer a corridor, choose a replacement province, redistribute state data, reconnect a railway, or move a port without an explicit instruction. ID and color allocation checks the configured game, dependencies, and mod before choosing a value.
36
+
37
+ ## Review boundary
38
+
39
+ Map renders are offline evidence. Final inspection checks that references remain valid and changes stay within the declared geometry. Unsupported or ambiguous changes stop with a blocker instead of applying a partial substitute.
package/docs/setup.md ADDED
@@ -0,0 +1,39 @@
1
+ # Setup
2
+
3
+ HOI4 Agent Tools requires Node.js 22 or 24.
4
+
5
+ ## Install and initialize
6
+
7
+ ```bash
8
+ npm install --global hoi4-agent-tools@1.0.0
9
+ hoi4-agent-tools-setup --init
10
+ ```
11
+
12
+ The setup command discovers standard HOI4 game and mod locations, creates a separate storage folder for generated workspace data, and writes the default per-user config. Each configured mod root is a parent folder whose immediate child directories are individual mods. Every discovered mod is writable through the three rewrite tools; no per-mod write switch or approval step is required. The installed game remains reference-only.
13
+
14
+ After connecting the MCP server, call `hoi4.mods` to confirm which mods are available.
15
+
16
+ ## Override discovered paths
17
+
18
+ Use explicit paths when discovery is incomplete or when you want to expose more than one mod root:
19
+
20
+ ```bash
21
+ hoi4-agent-tools-setup --init --mod-root /projects/hoi4-mods --mod-root /workshop/hoi4-mods --game-root "/games/Hearts of Iron IV" --workspace-storage-root /var/lib/hoi4-agent-tools
22
+ ```
23
+
24
+ - `--mod-root PATH` adds a parent folder containing mods. Repeat it for additional locations.
25
+ - `--game-root PATH` selects the installed game folder used as a read-only reference.
26
+ - `--workspace-storage-root PATH` selects where indexes, renders, and other generated workspace files are stored.
27
+ - `--config PATH` writes or reads a config at a custom path instead of the default per-user location.
28
+
29
+ The corresponding config fields are `modRoots`, `gameRoot`, and `workspaceStorageRoot`.
30
+
31
+ Linked directory entries are not followed. If a mod folder is a symlink or junction, configure the real parent directory as another `--mod-root`.
32
+
33
+ ## MCP client registration
34
+
35
+ ```bash
36
+ hoi4-agent-tools-setup --print-client-config
37
+ ```
38
+
39
+ Use the printed `globalInstall` or `codexTomlGlobal` entry. It is platform-correct and uses the default config without an environment variable. For a custom config, add `--config PATH` when printing the registration.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "hoi4-agent-tools",
3
3
  "mcpName": "io.github.klimPaskov/hoi4-agent-tools",
4
- "version": "0.2.0",
5
- "description": "Source-preserving HOI4 workbench with workspace-authorized autonomous rewrites for coding agents",
4
+ "version": "1.0.0",
5
+ "description": "MCP tools for coding agents to create and clean HOI4 focus trees, scripted GUIs, and maps",
6
6
  "type": "module",
7
7
  "license": "Apache-2.0",
8
8
  "author": "HOI4 Agent Tools contributors",
@@ -29,27 +29,26 @@
29
29
  },
30
30
  "files": [
31
31
  "dist/",
32
- "docs/",
33
- "schemas/",
32
+ "docs/README.md",
33
+ "docs/setup.md",
34
+ "docs/focus.md",
35
+ "docs/gui.md",
36
+ "docs/map.md",
37
+ "docs/http.md",
38
+ "docs/development.md",
34
39
  "server.json",
35
40
  "README.md",
36
41
  "CHANGELOG.md",
37
42
  "LICENSE",
38
43
  "SECURITY.md"
39
44
  ],
40
- "exports": {
41
- ".": {
42
- "types": "./dist/index.d.ts",
43
- "import": "./dist/index.js"
44
- },
45
- "./schemas/*": "./schemas/*"
46
- },
47
45
  "bin": {
48
46
  "hoi4-agent-tools": "./dist/bin/stdio.js",
49
47
  "hoi4-agent-tools-http": "./dist/bin/http.js",
50
48
  "hoi4-agent-tools-setup": "./dist/bin/setup.js"
51
49
  },
52
50
  "scripts": {
51
+ "prebuild": "node --eval \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
53
52
  "build": "tsc -p tsconfig.build.json",
54
53
  "typecheck": "tsc -p tsconfig.json --noEmit",
55
54
  "lint": "eslint .",
package/server.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.klimPaskov/hoi4-agent-tools",
4
4
  "title": "HOI4 Agent Tools",
5
- "description": "Agent-first HOI4 focus, scripted GUI, and map tools with workspace-authorized autonomous rewrites.",
6
- "version": "0.2.0",
5
+ "description": "Create and clean HOI4 focus trees, scripted GUIs, and maps with coding agents.",
6
+ "version": "1.0.0",
7
7
  "repository": {
8
8
  "url": "https://github.com/klimPaskov/hoi4-agent-tools",
9
9
  "source": "github"
@@ -13,16 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "hoi4-agent-tools",
16
- "version": "0.2.0",
17
- "environmentVariables": [
18
- {
19
- "name": "HOI4_AGENT_CONFIG",
20
- "description": "Absolute path to a persistent allowlisted HOI4 Agent Tools server configuration file.",
21
- "format": "filepath",
22
- "isRequired": true,
23
- "placeholder": "/absolute/path/to/config.json"
24
- }
25
- ],
16
+ "version": "1.0.0",
26
17
  "transport": {
27
18
  "type": "stdio"
28
19
  }
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=http.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/bin/http.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/bin/http.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC;IACxF,MAAM,QAAQ,GAAG,KAAK,IAAmB,EAAE;QACzC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC;AACjD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,aAAa,CAAC;QACf,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,gBAAgB;QACvB,IAAI,EACF,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK;YAC5D,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;YACpB,CAAC,CAAC,gBAAgB;QACtB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAChE,CAAC,IAAI,CACP,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/bin/setup.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/bin/setup.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2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AK,CAAC,sCAAsC,CAAC,CAAC;AAC1D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,GAAG,aAAa,CAAC;QACf,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAChE,CAAC,IAAI,CACP,CAAC;IACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=stdio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/bin/stdio.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/bin/stdio.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,KAAK,EAAQ,EAAE;QACtC,MAAM,eAAe,GACnB,KAAK,YAAY,oBAAoB,IAAI,KAAK,Y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