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.
- package/CHANGELOG.md +42 -0
- package/LICENSE +201 -0
- package/README.md +140 -2
- package/SECURITY.md +17 -0
- package/dist/bin/http.d.ts +3 -0
- package/dist/bin/http.d.ts.map +1 -0
- package/dist/bin/http.js +27 -0
- package/dist/bin/http.js.map +1 -0
- package/dist/bin/setup.d.ts +3 -0
- package/dist/bin/setup.d.ts.map +1 -0
- package/dist/bin/setup.js +188 -0
- package/dist/bin/setup.js.map +1 -0
- package/dist/bin/stdio.d.ts +3 -0
- package/dist/bin/stdio.d.ts.map +1 -0
- package/dist/bin/stdio.js +36 -0
- package/dist/bin/stdio.js.map +1 -0
- package/dist/hoi4_agent_tools/core/artifacts.d.ts +117 -0
- package/dist/hoi4_agent_tools/core/artifacts.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/artifacts.js +1047 -0
- package/dist/hoi4_agent_tools/core/artifacts.js.map +1 -0
- package/dist/hoi4_agent_tools/core/canonical.d.ts +13 -0
- package/dist/hoi4_agent_tools/core/canonical.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/canonical.js +41 -0
- package/dist/hoi4_agent_tools/core/canonical.js.map +1 -0
- package/dist/hoi4_agent_tools/core/configuration.d.ts +137 -0
- package/dist/hoi4_agent_tools/core/configuration.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/configuration.js +383 -0
- package/dist/hoi4_agent_tools/core/configuration.js.map +1 -0
- package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts +18 -0
- package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/diagnostic-collector.js +45 -0
- package/dist/hoi4_agent_tools/core/diagnostic-collector.js.map +1 -0
- package/dist/hoi4_agent_tools/core/diagnostics.d.ts +26 -0
- package/dist/hoi4_agent_tools/core/diagnostics.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/diagnostics.js +25 -0
- package/dist/hoi4_agent_tools/core/diagnostics.js.map +1 -0
- package/dist/hoi4_agent_tools/core/diff.d.ts +22 -0
- package/dist/hoi4_agent_tools/core/diff.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/diff.js +93 -0
- package/dist/hoi4_agent_tools/core/diff.js.map +1 -0
- package/dist/hoi4_agent_tools/core/engine.d.ts +56 -0
- package/dist/hoi4_agent_tools/core/engine.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/engine.js +319 -0
- package/dist/hoi4_agent_tools/core/engine.js.map +1 -0
- package/dist/hoi4_agent_tools/core/image-diff.d.ts +14 -0
- package/dist/hoi4_agent_tools/core/image-diff.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/image-diff.js +121 -0
- package/dist/hoi4_agent_tools/core/image-diff.js.map +1 -0
- package/dist/hoi4_agent_tools/core/index.d.ts +64 -0
- package/dist/hoi4_agent_tools/core/index.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/index.js +963 -0
- package/dist/hoi4_agent_tools/core/index.js.map +1 -0
- package/dist/hoi4_agent_tools/core/index.public.d.ts +16 -0
- package/dist/hoi4_agent_tools/core/index.public.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/index.public.js +16 -0
- package/dist/hoi4_agent_tools/core/index.public.js.map +1 -0
- package/dist/hoi4_agent_tools/core/render-budget.d.ts +51 -0
- package/dist/hoi4_agent_tools/core/render-budget.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/render-budget.js +109 -0
- package/dist/hoi4_agent_tools/core/render-budget.js.map +1 -0
- package/dist/hoi4_agent_tools/core/result.d.ts +45 -0
- package/dist/hoi4_agent_tools/core/result.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/result.js +26 -0
- package/dist/hoi4_agent_tools/core/result.js.map +1 -0
- package/dist/hoi4_agent_tools/core/scanner.d.ts +28 -0
- package/dist/hoi4_agent_tools/core/scanner.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/scanner.js +136 -0
- package/dist/hoi4_agent_tools/core/scanner.js.map +1 -0
- package/dist/hoi4_agent_tools/core/server-state.d.ts +31 -0
- package/dist/hoi4_agent_tools/core/server-state.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/server-state.js +413 -0
- package/dist/hoi4_agent_tools/core/server-state.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/encoding.d.ts +10 -0
- package/dist/hoi4_agent_tools/core/source/encoding.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/encoding.js +54 -0
- package/dist/hoi4_agent_tools/core/source/encoding.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/index.d.ts +7 -0
- package/dist/hoi4_agent_tools/core/source/index.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/index.js +7 -0
- package/dist/hoi4_agent_tools/core/source/index.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/lexer.d.ts +30 -0
- package/dist/hoi4_agent_tools/core/source/lexer.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/lexer.js +266 -0
- package/dist/hoi4_agent_tools/core/source/lexer.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/limits.d.ts +21 -0
- package/dist/hoi4_agent_tools/core/source/limits.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/limits.js +49 -0
- package/dist/hoi4_agent_tools/core/source/limits.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/localisation.d.ts +20 -0
- package/dist/hoi4_agent_tools/core/source/localisation.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/localisation.js +163 -0
- package/dist/hoi4_agent_tools/core/source/localisation.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/parser.d.ts +44 -0
- package/dist/hoi4_agent_tools/core/source/parser.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/parser.js +334 -0
- package/dist/hoi4_agent_tools/core/source/parser.js.map +1 -0
- package/dist/hoi4_agent_tools/core/source/rewrite.d.ts +10 -0
- package/dist/hoi4_agent_tools/core/source/rewrite.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/source/rewrite.js +28 -0
- package/dist/hoi4_agent_tools/core/source/rewrite.js.map +1 -0
- package/dist/hoi4_agent_tools/core/svg-text.d.ts +34 -0
- package/dist/hoi4_agent_tools/core/svg-text.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/svg-text.js +127 -0
- package/dist/hoi4_agent_tools/core/svg-text.js.map +1 -0
- package/dist/hoi4_agent_tools/core/transaction-limits.d.ts +9 -0
- package/dist/hoi4_agent_tools/core/transaction-limits.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/transaction-limits.js +9 -0
- package/dist/hoi4_agent_tools/core/transaction-limits.js.map +1 -0
- package/dist/hoi4_agent_tools/core/transactions.d.ts +162 -0
- package/dist/hoi4_agent_tools/core/transactions.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/transactions.js +1181 -0
- package/dist/hoi4_agent_tools/core/transactions.js.map +1 -0
- package/dist/hoi4_agent_tools/core/workspace.d.ts +68 -0
- package/dist/hoi4_agent_tools/core/workspace.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/core/workspace.js +794 -0
- package/dist/hoi4_agent_tools/core/workspace.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/compiler.d.ts +9 -0
- package/dist/hoi4_agent_tools/focus/compiler.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/compiler.js +273 -0
- package/dist/hoi4_agent_tools/focus/compiler.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/continuous-render.d.ts +32 -0
- package/dist/hoi4_agent_tools/focus/continuous-render.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/continuous-render.js +179 -0
- package/dist/hoi4_agent_tools/focus/continuous-render.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/drift.d.ts +22 -0
- package/dist/hoi4_agent_tools/focus/drift.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/drift.js +124 -0
- package/dist/hoi4_agent_tools/focus/drift.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/geometry.d.ts +17 -0
- package/dist/hoi4_agent_tools/focus/geometry.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/geometry.js +35 -0
- package/dist/hoi4_agent_tools/focus/geometry.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/importer.d.ts +9 -0
- package/dist/hoi4_agent_tools/focus/importer.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/importer.js +732 -0
- package/dist/hoi4_agent_tools/focus/importer.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/index.d.ts +14 -0
- package/dist/hoi4_agent_tools/focus/index.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/index.js +14 -0
- package/dist/hoi4_agent_tools/focus/index.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/layout.d.ts +5 -0
- package/dist/hoi4_agent_tools/focus/layout.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/layout.js +653 -0
- package/dist/hoi4_agent_tools/focus/layout.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/limits.d.ts +9 -0
- package/dist/hoi4_agent_tools/focus/limits.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/limits.js +9 -0
- package/dist/hoi4_agent_tools/focus/limits.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/lint.d.ts +14 -0
- package/dist/hoi4_agent_tools/focus/lint.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/lint.js +839 -0
- package/dist/hoi4_agent_tools/focus/lint.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/model.d.ts +303 -0
- package/dist/hoi4_agent_tools/focus/model.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/model.js +20 -0
- package/dist/hoi4_agent_tools/focus/model.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/native-effects.d.ts +9 -0
- package/dist/hoi4_agent_tools/focus/native-effects.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/native-effects.js +563 -0
- package/dist/hoi4_agent_tools/focus/native-effects.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/planning.d.ts +15 -0
- package/dist/hoi4_agent_tools/focus/planning.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/planning.js +241 -0
- package/dist/hoi4_agent_tools/focus/planning.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/presentation.d.ts +24 -0
- package/dist/hoi4_agent_tools/focus/presentation.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/presentation.js +204 -0
- package/dist/hoi4_agent_tools/focus/presentation.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/render.d.ts +35 -0
- package/dist/hoi4_agent_tools/focus/render.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/render.js +491 -0
- package/dist/hoi4_agent_tools/focus/render.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/service.d.ts +82 -0
- package/dist/hoi4_agent_tools/focus/service.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/service.js +492 -0
- package/dist/hoi4_agent_tools/focus/service.js.map +1 -0
- package/dist/hoi4_agent_tools/focus/source-update.d.ts +6 -0
- package/dist/hoi4_agent_tools/focus/source-update.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/focus/source-update.js +328 -0
- package/dist/hoi4_agent_tools/focus/source-update.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts +37 -0
- package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/animation-manifest.js +66 -0
- package/dist/hoi4_agent_tools/gui/animation-manifest.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/assets.d.ts +71 -0
- package/dist/hoi4_agent_tools/gui/assets.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/assets.js +629 -0
- package/dist/hoi4_agent_tools/gui/assets.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/dds.d.ts +17 -0
- package/dist/hoi4_agent_tools/gui/dds.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/dds.js +245 -0
- package/dist/hoi4_agent_tools/gui/dds.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/helpers.d.ts +101 -0
- package/dist/hoi4_agent_tools/gui/helpers.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/helpers.js +1072 -0
- package/dist/hoi4_agent_tools/gui/helpers.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/index.d.ts +15 -0
- package/dist/hoi4_agent_tools/gui/index.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/index.js +15 -0
- package/dist/hoi4_agent_tools/gui/index.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/layout.d.ts +6 -0
- package/dist/hoi4_agent_tools/gui/layout.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/layout.js +753 -0
- package/dist/hoi4_agent_tools/gui/layout.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/limits.d.ts +25 -0
- package/dist/hoi4_agent_tools/gui/limits.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/limits.js +27 -0
- package/dist/hoi4_agent_tools/gui/limits.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/renderer.d.ts +18 -0
- package/dist/hoi4_agent_tools/gui/renderer.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/renderer.js +388 -0
- package/dist/hoi4_agent_tools/gui/renderer.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/scenario.d.ts +66 -0
- package/dist/hoi4_agent_tools/gui/scenario.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/scenario.js +191 -0
- package/dist/hoi4_agent_tools/gui/scenario.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/source-graph.d.ts +7 -0
- package/dist/hoi4_agent_tools/gui/source-graph.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/source-graph.js +1074 -0
- package/dist/hoi4_agent_tools/gui/source-graph.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/source-patch.d.ts +13 -0
- package/dist/hoi4_agent_tools/gui/source-patch.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/source-patch.js +90 -0
- package/dist/hoi4_agent_tools/gui/source-patch.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/studio.d.ts +86 -0
- package/dist/hoi4_agent_tools/gui/studio.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/studio.js +830 -0
- package/dist/hoi4_agent_tools/gui/studio.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/tga.d.ts +16 -0
- package/dist/hoi4_agent_tools/gui/tga.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/tga.js +157 -0
- package/dist/hoi4_agent_tools/gui/tga.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/types.d.ts +322 -0
- package/dist/hoi4_agent_tools/gui/types.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/types.js +19 -0
- package/dist/hoi4_agent_tools/gui/types.js.map +1 -0
- package/dist/hoi4_agent_tools/gui/validators.d.ts +8 -0
- package/dist/hoi4_agent_tools/gui/validators.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/gui/validators.js +951 -0
- package/dist/hoi4_agent_tools/gui/validators.js.map +1 -0
- package/dist/hoi4_agent_tools/map/bmp.d.ts +62 -0
- package/dist/hoi4_agent_tools/map/bmp.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/bmp.js +363 -0
- package/dist/hoi4_agent_tools/map/bmp.js.map +1 -0
- package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts +5 -0
- package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/diagnostic-limit.js +21 -0
- package/dist/hoi4_agent_tools/map/diagnostic-limit.js.map +1 -0
- package/dist/hoi4_agent_tools/map/index.d.ts +8 -0
- package/dist/hoi4_agent_tools/map/index.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/index.js +8 -0
- package/dist/hoi4_agent_tools/map/index.js.map +1 -0
- package/dist/hoi4_agent_tools/map/limits.d.ts +13 -0
- package/dist/hoi4_agent_tools/map/limits.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/limits.js +13 -0
- package/dist/hoi4_agent_tools/map/limits.js.map +1 -0
- package/dist/hoi4_agent_tools/map/model.d.ts +269 -0
- package/dist/hoi4_agent_tools/map/model.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/model.js +1114 -0
- package/dist/hoi4_agent_tools/map/model.js.map +1 -0
- package/dist/hoi4_agent_tools/map/operations.d.ts +401 -0
- package/dist/hoi4_agent_tools/map/operations.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/operations.js +2717 -0
- package/dist/hoi4_agent_tools/map/operations.js.map +1 -0
- package/dist/hoi4_agent_tools/map/render.d.ts +90 -0
- package/dist/hoi4_agent_tools/map/render.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/render.js +759 -0
- package/dist/hoi4_agent_tools/map/render.js.map +1 -0
- package/dist/hoi4_agent_tools/map/service.d.ts +81 -0
- package/dist/hoi4_agent_tools/map/service.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/service.js +695 -0
- package/dist/hoi4_agent_tools/map/service.js.map +1 -0
- package/dist/hoi4_agent_tools/map/validation.d.ts +23 -0
- package/dist/hoi4_agent_tools/map/validation.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/map/validation.js +1177 -0
- package/dist/hoi4_agent_tools/map/validation.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts +3 -0
- package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/prompts/register.js +50 -0
- package/dist/hoi4_agent_tools/mcp/prompts/register.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts +9 -0
- package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/registry/metadata.js +10 -0
- package/dist/hoi4_agent_tools/mcp/registry/metadata.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/resources/register.d.ts +5 -0
- package/dist/hoi4_agent_tools/mcp/resources/register.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/resources/register.js +278 -0
- package/dist/hoi4_agent_tools/mcp/resources/register.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/security/auth.d.ts +24 -0
- package/dist/hoi4_agent_tools/mcp/security/auth.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/security/auth.js +234 -0
- package/dist/hoi4_agent_tools/mcp/security/auth.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts +35 -0
- package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/base-tools.js +835 -0
- package/dist/hoi4_agent_tools/mcp/server/base-tools.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/create.d.ts +5 -0
- package/dist/hoi4_agent_tools/mcp/server/create.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/create.js +26 -0
- package/dist/hoi4_agent_tools/mcp/server/create.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts +133 -0
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.js +127 -0
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/progress.d.ts +8 -0
- package/dist/hoi4_agent_tools/mcp/server/progress.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/progress.js +21 -0
- package/dist/hoi4_agent_tools/mcp/server/progress.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/result.d.ts +232 -0
- package/dist/hoi4_agent_tools/mcp/server/result.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/server/result.js +353 -0
- package/dist/hoi4_agent_tools/mcp/server/result.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts +5 -0
- package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/tools/focus.js +1059 -0
- package/dist/hoi4_agent_tools/mcp/tools/focus.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts +111 -0
- package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/tools/gui.js +598 -0
- package/dist/hoi4_agent_tools/mcp/tools/gui.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/tools/map.d.ts +5 -0
- package/dist/hoi4_agent_tools/mcp/tools/map.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/tools/map.js +685 -0
- package/dist/hoi4_agent_tools/mcp/tools/map.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts +58 -0
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js +181 -0
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts +26 -0
- package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/event-store.js +86 -0
- package/dist/hoi4_agent_tools/mcp/transports/event-store.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/http.d.ts +28 -0
- package/dist/hoi4_agent_tools/mcp/transports/http.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/http.js +744 -0
- package/dist/hoi4_agent_tools/mcp/transports/http.js.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts +15 -0
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js +51 -0
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js.map +1 -0
- package/dist/hoi4_agent_tools/runtime.d.ts +4 -0
- package/dist/hoi4_agent_tools/runtime.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/runtime.js +27 -0
- package/dist/hoi4_agent_tools/runtime.js.map +1 -0
- package/dist/hoi4_agent_tools/schemas/common.d.ts +74 -0
- package/dist/hoi4_agent_tools/schemas/common.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/schemas/common.js +51 -0
- package/dist/hoi4_agent_tools/schemas/common.js.map +1 -0
- package/dist/hoi4_agent_tools/schemas/focus.d.ts +784 -0
- package/dist/hoi4_agent_tools/schemas/focus.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/schemas/focus.js +330 -0
- package/dist/hoi4_agent_tools/schemas/focus.js.map +1 -0
- package/dist/hoi4_agent_tools/schemas/index.d.ts +5 -0
- package/dist/hoi4_agent_tools/schemas/index.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/schemas/index.js +5 -0
- package/dist/hoi4_agent_tools/schemas/index.js.map +1 -0
- package/dist/hoi4_agent_tools/schemas/map.d.ts +654 -0
- package/dist/hoi4_agent_tools/schemas/map.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/schemas/map.js +570 -0
- package/dist/hoi4_agent_tools/schemas/map.js.map +1 -0
- package/dist/hoi4_agent_tools/schemas/transaction.d.ts +259 -0
- package/dist/hoi4_agent_tools/schemas/transaction.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/schemas/transaction.js +104 -0
- package/dist/hoi4_agent_tools/schemas/transaction.js.map +1 -0
- package/dist/hoi4_agent_tools/version.d.ts +6 -0
- package/dist/hoi4_agent_tools/version.d.ts.map +1 -0
- package/dist/hoi4_agent_tools/version.js +7 -0
- package/dist/hoi4_agent_tools/version.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/docs/README.md +22 -0
- package/docs/adr/0001-runtime-and-language.md +16 -0
- package/docs/adr/0002-lossless-source-model.md +18 -0
- package/docs/adr/0003-image-and-font-codecs.md +18 -0
- package/docs/adr/0004-focus-layout.md +16 -0
- package/docs/adr/0005-offline-rendering.md +18 -0
- package/docs/adr/0006-mcp-sdk-and-protocol.md +16 -0
- package/docs/adr/0007-storage-and-transactions.md +24 -0
- package/docs/adr/0008-test-strategy.md +18 -0
- package/docs/adr/0009-packaging-and-registry.md +16 -0
- package/docs/adr/0010-unsupported-and-refusal-policy.md +18 -0
- package/docs/adr/0011-http-security.md +16 -0
- package/docs/adr/README.md +13 -0
- package/docs/architecture.md +60 -0
- package/docs/artifacts.md +133 -0
- package/docs/compatibility.md +33 -0
- package/docs/completion-report.md +60 -0
- package/docs/configuration.md +285 -0
- package/docs/focus-workflow.md +68 -0
- package/docs/gui-workflow.md +121 -0
- package/docs/limitations.md +30 -0
- package/docs/map-workflow.md +89 -0
- package/docs/performance.md +117 -0
- package/docs/release.md +181 -0
- package/docs/research/mcp-2026-07-10.md +46 -0
- package/docs/research/source-ledger.md +68 -0
- package/docs/security.md +139 -0
- package/docs/self-hosting.md +168 -0
- package/docs/testing.md +43 -0
- package/docs/third-party-notices.md +11 -0
- package/docs/transactions.md +162 -0
- package/docs/troubleshooting.md +46 -0
- package/package.json +98 -5
- package/schemas/configuration.schema.json +794 -0
- package/schemas/continuous-focus-palette.schema.json +325 -0
- package/schemas/focus-plan.schema.json +902 -0
- package/schemas/focus-planning-sidecar.schema.json +364 -0
- package/schemas/gui-animation-source.schema.json +176 -0
- package/schemas/gui-helper.schema.json +301 -0
- package/schemas/gui-scenario.schema.json +298 -0
- package/schemas/map-operation.schema.json +2284 -0
- package/schemas/operation-result.schema.json +344 -0
- package/schemas/transaction-manifest.schema.json +685 -0
- package/server.json +32 -0
package/docs/testing.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Testing and fixtures
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
npm ci
|
|
5
|
+
npm run test
|
|
6
|
+
npm run test:coverage
|
|
7
|
+
npm run fixtures:check
|
|
8
|
+
npm run build
|
|
9
|
+
npm run inspector
|
|
10
|
+
npm run check
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Portable CI
|
|
14
|
+
|
|
15
|
+
CI owns all inputs:
|
|
16
|
+
|
|
17
|
+
- a 255-focus workspace with ten route families, exclusions, convergence, planner-sidecar hidden/crisis/shared-support metadata, relative/pinned/automatic positions, a real `continuous_focus_palette`, active localisation, a two-frame sprite texture, and resolved synthetic references;
|
|
18
|
+
- a 170-element five-tab GUI with a dynamic list, target cards, meters, distinct frame animation, modal, all required states, licensed fixture font, and defect variants;
|
|
19
|
+
- a nontrivial 24-bit BMP mini-world with islands, exact split masks/polygons, state/region/network/adjacency data, and invalid variants.
|
|
20
|
+
|
|
21
|
+
Suites cover parser byte round trips, encodings, property cases, source locations, overlay/load order, custom focus roots, exact referenced-texture scanning, strict schemas, deterministic goldens, generated-source maps, planning-sidecar enrichment, image comparisons, font metrics, bitmap diffs, transaction fault/recovery, path security, cross-workspace isolation, stdio, Streamable HTTP, auth/origin/session limits, resource/prompt/tool discovery, package installation, Registry schema, and end-to-end agent workflows.
|
|
22
|
+
|
|
23
|
+
## Local integration
|
|
24
|
+
|
|
25
|
+
Set paths explicitly; tests are read-only:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
HOI4_GAME_ROOT=/path/to/game \
|
|
29
|
+
HOI4_EXTERNAL_MOD_ROOT=/path/to/mod \
|
|
30
|
+
npm run test:local
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Optionally set `HOI4_DEPENDENCY_ROOTS` to dependency roots separated by the operating system path delimiter (`;` on Windows, `:` on POSIX).
|
|
34
|
+
|
|
35
|
+
Three local tests parse and deterministically render a large vanilla focus tree, build and render a current GUI/GFX/font source graph, and scan/render/store the current province map with state, coastline, supply-node, and railway data against one external mod. Generated caches and artifacts stay in a temporary directory that is removed after the suite; the external roots remain read-only, no files are copied into the repository, and the game is never launched.
|
|
36
|
+
|
|
37
|
+
`npm run test:local` uses a project-owned validation runner around the standalone local Vitest configuration. It routes only `tests/local`, preserves ordinary Vitest failure codes, and independently requires the exact focus, GUI, and map qualification workflows to finish. The command fails when paths are absent and the tests skip, when a required workflow is not collected, when a worker terminates or runs out of memory, when Vitest reports any unhandled error, or when the reporter lifecycle is incomplete. A zero Vitest exit code alone is therefore not treated as success.
|
|
38
|
+
|
|
39
|
+
## Performance
|
|
40
|
+
|
|
41
|
+
Run the explicit, non-CI benchmark with `npm run benchmark`. It records cold/warm shared scans, the 255-node focus layout/render, the 150+ element GUI state gallery, and a full cross-root synthetic map scan plus all base-layer renders. Cache keys include content hashes; a deterministic unit test mutates content while preserving size and modification time to prove safe invalidation.
|
|
42
|
+
|
|
43
|
+
Current measurements, methodology, and rerun instructions are in [performance.md](performance.md).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## Roboto
|
|
4
|
+
|
|
5
|
+
HOI4 Agent Tools depends on `@fontsource-variable/roboto` version 5.2.10 for deterministic, host-independent artifact labels and the project-owned synthetic BMFont fixture.
|
|
6
|
+
|
|
7
|
+
Copyright 2011 The Roboto Project Authors (<https://github.com/googlefonts/roboto-classic>). Roboto-Italic[wdth,wght].ttf: Copyright 2011 The Roboto Project Authors (<https://github.com/googlefonts/roboto-classic>).
|
|
8
|
+
|
|
9
|
+
Roboto is licensed under the SIL Open Font License, Version 1.1 (`OFL-1.1`). The complete license text is distributed as `LICENSE` in the installed `@fontsource-variable/roboto` package. The font package is pinned in `package.json` and `package-lock.json`; generated SVG/PNG documents may contain derived glyph outlines or pixels as permitted by the OFL.
|
|
10
|
+
|
|
11
|
+
The application source remains licensed under Apache-2.0 as stated in the repository [LICENSE](../LICENSE). Third-party components retain their respective licenses.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Transactions, diffs, and rollback
|
|
2
|
+
|
|
3
|
+
## Plan
|
|
4
|
+
|
|
5
|
+
A domain `plan_changes`/`map_plan` call calculates every affected source and binary file before writing. Proposed bytes are validated in memory. The plan persists content-addressed before/after blobs and produces source, binary, pixel, and rendered comparison artifacts where applicable.
|
|
6
|
+
|
|
7
|
+
Every proposed source target is resolved with write access restricted to the workspace's canonical
|
|
8
|
+
mod root. Transaction calls cannot write the game, a dependency, a fixture, artifact storage,
|
|
9
|
+
cache storage, or the reserved `.hoi4-agent` subtree as mod source.
|
|
10
|
+
|
|
11
|
+
The transaction API requires both validation phases: planning must return at least one explicit in-memory check, and apply must return at least one explicit post-write check. Missing or empty callbacks fail with `TRANSACTION_DRY_RUN_VALIDATION_REQUIRED` or `TRANSACTION_POST_VALIDATION_REQUIRED`; callers cannot opt out through the typed core API. Diff artifacts are committed as one batch with the journal only after the planning validator returns structurally valid results. A rejected validator or journal admission leaves artifact inventory unchanged. A completed dry run whose explicit checks fail remains reviewable as a blocked plan and cannot be applied.
|
|
12
|
+
|
|
13
|
+
Text diffs use an exact deterministic algorithm with a fixed memory bound and cancellation checks. If an exact diff would exceed the bound, planning stops with `DIFF_COMPLEXITY_LIMIT`; the server does not substitute a truncated, approximate, or misleading diff.
|
|
14
|
+
|
|
15
|
+
The returned transaction ID is not approval. Review:
|
|
16
|
+
|
|
17
|
+
- operations and unresolved choices;
|
|
18
|
+
- affected file list;
|
|
19
|
+
- source and visual diff resources;
|
|
20
|
+
- diagnostic locations and validation gates;
|
|
21
|
+
- expiry and plan hash.
|
|
22
|
+
|
|
23
|
+
Plan and mutation tool results keep only a bounded path sample plus the authenticated transaction
|
|
24
|
+
manifest resource. Review artifacts remain listed in that manifest rather than being duplicated as
|
|
25
|
+
hundreds of inline resource links. `hoi4.transaction_diff` returns at most 20 files, operation
|
|
26
|
+
summaries, and artifact links per page; follow every `nextCursor` until it is absent. Cursors are
|
|
27
|
+
bound to the immutable plan hash and fail if reused for a different transaction. Inline validation
|
|
28
|
+
contains at most five checks with an explicit truncation diagnostic; the manifest is the complete
|
|
29
|
+
validation record.
|
|
30
|
+
|
|
31
|
+
Focus plans include both the edited Clausewitz source and its adjacent `.focus-plan.json` design sidecar in one transaction. The manifest also retains the proposed generated-source map and sidecar artifacts through apply and rollback so each generated focus range remains traceable to its planning/source node.
|
|
32
|
+
|
|
33
|
+
## Apply
|
|
34
|
+
|
|
35
|
+
Call `hoi4.transaction_apply` separately with `workspaceId`, `transactionId`, and the exact 64-character `expectedPlanHash`. The server rejects a different principal/workspace, changed roots, failed dry run, expiry, reused state, or any changed before-hash.
|
|
36
|
+
|
|
37
|
+
The persisted immutable plan payload is recomputed against `planHash` whenever a manifest is
|
|
38
|
+
loaded. A recomputable integrity hash remains useful for deterministic diagnostics, but is never an
|
|
39
|
+
authorization boundary. Every exact-version manifest also carries an HMAC-SHA-256 tag over the
|
|
40
|
+
complete canonical payload except that tag itself, including expiry, state, applied files, failure,
|
|
41
|
+
rollback status, operations, plan, diagnostics, and validation. The random 256-bit key is created
|
|
42
|
+
atomically beneath the non-overlapping operator `serverStateRoot`; it is never derived from public
|
|
43
|
+
workspace data or exposed through MCP.
|
|
44
|
+
|
|
45
|
+
The same protected state stores one authenticated latest-revision head per admitted journal. An
|
|
46
|
+
older valid manifest is rejected as replay. Manifest replacement is cache-first and caller state is
|
|
47
|
+
updated only after persistence: a crash between cache replacement and protected-head commit may
|
|
48
|
+
reconcile only an HMAC-valid exact `+1` successor. Missing heads, gaps, conflicting same revisions,
|
|
49
|
+
and forged successors fail closed. Successor creation is durable before older revision-head files
|
|
50
|
+
are removed, so an old-head cleanup failure does not break loading.
|
|
51
|
+
|
|
52
|
+
Ordinary status, diff, and resource reads are pure: they accept only an exact protected head and
|
|
53
|
+
never promote state. An authenticated cache-first exact successor reports
|
|
54
|
+
`TRANSACTION_HEAD_RECONCILIATION_REQUIRED` until startup recovery or an authorized write path
|
|
55
|
+
performs the narrowly allowed reconciliation.
|
|
56
|
+
|
|
57
|
+
Unauthenticated journals from an older deployment are deliberately not auto-migrated. They remain
|
|
58
|
+
fail-closed for operator review because no server-held secret can prove their origin. Archive or
|
|
59
|
+
remove them explicitly before reclaiming their quota; do not manufacture an authentication tag.
|
|
60
|
+
|
|
61
|
+
During apply the server:
|
|
62
|
+
|
|
63
|
+
1. takes the exclusive workspace lock;
|
|
64
|
+
2. rechecks every precondition;
|
|
65
|
+
3. writes and flushes same-volume staged files;
|
|
66
|
+
4. journals backups and replacements in deterministic order;
|
|
67
|
+
5. rebuilds the shared index;
|
|
68
|
+
6. runs post-write validation;
|
|
69
|
+
7. removes temporary backups only after success.
|
|
70
|
+
|
|
71
|
+
The workspace lock serializes cooperating server processes that use the same cache. Before each
|
|
72
|
+
replacement, the current source hash is checked again; after post-write validation, every result
|
|
73
|
+
hash is checked. These checks detect stale ordinary edits, but they are not a race-proof
|
|
74
|
+
filesystem sandbox against a hostile operating-system principal.
|
|
75
|
+
|
|
76
|
+
## Failure and recovery
|
|
77
|
+
|
|
78
|
+
Any error starts rollback in reverse file order. Existing backups or persisted blobs restore exact original bytes, including BMP headers and padding. Restores stage and flush bytes before atomically renaming over the current target; they never unlink an existing target before a blob replacement. A durable `rolling_back` journal can also resume the legacy interrupted state where that target is already missing, but only after verifying its persisted before-blob. Startup scans unfinished journals and completes rollback before accepting a new write.
|
|
79
|
+
|
|
80
|
+
Runtime registration definitions are not persisted, but their hash-only ownership claims are.
|
|
81
|
+
Their unfinished journals are recovered only after the same principal re-registers an exactly
|
|
82
|
+
matching canonical workspace and the persistent claim is verified, before status or write access
|
|
83
|
+
is returned to the caller.
|
|
84
|
+
|
|
85
|
+
Lock owners record the host, process, server instance, and process start time. A dead owner on the same host is cleared during startup recovery; an ownerless acquisition lock is cleared only after a 30-second grace period. A live local owner and every different- or unknown-host owner remain authoritative. Automatic cross-host crash recovery is intentionally unsupported: deployments sharing a workspace/cache filesystem across hosts must provide single-writer orchestration and operator-confirmed recovery rather than relying on local PID evidence.
|
|
86
|
+
|
|
87
|
+
Multi-file atomicity is logical and recoverable, not an operating-system transaction. External
|
|
88
|
+
processes can briefly observe replacement steps. Under an operator-controlled filesystem, success
|
|
89
|
+
is returned only after post-write validation and final result-hash verification. A principal able
|
|
90
|
+
to concurrently replace directories, links, mounts, or files outside the transaction lock already
|
|
91
|
+
has direct filesystem authority and is outside the application security boundary; the server does
|
|
92
|
+
not claim race-proof atomicity against that actor.
|
|
93
|
+
|
|
94
|
+
## Journal retention and quotas
|
|
95
|
+
|
|
96
|
+
Transaction journals live under `<cacheRoot>/transactions`. The configurable defaults are 128
|
|
97
|
+
journals and 536,870,912 bytes per workspace cache. A plan must also fit its own rollback blobs,
|
|
98
|
+
serialized manifest, and replacement-work estimate beneath the byte ceiling. The plan is refused
|
|
99
|
+
with `TRANSACTION_JOURNAL_LIMIT` before a usable journal is committed if either the count, stored
|
|
100
|
+
bytes, or single-plan work budget would be exceeded. No smaller or truncated rollback journal is
|
|
101
|
+
substituted.
|
|
102
|
+
|
|
103
|
+
One manifest is bounded to 1,000 changed files, 1,000 operations, 10,000 read dependencies, 100
|
|
104
|
+
validation checks, 100 diagnostics, 512 artifacts, and 1,000 applied-file entries. Inputs over a
|
|
105
|
+
count limit or the existing serialized journal/work-byte budget are rejected, never truncated.
|
|
106
|
+
Post-write validation is preflighted against the combined check and diagnostic counts before the
|
|
107
|
+
manifest is mutated. A 100+1 overflow triggers exact rollback while preserving a schema-bounded
|
|
108
|
+
authenticated terminal journal.
|
|
109
|
+
|
|
110
|
+
Before committing a new plan, the server performs narrowly scoped retention cleanup:
|
|
111
|
+
|
|
112
|
+
- expired `planned` and `rolled_back` journals are removed by deleting their protected head first
|
|
113
|
+
and cache journal second. A crash or later reintroduction of the cache copy then fails for a
|
|
114
|
+
missing head rather than replaying;
|
|
115
|
+
- an incomplete transaction directory with no manifest is removed only after it is older than
|
|
116
|
+
`transactionTtlSeconds`;
|
|
117
|
+
- `applied`, `failed`, `applying`, and `rolling_back` journals are not quota-evicted. Interrupted
|
|
118
|
+
states are handled by recovery instead;
|
|
119
|
+
- malformed, integrity-failing, or otherwise unreadable journals are retained and continue to
|
|
120
|
+
count against quota rather than being guessed safe to delete.
|
|
121
|
+
|
|
122
|
+
Only the latest protected revision is retained per live journal. Cache-without-head planned or
|
|
123
|
+
rolled-back remnants from an interrupted admission/prune are authenticated and removed safely;
|
|
124
|
+
active or unauthenticated remnants remain fail-closed. Head-without-cache remnants are removed
|
|
125
|
+
while reconciling a workspace. Protected state therefore remains bounded by admitted cache
|
|
126
|
+
journals rather than growing with revision or expiry churn.
|
|
127
|
+
|
|
128
|
+
After that cleanup, the server deterministically accepts the complete plan or refuses it. It does
|
|
129
|
+
not evict a valid applied/failed journal to make room. Operators who intentionally remove terminal
|
|
130
|
+
journals also remove their status, audit evidence, persisted blobs, and any later explicit rollback
|
|
131
|
+
ability.
|
|
132
|
+
|
|
133
|
+
Diff artifact creation and journal admission share a failure boundary. If the journal count or byte
|
|
134
|
+
check rejects a plan, the artifact store removes only content and provenance files created for that
|
|
135
|
+
attempt; artifact inventory is unchanged and any identical artifact retained by another operation
|
|
136
|
+
remains addressable.
|
|
137
|
+
|
|
138
|
+
## Explicit rollback
|
|
139
|
+
|
|
140
|
+
`hoi4.transaction_rollback` is available after successful apply. It first verifies that every current file still has the transaction's after-hash. An external edit makes rollback stale, protecting later work from being overwritten.
|
|
141
|
+
|
|
142
|
+
Rollback accepts cancellation through its path/hash verification preflight. Once byte restoration
|
|
143
|
+
starts, restore plus authenticated journal advancement is deliberately non-cancellable so a client
|
|
144
|
+
disconnect cannot strand a partial rollback.
|
|
145
|
+
|
|
146
|
+
Status/manifest reads and runtime recovery enumeration accept cancellation around filesystem
|
|
147
|
+
reads, JSON/schema validation, and protected-head verification. Once recovery begins restoring
|
|
148
|
+
source bytes, it follows the same non-cancellable critical-phase rule.
|
|
149
|
+
|
|
150
|
+
Transaction manifests are readable as:
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
hoi4-agent://workspace/{workspaceId}/transaction/{transactionId}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Manifest resources use the same 1 MiB `offset`/`length` byte ranges as artifacts. A complete
|
|
157
|
+
strict-UTF-8 manifest may be returned as MCP `text`; every partial range is a base64 `blob`.
|
|
158
|
+
Advance `offset` by the decoded byte count and continue until a chunk is shorter than the requested
|
|
159
|
+
length. Transaction manifests have a separate fixed 16 MiB serialized ceiling, independent of the
|
|
160
|
+
larger rollback-blob journal budget.
|
|
161
|
+
Canonical resource bytes are cached by stable file identity and protected revision, with at most
|
|
162
|
+
eight entries and 16 MiB total, so later ranges do not repeatedly rebuild a large manifest object.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
## Configuration not found
|
|
4
|
+
|
|
5
|
+
Set `HOI4_AGENT_CONFIG` to an absolute path or add `--config PATH` to the server command. Run `hoi4-agent-tools-setup --diagnose --config PATH`.
|
|
6
|
+
|
|
7
|
+
## Workspace/path rejected
|
|
8
|
+
|
|
9
|
+
Use a registered workspace-relative path. Confirm the canonical root is beneath `registrationRoots`; runtime mods also require the separate `writableRegistrationRoots` capability. Check for junctions/symlinks, parent segments, device names, trailing dots/spaces, or alternate data streams. Game and dependencies are intentionally read-only.
|
|
10
|
+
|
|
11
|
+
## Apply reports stale
|
|
12
|
+
|
|
13
|
+
The source changed after planning. Do not reuse the transaction. Scan and produce a new dry run so review evidence matches current files.
|
|
14
|
+
|
|
15
|
+
## Transaction state rejected
|
|
16
|
+
|
|
17
|
+
Transaction mode requires an absolute, persistent `serverStateRoot` that does not overlap any
|
|
18
|
+
source or generated-storage capability. Run setup with `--enable-writes --server-state ROOT`, then
|
|
19
|
+
run `--diagnose`. Preserve the same private state root across restarts. A missing key, malformed or
|
|
20
|
+
replayed head, unauthenticated legacy manifest, or cache/head revision conflict fails closed; review
|
|
21
|
+
and archive the affected journal/state evidence instead of regenerating a public hash or tag.
|
|
22
|
+
|
|
23
|
+
## Runtime registration conflicts after restart
|
|
24
|
+
|
|
25
|
+
The artifact root already has a hash-only runtime owner claim. Register the exact canonical
|
|
26
|
+
workspace as the same principal, or stop the server and perform an explicit operator-reviewed data
|
|
27
|
+
reassignment. Do not delete the claim alone or expect a renamed workspace ID, path alias, or second
|
|
28
|
+
principal to inherit the existing evidence.
|
|
29
|
+
|
|
30
|
+
## Render has missing/unsupported fields
|
|
31
|
+
|
|
32
|
+
Read the fidelity resource. Register the correct game/dependency root and supply a scenario value or asset. Unsupported fields stay raw; do not treat an approximation as engine evidence.
|
|
33
|
+
|
|
34
|
+
## HTTP refuses to start
|
|
35
|
+
|
|
36
|
+
Authentication is mandatory. Static token secrets must be at least 32 characters and are loopback-only. Public binding requires HTTPS `publicUrl`, OAuth settings, allowed origins, and principal grants.
|
|
37
|
+
|
|
38
|
+
## HTTP returns 401/403/404
|
|
39
|
+
|
|
40
|
+
- 401: missing/invalid/expired token or wrong issuer/audience.
|
|
41
|
+
- 403: origin, scope, principal/workspace, or cross-principal session rejected.
|
|
42
|
+
- 404 with session ID: session is unknown or expired; initialize a new MCP session.
|
|
43
|
+
|
|
44
|
+
## Inspector
|
|
45
|
+
|
|
46
|
+
Build first, then run `npm run inspector`. The Inspector proxy is a local debugging surface; do not expose it unauthenticated.
|
package/package.json
CHANGED
|
@@ -1,18 +1,111 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hoi4-agent-tools",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"mcpName": "io.github.klimPaskov/hoi4-agent-tools",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"description": "Source-preserving HOI4 workbench exposed as a safe Model Context Protocol server for coding agents",
|
|
6
|
+
"type": "module",
|
|
5
7
|
"license": "Apache-2.0",
|
|
8
|
+
"author": "HOI4 Agent Tools contributors",
|
|
9
|
+
"homepage": "https://github.com/klimPaskov/hoi4-agent-tools#readme",
|
|
10
|
+
"bugs": "https://github.com/klimPaskov/hoi4-agent-tools/issues",
|
|
6
11
|
"repository": {
|
|
7
12
|
"type": "git",
|
|
8
13
|
"url": "git+https://github.com/klimPaskov/hoi4-agent-tools.git"
|
|
9
14
|
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"mcp",
|
|
17
|
+
"model-context-protocol",
|
|
18
|
+
"hearts-of-iron-iv",
|
|
19
|
+
"hoi4",
|
|
20
|
+
"modding",
|
|
21
|
+
"coding-agents"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": "^22.0.0 || ^24.0.0"
|
|
25
|
+
},
|
|
10
26
|
"files": [
|
|
11
|
-
"
|
|
27
|
+
"dist/",
|
|
28
|
+
"docs/",
|
|
29
|
+
"schemas/",
|
|
30
|
+
"server.json",
|
|
31
|
+
"README.md",
|
|
32
|
+
"CHANGELOG.md",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"SECURITY.md"
|
|
12
35
|
],
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"import": "./dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./schemas/*": "./schemas/*"
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"hoi4-agent-tools": "./dist/bin/stdio.js",
|
|
45
|
+
"hoi4-agent-tools-http": "./dist/bin/http.js",
|
|
46
|
+
"hoi4-agent-tools-setup": "./dist/bin/setup.js"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc -p tsconfig.build.json",
|
|
50
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
51
|
+
"lint": "eslint .",
|
|
52
|
+
"format": "prettier --write .",
|
|
53
|
+
"format:check": "prettier --check .",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:unit": "vitest run tests/unit",
|
|
56
|
+
"test:integration": "vitest run tests/integration",
|
|
57
|
+
"test:local": "tsx scripts/run-local-tests.ts",
|
|
58
|
+
"test:coverage": "vitest run --coverage",
|
|
59
|
+
"benchmark": "node --expose-gc --import tsx scripts/benchmark.ts",
|
|
60
|
+
"fixtures:generate": "npm run fixtures:generate:focus && npm run fixtures:generate:gui && npm run fixtures:generate:map",
|
|
61
|
+
"fixtures:generate:focus": "tsx scripts/generate-fixtures.ts",
|
|
62
|
+
"fixtures:generate:gui": "tsx scripts/generate-gui-fixture.ts",
|
|
63
|
+
"fixtures:generate:map": "tsx scripts/generate-map-fixture.ts",
|
|
64
|
+
"fixtures:check": "npm run fixtures:generate && tsx scripts/check-generated.ts fixtures",
|
|
65
|
+
"schemas:generate": "tsx scripts/generate-schemas.ts",
|
|
66
|
+
"schemas:check": "tsx scripts/generate-schemas.ts && tsx scripts/check-generated.ts schemas",
|
|
67
|
+
"registry:validate": "tsx scripts/validate-registry.ts",
|
|
68
|
+
"publication:verify": "tsx scripts/verify-publication.ts",
|
|
69
|
+
"publication:install": "tsx scripts/verify-public-install.ts",
|
|
70
|
+
"release:artifact:verify": "tsx scripts/verify-release-artifact.ts",
|
|
71
|
+
"release:order:verify": "tsx scripts/verify-npm-release-order.ts",
|
|
72
|
+
"pack:check": "tsx scripts/check-package.ts",
|
|
73
|
+
"inspector": "tsx scripts/run-inspector.ts",
|
|
74
|
+
"check": "npm run format:check && npm run lint && npm run typecheck && npm run test && npm run fixtures:check && npm run schemas:check && npm run build && npm run pack:check && npm run registry:validate",
|
|
75
|
+
"prepack": "npm run build"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@fontsource-variable/roboto": "5.2.10",
|
|
79
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
80
|
+
"express": "5.2.1",
|
|
81
|
+
"fast-glob": "3.3.3",
|
|
82
|
+
"fontkit": "2.0.4",
|
|
83
|
+
"iconv-lite": "0.7.3",
|
|
84
|
+
"jose": "6.1.3",
|
|
85
|
+
"sharp": "0.35.3",
|
|
86
|
+
"zod": "4.4.3"
|
|
87
|
+
},
|
|
88
|
+
"devDependencies": {
|
|
89
|
+
"@eslint/js": "10.0.1",
|
|
90
|
+
"@modelcontextprotocol/inspector": "0.22.0",
|
|
91
|
+
"@types/express": "5.0.6",
|
|
92
|
+
"@types/fontkit": "2.0.9",
|
|
93
|
+
"@types/node": "22.20.1",
|
|
94
|
+
"@types/pixelmatch": "5.2.6",
|
|
95
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
96
|
+
"ajv": "8.20.0",
|
|
97
|
+
"ajv-formats": "3.0.1",
|
|
98
|
+
"eslint": "10.6.0",
|
|
99
|
+
"fast-check": "4.9.0",
|
|
100
|
+
"pixelmatch": "7.2.0",
|
|
101
|
+
"prettier": "3.9.5",
|
|
102
|
+
"tsx": "4.23.0",
|
|
103
|
+
"typescript": "6.0.3",
|
|
104
|
+
"typescript-eslint": "8.63.0",
|
|
105
|
+
"vitest": "4.1.10"
|
|
106
|
+
},
|
|
13
107
|
"publishConfig": {
|
|
14
108
|
"access": "public",
|
|
15
|
-
"provenance":
|
|
16
|
-
"tag": "bootstrap"
|
|
109
|
+
"provenance": true
|
|
17
110
|
}
|
|
18
111
|
}
|