hoi4-agent-tools 0.0.0-bootstrap.1 → 0.1.3
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 +50 -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 +69 -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 +200 -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
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Agent Nudger map workflow
|
|
2
|
+
|
|
3
|
+
Agent Nudger is a headless declarative map transaction service for coding agents. HTML/PNG/JSON maps are inspection evidence, not a manual editor.
|
|
4
|
+
|
|
5
|
+
## Indexed sources
|
|
6
|
+
|
|
7
|
+
The shared scan connects province bitmap and definitions, states, strategic regions, terrain/continent values, adjacency CSV, supply nodes, railways, victory points, resources/buildings, ownership/control/cores/claims, coast/ports, placement files, localisation, and dependency overrides. It honors each workspace's configured `roots.map`, `roots.states`, and `roots.localisation` directories. Files named by the active `default.map` (including adjacency, supply-node, railway, province, definition, and position files) remain authoritative for active reads and additive writes. Allocation and collision evidence additionally resolves every scanned root's own `default.map`-selected definition filename. A partial root without its own selector inherits the active definition filename for evidence only. If any selector-owning root has a malformed, parser-limited, or otherwise diagnostic-bearing `default.map`, map scan and indexing stop with `MAP_DEFAULT_MAP_SELECTOR_BLOCKED`; the service never substitutes `definition.csv`, `provinces.bmp`, or an inherited selector for an untrustworthy file.
|
|
8
|
+
|
|
9
|
+
## Geometry input
|
|
10
|
+
|
|
11
|
+
Province geometry apply requires one exact representation:
|
|
12
|
+
|
|
13
|
+
- selected existing province IDs;
|
|
14
|
+
- polygon with integer raster-boundary coordinates and explicit `fillRule: "even-odd"`;
|
|
15
|
+
- raster mask manifest with dimensions, origin, exact selected-pixel count, SHA-256, and canonical Base64 data;
|
|
16
|
+
- explicit absolute pixel region (`kind: pixels`).
|
|
17
|
+
|
|
18
|
+
Natural-language descriptions can guide a coding agent, but are not accepted as apply geometry.
|
|
19
|
+
|
|
20
|
+
Polygon vertices describe raster cell boundaries, not pixel indices. For a raster of `width` by `height`, every vertex must use an integer `x` from `0` through `width` and an integer `y` from `0` through `height`; the right and bottom boundary values `width` and `height` are valid. A greater coordinate is rejected with `MAP_GEOMETRY_OUT_OF_BOUNDS` before bounding-box or raster-work allocation, and polygon geometry is never silently clipped. Rasterization samples each candidate pixel at its center, `(x + 0.5, y + 0.5)`, using the required even-odd fill rule. Every selected center must still belong to the declared source province.
|
|
21
|
+
|
|
22
|
+
Raster-mask `data` is one byte per cell in row-major order. Every byte is exactly `0` or `1`; the SHA-256 is computed over those decoded bytes. The declared rectangle must fit the active raster, its byte length must equal `width * height`, and both the selected count and hash must match before every selected absolute pixel is checked against the source province. A mask may describe at most 20,000,000 cells, while any one split, mask, polygon, normal-adjacency transfer set, whole-province color update, or merge may select/recolor at most 1,000,000 pixels. Polygon admission also stops at 50,000,000 cell-point comparisons. Counts known from the manifest or indexed province geometry are checked before decoding, raster scanning, or selection-buffer allocation; an over-limit operation returns `MAP_SELECTED_PIXEL_BUDGET_BLOCKED` without proposing changes.
|
|
23
|
+
|
|
24
|
+
Selected geometry is represented internally as deterministic row-major numeric offsets rather than coordinate strings or `{x, y, color}` object arrays. The fixed 1,000,000-pixel ceiling keeps the primary four-byte offset buffer below 4 MiB (4,000,000 bytes), and uniform recolors copy the BMP once and write directly through those offsets. Explicit-coordinate duplicates and normal-adjacency transfer duplicates are detected by numeric offset. Source BMP operations use exact colors without antialiasing, interpolation, resizing, alpha conversion, or palette quantization. Untouched bytes and pixels remain identical.
|
|
25
|
+
|
|
26
|
+
## State payload policies
|
|
27
|
+
|
|
28
|
+
Split/merge/move operations do not guess manpower, resources, buildings, victory points, ownership, control, cores, claims, supply, or railway behavior. Each applicable payload must select an explicit policy:
|
|
29
|
+
|
|
30
|
+
- remain with original state;
|
|
31
|
+
- move with a named province;
|
|
32
|
+
- deterministic proportional distribution;
|
|
33
|
+
- exact manifest values;
|
|
34
|
+
- block until resolved.
|
|
35
|
+
|
|
36
|
+
Proportional rounding is deterministic and checked for conservation. The transaction remains blocked while any required policy is unresolved.
|
|
37
|
+
|
|
38
|
+
State move, split, and merge manifests also declare `ports`, `supplyNodes`, `railways`, and `positions` as `follow-province`. Those records are keyed by a selected province or its state association, so their source bytes remain unchanged except for the already modelled state-ID field on applicable position rows. The explicit literals make that behavior reviewable and prevent a partial distribution object from silently choosing it.
|
|
39
|
+
|
|
40
|
+
New states require an explicit name localisation key and a strict `localisation` policy. `existing` requires exactly one safe active `l_english` entry. `upsert` updates only the quoted value of that exact entry, appends to an explicitly targeted existing file, or creates an explicitly targeted file in a configured localisation root. Created and edited files are UTF-8 with BOM. Comments, key versions, spacing, line endings, ordering, unknown lines, and unrelated entries are preserved. Missing policy/target/key, duplicate active keys, unsafe paths, target mismatch, non-BOM encoding, or malformed target source blocks the whole operation before it contributes changes.
|
|
41
|
+
|
|
42
|
+
`StateRecord.capital` is inspection-only derived data: select the province with the highest exact victory-point value, then the lowest province ID on a tie. Current state source has no generic `capital = <province>` field. Agent Nudger never emits or patches that assignment. `update_state.changes.capital` is therefore an assertion, not a write: it is accepted only beside an exact `victoryPoints` payload whose derived result matches the assertion (including `null` for no victory points). State moves, splits, and merges derive the result from their explicit VP policy.
|
|
43
|
+
|
|
44
|
+
## Province merge and removal
|
|
45
|
+
|
|
46
|
+
`merge_provinces` and `remove_province` accept arbitrary compatible source IDs; removed IDs do not need to be the highest rows in `definition.csv`. Surviving definitions are compacted deterministically to contiguous IDs from zero in old-ID order. Removed source IDs map to the target's compacted ID, including when the target itself moves downward.
|
|
47
|
+
|
|
48
|
+
The same total old-to-new map is applied atomically to state membership, victory points, province buildings, strategic regions, special-adjacency endpoints and through-provinces, supply nodes, railways, unit positions, and building-position sea references. Source pixels are repainted with the target color; other province colors and pixels remain unchanged. Reference collisions created by the merge are resolved by the declared sum/deduplicate policy. Definition row order, comments and extra fields, text-file comments, line endings, and source encoding are retained by targeted rewrites, and rollback restores every affected file byte-for-byte.
|
|
49
|
+
|
|
50
|
+
Compaction requires an active definition table that is already contiguous from zero and unambiguous by ID and color. The merge also requires every source and target to share province type plus exact state and strategic-region membership; these are refusal cases rather than guessed redistribution.
|
|
51
|
+
|
|
52
|
+
Province split/create manifests explicitly retain existing victory points, province buildings, ports, supply nodes, railways, special adjacencies, positions, and entity locators on the source province while the selected pixels and new ID join the declared state and strategic region. To move connected data to the new province, place the corresponding exact remove/add or update operations after the split in the same ordered transaction. Omitting any retention field blocks the split before geometry changes are proposed.
|
|
53
|
+
|
|
54
|
+
## Province type migration
|
|
55
|
+
|
|
56
|
+
`update_province_definition` can migrate among `land`, `sea`, and `lake`. A real type change requires the complete strict `distribution` object; missing, partial, unknown, or transition-incompatible policies block the operation before it contributes any file change.
|
|
57
|
+
|
|
58
|
+
The policy explicitly covers:
|
|
59
|
+
|
|
60
|
+
- exact state membership (`retain`, `remove` with the indexed state ID, or `assign` with a target state ID);
|
|
61
|
+
- retention of state-level values in their current states and strategic-region membership;
|
|
62
|
+
- victory points and non-port province buildings (`retain-if-valid` or `remove`);
|
|
63
|
+
- naval-base buildings plus port placements/references (`retain-if-valid` or `remove`);
|
|
64
|
+
- supply nodes (`retain-if-valid` or `remove`);
|
|
65
|
+
- railways (`retain-if-valid` or remove every containing route; routes are never silently spliced);
|
|
66
|
+
- building and unit positions (`retain-if-valid` or `remove`) and entity locators (`retain-at-coordinate`, because type migration does not alter geometry);
|
|
67
|
+
- special adjacency endpoint/through references (`retain-if-valid` or `remove-referencing`).
|
|
68
|
+
|
|
69
|
+
Land-to-water requires removal from the exact indexed state and cannot leave that state without land. Water-to-land requires an explicit existing target state in the same strategic region. Sea targets require `ocean` terrain and continent `0`; lake targets require `lakes` and continent `0`; land targets require a non-water terrain and nonzero continent. Coastal fields and neighboring coastal changes remain exact manifest inputs and are verified by final map validation. Dependency removals and the definition edit share one hash-bound transaction, so apply and rollback cover every affected state, definition, network, position, and adjacency file together.
|
|
70
|
+
|
|
71
|
+
When a dependency should move rather than disappear, place the corresponding exact `update_state`, position, supply, railway, or adjacency operation after the type migration in the same ordered manifest. The migration policy removes or retains the old record explicitly; the later operation supplies the new target explicitly.
|
|
72
|
+
|
|
73
|
+
## Normal and special adjacency
|
|
74
|
+
|
|
75
|
+
Special adjacency rows remain declarative `add_adjacency` and `remove_adjacency` operations against the active `default.map` adjacency CSV. Normal topological adjacency is derived only from four-neighbor province bitmap geometry (including horizontal map wrap) and uses separate `add_normal_adjacency` and `remove_normal_adjacency` operations.
|
|
76
|
+
|
|
77
|
+
Every normal-adjacency operation carries unique exact pixel transfers with a coordinate, the province currently owning that pixel, and the destination province. Both requested endpoints and all transfer provinces must exist, every source must match the active raster, and every transfer must involve at least one requested endpoint. Agent Nudger repaints only those 24-bit pixels, rebuilds topology, and blocks/rolls back the operation unless the requested pair is present after an add or absent after a remove. Related coastal-definition changes remain explicit ordered operations in the same transaction.
|
|
78
|
+
|
|
79
|
+
## Allocation
|
|
80
|
+
|
|
81
|
+
ID/color allocation scans current game, dependencies, and mod sources first, including the definition table selected by each root's own `default.map` even when its filename differs from the active table. It records per-file/root maxima, used ranges, active definition contiguity, collisions, reserved values, selected value/color, and source revision. Explicit values are checked against the same evidence. A lower-root ID/color collision is returned as a named dependency conflict on the manifest operation that requested it. The allocator never assumes the numerically next value is safe.
|
|
82
|
+
|
|
83
|
+
## Artifacts and validation
|
|
84
|
+
|
|
85
|
+
Map base layers cover province, state, strategic region, terrain, continent, owner, controller, cores, claims, and coast. Overlays cover coastlines, ports, victory points, resources, state buildings, province buildings, supply nodes, railways, special adjacencies, building positions, unit positions, and weather positions. Resource/building data is present in canonical JSON as exact sorted state/province maps as well as deterministic PNG markers; HTML embeds the same JSON and PNG with pan/zoom controls. Render loops honor cancellation signals.
|
|
86
|
+
|
|
87
|
+
Every map preflight stores three content-addressed PNG/JSON/HTML triplets: baseline (`map-before.*`), proposed (`map-proposed.*`), and changed-pixel/semantic diff (`map-diff.*`). Their links and content hashes are included in the transaction plan hash. Semantic diff JSON includes definitions, state/region membership, full state values (manpower, category, resources, owner/controller, cores/claims, VPs, state/province buildings, and derived capital), ports, building/unit/weather positions, entity locators, supply, railways, exact special-adjacency records, and exact bitmap-derived normal-adjacency pairs.
|
|
88
|
+
|
|
89
|
+
Validation detects duplicate IDs/colors, bitmap-definition mismatches, invalid references, unassigned/multi-state land, invalid derived capitals/VPs/ports/regions/adjacency/supply/rail/placements, removed references, coast inconsistencies, duplicate state IDs, missing localisation, ownership/control conflicts, lost payload, changes outside declared bounds, and dependency conflicts. Geometry review includes disconnected components, one-pixel corridors, and enclosed province holes. Hole detection uses one bounded digital-topology pass and reports `MAP_PROVINCE_HOLE_REVIEW` as a warning because intentional enclaves can be valid; provinces crossing the horizontally wrapping seam are excluded from planar hole classification. Baseline comparisons diagnose dimensions, file/DIB header, row orientation, pixel offset, bit depth, and palette changes separately. Sea and legitimate lake/island cases are not misclassified as missing state membership.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Performance benchmark
|
|
2
|
+
|
|
3
|
+
Performance is recorded by an explicit developer command, not by a required CI timing assertion:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm ci
|
|
7
|
+
npm run benchmark
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The command prints a structured JSON report to stdout and exits nonzero only for correctness failures such as a fixture below its required size, a changed deterministic output, or unsafe cache invalidation. It has no elapsed-time or memory pass threshold. Timing and memory naturally vary by host, runtime, system load, and native codec build.
|
|
11
|
+
|
|
12
|
+
## Workload and methodology
|
|
13
|
+
|
|
14
|
+
The benchmark reads only checked-in, project-owned synthetic fixtures:
|
|
15
|
+
|
|
16
|
+
- `fixtures/focus`: 255 focuses in ten route families, scanned and indexed through `CoreEngine`, then laid out, linted, rendered, and stored through `FocusWorkbench`;
|
|
17
|
+
- `fixtures/gui`: 158 source elements and 203 visible scene elements, rendered through `ScriptedGuiStudio` as fourteen state scenes, three resolution/UI-scale scenes, five primary variants, comparison evidence, and 24 stored artifacts;
|
|
18
|
+
- `fixtures/map`: the complete 256×256 map fixture across game, dependency, and mod fixture roots, scanned and indexed through `AgentNudger`, then rendered in all ten current base layers (including continent) with all twelve current overlays enabled;
|
|
19
|
+
- a temporary copy of the focus workspace for metadata/content-hash cache checks.
|
|
20
|
+
|
|
21
|
+
The 255-focus fixture's 13,152×3,600 raster (47,347,200 pixels) is intentionally below the fixed 48-Mi-pixel per-artifact ceiling. The vanilla 5,632×2,048 map is also below the ceiling at scale 1, and its diff/before/proposed output trio charges 34,603,008 of the 64-Mi-pixel aggregate request budget. Larger scale or variant combinations are refused before allocation rather than included in benchmark timing.
|
|
22
|
+
|
|
23
|
+
Each workload runs twice in one process. **Cold** means the first invocation using a fresh service and empty temporary artifact/cache roots. **Warm** means the immediate repeat in the same Node process. The script does not evict the operating system's file cache, so “cold” is an application-level cold run, not a physical-disk cold run. With `--expose-gc`, garbage collection is requested before each measured pass.
|
|
24
|
+
|
|
25
|
+
Elapsed values use the monotonic Node performance clock. Memory is the process endpoint measurement from `process.memoryUsage()`, not a sampled peak. RSS includes native allocations from Sharp/libvips; because suites run sequentially, native allocator retention can affect later baselines and deltas. One cold and one warm pass keep the command bounded; rerun it several times externally when investigating variance.
|
|
26
|
+
|
|
27
|
+
The GUI total deliberately includes an explicit source scan followed by `renderAndStore`, which performs its own scan as part of the public workflow. The map render phase operates on the fully scanned index and renders all base layers without artifact-store I/O. Output fingerprints must match between cold and warm passes.
|
|
28
|
+
|
|
29
|
+
## Recorded result
|
|
30
|
+
|
|
31
|
+
Recorded at `2026-07-10T22:22:50.905Z` with this exact command from the repository root:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run benchmark
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Runtime and platform:
|
|
38
|
+
|
|
39
|
+
- Windows (`win32`) release `10.0.26200`, x64;
|
|
40
|
+
- AMD Ryzen 5 7500F 6-Core Processor; 12 logical processors;
|
|
41
|
+
- 32,375.906 MiB total physical memory;
|
|
42
|
+
- Node.js `v24.15.0`, V8 `13.6.233.17-node.48`;
|
|
43
|
+
- Sharp `0.35.3`, libvips `8.18.3`.
|
|
44
|
+
|
|
45
|
+
Times are milliseconds. Memory columns are endpoint delta MiB for the measured pass.
|
|
46
|
+
|
|
47
|
+
| Workload | Pass | Total | Scan/index | Layout or render/store | RSS Δ | Heap-used Δ |
|
|
48
|
+
| ------------------------------ | ---- | ---------: | -------------------: | ------------------------------------------: | ------: | ----------: |
|
|
49
|
+
| Focus (255 nodes) | Cold | 15,082.652 | 36.402 | layout 62.085; lint/render/store 14,983.948 | 21.820 | 12.223 |
|
|
50
|
+
| Focus (255 nodes) | Warm | 16,721.268 | 8.274 | layout 59.933; lint/render/store 16,652.932 | 55.937 | 4.343 |
|
|
51
|
+
| GUI (158 source / 203 visible) | Cold | 11,507.893 | 59.041 explicit scan | gallery render/store 11,448.837 | 200.343 | 47.387 |
|
|
52
|
+
| GUI (158 source / 203 visible) | Warm | 5,607.155 | 46.417 explicit scan | gallery render/store 5,560.708 | 49.492 | 48.742 |
|
|
53
|
+
| Map (65,536 pixels) | Cold | 852.390 | 31.467 | ten layers × twelve overlays 820.908 | -38.598 | 58.195 |
|
|
54
|
+
| Map (65,536 pixels) | Warm | 671.601 | 21.518 | ten layers × twelve overlays 650.073 | 20.762 | 30.028 |
|
|
55
|
+
|
|
56
|
+
Relevant output and input counts from the same run:
|
|
57
|
+
|
|
58
|
+
| Workload | Counts |
|
|
59
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
60
|
+
| Focus | 8 scanned files; 255 focuses; 10 route families; 6 artifacts |
|
|
61
|
+
| GUI | 7 scanned files; 158 source elements; 203 visible elements; 14 states; 3 resolutions; 5 primary variants; 24 artifacts; 14,455,435 output bytes |
|
|
62
|
+
| Map | 21 scanned files / 198,897 bytes; 65,536 pixels; 5 definition rows; 4 provinces with geometry; 3 states; 2 strategic regions; 10 base layers; 12 overlays per layer; 14,339 PNG bytes |
|
|
63
|
+
|
|
64
|
+
Cold and warm output fingerprints matched for all three workloads.
|
|
65
|
+
|
|
66
|
+
## Cache invalidation behavior
|
|
67
|
+
|
|
68
|
+
`WorkspaceScanner` reads file metadata and bytes on every scan and computes a SHA-256 content hash. `CoreEngine` derives its revision from each file's display path, load order, and content hash, then keys its in-memory scan/index cache by workspace ID and revision. Size and modification time are recorded as evidence but are not trusted as the semantic cache key.
|
|
69
|
+
|
|
70
|
+
Scan admission normally serializes physical scans for a workspace. If a scanner ignores cancellation, one replacement scan may run after the original request is aborted so current callers are not held behind abandoned work. At most two physical scanners may exist for that workspace in this state; a third request waits. Generation fencing prevents a stale late completion from replacing the current cache entry.
|
|
71
|
+
|
|
72
|
+
The benchmark changes only the copied fixture's modification time and confirms that the revision remains unchanged and the in-memory snapshot is reused. It then changes source bytes without changing file size or modification time and confirms that the content hash changes, the revision changes, and the cached snapshot is not reused. In the recorded run:
|
|
73
|
+
|
|
74
|
+
- baseline scan: 21.353 ms;
|
|
75
|
+
- metadata-only rescan/cache hit: 5.431 ms;
|
|
76
|
+
- same-size, same-mtime content change/rescan: 20.300 ms.
|
|
77
|
+
|
|
78
|
+
The deterministic unit test in `tests/unit/core-cache.test.ts` continuously checks this correctness property without asserting timing. Explicit transaction apply/rollback paths also invalidate the workspace cache; the content-derived revision remains the safety backstop for external edits.
|
|
79
|
+
|
|
80
|
+
The Scripted GUI Studio and Agent Nudger benchmark paths currently rebuild their domain scans/indexes on each call. Their warm figures therefore reflect runtime/JIT and operating-system cache effects rather than a domain-level memoization claim. Stored artifacts are content-addressed, but artifact storage is not treated as a parsed-source cache.
|
|
81
|
+
|
|
82
|
+
## Reproducing and comparing runs
|
|
83
|
+
|
|
84
|
+
Run from a clean install on the host being measured:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm ci
|
|
88
|
+
npm run --silent benchmark > benchmark-result.json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
No game installation, mod workspace, environment variable, network access, or proprietary input is used. The script creates all runtime storage below the operating system temporary directory and removes it on completion. Compare the JSON phase timings, memory samples, counts, and runtime/platform block; do not compare only the total time across unlike hosts.
|
|
92
|
+
|
|
93
|
+
To check cache correctness without collecting performance data:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm test -- tests/unit/core-cache.test.ts
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Opt-in installed-data qualification
|
|
100
|
+
|
|
101
|
+
The opt-in local suite is a compatibility qualification, not a CI performance threshold. It reads configured installed-game and external-mod roots in place, writes only to an operating-system temporary directory, and neither launches the game nor copies proprietary inputs into the project.
|
|
102
|
+
|
|
103
|
+
On the same Windows/Node host documented above, the final `2026-07-10` qualification completed all three required tests through the fail-closed `npm run test:local` harness:
|
|
104
|
+
|
|
105
|
+
| Workflow | Elapsed |
|
|
106
|
+
| ----------------------------------------------------------------------------------------------------------- | --------: |
|
|
107
|
+
| Large vanilla focus import, stable layout, and two deterministic renders, plus an external-mod focus render | 83.551 s |
|
|
108
|
+
| External GUI/GFX/font graph construction and two deterministic full/annotated renders | 56.019 s |
|
|
109
|
+
| External map scan plus state/coastline/supply/railway render and content-addressed PNG/JSON/HTML storage | 22.981 s |
|
|
110
|
+
| Total test time | 162.578 s |
|
|
111
|
+
|
|
112
|
+
The GUI qualification's canonical source-graph JSON was 302,497,021 bytes. The default
|
|
113
|
+
134,217,728-byte per-object ceiling remained enabled: storage produced a byte-exact three-chunk
|
|
114
|
+
resource bundle plus its canonical index, repeated the same render/storage call, and verified
|
|
115
|
+
deterministic output without truncating the graph or increasing the ceiling.
|
|
116
|
+
|
|
117
|
+
The reporter independently confirmed three completed tests and no unhandled worker error. Root paths and source-derived content are intentionally absent from the report. These timings vary with installed data, disk/cache state, processor, memory, and codec versions; only completion and deterministic/correct output are assertions.
|
package/docs/release.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Release and MCP Registry publication
|
|
2
|
+
|
|
3
|
+
Releases use strict stable Semantic Versioning and an immutable Git tag. Every public writer
|
|
4
|
+
re-queries both the direct tag and its optional annotated-tag peel immediately before the write.
|
|
5
|
+
The peeled commit must equal `GITHUB_SHA` and the commit recorded in the release artifact.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- a clean tested commit on `main`;
|
|
10
|
+
- package, server, source, schema, documentation, lockfile, and changelog versions synchronized;
|
|
11
|
+
- the public GitHub repository owned by the canonical `klimPaskov` account;
|
|
12
|
+
- GitHub release immutability enabled in repository settings before the first stable release;
|
|
13
|
+
- a public, pre-bootstrapped `ghcr.io/klimpaskov/hoi4-agent-tools` package;
|
|
14
|
+
- the npm namespace bootstrap completed and the trusted publisher configured;
|
|
15
|
+
- GitHub Actions OIDC available for ordinary npm and MCP Registry publication.
|
|
16
|
+
|
|
17
|
+
The release workflow uses the npm 11.16.0 CLI bundled with the pinned Node 24.18.0 LTS distribution.
|
|
18
|
+
No release job upgrades npm globally. The ordinary npm OIDC publisher does not check out source,
|
|
19
|
+
run `npm ci`, execute dependency lifecycle scripts, or install any package. It downloads the one
|
|
20
|
+
artifact made by `validate_pack`, checks its recorded commit and SHA-256/SHA-512 digests, rechecks
|
|
21
|
+
the public npm state and peeled Git tag, resolves the validated basename to a contained absolute
|
|
22
|
+
artifact path, and publishes that exact tarball with `--ignore-scripts` and provenance. The
|
|
23
|
+
absolute path is required because npm can parse a slash-containing relative path as a GitHub
|
|
24
|
+
repository shorthand. If either the legacy `NPM_TOKEN` or one-use `NPM_BOOTSTRAP_TOKEN` repository secret exists, the ordinary release fails
|
|
25
|
+
before requesting or using trusted-publisher credentials.
|
|
26
|
+
|
|
27
|
+
## One-time npm namespace bootstrap
|
|
28
|
+
|
|
29
|
+
An unclaimed package cannot have a trusted publisher configured. The one-time manual
|
|
30
|
+
`Bootstrap npm trusted publishing` workflow claims the namespace with the non-executable
|
|
31
|
+
prerelease `0.0.0-bootstrap.1`; it never publishes a stable release. The `.1` suffix preserves
|
|
32
|
+
the immutable audit trail of an earlier `.0` tag whose run stopped before npm accepted any
|
|
33
|
+
publication.
|
|
34
|
+
|
|
35
|
+
1. Create the immutable tag `npm-bootstrap-v0.0.0-bootstrap.1` on the reviewed `main` commit.
|
|
36
|
+
2. Create a short-lived npm granular access token with read/write access to **All Packages** and
|
|
37
|
+
bypass-2FA enabled. This broad initial scope is an npm limitation for an unclaimed namespace.
|
|
38
|
+
Give it the shortest practical expiry and store it only as `NPM_BOOTSTRAP_TOKEN`.
|
|
39
|
+
3. Dispatch `bootstrap-npm.yml` from that exact tag. The workflow has no `id-token` permission,
|
|
40
|
+
accepts only the hard-coded package/version/dist-tag, runs `npm audit signatures` before the
|
|
41
|
+
write, publishes a two-file non-executable tarball under the `bootstrap` dist-tag, and verifies
|
|
42
|
+
the public bytes and npm registry signature without the token.
|
|
43
|
+
4. Revoke the granular token immediately and delete `NPM_BOOTSTRAP_TOKEN`.
|
|
44
|
+
5. Configure npm trusted publishing for GitHub owner `klimPaskov`, repository
|
|
45
|
+
`hoi4-agent-tools`, and workflow `release.yml`; explicitly select the required allowed action `npm publish`.
|
|
46
|
+
npm requires an allowed action for configurations created after May 20, 2026.
|
|
47
|
+
|
|
48
|
+
The ordinary release workflow never supports token fallback. Do not create an `NPM_TOKEN`
|
|
49
|
+
secret, and delete `NPM_BOOTSTRAP_TOKEN` immediately after the namespace claim; either secret's
|
|
50
|
+
presence deliberately blocks the OIDC publisher.
|
|
51
|
+
|
|
52
|
+
On an entirely new npm package, the registry can additionally assign the sole bootstrap version
|
|
53
|
+
to `latest` even when the publish command explicitly selects `bootstrap`. The first stable release
|
|
54
|
+
accepts only the exact observed recovery state: versions contains only `0.0.0-bootstrap.1`, and
|
|
55
|
+
the only dist-tags are `bootstrap` and `latest`, both naming that version. Any extra version, tag,
|
|
56
|
+
different prerelease, missing bootstrap tag, or malformed state stops publication. Once the first
|
|
57
|
+
stable package is published, the normal strict stable-version monotonic and exact-rerun rules apply.
|
|
58
|
+
|
|
59
|
+
## Immutable fix-forward history
|
|
60
|
+
|
|
61
|
+
Stable tags and public package versions are never moved, deleted, or overwritten after a failed
|
|
62
|
+
release attempt. The retained history before `0.1.3` is:
|
|
63
|
+
|
|
64
|
+
- `v0.1.0` stopped during prepublication validation, before any public writer ran;
|
|
65
|
+
- `v0.1.1` stopped before npm accepted bytes because npm interpreted a slash-containing relative
|
|
66
|
+
tarball operand as GitHub repository shorthand;
|
|
67
|
+
- `v0.1.2` published the exact npm package with trusted-publisher provenance, then stopped in the
|
|
68
|
+
independent verifier because the pinned npm subprocess had been configured with the official
|
|
69
|
+
Registry URL without its trailing slash while the strict verifier required the canonical
|
|
70
|
+
slash-terminated spelling. npm signatures and attestations themselves verified successfully;
|
|
71
|
+
GHCR, GitHub Release, and MCP Registry writers were skipped.
|
|
72
|
+
|
|
73
|
+
`0.1.3` centralizes the exact canonical Registry URL used by the subprocess and verifier. The
|
|
74
|
+
normal stable-version monotonic gate treats the public `0.1.2` package as immutable history and
|
|
75
|
+
permits only a strictly newer version. Rerunning or fixing a release never authorizes rewriting a
|
|
76
|
+
tag, package version, image tag, release asset, or Registry version.
|
|
77
|
+
|
|
78
|
+
## Required pre-tag immutability check
|
|
79
|
+
|
|
80
|
+
GitHub's immutable-release settings endpoint requires repository `Administration:read`, which
|
|
81
|
+
the short-lived repository `GITHUB_TOKEN` cannot request. Do not add a long-lived administration
|
|
82
|
+
token to Actions for this check. Instead, the repository owner must run the authenticated check
|
|
83
|
+
below immediately before pushing each stable release tag:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
test "$(gh api \
|
|
87
|
+
--header 'X-GitHub-Api-Version: 2026-03-10' \
|
|
88
|
+
repos/klimPaskov/hoi4-agent-tools/immutable-releases \
|
|
89
|
+
--jq '.enabled')" = 'true'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
This owner check is a release prerequisite and must pass before the first public writer starts.
|
|
93
|
+
The workflow also requires the completed release to report `immutable: true` before MCP Registry
|
|
94
|
+
publication and final verification. That post-publication gate detects a skipped prerequisite,
|
|
95
|
+
but it cannot undo a mutable release; an administrator changing the setting between the owner
|
|
96
|
+
check and release publication is an external GitHub settings race that the release API offers no
|
|
97
|
+
conditional publish operation to close.
|
|
98
|
+
|
|
99
|
+
## One-time GHCR visibility bootstrap
|
|
100
|
+
|
|
101
|
+
GitHub creates the first personal-account container package as private. Run the pinned manual
|
|
102
|
+
`Bootstrap GHCR` workflow from public `main`, then change package visibility to **Public** in the
|
|
103
|
+
package settings. The bootstrap uses only the repository-scoped `GITHUB_TOKEN`, publishes only
|
|
104
|
+
the `bootstrap` tag, and verifies the authenticated index contains exact `linux/amd64` and
|
|
105
|
+
`linux/arm64` runtime manifests. GitHub exposes no supported API for changing a personal GHCR
|
|
106
|
+
package's visibility, so the bootstrap cannot prove anonymous access until an administrator makes
|
|
107
|
+
that newly created package public in the package settings.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
gh workflow run bootstrap-ghcr.yml --repo klimPaskov/hoi4-agent-tools --ref main
|
|
111
|
+
gh run watch --repo klimPaskov/hoi4-agent-tools
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
After changing visibility to **Public**, prove anonymous visibility and both runtime manifests with
|
|
115
|
+
a Docker configuration that contains no credentials:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
ANONYMOUS_DOCKER_CONFIG="$(mktemp -d)"
|
|
119
|
+
MANIFEST="$(DOCKER_CONFIG="$ANONYMOUS_DOCKER_CONFIG" \
|
|
120
|
+
docker buildx imagetools inspect --raw \
|
|
121
|
+
ghcr.io/klimpaskov/hoi4-agent-tools:bootstrap)"
|
|
122
|
+
RUNTIME_PLATFORMS="$(jq --raw-output \
|
|
123
|
+
'[.manifests[] | select(.platform.os == "linux") | "\(.platform.os)/\(.platform.architecture)"] | unique | sort | join(",")' \
|
|
124
|
+
<<<"$MANIFEST")"
|
|
125
|
+
rm -rf "$ANONYMOUS_DOCKER_CONFIG"
|
|
126
|
+
test "$RUNTIME_PLATFORMS" = 'linux/amd64,linux/arm64'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Local release audit
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm ci --ignore-scripts
|
|
133
|
+
npm audit --audit-level=high
|
|
134
|
+
npm audit signatures --ignore-scripts
|
|
135
|
+
npm run check
|
|
136
|
+
npm run test:coverage
|
|
137
|
+
npm run inspector
|
|
138
|
+
REGISTRY_LIVE_VALIDATION=1 npm run registry:validate
|
|
139
|
+
npm pack --dry-run --ignore-scripts --json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The workflow repeats `npm audit signatures` as a mandatory gate before any public writer can
|
|
143
|
+
start. It verifies the package-manager inputs used by the build and later verifies the newly
|
|
144
|
+
published package with `npm audit signatures --json --include-attestations`.
|
|
145
|
+
|
|
146
|
+
## Enforced publication chain
|
|
147
|
+
|
|
148
|
+
1. `validate_pack` verifies the remote peeled tag, `main` ancestry, canonical identity, npm
|
|
149
|
+
release order, repository/GHCR visibility, all checks, dependency signatures, and coverage. It
|
|
150
|
+
creates one tarball, `npm-pack.json`, and `release-identity.json` bound to the tarball digests
|
|
151
|
+
and source commit. This job has no OIDC permission.
|
|
152
|
+
2. `publish_npm` is the minimal OIDC job. It rejects both npm bearer-token secrets, downloads and validates the
|
|
153
|
+
exact artifact, rechecks npm ordering and the remote peeled tag, resolves the tarball to a
|
|
154
|
+
contained absolute file path, then publishes only when the version is absent. It performs no
|
|
155
|
+
checkout or dependency installation.
|
|
156
|
+
3. `verify_npm` has no OIDC permission. It downloads the public tarball byte-for-byte, runs the
|
|
157
|
+
official npm signature verifier, and passes the exact returned Sigstore bundle to npm's bundled
|
|
158
|
+
official Sigstore verifier with the expected Fulcio issuer and workflow certificate identity.
|
|
159
|
+
Verification requires one signed DSSE envelope, Rekor inclusion, the exact npm PURL and
|
|
160
|
+
SHA-512 subject, GitHub-hosted runner builder, release workflow/tag, and release commit. A
|
|
161
|
+
replayed bundle that differs from the current registry response is rejected.
|
|
162
|
+
4. `publish_image` first checks the anonymous exact SemVer tag and GitHub release as one state
|
|
163
|
+
matrix. A completed identical rerun is accepted only when the tag digest equals the immutable
|
|
164
|
+
`container-image.json` release asset. If the tag exists but the later GitHub release does not,
|
|
165
|
+
the workflow reconstructs `container-image.json` from the exact anonymous digest and permits
|
|
166
|
+
recovery only after the normal anonymous verifier proves the index digest, two runtime
|
|
167
|
+
platforms, image source/revision/version labels, SBOM subjects, provenance subjects, source
|
|
168
|
+
tag, and source SHA against `GITHUB_SHA`. A release without its image tag, any mismatched
|
|
169
|
+
release asset, or any failed provenance check stops the chain. A first publication builds from
|
|
170
|
+
the action's default Git context, pushes by digest without a tag, rechecks the Git tag, then
|
|
171
|
+
creates the exact SemVer tag once. No mutable major/minor tag is published.
|
|
172
|
+
5. `github_release` uses the authenticated, fully paginated List releases endpoint because
|
|
173
|
+
GitHub's by-tag endpoint exposes published releases but not drafts. It requires zero or one
|
|
174
|
+
exact tag match, cross-checks the published endpoint, and classifies the state as absent, a
|
|
175
|
+
mutable draft, or an already-complete immutable release. Drafts and publications must be owned
|
|
176
|
+
by the canonical GitHub Actions bot, use the exact tag-derived title and checked-in changelog
|
|
177
|
+
body, and expose no asset-label override. An existing draft may contain only a byte-for-byte
|
|
178
|
+
verified subset of the four expected uploaded assets from that same bot; unexpected,
|
|
179
|
+
duplicate, differently uploaded, non-uploaded, or differing assets stop the workflow without
|
|
180
|
+
deletion or replacement. The pinned release action stages missing assets with overwrite
|
|
181
|
+
disabled, canonicalizes the title and body, and leaves the release as a draft. Its numeric
|
|
182
|
+
release ID must match the unique authenticated listing. The workflow then requires the exact
|
|
183
|
+
npm tarball, both npm manifests, and `container-image.json`, repeats the unique-ID, metadata,
|
|
184
|
+
and byte checks, rechecks the peeled tag, and publishes that verified draft once.
|
|
185
|
+
Repository-level release immutability protects the assets and Git tag after publication. An
|
|
186
|
+
exact uploaded subset is resumable; a failed GitHub upload left in `starter` state or a draft
|
|
187
|
+
with noncanonical authorship or labels is a manual draft-cleanup blocker rather than permission
|
|
188
|
+
to overwrite or delete assets automatically. A completed rerun must match the one listed/public
|
|
189
|
+
release ID, canonical metadata, and all four immutable assets exactly.
|
|
190
|
+
6. `publish_registry` validates a checksum-pinned official publisher, uses GitHub OIDC, rechecks
|
|
191
|
+
the peeled tag after login, and publishes the exact `server.json` only when absent.
|
|
192
|
+
7. `verify_public` re-queries the peeled tag and verifies npm, immutable GitHub release assets,
|
|
193
|
+
anonymous GHCR digest/SBOM/provenance, and complete MCP Registry metadata. It also performs a
|
|
194
|
+
clean public install and registry-signature audit.
|
|
195
|
+
|
|
196
|
+
The global non-cancelling `release` concurrency group serializes releases. npm, GitHub release,
|
|
197
|
+
the exact container tag, and MCP Registry version are treated as immutable: existing matching
|
|
198
|
+
objects may make a completed rerun idempotent, while absent records, moved tags, ambiguous state,
|
|
199
|
+
or differing bytes/digests stop the chain. The Registry hosts metadata, not package bytes; local
|
|
200
|
+
validation alone is never treated as publication evidence.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# MCP protocol, SDK, security, and Registry review
|
|
2
|
+
|
|
3
|
+
Verified 2026-07-10 against official sources.
|
|
4
|
+
|
|
5
|
+
## Selected production baseline
|
|
6
|
+
|
|
7
|
+
- Final protocol: [`2025-11-25`](https://modelcontextprotocol.io/specification/2025-11-25).
|
|
8
|
+
- Production TypeScript SDK: [`@modelcontextprotocol/sdk` 1.29.0](https://www.npmjs.com/package/%40modelcontextprotocol/sdk?activeTab=versions), using the [`v1.x` server guide](https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.x/docs/server.md).
|
|
9
|
+
- Inspector: [`@modelcontextprotocol/inspector` 0.22.0](https://www.npmjs.com/package/%40modelcontextprotocol/inspector).
|
|
10
|
+
- Registry schema: [`2025-12-11/server.schema.json`](https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json).
|
|
11
|
+
- Registry publisher pinned by release workflow: `v1.7.9`; the workflow verifies the published checksum manifest and archive before extraction.
|
|
12
|
+
|
|
13
|
+
The breaking `2026-07-28` protocol and SDK v2 split packages were release candidates on the review date. They are not used for the production package. This decision must be revisited after the final release.
|
|
14
|
+
|
|
15
|
+
## Transport and capability requirements applied
|
|
16
|
+
|
|
17
|
+
- Stdio uses newline-delimited UTF-8 JSON-RPC, protocol-only stdout, and stderr logging.
|
|
18
|
+
- Streamable HTTP uses one `/mcp` POST/GET endpoint plus DELETE for session termination. It is stateful to support progress, cancellation, server notifications, SSE resumption, and secure random sessions.
|
|
19
|
+
- Sessions are bound to authenticated principals and expire; they are never authentication credentials.
|
|
20
|
+
- Tools use strict schemas and explicit read-only/destructive/idempotent/open-world annotations. Hints do not replace enforcement.
|
|
21
|
+
- Long work observes `AbortSignal` and sends monotonic progress only when the client supplies a progress token.
|
|
22
|
+
- Large results are content-addressed resources. Binary reads are bounded/chunkable because resource links defer retrieval but are not a byte-stream transport.
|
|
23
|
+
- Prompts describe safe workflows but grant no permission.
|
|
24
|
+
|
|
25
|
+
## Remote security requirements applied
|
|
26
|
+
|
|
27
|
+
- Loopback is the default bind address.
|
|
28
|
+
- Present origins and Host are validated; request body, concurrency, rate, session, and expiry limits are enforced.
|
|
29
|
+
- Every HTTP method authenticates. Static environment bearer tokens are loopback-only.
|
|
30
|
+
- Non-loopback operation requires HTTPS and OAuth/OIDC resource-server JWT verification: issuer, JWKS, audience, algorithms, expiry, subject, and required scopes.
|
|
31
|
+
- Protected Resource Metadata is exposed when OAuth is configured.
|
|
32
|
+
- Principal-to-workspace grants are server-side; token passthrough, query-string tokens, cross-principal sessions, and cross-workspace transactions are rejected.
|
|
33
|
+
|
|
34
|
+
Primary references: [transport specification](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), [authorization](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization), [security guidance](https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices), [tools](https://modelcontextprotocol.io/specification/2025-11-25/server/tools), [resources](https://modelcontextprotocol.io/specification/2025-11-25/server/resources), [prompts](https://modelcontextprotocol.io/specification/2025-11-25/server/prompts), [progress](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/progress), and [cancellation](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/cancellation).
|
|
35
|
+
|
|
36
|
+
## Registry requirements applied
|
|
37
|
+
|
|
38
|
+
- `package.json.mcpName` exactly matches `server.json.name`.
|
|
39
|
+
- The public npm package version, server version, and Registry version are exact and synchronized.
|
|
40
|
+
- Registry versions are immutable; release metadata is validated before publishing.
|
|
41
|
+
- npm is published first because the Registry stores discovery metadata rather than package bytes.
|
|
42
|
+
- The release workflow uses GitHub OIDC for `mcp-publisher` and npm provenance.
|
|
43
|
+
- npm trusted publishers created after May 20, 2026 require an explicit allowed action; this package selects `npm publish`, uses a GitHub-hosted runner with `id-token: write`, and does not restore a package-manager cache in release jobs.
|
|
44
|
+
- The pinned official publisher's live `validate` operation accepts this release's `server.json` before publication.
|
|
45
|
+
|
|
46
|
+
References: [Registry quickstart](https://modelcontextprotocol.io/registry/quickstart), [package types](https://modelcontextprotocol.io/registry/package-types), [versioning](https://modelcontextprotocol.io/registry/versioning), and [GitHub Actions publishing](https://modelcontextprotocol.io/registry/github-actions).
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# HOI4 source research ledger
|
|
2
|
+
|
|
3
|
+
Reviewed 2026-07-10. These sources informed format support and tests; no installed-game or third-party-mod content is included in this repository.
|
|
4
|
+
|
|
5
|
+
## Offline wiki snapshot
|
|
6
|
+
|
|
7
|
+
The supplied offline Hearts of Iron IV wiki snapshot was consulted for:
|
|
8
|
+
|
|
9
|
+
- `Data structures - Hearts of Iron 4 Wiki.md`: ordered blocks, variables/tokens, event targets, and generic script structure.
|
|
10
|
+
- `National focus modding - Hearts of Iron 4 Wiki.md`: tree assignment, prerequisite grouping, relative positions, exclusions, continuous focuses, icons, AI, filters, and localisation.
|
|
11
|
+
- `Interface modding - Hearts of Iron 4 Wiki.md`: containers, element types, scrolling, positions, orientation, and fonts.
|
|
12
|
+
- `Scripted GUI modding - Hearts of Iron 4 Wiki.md`: contexts, parents, visibility, effects/triggers, dynamic lists, properties, AI, templates, and scripted localisation.
|
|
13
|
+
- `Graphical asset modding - Hearts of Iron 4 Wiki.md`: sprite, frame animation, progress, and bitmap-font declarations.
|
|
14
|
+
- `Map modding - Hearts of Iron 4 Wiki.md`: BMP headers/palettes, coordinates, definitions, terrain, buildings, unit positions, adjacency, and supply.
|
|
15
|
+
- `State modding - Hearts of Iron 4 Wiki.md`: state/history/province/building/resource/victory-point structure and strategic-region constraints.
|
|
16
|
+
- `Localisation - Hearts of Iron 4 Wiki.md`: UTF-8 BOM, language headers, key grammar, versions, escaping, and scripted localisation.
|
|
17
|
+
- `Triggers`, `Effects`, and `Scopes`: ordered raw trigger/effect preservation and source-reference indexing.
|
|
18
|
+
|
|
19
|
+
The wiki remains useful background, but current official files and installed examples take precedence when they differ.
|
|
20
|
+
|
|
21
|
+
## Installed official documentation
|
|
22
|
+
|
|
23
|
+
Under `<HOI4_ROOT>/documentation`:
|
|
24
|
+
|
|
25
|
+
- `script_concept_documentation.md`: collections, contextual/formatted localisation, math expressions, and script constants.
|
|
26
|
+
- `triggers_documentation.md`: current trigger names/scopes, state/province/focus/railway references, and dynamic argument support.
|
|
27
|
+
- `effects_documentation.md`: current effect names/scopes and state/province/focus references. Its
|
|
28
|
+
553 documented effect identifiers form the bundled Focus Workbench native-effect catalog;
|
|
29
|
+
headings only were retained, not proprietary documentation prose.
|
|
30
|
+
- `loc_objects_documentation.md` and `loc_formatter_documentation.md`: current province/state objects and font/layout-relevant localisation behavior.
|
|
31
|
+
- `dynamic_variables_documentation.md`, `modifiers_documentation.md`, collection input/operator documentation: tokens and raw constructs the CST must retain.
|
|
32
|
+
|
|
33
|
+
Official documentation found outside that folder was also consulted, especially:
|
|
34
|
+
|
|
35
|
+
- `common/scripted_guis/_documentation.md`: authoritative current contexts, parent attachment, dynamic lists, properties, dirty variables, effects/triggers, and AI fields.
|
|
36
|
+
- `common/focus_inlay_windows/documentation.md`: current inlay fields, including scripted buttons and progress bars absent from older summaries.
|
|
37
|
+
|
|
38
|
+
## Vanilla precedents
|
|
39
|
+
|
|
40
|
+
Representative read-only examples:
|
|
41
|
+
|
|
42
|
+
- `common/national_focus/generic.txt` and large country trees for repeated prerequisite blocks, OR groups, exclusions, relative positions, raw rewards, `continuous_focus_position`, route AI, uppercase `IF`/`ELSE_IF`/`ELSE`, weighted `random_list`, direct scripted-effect calls, scoped country/state/character blocks, decision/formable links, and cosmetic-tag effects.
|
|
43
|
+
- `common/continuous_focus/generic.txt` for the current `continuous_focus_palette = { ... focus = { ... } }` model, palette selection/position, and continuous-focus availability, enablement, modifier, cost, and AI fields.
|
|
44
|
+
- `interface/achievements.gui`, `interface/abilitylist.gui`, scripted-GUI interface files, and paired `.gfx` files for nested containers, lists, click regions, sprite states, and ordering.
|
|
45
|
+
- `common/scripted_guis/*.txt` for decision-category contexts, button effect/trigger naming, AI, dynamic lists, and parent/window connections.
|
|
46
|
+
- `interface/*.gfx`, `gfx/interface/**`, and `gfx/fonts/**` for horizontal frame strips, fractional animation rates, DDS/TGA/PNG textures, vector and bitmap font sources.
|
|
47
|
+
- `map/default.map`, `map/provinces.bmp`, `map/definition.csv`, `map/adjacencies.csv`, `map/supply_nodes.txt`, `map/railways.txt`, `map/buildings.txt`, `map/unitstacks.txt`, and `map/weatherpositions.txt` for current map formats.
|
|
48
|
+
- `history/states/*.txt` and `map/strategicregions/*.txt` for state/region membership and ordered history payloads.
|
|
49
|
+
|
|
50
|
+
## Current format conclusions
|
|
51
|
+
|
|
52
|
+
- The inspected installed build was HOI4 1.19.2 content dated 2026-06-12.
|
|
53
|
+
- `provinces.bmp` is a 5632×2048, uncompressed, bottom-up 24-bit BMP with a 40-byte DIB header.
|
|
54
|
+
- Other current map BMPs include indexed 8-bit DIB40 and DIB124 files; the codec must honor pixel offsets, row padding, palette size, orientation, and untouched bytes.
|
|
55
|
+
- Map CSV/text examples use UTF-8 without BOM and LF; localisation examples use UTF-8 BOM. The source model detects and preserves each file rather than normalizing it.
|
|
56
|
+
- Active placement data is in building/unit/weather files; `positions.txt` may exist but be empty. Model-local `.asset` locator blocks are a separate source family.
|
|
57
|
+
- `weatherpositions.txt` uses `small` and `big` tokens in the inspected build.
|
|
58
|
+
- Sprite textures include PNG, TGA, uncompressed DDS, DXT1/3/5, DX10 RGBA/BGRA, and RXGB variants. Frame counts divide a horizontal strip; animation rates may be fractional.
|
|
59
|
+
- Bitmap fonts use `.fnt` metrics/kerning and texture atlases. Locale overrides and additional script font files must remain connected in the source graph.
|
|
60
|
+
- Definition rows and state IDs are contiguous in the inspected build. Province ID allocation therefore records current contiguity and must not treat arbitrary gaps as universally safe.
|
|
61
|
+
- Only land provinces are required to belong to a state; sea provinces and some lakes legitimately do not. Every nonzero province is expected in one strategic region.
|
|
62
|
+
- State source does not expose a generic `capital` field. Map operations distinguish a country's capital-state reference from a state's chief victory-point/capital province and never guess between them.
|
|
63
|
+
- Clausewitz quoted strings decode only escaped quote and backslash. Literal newlines are invalid. Token expressions such as `variable?100` are scalar atoms; only `?=` is an operator.
|
|
64
|
+
- Focus completion rewards call scripted effects directly by identifier; there is no native
|
|
65
|
+
`scripted_effect = helper_id` wrapper. `set_cosmetic_tag` targets cosmetic identity and is not a
|
|
66
|
+
formable-decision reference. Formables are decision targets, and
|
|
67
|
+
`unlock_decision_category_tooltip` targets a top-level decision category.
|
|
68
|
+
- File replacement, duplicate keys, and ordering are database-specific. Same relative indexed filename shadows lower load-order sources; directly indexed files in a `replace_path` directory are removed without treating every descendant asset as removed.
|