hoi4-agent-tools 0.0.0-bootstrap.1 → 0.1.2

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 (416) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/LICENSE +201 -0
  3. package/README.md +140 -2
  4. package/SECURITY.md +17 -0
  5. package/dist/bin/http.d.ts +3 -0
  6. package/dist/bin/http.d.ts.map +1 -0
  7. package/dist/bin/http.js +27 -0
  8. package/dist/bin/http.js.map +1 -0
  9. package/dist/bin/setup.d.ts +3 -0
  10. package/dist/bin/setup.d.ts.map +1 -0
  11. package/dist/bin/setup.js +188 -0
  12. package/dist/bin/setup.js.map +1 -0
  13. package/dist/bin/stdio.d.ts +3 -0
  14. package/dist/bin/stdio.d.ts.map +1 -0
  15. package/dist/bin/stdio.js +36 -0
  16. package/dist/bin/stdio.js.map +1 -0
  17. package/dist/hoi4_agent_tools/core/artifacts.d.ts +117 -0
  18. package/dist/hoi4_agent_tools/core/artifacts.d.ts.map +1 -0
  19. package/dist/hoi4_agent_tools/core/artifacts.js +1047 -0
  20. package/dist/hoi4_agent_tools/core/artifacts.js.map +1 -0
  21. package/dist/hoi4_agent_tools/core/canonical.d.ts +13 -0
  22. package/dist/hoi4_agent_tools/core/canonical.d.ts.map +1 -0
  23. package/dist/hoi4_agent_tools/core/canonical.js +41 -0
  24. package/dist/hoi4_agent_tools/core/canonical.js.map +1 -0
  25. package/dist/hoi4_agent_tools/core/configuration.d.ts +137 -0
  26. package/dist/hoi4_agent_tools/core/configuration.d.ts.map +1 -0
  27. package/dist/hoi4_agent_tools/core/configuration.js +383 -0
  28. package/dist/hoi4_agent_tools/core/configuration.js.map +1 -0
  29. package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts +18 -0
  30. package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts.map +1 -0
  31. package/dist/hoi4_agent_tools/core/diagnostic-collector.js +45 -0
  32. package/dist/hoi4_agent_tools/core/diagnostic-collector.js.map +1 -0
  33. package/dist/hoi4_agent_tools/core/diagnostics.d.ts +26 -0
  34. package/dist/hoi4_agent_tools/core/diagnostics.d.ts.map +1 -0
  35. package/dist/hoi4_agent_tools/core/diagnostics.js +25 -0
  36. package/dist/hoi4_agent_tools/core/diagnostics.js.map +1 -0
  37. package/dist/hoi4_agent_tools/core/diff.d.ts +22 -0
  38. package/dist/hoi4_agent_tools/core/diff.d.ts.map +1 -0
  39. package/dist/hoi4_agent_tools/core/diff.js +93 -0
  40. package/dist/hoi4_agent_tools/core/diff.js.map +1 -0
  41. package/dist/hoi4_agent_tools/core/engine.d.ts +56 -0
  42. package/dist/hoi4_agent_tools/core/engine.d.ts.map +1 -0
  43. package/dist/hoi4_agent_tools/core/engine.js +319 -0
  44. package/dist/hoi4_agent_tools/core/engine.js.map +1 -0
  45. package/dist/hoi4_agent_tools/core/image-diff.d.ts +14 -0
  46. package/dist/hoi4_agent_tools/core/image-diff.d.ts.map +1 -0
  47. package/dist/hoi4_agent_tools/core/image-diff.js +121 -0
  48. package/dist/hoi4_agent_tools/core/image-diff.js.map +1 -0
  49. package/dist/hoi4_agent_tools/core/index.d.ts +64 -0
  50. package/dist/hoi4_agent_tools/core/index.d.ts.map +1 -0
  51. package/dist/hoi4_agent_tools/core/index.js +963 -0
  52. package/dist/hoi4_agent_tools/core/index.js.map +1 -0
  53. package/dist/hoi4_agent_tools/core/index.public.d.ts +16 -0
  54. package/dist/hoi4_agent_tools/core/index.public.d.ts.map +1 -0
  55. package/dist/hoi4_agent_tools/core/index.public.js +16 -0
  56. package/dist/hoi4_agent_tools/core/index.public.js.map +1 -0
  57. package/dist/hoi4_agent_tools/core/render-budget.d.ts +51 -0
  58. package/dist/hoi4_agent_tools/core/render-budget.d.ts.map +1 -0
  59. package/dist/hoi4_agent_tools/core/render-budget.js +109 -0
  60. package/dist/hoi4_agent_tools/core/render-budget.js.map +1 -0
  61. package/dist/hoi4_agent_tools/core/result.d.ts +45 -0
  62. package/dist/hoi4_agent_tools/core/result.d.ts.map +1 -0
  63. package/dist/hoi4_agent_tools/core/result.js +26 -0
  64. package/dist/hoi4_agent_tools/core/result.js.map +1 -0
  65. package/dist/hoi4_agent_tools/core/scanner.d.ts +28 -0
  66. package/dist/hoi4_agent_tools/core/scanner.d.ts.map +1 -0
  67. package/dist/hoi4_agent_tools/core/scanner.js +136 -0
  68. package/dist/hoi4_agent_tools/core/scanner.js.map +1 -0
  69. package/dist/hoi4_agent_tools/core/server-state.d.ts +31 -0
  70. package/dist/hoi4_agent_tools/core/server-state.d.ts.map +1 -0
  71. package/dist/hoi4_agent_tools/core/server-state.js +413 -0
  72. package/dist/hoi4_agent_tools/core/server-state.js.map +1 -0
  73. package/dist/hoi4_agent_tools/core/source/encoding.d.ts +10 -0
  74. package/dist/hoi4_agent_tools/core/source/encoding.d.ts.map +1 -0
  75. package/dist/hoi4_agent_tools/core/source/encoding.js +54 -0
  76. package/dist/hoi4_agent_tools/core/source/encoding.js.map +1 -0
  77. package/dist/hoi4_agent_tools/core/source/index.d.ts +7 -0
  78. package/dist/hoi4_agent_tools/core/source/index.d.ts.map +1 -0
  79. package/dist/hoi4_agent_tools/core/source/index.js +7 -0
  80. package/dist/hoi4_agent_tools/core/source/index.js.map +1 -0
  81. package/dist/hoi4_agent_tools/core/source/lexer.d.ts +30 -0
  82. package/dist/hoi4_agent_tools/core/source/lexer.d.ts.map +1 -0
  83. package/dist/hoi4_agent_tools/core/source/lexer.js +266 -0
  84. package/dist/hoi4_agent_tools/core/source/lexer.js.map +1 -0
  85. package/dist/hoi4_agent_tools/core/source/limits.d.ts +21 -0
  86. package/dist/hoi4_agent_tools/core/source/limits.d.ts.map +1 -0
  87. package/dist/hoi4_agent_tools/core/source/limits.js +49 -0
  88. package/dist/hoi4_agent_tools/core/source/limits.js.map +1 -0
  89. package/dist/hoi4_agent_tools/core/source/localisation.d.ts +20 -0
  90. package/dist/hoi4_agent_tools/core/source/localisation.d.ts.map +1 -0
  91. package/dist/hoi4_agent_tools/core/source/localisation.js +163 -0
  92. package/dist/hoi4_agent_tools/core/source/localisation.js.map +1 -0
  93. package/dist/hoi4_agent_tools/core/source/parser.d.ts +44 -0
  94. package/dist/hoi4_agent_tools/core/source/parser.d.ts.map +1 -0
  95. package/dist/hoi4_agent_tools/core/source/parser.js +334 -0
  96. package/dist/hoi4_agent_tools/core/source/parser.js.map +1 -0
  97. package/dist/hoi4_agent_tools/core/source/rewrite.d.ts +10 -0
  98. package/dist/hoi4_agent_tools/core/source/rewrite.d.ts.map +1 -0
  99. package/dist/hoi4_agent_tools/core/source/rewrite.js +28 -0
  100. package/dist/hoi4_agent_tools/core/source/rewrite.js.map +1 -0
  101. package/dist/hoi4_agent_tools/core/svg-text.d.ts +34 -0
  102. package/dist/hoi4_agent_tools/core/svg-text.d.ts.map +1 -0
  103. package/dist/hoi4_agent_tools/core/svg-text.js +127 -0
  104. package/dist/hoi4_agent_tools/core/svg-text.js.map +1 -0
  105. package/dist/hoi4_agent_tools/core/transaction-limits.d.ts +9 -0
  106. package/dist/hoi4_agent_tools/core/transaction-limits.d.ts.map +1 -0
  107. package/dist/hoi4_agent_tools/core/transaction-limits.js +9 -0
  108. package/dist/hoi4_agent_tools/core/transaction-limits.js.map +1 -0
  109. package/dist/hoi4_agent_tools/core/transactions.d.ts +162 -0
  110. package/dist/hoi4_agent_tools/core/transactions.d.ts.map +1 -0
  111. package/dist/hoi4_agent_tools/core/transactions.js +1181 -0
  112. package/dist/hoi4_agent_tools/core/transactions.js.map +1 -0
  113. package/dist/hoi4_agent_tools/core/workspace.d.ts +68 -0
  114. package/dist/hoi4_agent_tools/core/workspace.d.ts.map +1 -0
  115. package/dist/hoi4_agent_tools/core/workspace.js +794 -0
  116. package/dist/hoi4_agent_tools/core/workspace.js.map +1 -0
  117. package/dist/hoi4_agent_tools/focus/compiler.d.ts +9 -0
  118. package/dist/hoi4_agent_tools/focus/compiler.d.ts.map +1 -0
  119. package/dist/hoi4_agent_tools/focus/compiler.js +273 -0
  120. package/dist/hoi4_agent_tools/focus/compiler.js.map +1 -0
  121. package/dist/hoi4_agent_tools/focus/continuous-render.d.ts +32 -0
  122. package/dist/hoi4_agent_tools/focus/continuous-render.d.ts.map +1 -0
  123. package/dist/hoi4_agent_tools/focus/continuous-render.js +179 -0
  124. package/dist/hoi4_agent_tools/focus/continuous-render.js.map +1 -0
  125. package/dist/hoi4_agent_tools/focus/drift.d.ts +22 -0
  126. package/dist/hoi4_agent_tools/focus/drift.d.ts.map +1 -0
  127. package/dist/hoi4_agent_tools/focus/drift.js +124 -0
  128. package/dist/hoi4_agent_tools/focus/drift.js.map +1 -0
  129. package/dist/hoi4_agent_tools/focus/geometry.d.ts +17 -0
  130. package/dist/hoi4_agent_tools/focus/geometry.d.ts.map +1 -0
  131. package/dist/hoi4_agent_tools/focus/geometry.js +35 -0
  132. package/dist/hoi4_agent_tools/focus/geometry.js.map +1 -0
  133. package/dist/hoi4_agent_tools/focus/importer.d.ts +9 -0
  134. package/dist/hoi4_agent_tools/focus/importer.d.ts.map +1 -0
  135. package/dist/hoi4_agent_tools/focus/importer.js +732 -0
  136. package/dist/hoi4_agent_tools/focus/importer.js.map +1 -0
  137. package/dist/hoi4_agent_tools/focus/index.d.ts +14 -0
  138. package/dist/hoi4_agent_tools/focus/index.d.ts.map +1 -0
  139. package/dist/hoi4_agent_tools/focus/index.js +14 -0
  140. package/dist/hoi4_agent_tools/focus/index.js.map +1 -0
  141. package/dist/hoi4_agent_tools/focus/layout.d.ts +5 -0
  142. package/dist/hoi4_agent_tools/focus/layout.d.ts.map +1 -0
  143. package/dist/hoi4_agent_tools/focus/layout.js +653 -0
  144. package/dist/hoi4_agent_tools/focus/layout.js.map +1 -0
  145. package/dist/hoi4_agent_tools/focus/limits.d.ts +9 -0
  146. package/dist/hoi4_agent_tools/focus/limits.d.ts.map +1 -0
  147. package/dist/hoi4_agent_tools/focus/limits.js +9 -0
  148. package/dist/hoi4_agent_tools/focus/limits.js.map +1 -0
  149. package/dist/hoi4_agent_tools/focus/lint.d.ts +14 -0
  150. package/dist/hoi4_agent_tools/focus/lint.d.ts.map +1 -0
  151. package/dist/hoi4_agent_tools/focus/lint.js +839 -0
  152. package/dist/hoi4_agent_tools/focus/lint.js.map +1 -0
  153. package/dist/hoi4_agent_tools/focus/model.d.ts +303 -0
  154. package/dist/hoi4_agent_tools/focus/model.d.ts.map +1 -0
  155. package/dist/hoi4_agent_tools/focus/model.js +20 -0
  156. package/dist/hoi4_agent_tools/focus/model.js.map +1 -0
  157. package/dist/hoi4_agent_tools/focus/native-effects.d.ts +9 -0
  158. package/dist/hoi4_agent_tools/focus/native-effects.d.ts.map +1 -0
  159. package/dist/hoi4_agent_tools/focus/native-effects.js +563 -0
  160. package/dist/hoi4_agent_tools/focus/native-effects.js.map +1 -0
  161. package/dist/hoi4_agent_tools/focus/planning.d.ts +15 -0
  162. package/dist/hoi4_agent_tools/focus/planning.d.ts.map +1 -0
  163. package/dist/hoi4_agent_tools/focus/planning.js +241 -0
  164. package/dist/hoi4_agent_tools/focus/planning.js.map +1 -0
  165. package/dist/hoi4_agent_tools/focus/presentation.d.ts +24 -0
  166. package/dist/hoi4_agent_tools/focus/presentation.d.ts.map +1 -0
  167. package/dist/hoi4_agent_tools/focus/presentation.js +204 -0
  168. package/dist/hoi4_agent_tools/focus/presentation.js.map +1 -0
  169. package/dist/hoi4_agent_tools/focus/render.d.ts +35 -0
  170. package/dist/hoi4_agent_tools/focus/render.d.ts.map +1 -0
  171. package/dist/hoi4_agent_tools/focus/render.js +491 -0
  172. package/dist/hoi4_agent_tools/focus/render.js.map +1 -0
  173. package/dist/hoi4_agent_tools/focus/service.d.ts +82 -0
  174. package/dist/hoi4_agent_tools/focus/service.d.ts.map +1 -0
  175. package/dist/hoi4_agent_tools/focus/service.js +492 -0
  176. package/dist/hoi4_agent_tools/focus/service.js.map +1 -0
  177. package/dist/hoi4_agent_tools/focus/source-update.d.ts +6 -0
  178. package/dist/hoi4_agent_tools/focus/source-update.d.ts.map +1 -0
  179. package/dist/hoi4_agent_tools/focus/source-update.js +328 -0
  180. package/dist/hoi4_agent_tools/focus/source-update.js.map +1 -0
  181. package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts +37 -0
  182. package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts.map +1 -0
  183. package/dist/hoi4_agent_tools/gui/animation-manifest.js +66 -0
  184. package/dist/hoi4_agent_tools/gui/animation-manifest.js.map +1 -0
  185. package/dist/hoi4_agent_tools/gui/assets.d.ts +71 -0
  186. package/dist/hoi4_agent_tools/gui/assets.d.ts.map +1 -0
  187. package/dist/hoi4_agent_tools/gui/assets.js +629 -0
  188. package/dist/hoi4_agent_tools/gui/assets.js.map +1 -0
  189. package/dist/hoi4_agent_tools/gui/dds.d.ts +17 -0
  190. package/dist/hoi4_agent_tools/gui/dds.d.ts.map +1 -0
  191. package/dist/hoi4_agent_tools/gui/dds.js +245 -0
  192. package/dist/hoi4_agent_tools/gui/dds.js.map +1 -0
  193. package/dist/hoi4_agent_tools/gui/helpers.d.ts +101 -0
  194. package/dist/hoi4_agent_tools/gui/helpers.d.ts.map +1 -0
  195. package/dist/hoi4_agent_tools/gui/helpers.js +1072 -0
  196. package/dist/hoi4_agent_tools/gui/helpers.js.map +1 -0
  197. package/dist/hoi4_agent_tools/gui/index.d.ts +15 -0
  198. package/dist/hoi4_agent_tools/gui/index.d.ts.map +1 -0
  199. package/dist/hoi4_agent_tools/gui/index.js +15 -0
  200. package/dist/hoi4_agent_tools/gui/index.js.map +1 -0
  201. package/dist/hoi4_agent_tools/gui/layout.d.ts +6 -0
  202. package/dist/hoi4_agent_tools/gui/layout.d.ts.map +1 -0
  203. package/dist/hoi4_agent_tools/gui/layout.js +753 -0
  204. package/dist/hoi4_agent_tools/gui/layout.js.map +1 -0
  205. package/dist/hoi4_agent_tools/gui/limits.d.ts +25 -0
  206. package/dist/hoi4_agent_tools/gui/limits.d.ts.map +1 -0
  207. package/dist/hoi4_agent_tools/gui/limits.js +27 -0
  208. package/dist/hoi4_agent_tools/gui/limits.js.map +1 -0
  209. package/dist/hoi4_agent_tools/gui/renderer.d.ts +18 -0
  210. package/dist/hoi4_agent_tools/gui/renderer.d.ts.map +1 -0
  211. package/dist/hoi4_agent_tools/gui/renderer.js +388 -0
  212. package/dist/hoi4_agent_tools/gui/renderer.js.map +1 -0
  213. package/dist/hoi4_agent_tools/gui/scenario.d.ts +66 -0
  214. package/dist/hoi4_agent_tools/gui/scenario.d.ts.map +1 -0
  215. package/dist/hoi4_agent_tools/gui/scenario.js +191 -0
  216. package/dist/hoi4_agent_tools/gui/scenario.js.map +1 -0
  217. package/dist/hoi4_agent_tools/gui/source-graph.d.ts +7 -0
  218. package/dist/hoi4_agent_tools/gui/source-graph.d.ts.map +1 -0
  219. package/dist/hoi4_agent_tools/gui/source-graph.js +1074 -0
  220. package/dist/hoi4_agent_tools/gui/source-graph.js.map +1 -0
  221. package/dist/hoi4_agent_tools/gui/source-patch.d.ts +13 -0
  222. package/dist/hoi4_agent_tools/gui/source-patch.d.ts.map +1 -0
  223. package/dist/hoi4_agent_tools/gui/source-patch.js +90 -0
  224. package/dist/hoi4_agent_tools/gui/source-patch.js.map +1 -0
  225. package/dist/hoi4_agent_tools/gui/studio.d.ts +86 -0
  226. package/dist/hoi4_agent_tools/gui/studio.d.ts.map +1 -0
  227. package/dist/hoi4_agent_tools/gui/studio.js +830 -0
  228. package/dist/hoi4_agent_tools/gui/studio.js.map +1 -0
  229. package/dist/hoi4_agent_tools/gui/tga.d.ts +16 -0
  230. package/dist/hoi4_agent_tools/gui/tga.d.ts.map +1 -0
  231. package/dist/hoi4_agent_tools/gui/tga.js +157 -0
  232. package/dist/hoi4_agent_tools/gui/tga.js.map +1 -0
  233. package/dist/hoi4_agent_tools/gui/types.d.ts +322 -0
  234. package/dist/hoi4_agent_tools/gui/types.d.ts.map +1 -0
  235. package/dist/hoi4_agent_tools/gui/types.js +19 -0
  236. package/dist/hoi4_agent_tools/gui/types.js.map +1 -0
  237. package/dist/hoi4_agent_tools/gui/validators.d.ts +8 -0
  238. package/dist/hoi4_agent_tools/gui/validators.d.ts.map +1 -0
  239. package/dist/hoi4_agent_tools/gui/validators.js +951 -0
  240. package/dist/hoi4_agent_tools/gui/validators.js.map +1 -0
  241. package/dist/hoi4_agent_tools/map/bmp.d.ts +62 -0
  242. package/dist/hoi4_agent_tools/map/bmp.d.ts.map +1 -0
  243. package/dist/hoi4_agent_tools/map/bmp.js +363 -0
  244. package/dist/hoi4_agent_tools/map/bmp.js.map +1 -0
  245. package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts +5 -0
  246. package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts.map +1 -0
  247. package/dist/hoi4_agent_tools/map/diagnostic-limit.js +21 -0
  248. package/dist/hoi4_agent_tools/map/diagnostic-limit.js.map +1 -0
  249. package/dist/hoi4_agent_tools/map/index.d.ts +8 -0
  250. package/dist/hoi4_agent_tools/map/index.d.ts.map +1 -0
  251. package/dist/hoi4_agent_tools/map/index.js +8 -0
  252. package/dist/hoi4_agent_tools/map/index.js.map +1 -0
  253. package/dist/hoi4_agent_tools/map/limits.d.ts +13 -0
  254. package/dist/hoi4_agent_tools/map/limits.d.ts.map +1 -0
  255. package/dist/hoi4_agent_tools/map/limits.js +13 -0
  256. package/dist/hoi4_agent_tools/map/limits.js.map +1 -0
  257. package/dist/hoi4_agent_tools/map/model.d.ts +269 -0
  258. package/dist/hoi4_agent_tools/map/model.d.ts.map +1 -0
  259. package/dist/hoi4_agent_tools/map/model.js +1114 -0
  260. package/dist/hoi4_agent_tools/map/model.js.map +1 -0
  261. package/dist/hoi4_agent_tools/map/operations.d.ts +401 -0
  262. package/dist/hoi4_agent_tools/map/operations.d.ts.map +1 -0
  263. package/dist/hoi4_agent_tools/map/operations.js +2717 -0
  264. package/dist/hoi4_agent_tools/map/operations.js.map +1 -0
  265. package/dist/hoi4_agent_tools/map/render.d.ts +90 -0
  266. package/dist/hoi4_agent_tools/map/render.d.ts.map +1 -0
  267. package/dist/hoi4_agent_tools/map/render.js +759 -0
  268. package/dist/hoi4_agent_tools/map/render.js.map +1 -0
  269. package/dist/hoi4_agent_tools/map/service.d.ts +81 -0
  270. package/dist/hoi4_agent_tools/map/service.d.ts.map +1 -0
  271. package/dist/hoi4_agent_tools/map/service.js +695 -0
  272. package/dist/hoi4_agent_tools/map/service.js.map +1 -0
  273. package/dist/hoi4_agent_tools/map/validation.d.ts +23 -0
  274. package/dist/hoi4_agent_tools/map/validation.d.ts.map +1 -0
  275. package/dist/hoi4_agent_tools/map/validation.js +1177 -0
  276. package/dist/hoi4_agent_tools/map/validation.js.map +1 -0
  277. package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts +3 -0
  278. package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts.map +1 -0
  279. package/dist/hoi4_agent_tools/mcp/prompts/register.js +50 -0
  280. package/dist/hoi4_agent_tools/mcp/prompts/register.js.map +1 -0
  281. package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts +9 -0
  282. package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts.map +1 -0
  283. package/dist/hoi4_agent_tools/mcp/registry/metadata.js +10 -0
  284. package/dist/hoi4_agent_tools/mcp/registry/metadata.js.map +1 -0
  285. package/dist/hoi4_agent_tools/mcp/resources/register.d.ts +5 -0
  286. package/dist/hoi4_agent_tools/mcp/resources/register.d.ts.map +1 -0
  287. package/dist/hoi4_agent_tools/mcp/resources/register.js +278 -0
  288. package/dist/hoi4_agent_tools/mcp/resources/register.js.map +1 -0
  289. package/dist/hoi4_agent_tools/mcp/security/auth.d.ts +24 -0
  290. package/dist/hoi4_agent_tools/mcp/security/auth.d.ts.map +1 -0
  291. package/dist/hoi4_agent_tools/mcp/security/auth.js +234 -0
  292. package/dist/hoi4_agent_tools/mcp/security/auth.js.map +1 -0
  293. package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts +35 -0
  294. package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts.map +1 -0
  295. package/dist/hoi4_agent_tools/mcp/server/base-tools.js +835 -0
  296. package/dist/hoi4_agent_tools/mcp/server/base-tools.js.map +1 -0
  297. package/dist/hoi4_agent_tools/mcp/server/create.d.ts +5 -0
  298. package/dist/hoi4_agent_tools/mcp/server/create.d.ts.map +1 -0
  299. package/dist/hoi4_agent_tools/mcp/server/create.js +26 -0
  300. package/dist/hoi4_agent_tools/mcp/server/create.js.map +1 -0
  301. package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts +133 -0
  302. package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts.map +1 -0
  303. package/dist/hoi4_agent_tools/mcp/server/output-schemas.js +127 -0
  304. package/dist/hoi4_agent_tools/mcp/server/output-schemas.js.map +1 -0
  305. package/dist/hoi4_agent_tools/mcp/server/progress.d.ts +8 -0
  306. package/dist/hoi4_agent_tools/mcp/server/progress.d.ts.map +1 -0
  307. package/dist/hoi4_agent_tools/mcp/server/progress.js +21 -0
  308. package/dist/hoi4_agent_tools/mcp/server/progress.js.map +1 -0
  309. package/dist/hoi4_agent_tools/mcp/server/result.d.ts +232 -0
  310. package/dist/hoi4_agent_tools/mcp/server/result.d.ts.map +1 -0
  311. package/dist/hoi4_agent_tools/mcp/server/result.js +353 -0
  312. package/dist/hoi4_agent_tools/mcp/server/result.js.map +1 -0
  313. package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts +5 -0
  314. package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts.map +1 -0
  315. package/dist/hoi4_agent_tools/mcp/tools/focus.js +1059 -0
  316. package/dist/hoi4_agent_tools/mcp/tools/focus.js.map +1 -0
  317. package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts +111 -0
  318. package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts.map +1 -0
  319. package/dist/hoi4_agent_tools/mcp/tools/gui.js +598 -0
  320. package/dist/hoi4_agent_tools/mcp/tools/gui.js.map +1 -0
  321. package/dist/hoi4_agent_tools/mcp/tools/map.d.ts +5 -0
  322. package/dist/hoi4_agent_tools/mcp/tools/map.d.ts.map +1 -0
  323. package/dist/hoi4_agent_tools/mcp/tools/map.js +685 -0
  324. package/dist/hoi4_agent_tools/mcp/tools/map.js.map +1 -0
  325. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts +58 -0
  326. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts.map +1 -0
  327. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js +181 -0
  328. package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js.map +1 -0
  329. package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts +26 -0
  330. package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts.map +1 -0
  331. package/dist/hoi4_agent_tools/mcp/transports/event-store.js +86 -0
  332. package/dist/hoi4_agent_tools/mcp/transports/event-store.js.map +1 -0
  333. package/dist/hoi4_agent_tools/mcp/transports/http.d.ts +28 -0
  334. package/dist/hoi4_agent_tools/mcp/transports/http.d.ts.map +1 -0
  335. package/dist/hoi4_agent_tools/mcp/transports/http.js +744 -0
  336. package/dist/hoi4_agent_tools/mcp/transports/http.js.map +1 -0
  337. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts +15 -0
  338. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts.map +1 -0
  339. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js +51 -0
  340. package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js.map +1 -0
  341. package/dist/hoi4_agent_tools/runtime.d.ts +4 -0
  342. package/dist/hoi4_agent_tools/runtime.d.ts.map +1 -0
  343. package/dist/hoi4_agent_tools/runtime.js +27 -0
  344. package/dist/hoi4_agent_tools/runtime.js.map +1 -0
  345. package/dist/hoi4_agent_tools/schemas/common.d.ts +74 -0
  346. package/dist/hoi4_agent_tools/schemas/common.d.ts.map +1 -0
  347. package/dist/hoi4_agent_tools/schemas/common.js +51 -0
  348. package/dist/hoi4_agent_tools/schemas/common.js.map +1 -0
  349. package/dist/hoi4_agent_tools/schemas/focus.d.ts +784 -0
  350. package/dist/hoi4_agent_tools/schemas/focus.d.ts.map +1 -0
  351. package/dist/hoi4_agent_tools/schemas/focus.js +330 -0
  352. package/dist/hoi4_agent_tools/schemas/focus.js.map +1 -0
  353. package/dist/hoi4_agent_tools/schemas/index.d.ts +5 -0
  354. package/dist/hoi4_agent_tools/schemas/index.d.ts.map +1 -0
  355. package/dist/hoi4_agent_tools/schemas/index.js +5 -0
  356. package/dist/hoi4_agent_tools/schemas/index.js.map +1 -0
  357. package/dist/hoi4_agent_tools/schemas/map.d.ts +654 -0
  358. package/dist/hoi4_agent_tools/schemas/map.d.ts.map +1 -0
  359. package/dist/hoi4_agent_tools/schemas/map.js +570 -0
  360. package/dist/hoi4_agent_tools/schemas/map.js.map +1 -0
  361. package/dist/hoi4_agent_tools/schemas/transaction.d.ts +259 -0
  362. package/dist/hoi4_agent_tools/schemas/transaction.d.ts.map +1 -0
  363. package/dist/hoi4_agent_tools/schemas/transaction.js +104 -0
  364. package/dist/hoi4_agent_tools/schemas/transaction.js.map +1 -0
  365. package/dist/hoi4_agent_tools/version.d.ts +6 -0
  366. package/dist/hoi4_agent_tools/version.d.ts.map +1 -0
  367. package/dist/hoi4_agent_tools/version.js +7 -0
  368. package/dist/hoi4_agent_tools/version.js.map +1 -0
  369. package/dist/index.d.ts +3 -0
  370. package/dist/index.d.ts.map +1 -0
  371. package/dist/index.js +3 -0
  372. package/dist/index.js.map +1 -0
  373. package/docs/README.md +22 -0
  374. package/docs/adr/0001-runtime-and-language.md +16 -0
  375. package/docs/adr/0002-lossless-source-model.md +18 -0
  376. package/docs/adr/0003-image-and-font-codecs.md +18 -0
  377. package/docs/adr/0004-focus-layout.md +16 -0
  378. package/docs/adr/0005-offline-rendering.md +18 -0
  379. package/docs/adr/0006-mcp-sdk-and-protocol.md +16 -0
  380. package/docs/adr/0007-storage-and-transactions.md +24 -0
  381. package/docs/adr/0008-test-strategy.md +18 -0
  382. package/docs/adr/0009-packaging-and-registry.md +16 -0
  383. package/docs/adr/0010-unsupported-and-refusal-policy.md +18 -0
  384. package/docs/adr/0011-http-security.md +16 -0
  385. package/docs/adr/README.md +13 -0
  386. package/docs/architecture.md +60 -0
  387. package/docs/artifacts.md +133 -0
  388. package/docs/compatibility.md +33 -0
  389. package/docs/completion-report.md +60 -0
  390. package/docs/configuration.md +285 -0
  391. package/docs/focus-workflow.md +68 -0
  392. package/docs/gui-workflow.md +121 -0
  393. package/docs/limitations.md +30 -0
  394. package/docs/map-workflow.md +89 -0
  395. package/docs/performance.md +117 -0
  396. package/docs/release.md +181 -0
  397. package/docs/research/mcp-2026-07-10.md +46 -0
  398. package/docs/research/source-ledger.md +68 -0
  399. package/docs/security.md +139 -0
  400. package/docs/self-hosting.md +168 -0
  401. package/docs/testing.md +43 -0
  402. package/docs/third-party-notices.md +11 -0
  403. package/docs/transactions.md +162 -0
  404. package/docs/troubleshooting.md +46 -0
  405. package/package.json +98 -5
  406. package/schemas/configuration.schema.json +794 -0
  407. package/schemas/continuous-focus-palette.schema.json +325 -0
  408. package/schemas/focus-plan.schema.json +902 -0
  409. package/schemas/focus-planning-sidecar.schema.json +364 -0
  410. package/schemas/gui-animation-source.schema.json +176 -0
  411. package/schemas/gui-helper.schema.json +301 -0
  412. package/schemas/gui-scenario.schema.json +298 -0
  413. package/schemas/map-operation.schema.json +2284 -0
  414. package/schemas/operation-result.schema.json +344 -0
  415. package/schemas/transaction-manifest.schema.json +685 -0
  416. package/server.json +32 -0
@@ -0,0 +1,16 @@
1
+ # ADR 0011: Authenticated, origin-checked Streamable HTTP
2
+
3
+ - Status: accepted
4
+ - Date: 2026-07-10
5
+
6
+ ## Decision
7
+
8
+ HTTP binds to `127.0.0.1` by default. Every request is authenticated. Loopback deployments may use long static bearer tokens loaded from environment variables. Non-loopback deployment requires an HTTPS public resource URL and JWT verification against configured OAuth/OIDC issuer, JWKS, audience, algorithms, expiry, and scopes. Protected-resource metadata is published and linked from Bearer challenges. Write-scoped tool calls are rejected at the transport with an MCP 2025-11-25 step-up challenge while the corresponding handlers independently enforce the same scope. Present origins are allowlisted, Host is validated, sessions use cryptographically secure IDs bound to principals, clients, and a monotonic scope set, and body/rate/concurrency/session limits are enforced.
9
+
10
+ ## Rationale
11
+
12
+ MCP sessions are routing state, not authentication. OAuth resource-server validation and principal-to-workspace grants prevent token passthrough, confused-deputy behavior, and cross-user workspace access. Origin and Host checks address DNS rebinding and browser-origin attacks.
13
+
14
+ ## Consequences
15
+
16
+ The server does not implement an authorization server. Operators configure a compatible issuer or keep HTTP on loopback. Stdio does not use MCP OAuth and inherits local process permissions plus the same workspace policy.
@@ -0,0 +1,13 @@
1
+ # Architecture decisions
2
+
3
+ 1. [Runtime and language](0001-runtime-and-language.md)
4
+ 2. [Lossless source model](0002-lossless-source-model.md)
5
+ 3. [Image and font codecs](0003-image-and-font-codecs.md)
6
+ 4. [Focus layout](0004-focus-layout.md)
7
+ 5. [Offline rendering](0005-offline-rendering.md)
8
+ 6. [MCP SDK and protocol](0006-mcp-sdk-and-protocol.md)
9
+ 7. [Storage and transactions](0007-storage-and-transactions.md)
10
+ 8. [Test strategy](0008-test-strategy.md)
11
+ 9. [Packaging and Registry](0009-packaging-and-registry.md)
12
+ 10. [Unsupported/refusal policy](0010-unsupported-and-refusal-policy.md)
13
+ 11. [HTTP security](0011-http-security.md)
@@ -0,0 +1,60 @@
1
+ # Architecture
2
+
3
+ All external behavior enters through MCP and calls typed domain services. Transport code validates protocol and authorization; it does not parse source, lay out graphs, render images, or write files.
4
+
5
+ In this documentation, “read-only” scan, lint, layout, and render operations mean that registered HOI4 source bytes are never changed. MCP `readOnlyHint` follows the protocol's broader environmental-mutation meaning: an operation that creates content-addressed evidence under an allowlisted generated-artifact root advertises `readOnlyHint: false`, even though it cannot edit game or mod source.
6
+
7
+ ```text
8
+ MCP tools/resources/prompts
9
+ │
10
+ ▼
11
+ focus / gui / map services
12
+ │
13
+ ▼
14
+ workspace resolver ─ source CST ─ symbol/reference index
15
+ │ │
16
+ ├─ diagnostics ───┤
17
+ ├─ artifact store ┤
18
+ └─ transaction journal / diffs / rollback
19
+ ```
20
+
21
+ ## Workspace overlay
22
+
23
+ A workspace combines a mod root, an optional installed-game reference root, ordered dependency roots, owner-scoped `replace_path` declarations, conventional subsystem roots, an artifact root, cache root, and optional fixture root. File traversal is stable. Same-relative-path files are shadowed by higher load order; each mod or dependency replacement declaration hides its subtree only in lower-precedence roots.
24
+
25
+ Paths are canonicalized through existing ancestors. Public operations accept relative paths only and reject traversal, absolute/device/UNC paths, alternate data streams, Windows device names, and symlink or junction escapes. Game and dependency roots are immutable.
26
+
27
+ ## Source model
28
+
29
+ The lexer retains original bytes and every token: whitespace, comments, strings, atoms, operators, braces, and invalid ranges. The CST retains duplicate keys and ordered blocks. Semantic readers build focus, GUI, or map views over CST ranges. Targeted replacements splice the original decoded text and encode with the original UTF-8 BOM, UTF-8, or Windows-1252 mode. No-change serialization returns original bytes.
30
+
31
+ Malformed or unrepresentable content blocks rewriting. Unknown constructs remain raw source, not guessed fields.
32
+
33
+ ## Shared index
34
+
35
+ `CoreEngine.scan` creates the authoritative `SymbolIndex` for an exact file snapshot. Focus consumes it directly; Scripted GUI receives that same index when building its connected source graph; Agent Nudger attaches it as `MapWorkspaceIndex.sharedIndex` and layers raster/network semantics over it. Proposed-file graphs rebuild through the shared index service rather than a domain parser authority.
36
+
37
+ The index connects tree/focus IDs, sprites/textures, GUI elements, scripted GUI entries, localisation, state/province IDs and colors, strategic regions, adjacencies, supply nodes, railways, and cross-file references. Definitions retain load order, locations, collision state, and override evidence. Province definitions are resolved from each source root's own `default.map` selector, with lower partial roots inheriting the active selector name.
38
+
39
+ Large binary rasters and translation catalogs are selected lazily rather than retained wholesale. Agent Nudger follows the active `default.map` province-bitmap selector. The shared index uses `l_english`, while GUI scenario operations add every explicitly requested language. This narrows scan breadth without changing source precedence or the lossless representation of any selected file.
40
+
41
+ ## Determinism
42
+
43
+ Canonical JSON sorts keys with a locale-independent total UTF-16 code-unit order, traversal uses stable path ordering, layout tie-breaking is fixed, and artifact names are content hashes. Render profiles include source/asset/font hashes and all scenario geometry. Timestamps, host paths, locale collation, random IDs, and time zones are excluded from hashed artifacts.
44
+
45
+ ## Artifacts and transactions
46
+
47
+ Generated evidence is content-addressed below `.hoi4-agent/artifacts`. Artifact manifests bind their
48
+ immutable provenance address to a hash-only canonical workspace and configured/runtime owner
49
+ identity. Runtime-generated stores also carry an atomic persistent owner claim, while statically
50
+ configured workspaces retain one shared operator identity for their explicit grants.
51
+
52
+ A transaction includes the complete affected-file set, before/after hashes and blobs, operation
53
+ provenance, validation, source/binary/visual diffs, expiry, principal, workspace/root fingerprint,
54
+ and plan hash. Its complete mutable journal is HMAC-authenticated by a random key beneath the
55
+ isolated `serverStateRoot`; a protected latest-revision head prevents replay and bounds state to one
56
+ head per admitted cache journal.
57
+
58
+ Apply acquires one workspace write lock, rechecks preconditions, stages files on the same volume, journals deterministic replacements, rebuilds the affected index, and post-validates. Failure and startup recovery restore original blobs. This is recoverable logical atomicity; another process can briefly observe a replacement sequence.
59
+
60
+ Detailed decisions are recorded in [ADRs](adr/README.md).
@@ -0,0 +1,133 @@
1
+ # Artifact resources
2
+
3
+ Tools return compact summaries and links. Content is stored by SHA-256 under the workspace's configured artifact root and exposed through an authorization-checked URI:
4
+
5
+ ```text
6
+ hoi4-agent://workspace/{workspaceId}/artifact/{sha256}/{provenanceHash}/{name}
7
+ ```
8
+
9
+ Each version-2 manifest records name, MIME type, byte size, content hash, artifact kind,
10
+ tool/schema version, SHA-256 source hashes, render profile, domain metadata, and hash-only bindings
11
+ for the resolved workspace and its configured or runtime owner. Filesystem paths and raw principals
12
+ are not exposed. Missing/create/delete states belong in provenance metadata, never sentinel values
13
+ inside the source-hash map.
14
+
15
+ Very broad domain inventories retain a deterministic path/hash sample capped at 256 entries and
16
+ 128 KiB in the manifest, plus a count and a SHA-256 commitment over every length-prefixed sorted
17
+ path/hash pair. This policy applies uniformly to project, focus, GUI, and map evidence. Complete
18
+ inventories remain in the structured artifact content: project diagnostics use their exact `files`
19
+ inventory, while focus, GUI, and map JSON evidence records exact source hashes. Binary and HTML
20
+ review artifacts carry the same bounded, digest-backed provenance and are paired with the exact
21
+ structured evidence for their bundle. Bounding a manifest therefore does not drop source evidence.
22
+ The inventory commitment uses the versioned `sha256-length-prefixed-path-digest-v1` algorithm
23
+ recorded in metadata.
24
+
25
+ The manifest is immutable for a given content hash, provenance hash, and artifact name. Repeating the same bytes, name, and provenance is idempotent. Identical content produced from a different source revision receives a distinct provenance hash and URI while reusing the same content-addressed bytes, so earlier evidence is never rewritten or ambiguously relabelled.
26
+
27
+ Artifact names ending in `.manifest.json`, under an ASCII case-insensitive comparison, are reserved
28
+ for store metadata and rejected. This rule is identical on case-sensitive and case-insensitive
29
+ filesystems, so content can never be mistaken for an inventory manifest.
30
+
31
+ The workspace and owner bindings participate in the provenance hash and are checked by list,
32
+ describe, and resource reads. A store reused by another workspace ID, canonical root topology, or
33
+ runtime principal cannot enumerate or read the older manifests. Statically configured workspaces
34
+ derive one shared operator identity, so all explicitly granted principals retain their intended
35
+ access. Legacy unbound manifests and malformed/conflicting manifests fail closed; the server does
36
+ not delete or relabel them automatically.
37
+
38
+ Resource reads are limited to 1 MiB per request and support `offset` and `length` query parameters for large artifacts. Integrity verification streams the complete artifact through a fixed-size hash buffer while retaining only the requested range, so chunking also bounds payload memory. Only a complete payload that round-trips as strict UTF-8 may return MCP `text`. Every partial range, invalid UTF-8 payload, image, and other binary returns an MCP base64 `blob`, preserving exact bytes even when a range splits a code point. Clients advance `offset` by the decoded byte count and continue until a chunk is shorter than the requested length; the same rule applies to provenance-manifest resources.
39
+
40
+ Some complete logical evidence, notably an installed workspace's GUI source graph, can legitimately
41
+ be larger than `artifactMaxSingleBytes`. Callers that opt into byte-exact logical storage receive a
42
+ normal artifact when the payload fits. An oversized payload instead returns one small canonical
43
+ JSON index named `*.chunks.json`. The index records `type = hoi4-agent.chunked-artifact`, the
44
+ original name, MIME type, size, SHA-256 and description, followed by ordered chunk resource links
45
+ with indexes, byte offsets, lengths and SHA-256 hashes. Chunks use
46
+ `application/octet-stream`; concatenating their decoded bytes in index order must reproduce the
47
+ recorded original size and SHA-256 exactly. The index itself is limited to 1 MiB so an MCP client
48
+ can read it in one request.
49
+
50
+ The chunks and index are one atomic artifact batch. Every physical object and provenance manifest
51
+ counts against the same aggregate-byte and entry quotas, every chunk remains at or below the
52
+ configured per-object ceiling, and any admission, write, cancellation or owning-commit failure
53
+ removes all files newly created by the bundle. This representation is lossless storage, not graph
54
+ truncation or a quota bypass. `hoi4.gui_scan` and GUI render source-graph evidence return only the
55
+ logical index link; agents follow its resource links when they need the full graph.
56
+
57
+ Logical chunk preparation has a separate fixed 536,870,912-byte in-memory batch ceiling, and a
58
+ lower configured `artifactMaxBytes` always wins. Before any payload is copied or hashed, admission
59
+ validates every logical write's name, provenance and byte length, checks safe aggregate arithmetic,
60
+ and projects the complete physical entry count after chunking. Preflight yields after each 256
61
+ logical writes so cancellation can stop a broad batch before preparation. Preparation is then
62
+ sequential, verifies that each admitted byte length is unchanged, and yields during hashing every
63
+ 16 MiB. Chunks share the one owned logical buffer during preparation instead of duplicating it.
64
+ Crossing the fixed preparation ceiling fails with `ARTIFACT_LOGICAL_BATCH_LIMIT` before allocation.
65
+
66
+ Artifact listing is paged at no more than 100 links. The store walks the complete sorted manifest
67
+ inventory to verify bindings and compute an exact SHA-256 inventory revision, but retains only the
68
+ requested page in memory. Cursors name the last public URI and are accepted only when that exact URI
69
+ still occurs under the same revision. Listing and content verification honor request cancellation
70
+ between directories, manifests, and hash chunks.
71
+
72
+ Manifest reads stat the file and enforce the fixed 1 MiB ceiling before signal-aware JSON loading.
73
+ Artifact writes, existing-content verification, quota walks, and queue waits also honor
74
+ cancellation. A cancelled batch completes non-cancellable cleanup of every partial file. Once the
75
+ caller's commit callback begins, that callback owns its critical-phase completion rules.
76
+
77
+ ## Storage placement
78
+
79
+ A mod workspace defaults to `<mod>/.hoi4-agent/artifacts`; any in-mod override must remain beneath
80
+ that exact generated subtree. An operator may instead place it beneath a configured `storageRoots`
81
+ parent. A primary `game` or `dependency` workspace must always use an explicit operator-owned
82
+ artifact root beneath `storageRoots`, separate from its explicit cache root. Artifact and cache
83
+ roots cannot overlap each other or a source root.
84
+
85
+ Generated artifact writes never make the game, dependency, or fixture source writable. Source
86
+ changes are a separate transaction surface and are confined to the mod root.
87
+
88
+ ## Retention quotas
89
+
90
+ The default per-workspace limits are:
91
+
92
+ - `artifactMaxBytes`: 536,870,912 bytes across content and manifests;
93
+ - `artifactMaxEntries`: 5,000 provenance manifests;
94
+ - `artifactMaxSingleBytes`: 134,217,728 bytes for one content object;
95
+ - serialized provenance manifests have a separate fixed 1 MiB ceiling and bounded fields.
96
+ - one logical chunk-preparation batch has a fixed 536,870,912-byte ceiling.
97
+
98
+ Content deduplication means a reused content hash adds no duplicate content bytes, while a new
99
+ provenance manifest still counts as an entry and consumes its serialized bytes. Within one server
100
+ process, the store measures current usage under an in-process per-root write queue before adding
101
+ immutable files. Multi-artifact operations preflight all logical writes and their projected
102
+ normal/chunk/index entries as one batch before payload copying or hashing, then retain newly created
103
+ content and manifests only if their owning operation commits. A failed transaction-journal
104
+ admission removes the diff files created by that batch without deleting pre-existing shared
105
+ content or provenance. If the complete content and manifest would exceed a count, aggregate-byte,
106
+ or per-object ceiling, the store refuses the write with `ARTIFACT_STORAGE_LIMIT`,
107
+ `ARTIFACT_LOGICAL_BATCH_LIMIT`, `ARTIFACT_SINGLE_LIMIT`, `ARTIFACT_CHUNK_INDEX_LIMIT`, or
108
+ `ARTIFACT_MANIFEST_LIMIT`; it does not write a truncated artifact or evict older evidence. Listing
109
+ also refuses when an externally modified store is already over its configured retention budget.
110
+
111
+ Artifact retention has no automatic garbage collector. Operator deletion is explicit and should
112
+ be coordinated with active requests; deleting an artifact invalidates its URI. In contrast,
113
+ transaction-journal cleanup follows the separate rules in [transactions](transactions.md). Do not
114
+ share one writable artifact root between uncoordinated server processes; an operating-system
115
+ storage service or operator must provide that coordination.
116
+
117
+ Typical artifacts:
118
+
119
+ - shared diagnostics and capability reports;
120
+ - focus HTML/SVG/PNG/JSON, generated-source maps, and hash-bound planning sidecars;
121
+ - GUI renders, galleries, hierarchy/click maps, comparisons, and fidelity reports;
122
+ - map layers, changed-pixel reports, and before/after previews;
123
+ - transaction manifests, source diffs, binary diffs, and validation reports.
124
+
125
+ Structured JSON evidence records source paths, hashes, frame numbers, dimensions, formats, and
126
+ fidelity metadata, but strips embedded `data:` payloads and glyph bitmap bytes. Composite SVG and
127
+ PNG review renders may contain processed, source-derived icon, sprite-frame, or font-glyph pixels
128
+ needed to inspect the requested interface; they are principal-bound generated evidence, not raw
129
+ asset-file resources. The server never registers an installed-game, dependency, or mod raster/font
130
+ file itself as an artifact.
131
+
132
+ Artifacts are evidence. External HOI4 source remains authoritative. Deleting the configured
133
+ artifact root invalidates only generated evidence, not mod content.
@@ -0,0 +1,33 @@
1
+ # Compatibility and versioning
2
+
3
+ ## Runtime and platforms
4
+
5
+ | Component | Supported |
6
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
7
+ | Node.js | 22.x and 24.x |
8
+ | Windows | Windows 10/11 x64 |
9
+ | Linux | Current x64/arm64 distributions supported by Node and Sharp |
10
+ | macOS | Source package supported; CI coverage may lag Windows/Linux |
11
+ | MCP | Final `2025-11-25` only; initialization requests for other revisions receive `2025-11-25` so clients without that revision can disconnect cleanly |
12
+ | HOI4 | Current file formats are capability-scanned; no fixed game installation path |
13
+
14
+ The `2026-07-28` protocol was a release candidate at 0.1.0 development time. Adopting its breaking stateless core and SDK v2 requires a compatibility release after it is final and supported by clients.
15
+
16
+ The pinned SDK also recognizes `2025-06-18`, `2025-03-26`, `2024-11-05`, and `2024-10-07`, but this server does not claim them: its public contracts use the final revision's structured output and resource-link behavior. Both stdio and Streamable HTTP gate negotiation to `2025-11-25`. After initialization, every Streamable HTTP POST, GET, or DELETE must carry `MCP-Protocol-Version: 2025-11-25`; a missing or different value receives a JSON-RPC error with HTTP status 400.
17
+
18
+ ## Public schemas
19
+
20
+ Tool names and input/output schemas are public API. Additive compatible changes use a minor release. Removing/renaming a tool or changing accepted/returned meaning requires a major release or a documented deprecation period. Schema version, package version, server implementation version, changelog, container tag, and Registry metadata stay synchronized.
21
+
22
+ Focus consumers can use `focus-plan.schema.json`, `focus-planning-sidecar.schema.json`, and `continuous-focus-palette.schema.json`. The planning sidecar is hash-bound enrichment data; it is not Clausewitz source and is never loaded by HOI4.
23
+
24
+ Focus reward import ships a reviewed native-effect identifier catalog derived from the official
25
+ HOI4 1.19.2 `effects_documentation.md`. This lets the importer distinguish engine effects from
26
+ direct `scripted_effect_id = yes/{ ... }` calls without requiring an installed game at runtime.
27
+ Compatibility reviews must refresh the catalog when official effect identifiers change; unknown
28
+ effect-position scalars remain source-linked helper references so stale or misspelled calls lint
29
+ as missing instead of disappearing.
30
+
31
+ ## Configuration migration
32
+
33
+ Config has an integer `version`. Unknown versions or fields fail with deterministic diagnostics. A future migration utility must print a reviewable proposed config and never edit a client or workspace silently.
@@ -0,0 +1,60 @@
1
+ # Completion report: 0.1.2 release candidate
2
+
3
+ - Candidate version: `0.1.2`
4
+ - Report date: 2026-07-11
5
+ - Status: implementation and local release qualification complete; public delivery pending
6
+
7
+ ## Implemented scope
8
+
9
+ The release candidate provides the shared source-preserving core, Focus Tree Workbench, Scripted GUI Studio, Agent Nudger map workflow, read-only-by-default transaction controls, stdio and authenticated Streamable HTTP transports, package entry points, schemas, synthetic portable fixtures, and public deployment documentation described by this repository.
10
+
11
+ The npm payload is explicitly limited to compiled entry points, documentation, schemas, `server.json`, and the project license, security policy, README, and changelog. Installed-game data, third-party mod data, fixtures, tests, source files, local configuration, and workspace artifacts are excluded.
12
+
13
+ ## Qualification evidence
14
+
15
+ The candidate has passed all 46 portable test files: 494 tests passed and one POSIX case was intentionally skipped on Windows. The latest enforced coverage is 88.44% statements, 78.25% branches, 91.28% functions, and 89.90% lines.
16
+
17
+ Release-specific qualification also covers:
18
+
19
+ - installation of the actual `npm pack` tarball into an isolated consumer, including an empty-cache install that proves `--prefer-offline` can fetch missing dependencies;
20
+ - execution of the installed stdio, HTTP, and setup entry points;
21
+ - package-content allowlisting, workspace-path leak checks, synchronized package and Registry metadata, and generated-schema checks;
22
+ - npm dependency audit, registry signatures, and attestations;
23
+ - live validation against the official MCP Registry API and pinned schema;
24
+ - official MCP Inspector discovery against the production stdio entry point;
25
+ - a production Docker build and protocol-only container stdio initialization/discovery; the release workflow records the final non-self-referential image digest in `container-image.json` rather than embedding an obsolete candidate digest into documentation copied inside that image;
26
+ - immutable GitHub Action references, workflow and shell linting, strict release ordering, and byte-for-byte npm/GitHub release verification;
27
+ - pinned Dockerfile-frontend and Node base-image digests, a multi-platform base supporting `linux/amd64` and `linux/arm64`, and a warning-free Docker build check;
28
+ - read-only production-container checks proving OAuth metadata discovery, unauthenticated `401`, invalid-Origin `403`, protocol-only stdio initialization/discovery of all 26 tools, and a real read-only `hoi4.project_status` call from the non-root Node 22.23.1 runtime;
29
+ - reusable bounded GUI helper templates, source-valid typed helper output, explicit state variants, deterministic scrolling and static meter handoffs, and refusal tests for unsafe or ambiguous helper compilation;
30
+ - explicit even-odd province polygons with raster-boundary bounds checking before rasterization, pixel-center sampling, and refusal rather than clipping;
31
+ - interrupted GitHub release recovery through a uniquely selected, byte-verified draft without asset overwrite or deletion, followed by exact immutable-release verification;
32
+ - three installed-data qualifications covering a large vanilla/external focus workflow, a real GUI/GFX/font graph with deterministic full/annotated renders, and full province-map scan/render/storage without launching the game; the 302,497,021-byte canonical GUI graph was stored exactly as three bounded resources plus its one-read index while the default 128 MiB per-object ceiling remained enabled;
33
+ - deterministic cold/warm benchmark output for the 255-focus, 203-visible-element GUI, and all-layer map workloads, including same-size/same-mtime content-hash invalidation.
34
+
35
+ Known refusal cases and intentional boundaries remain documented in [Known limitations](limitations.md). They are explicit product constraints, not fallback implementations.
36
+
37
+ ## Public delivery status
38
+
39
+ No public endpoint is claimed as complete in this report. The following evidence remains pending until the first release workflow finishes:
40
+
41
+ | Surface | Required completion evidence | Status |
42
+ | -------------- | --------------------------------------------------------------------------------------------------------- | ------- |
43
+ | GitHub source | Public canonical repository containing the tested commit and immutable `v0.1.2` tag | Pending |
44
+ | npm | Public `hoi4-agent-tools@0.1.2` with exact tarball integrity and SLSA provenance | Pending |
45
+ | GitHub release | Immutable `v0.1.2` release containing the exact npm and container digest manifests | Pending |
46
+ | GHCR | Public anonymous `0.1.2` digest with two runtime platforms and source-bound SBOM/provenance subjects | Pending |
47
+ | MCP Registry | Exact `io.github.klimPaskov/hoi4-agent-tools@0.1.2` metadata with official `active` and `isLatest` status | Pending |
48
+ | Public install | Clean registry installation, signature audit, MCP initialization, and tool discovery | Pending |
49
+
50
+ ## First-release completion sequence
51
+
52
+ 1. Commit the tested candidate on `main` and push it to the canonical public repository.
53
+ 2. Run the manual GHCR bootstrap workflow, make the new package public in GitHub, and verify the bootstrap index without saved credentials.
54
+ 3. Create `npm-bootstrap-v0.0.0-bootstrap.1`, store a shortest-lived npm granular token only as `NPM_BOOTSTRAP_TOKEN`, and run the manual non-OIDC npm bootstrap workflow from that tag. The earlier immutable `.0` attempt stopped before publication; it is retained as audit evidence rather than rewritten.
55
+ 4. Revoke and delete `NPM_BOOTSTRAP_TOKEN`, then configure npm trusted publishing for `klimPaskov/hoi4-agent-tools`, `release.yml`, and the explicit `npm publish` allowed action.
56
+ 5. Preserve the immutable `v0.1.0` tag whose run stopped in prepublication validation and `v0.1.1` whose OIDC job stopped before npm accepted bytes because npm parsed a relative tarball path as a Git shorthand. Qualify the synchronized `0.1.2` fix-forward commit and create `v0.1.2`. Do not create `NPM_TOKEN`; the OIDC workflow rejects it.
57
+ 6. Allow the release workflow to publish and verify npm, digest-immutable GHCR, the immutable GitHub release, and MCP Registry in its enforced order.
58
+ 7. Update this report with the commit, workflow run, public URLs, npm and image digests, and Registry status. Only then is public delivery complete.
59
+
60
+ Detailed commands and failure behavior are documented in [Release and MCP Registry publication](release.md).
@@ -0,0 +1,285 @@
1
+ # Configuration and workspaces
2
+
3
+ Pass a config with `--config PATH` or `HOI4_AGENT_CONFIG`. Unknown fields are rejected.
4
+ The read-only setup discovery command also checks `HOI4_GAME_ROOT` and the path-delimited `HOI4_MOD_ROOTS`; it reports candidates without registering or modifying them.
5
+
6
+ The stdio executable accepts newline-delimited JSON-RPC frames up to a fixed 16,777,216-byte
7
+ ceiling, excluding the line-feed delimiter. This transport safety limit is deliberately not a
8
+ configuration field; malformed UTF-8 and oversized terminated or unterminated frames close the
9
+ stdio connection with a stderr diagnostic and no protocol output. Streamable HTTP uses the
10
+ separately configured `http.maxBodyBytes`.
11
+
12
+ ```json
13
+ {
14
+ "version": 1,
15
+ "writePolicy": "read-only",
16
+ "serverStateRoot": "/var/lib/hoi4-agent-tools-state",
17
+ "transactionTtlSeconds": 3600,
18
+ "transactionMaxJournalBytes": 536870912,
19
+ "transactionMaxJournals": 128,
20
+ "scanMaxFiles": 20000,
21
+ "scanMaxBytes": 134217728,
22
+ "scanMaxFileBytes": 67108864,
23
+ "artifactMaxBytes": 536870912,
24
+ "artifactMaxEntries": 5000,
25
+ "artifactMaxSingleBytes": 134217728,
26
+ "registrationRoots": ["/srv/hoi4/workspaces", "/srv/hoi4/game", "/srv/hoi4/dependencies"],
27
+ "writableRegistrationRoots": ["/srv/hoi4/workspaces"],
28
+ "storageRoots": ["/var/lib/hoi4-agent-tools"],
29
+ "workspaces": [
30
+ {
31
+ "id": "example",
32
+ "name": "Example Mod",
33
+ "kind": "mod",
34
+ "root": "/srv/hoi4/workspaces/example",
35
+ "gameRoot": "/srv/hoi4/game",
36
+ "dependencyRoots": [],
37
+ "dependencies": [
38
+ {
39
+ "root": "/srv/hoi4/dependencies/base",
40
+ "replacePaths": ["common/ideas"]
41
+ }
42
+ ],
43
+ "replacePaths": ["common/national_focus"],
44
+ "artifactRoot": "/srv/hoi4/workspaces/example/.hoi4-agent/artifacts",
45
+ "cacheRoot": "/srv/hoi4/workspaces/example/.hoi4-agent/cache",
46
+ "writeEnabled": false
47
+ }
48
+ ]
49
+ }
50
+ ```
51
+
52
+ ## Server fields
53
+
54
+ All byte values are exact bytes. Defaults are applied when a field is omitted.
55
+
56
+ | Field | Default | Validation and behavior |
57
+ | ---------------------------- | ----------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
+ | `version` | required | Must equal the current configuration version, `1`. |
59
+ | `writePolicy` | `"read-only"` | `"read-only"` or `"transactions"`. |
60
+ | `serverStateRoot` | omitted | Required for `"transactions"`; absolute canonical operator state used for the private journal key and replay-protection heads. |
61
+ | `transactionTtlSeconds` | `3600` | 60 through 86,400 seconds. |
62
+ | `transactionMaxJournalBytes` | `536870912` | At least 1 MiB; aggregate transaction-journal retention ceiling and per-plan work ceiling. |
63
+ | `transactionMaxJournals` | `128` | 1 through 10,000 journals per workspace cache. |
64
+ | `scanMaxFiles` | `20000` | 1 through 1,000,000 enumerated files per scan. |
65
+ | `scanMaxBytes` | `134217728` | At least 1 MiB of file content per scan. |
66
+ | `scanMaxFileBytes` | `67108864` | At least 64 KiB and no greater than `scanMaxBytes`. |
67
+ | `artifactMaxBytes` | `536870912` | At least 1 MiB across one workspace artifact store; a lower value also bounds logical chunk preparation, which has an independent fixed 536,870,912-byte ceiling. |
68
+ | `artifactMaxEntries` | `5000` | 1 through 100,000 provenance manifests. |
69
+ | `artifactMaxSingleBytes` | `134217728` | At least 1 MiB and no greater than `artifactMaxBytes`; applies to content. Provenance manifests have a separate fixed 1 MiB ceiling. |
70
+ | `registrationRoots` | `[]` | Up to 16 operator-approved source parents for runtime `hoi4.project_register`; this alone never grants writable-mod registration. |
71
+ | `writableRegistrationRoots` | `[]` | Up to 16 narrow descendants of `registrationRoots` that may be runtime `kind: "mod"` roots. Empty fails closed. |
72
+ | `storageRoots` | `[]` | Up to 16 operator-approved parents for artifact and cache directories; not a source-registration allowlist. |
73
+ | `workspaces` | `[]` | Up to 1,000 statically reviewed workspace registrations; configured plus runtime registrations may never exceed 1,000. |
74
+ | `http` | loopback defaults below | Streamable HTTP policy. An omitted/default HTTP block has no credentials, so the HTTP executable refuses to start until authentication is configured. Stdio does not require HTTP authentication. |
75
+
76
+ The configuration also rejects unsafe combined budgets: `scanMaxBytes` multiplied by
77
+ `http.maxConcurrentRequests` must be at most 512 MiB, while `maxBodyBytes` multiplied by
78
+ `maxConcurrentRequests` must be at most 16 MiB. HTTP concurrency has a fixed maximum of two so two
79
+ simultaneous offline renders cannot exceed the supported process-safety model.
80
+
81
+ `serverStateRoot` is mandatory whenever `writePolicy` is `"transactions"`. It must be absolute,
82
+ resolve to a canonical directory through components that contain no symbolic links or junctions,
83
+ and it must not overlap any configured or runtime source, fixture, artifact, cache, registration,
84
+ writable-registration, or storage root. The server stores the native canonical spelling, including
85
+ expanding harmless Windows 8.3 names, only after checking every existing component for links.
86
+ The server creates one random 32-byte journal HMAC key there with mode `0600`; the surrounding
87
+ POSIX directory must exclude group/other access. Windows operators must grant only the dedicated
88
+ server account access through the directory DACL. Keep the same state root when restarting or
89
+ temporarily changing to read-only mode so existing journals remain verifiable and recoverable. Do
90
+ not copy a state root between unrelated deployments or expose it through a workspace mount.
91
+ The state filesystem and every runtime artifact filesystem must support same-volume hard links and
92
+ atomic rename/replacement. The server does not substitute a weaker ownership-claim or key-creation
93
+ protocol when those primitives are unavailable.
94
+
95
+ ## Workspace fields
96
+
97
+ | Field | Default | Validation and behavior |
98
+ | ----------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
99
+ | `id` | required | Lowercase identifier matching `[a-z][a-z0-9_-]{0,63}`; unique in the configuration. |
100
+ | `name` | required | Human-readable name, 1 through 200 characters. |
101
+ | `root` | required | Primary source root. Its root kind is selected by `kind`. |
102
+ | `kind` | `"mod"` | `"mod"`, `"game"`, or `"dependency"`. Only a mod primary root can ever be writable. |
103
+ | `gameRoot` | omitted | Optional additional read-only base-game source; it must not overlap another source in the workspace. |
104
+ | `dependencyRoots` | `[]` | Up to 16 ordered read-only dependency roots without replacement metadata. |
105
+ | `dependencies` | `[]` | Up to 16 ordered objects with required `root` and up to 1,000 `replacePaths`; mutually exclusive with non-empty `dependencyRoots`. |
106
+ | `replacePaths` | `[]` | Up to 1,000 safe relative paths owned by the primary source root. |
107
+ | `roots` | conventional roots below | Relative source-family search paths. Unknown root-family names are rejected. |
108
+ | `artifactRoot` | mod default; otherwise required | A mod defaults to `<root>/.hoi4-agent/artifacts`. A game/dependency primary workspace must name an operator-owned path under `storageRoots`. |
109
+ | `cacheRoot` | mod default; otherwise required | A mod defaults to `<root>/.hoi4-agent/cache`. A game/dependency primary workspace must name an operator-owned path under `storageRoots`. |
110
+ | `fixtureRoot` | omitted | Optional read-only fixture source. |
111
+ | `writeEnabled` | `false` | Effective only for `kind: "mod"` when global `writePolicy` is `"transactions"`. |
112
+
113
+ `registrationRoots`, `writableRegistrationRoots`, and `storageRoots` grant different capabilities:
114
+
115
+ - `registrationRoots` is consulted for runtime registration. The requested primary root and every
116
+ requested game, dependency, and fixture source must pass both lexical and canonical containment
117
+ beneath one of these roots. Statically configured `workspaces` come from the operator-reviewed
118
+ config file and are not required to be beneath `registrationRoots`.
119
+ - `writableRegistrationRoots` is a separate, default-empty capability. Every entry must remain
120
+ lexically and canonically beneath `registrationRoots`. A runtime primary root declared as
121
+ `kind: "mod"` must remain beneath one of these narrow roots even when `writeEnabled` is false,
122
+ because mod registration creates generated artifact/cache storage. A game or dependency root
123
+ listed only in `registrationRoots` cannot be relabelled as a writable mod by a caller.
124
+ - `storageRoots` permits generated files only. It never makes a directory eligible as a source.
125
+ Explicit artifact/cache paths outside a writable mod must canonicalize beneath one of these
126
+ roots.
127
+ - A mod may use its defaults or another descendant of the corresponding
128
+ `<mod>/.hoi4-agent/artifacts` or `<mod>/.hoi4-agent/cache` subtree. It may also use an explicit
129
+ path under `storageRoots`. Artifact and cache roots must be distinct, non-overlapping, and must
130
+ not overlap source roots.
131
+ - A `game` or `dependency` primary workspace is read-only and cannot place generated files in its
132
+ source tree. Both generated roots are therefore required and must be explicit operator-owned
133
+ descendants of `storageRoots`.
134
+
135
+ Read-only source roots may be shared only where the workspace-isolation checks permit it; a
136
+ workspace's internal primary/game/dependency/fixture roots must themselves be distinct and
137
+ non-overlapping. Writable mod roots and generated roots are protected from overlap with other
138
+ workspace-owned roots. The server creates approved artifact/cache directories when needed;
139
+ approval comes from containment, not from the directory merely existing.
140
+
141
+ For example, a read-only primary game workspace needs separate generated storage:
142
+
143
+ ```json
144
+ {
145
+ "storageRoots": ["/var/lib/hoi4-agent-tools"],
146
+ "workspaces": [
147
+ {
148
+ "id": "game-reference",
149
+ "name": "Installed Game Reference",
150
+ "kind": "game",
151
+ "root": "/srv/hoi4/game",
152
+ "artifactRoot": "/var/lib/hoi4-agent-tools/game-reference/artifacts",
153
+ "cacheRoot": "/var/lib/hoi4-agent-tools/game-reference/cache"
154
+ }
155
+ ]
156
+ }
157
+ ```
158
+
159
+ The same explicit-storage requirement applies when the primary `kind` is `"dependency"`.
160
+
161
+ `dependencyRoots` remains the concise form when dependencies declare no replacement ownership. Use `dependencies` instead when a dependency owns `replace_path` declarations; entries are ordered from lowest to highest precedence, and each replacement hides that subtree only in lower roots. The active mod's `replacePaths` remains the highest-precedence owner. The two dependency forms are mutually exclusive.
162
+
163
+ `hoi4.project_status` returns one authorized workspace per page when no `workspaceId` is supplied;
164
+ follow `nextCursor` until absent. Replacement ownership is summarized with exact counts and bounded
165
+ path samples, so a workspace with many `replace_path` entries cannot inflate a tool response.
166
+
167
+ ## Read and write policy
168
+
169
+ `writePolicy` defaults to `read-only`. Source apply/rollback requires `transactions` globally and `writeEnabled: true` on that mod workspace. A dependency or game registration remains read-only even if misconfigured.
170
+
171
+ `registrationRoots` controls runtime `hoi4.project_register`. A requested root must canonicalize beneath one of these roots, and a runtime mod additionally requires `writableRegistrationRoots`. HTTP principals also need `allowRegistration`. Granting `allowRegistration` permits that principal to register unclaimed sources beneath the configured capability roots, so use narrow roots or static reviewed workspaces for multi-user deployments. Runtime registration does not edit a client configuration or persist raw paths. It atomically records a hash-only owner/workspace claim in the canonical artifact root; later registrations of that physical store must match it. Reassigning a claimed store is therefore an explicit operator operation: stop the server, review/archive the claim and existing evidence, and choose whether to preserve or separately migrate data. The server never deletes or silently rebinds it.
172
+
173
+ Transaction mode does not accept pre-upgrade unauthenticated journal manifests. Preserve their
174
+ cache directories for operator review, then explicitly archive or remove them together with the
175
+ corresponding protected state decision; the server never guesses a migration or treats a public
176
+ integrity hash as authorization.
177
+
178
+ ## Conventional roots
179
+
180
+ Each workspace can override relative root lists:
181
+
182
+ - localisation: `localisation`, `localisation_synced`
183
+ - interface: `interface`
184
+ - GFX: `gfx`
185
+ - map: `map`
186
+ - focuses: `common/national_focus`
187
+ - scripted GUI: `common/scripted_guis`
188
+ - states: `history/states`
189
+
190
+ The exact default `roots` object is:
191
+
192
+ ```json
193
+ {
194
+ "localisation": ["localisation", "localisation_synced"],
195
+ "interface": ["interface"],
196
+ "gfx": ["gfx"],
197
+ "map": ["map"],
198
+ "focus": ["common/national_focus"],
199
+ "scriptedGui": ["common/scripted_guis"],
200
+ "states": ["history/states"]
201
+ }
202
+ ```
203
+
204
+ Adapters can change these paths, not the safety model or source semantics.
205
+
206
+ ## HTTP configuration
207
+
208
+ Loopback static token example:
209
+
210
+ ```json
211
+ {
212
+ "http": {
213
+ "host": "127.0.0.1",
214
+ "port": 3210,
215
+ "allowedOrigins": ["https://agent.example.test"],
216
+ "trustedProxyAddresses": [],
217
+ "tokens": [
218
+ {
219
+ "principal": "developer",
220
+ "tokenEnv": "HOI4_AGENT_HTTP_TOKEN",
221
+ "workspaceIds": ["example"],
222
+ "allowRegistration": false
223
+ }
224
+ ],
225
+ "principals": [],
226
+ "maxBodyBytes": 1048576,
227
+ "headersTimeoutMs": 10000,
228
+ "requestTimeoutMs": 30000,
229
+ "keepAliveTimeoutMs": 5000,
230
+ "maxConnections": 64,
231
+ "maxRequestsPerSocket": 100,
232
+ "maxConcurrentRequests": 2,
233
+ "maxSessions": 128,
234
+ "maxSessionsPerPrincipal": 32,
235
+ "maxEventStreams": 32,
236
+ "maxEventStreamsPerPrincipal": 4,
237
+ "maxSessionEventBytes": 1048576,
238
+ "maxEventStoreBytes": 16777216,
239
+ "requestsPerMinute": 120,
240
+ "sessionTtlSeconds": 3600
241
+ }
242
+ }
243
+ ```
244
+
245
+ Secrets are read from named environment variables and are not stored in config. A missing static
246
+ secret, a value shorter than 32 characters, or duplicate secret values make HTTP startup fail. See
247
+ [self-hosting](self-hosting.md) for OAuth configuration.
248
+
249
+ Every HTTP field is listed below. URLs are validated absolute URLs.
250
+
251
+ | Field | Default | Validation and behavior |
252
+ | ----------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
253
+ | `host` | `"127.0.0.1"` | Listen address. Static tokens are permitted only on `127.0.0.1`, `localhost`, or `::1`. |
254
+ | `port` | `3210` | 0 through 65,535; `0` requests an ephemeral port. |
255
+ | `publicUrl` | omitted | Canonical HTTP(S) origin or exact `/mcp` endpoint. Required for OAuth. A non-loopback listener or URL requires HTTPS public OAuth policy, including when a public reverse proxy reaches a loopback listener. Credentials, path prefixes, query, and fragment are forbidden. |
256
+ | `allowedOrigins` | `[]` | Exact HTTP(S) origins (`scheme://host[:port]`) without credentials, paths, queries, or fragments; opaque origins such as `null` are rejected. A present `Origin` header must match. Non-loopback deployments require at least one. |
257
+ | `trustedProxyAddresses` | `[]` | Exact IPv4/IPv6 socket-peer addresses allowed to supply `X-Forwarded-For` for the pre-auth rate key only; no CIDR, hostname, other forwarded-header trust, or implicit trust. |
258
+ | `tokens` | `[]` | Static-token grants. Mutually exclusive with `oauth`. |
259
+ | `principals` | `[]` | OAuth subject allowlist and workspace grants. OAuth startup requires at least one entry. |
260
+ | `oauth` | omitted | OAuth/OIDC JWT verification settings. |
261
+ | `maxBodyBytes` | `1048576` | 1,024 through 16,777,216 JSON bytes. |
262
+ | `headersTimeoutMs` | `10000` | 1,000 through 120,000; cannot exceed `requestTimeoutMs`. |
263
+ | `requestTimeoutMs` | `30000` | 1,000 through 300,000 to receive the complete request. |
264
+ | `keepAliveTimeoutMs` | `5000` | 1,000 through 120,000 and strictly less than `headersTimeoutMs`. |
265
+ | `maxConnections` | `64` | 1 through 100,000 accepted server connections. |
266
+ | `maxRequestsPerSocket` | `100` | 1 through 100,000 requests before a socket is retired. |
267
+ | `maxConcurrentRequests` | `2` | 1 through 2 admitted requests, enforced before JSON parsing and authentication. This fixed ceiling bounds concurrent offline render work. |
268
+ | `maxSessions` | `128` | 1 through 10,000 active plus pending MCP sessions globally. |
269
+ | `maxSessionsPerPrincipal` | `32` | 1 through 10,000 active plus pending sessions per principal, also capped by `maxSessions`. |
270
+ | `maxEventStreams` | `32` | 1 through 10,000 simultaneous resumable GET streams globally. |
271
+ | `maxEventStreamsPerPrincipal` | `4` | 1 through 10,000 simultaneous streams per principal. |
272
+ | `maxSessionEventBytes` | `1048576` | 64 KiB through 64 MiB of replay history per session; cannot exceed `maxEventStoreBytes`. |
273
+ | `maxEventStoreBytes` | `16777216` | 64 KiB through 256 MiB of replay history shared across sessions. |
274
+ | `requestsPerMinute` | `120` | 1 through 100,000 in each fixed minute, independently before auth per client address and after auth per principal. |
275
+ | `sessionTtlSeconds` | `3600` | 60 through 86,400; renewed by an authorized request. |
276
+
277
+ Each `tokens` entry requires `principal`, `tokenEnv`, and at least one configured `workspaceId`;
278
+ `allowRegistration` defaults to `false`. Token principals and environment-variable names must be
279
+ unique. Each `principals` entry requires `principal`; `workspaceIds` defaults to `[]` and
280
+ `allowRegistration` to `false`. OAuth principals must be unique, and static-token/OAuth principal
281
+ namespaces must be disjoint. Every granted workspace ID must exist in the static configuration.
282
+
283
+ The `oauth` object requires `issuer`, `jwksUri`, `audience`, and at least one
284
+ `authorizationServers` URL. `requiredScopes` defaults to `["hoi4:read"]`. `algorithms` defaults to
285
+ `["RS256"]` and accepts only `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`, or `EdDSA`.