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
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { boundedSourceHashEvidence, publicArtifactLink } from '../../core/artifacts.js';
|
|
3
|
+
import { canonicalJson } from '../../core/canonical.js';
|
|
4
|
+
import { emptyServiceResult } from '../../core/result.js';
|
|
5
|
+
import { AgentNudger, allocateMapIdentifiersAsync, } from '../../map/index.js';
|
|
6
|
+
import { workspaceIdSchema } from '../../schemas/common.js';
|
|
7
|
+
import { mapAllocationRequestSchema, mapOperationSchema } from '../../schemas/map.js';
|
|
8
|
+
import { PACKAGE_VERSION } from '../../version.js';
|
|
9
|
+
import { requireServerScope, transactionResourceLink, } from '../server/base-tools.js';
|
|
10
|
+
import { allocationEvidenceSchema, bitmapRenderHashesSchema, nonNegativeIntegerSchema, operationBlockerDataSchema, sha256Schema, } from '../server/output-schemas.js';
|
|
11
|
+
import { progressReporter } from '../server/progress.js';
|
|
12
|
+
import { errorResult, setInlineFilesScanned, strictOperationResultSchema, toolResult, } from '../server/result.js';
|
|
13
|
+
const rgbSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
r: z.number().int().min(0).max(255),
|
|
16
|
+
g: z.number().int().min(0).max(255),
|
|
17
|
+
b: z.number().int().min(0).max(255),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
const changedBoundsSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
minX: nonNegativeIntegerSchema,
|
|
23
|
+
minY: nonNegativeIntegerSchema,
|
|
24
|
+
maxX: nonNegativeIntegerSchema,
|
|
25
|
+
maxY: nonNegativeIntegerSchema,
|
|
26
|
+
count: nonNegativeIntegerSchema,
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
const recordDiffSchema = z
|
|
30
|
+
.object({
|
|
31
|
+
key: z.string().max(256),
|
|
32
|
+
before: z.string().max(512).nullable(),
|
|
33
|
+
after: z.string().max(512).nullable(),
|
|
34
|
+
})
|
|
35
|
+
.strict();
|
|
36
|
+
const membershipDiffSchema = z
|
|
37
|
+
.object({
|
|
38
|
+
provinceId: nonNegativeIntegerSchema,
|
|
39
|
+
before: z.array(nonNegativeIntegerSchema).max(32),
|
|
40
|
+
after: z.array(nonNegativeIntegerSchema).max(32),
|
|
41
|
+
})
|
|
42
|
+
.strict();
|
|
43
|
+
const mapSemanticDiffSchema = z
|
|
44
|
+
.object({
|
|
45
|
+
definitions: z
|
|
46
|
+
.array(z
|
|
47
|
+
.object({
|
|
48
|
+
id: nonNegativeIntegerSchema,
|
|
49
|
+
before: z.string().max(512).nullable(),
|
|
50
|
+
after: z.string().max(512).nullable(),
|
|
51
|
+
})
|
|
52
|
+
.strict())
|
|
53
|
+
.max(20),
|
|
54
|
+
stateMembership: z.array(membershipDiffSchema).max(20),
|
|
55
|
+
regionMembership: z.array(membershipDiffSchema).max(20),
|
|
56
|
+
states: z.array(recordDiffSchema).max(20),
|
|
57
|
+
ports: z.array(recordDiffSchema).max(20),
|
|
58
|
+
buildingPositions: z.array(recordDiffSchema).max(20),
|
|
59
|
+
unitPositions: z.array(recordDiffSchema).max(20),
|
|
60
|
+
weatherPositions: z.array(recordDiffSchema).max(20),
|
|
61
|
+
entityLocators: z.array(recordDiffSchema).max(20),
|
|
62
|
+
supplyNodes: z.array(recordDiffSchema).max(20),
|
|
63
|
+
railways: z.array(recordDiffSchema).max(20),
|
|
64
|
+
adjacencies: z.array(recordDiffSchema).max(20),
|
|
65
|
+
normalAdjacencies: z.array(recordDiffSchema).max(20),
|
|
66
|
+
supplyNodesChanged: z.boolean(),
|
|
67
|
+
railwaysChanged: z.boolean(),
|
|
68
|
+
adjacenciesChanged: z.boolean(),
|
|
69
|
+
normalAdjacenciesChanged: z.boolean(),
|
|
70
|
+
})
|
|
71
|
+
.strict();
|
|
72
|
+
const mapScanOutputSchema = strictOperationResultSchema(z
|
|
73
|
+
.object({
|
|
74
|
+
revision: sha256Schema,
|
|
75
|
+
sharedRevision: sha256Schema,
|
|
76
|
+
width: nonNegativeIntegerSchema.nullable(),
|
|
77
|
+
height: nonNegativeIntegerSchema.nullable(),
|
|
78
|
+
definitions: nonNegativeIntegerSchema,
|
|
79
|
+
states: nonNegativeIntegerSchema,
|
|
80
|
+
regions: nonNegativeIntegerSchema,
|
|
81
|
+
ports: nonNegativeIntegerSchema,
|
|
82
|
+
})
|
|
83
|
+
.strict());
|
|
84
|
+
const mapInspectOutputSchema = strictOperationResultSchema(z
|
|
85
|
+
.object({
|
|
86
|
+
revision: sha256Schema,
|
|
87
|
+
provinceCount: nonNegativeIntegerSchema,
|
|
88
|
+
stateCount: nonNegativeIntegerSchema,
|
|
89
|
+
regionCount: nonNegativeIntegerSchema,
|
|
90
|
+
})
|
|
91
|
+
.strict());
|
|
92
|
+
const mapAllocationOutputSchema = strictOperationResultSchema(z
|
|
93
|
+
.object({
|
|
94
|
+
stateId: nonNegativeIntegerSchema.optional(),
|
|
95
|
+
provinceId: nonNegativeIntegerSchema.optional(),
|
|
96
|
+
color: rgbSchema.optional(),
|
|
97
|
+
evidence: z.array(allocationEvidenceSchema).max(16),
|
|
98
|
+
})
|
|
99
|
+
.strict());
|
|
100
|
+
const mapRenderOutputSchema = strictOperationResultSchema(z
|
|
101
|
+
.object({
|
|
102
|
+
revision: sha256Schema,
|
|
103
|
+
width: nonNegativeIntegerSchema,
|
|
104
|
+
height: nonNegativeIntegerSchema,
|
|
105
|
+
hashes: bitmapRenderHashesSchema,
|
|
106
|
+
offlineRepresentation: z.literal(true),
|
|
107
|
+
})
|
|
108
|
+
.strict());
|
|
109
|
+
const mapValidateOutputSchema = strictOperationResultSchema(z.object({ revision: sha256Schema, diagnosticCount: nonNegativeIntegerSchema }).strict());
|
|
110
|
+
const mapPlanOutputSchema = strictOperationResultSchema(z
|
|
111
|
+
.object({
|
|
112
|
+
allocations: z.array(allocationEvidenceSchema).max(100),
|
|
113
|
+
operationBlockers: z.array(operationBlockerDataSchema).max(100),
|
|
114
|
+
expectedChangedBounds: changedBoundsSchema.nullable(),
|
|
115
|
+
changedProvinceIds: z.array(nonNegativeIntegerSchema).max(256),
|
|
116
|
+
changedProvinceCount: nonNegativeIntegerSchema,
|
|
117
|
+
semanticDiff: mapSemanticDiffSchema,
|
|
118
|
+
semanticDiffCounts: z.record(z.string().max(256), nonNegativeIntegerSchema),
|
|
119
|
+
semanticDiffTruncated: z.boolean(),
|
|
120
|
+
expiresAt: z.iso.datetime(),
|
|
121
|
+
transactionFileCount: nonNegativeIntegerSchema,
|
|
122
|
+
transactionArtifactCount: nonNegativeIntegerSchema,
|
|
123
|
+
})
|
|
124
|
+
.strict());
|
|
125
|
+
const artifactProducing = {
|
|
126
|
+
readOnlyHint: false,
|
|
127
|
+
destructiveHint: false,
|
|
128
|
+
idempotentHint: true,
|
|
129
|
+
openWorldHint: false,
|
|
130
|
+
};
|
|
131
|
+
const mapInlineDiffLimit = 20;
|
|
132
|
+
const mapInlineMembershipIdLimit = 32;
|
|
133
|
+
const mapInlineTextLimit = 512;
|
|
134
|
+
function compactAllocationEvidence(evidence) {
|
|
135
|
+
return {
|
|
136
|
+
...evidence,
|
|
137
|
+
rootCount: evidence.roots.length,
|
|
138
|
+
roots: evidence.roots.slice(0, 16),
|
|
139
|
+
rootsTruncated: evidence.roots.length > 16,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function compactNullableText(value) {
|
|
143
|
+
return value === null ? null : value.slice(0, mapInlineTextLimit);
|
|
144
|
+
}
|
|
145
|
+
function compactRecordDiffs(entries) {
|
|
146
|
+
return entries.slice(0, mapInlineDiffLimit).map(({ key, before, after }) => ({
|
|
147
|
+
key: key.slice(0, 256),
|
|
148
|
+
before: compactNullableText(before),
|
|
149
|
+
after: compactNullableText(after),
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
function compactMapSemanticDiff(semantic) {
|
|
153
|
+
const counts = {
|
|
154
|
+
definitions: semantic.definitions.length,
|
|
155
|
+
stateMembership: semantic.stateMembership.length,
|
|
156
|
+
regionMembership: semantic.regionMembership.length,
|
|
157
|
+
states: semantic.states.length,
|
|
158
|
+
ports: semantic.ports.length,
|
|
159
|
+
buildingPositions: semantic.buildingPositions.length,
|
|
160
|
+
unitPositions: semantic.unitPositions.length,
|
|
161
|
+
weatherPositions: semantic.weatherPositions.length,
|
|
162
|
+
entityLocators: semantic.entityLocators.length,
|
|
163
|
+
supplyNodes: semantic.supplyNodes.length,
|
|
164
|
+
railways: semantic.railways.length,
|
|
165
|
+
adjacencies: semantic.adjacencies.length,
|
|
166
|
+
normalAdjacencies: semantic.normalAdjacencies.length,
|
|
167
|
+
};
|
|
168
|
+
return {
|
|
169
|
+
semantic: {
|
|
170
|
+
definitions: semantic.definitions
|
|
171
|
+
.slice(0, mapInlineDiffLimit)
|
|
172
|
+
.map(({ id, before, after }) => ({
|
|
173
|
+
id,
|
|
174
|
+
before: compactNullableText(before),
|
|
175
|
+
after: compactNullableText(after),
|
|
176
|
+
})),
|
|
177
|
+
stateMembership: semantic.stateMembership.slice(0, mapInlineDiffLimit).map((entry) => ({
|
|
178
|
+
...entry,
|
|
179
|
+
before: entry.before.slice(0, mapInlineMembershipIdLimit),
|
|
180
|
+
after: entry.after.slice(0, mapInlineMembershipIdLimit),
|
|
181
|
+
})),
|
|
182
|
+
regionMembership: semantic.regionMembership.slice(0, mapInlineDiffLimit).map((entry) => ({
|
|
183
|
+
...entry,
|
|
184
|
+
before: entry.before.slice(0, mapInlineMembershipIdLimit),
|
|
185
|
+
after: entry.after.slice(0, mapInlineMembershipIdLimit),
|
|
186
|
+
})),
|
|
187
|
+
states: compactRecordDiffs(semantic.states),
|
|
188
|
+
ports: compactRecordDiffs(semantic.ports),
|
|
189
|
+
buildingPositions: compactRecordDiffs(semantic.buildingPositions),
|
|
190
|
+
unitPositions: compactRecordDiffs(semantic.unitPositions),
|
|
191
|
+
weatherPositions: compactRecordDiffs(semantic.weatherPositions),
|
|
192
|
+
entityLocators: compactRecordDiffs(semantic.entityLocators),
|
|
193
|
+
supplyNodes: compactRecordDiffs(semantic.supplyNodes),
|
|
194
|
+
railways: compactRecordDiffs(semantic.railways),
|
|
195
|
+
adjacencies: compactRecordDiffs(semantic.adjacencies),
|
|
196
|
+
normalAdjacencies: compactRecordDiffs(semantic.normalAdjacencies),
|
|
197
|
+
supplyNodesChanged: semantic.supplyNodesChanged,
|
|
198
|
+
railwaysChanged: semantic.railwaysChanged,
|
|
199
|
+
adjacenciesChanged: semantic.adjacenciesChanged,
|
|
200
|
+
normalAdjacenciesChanged: semantic.normalAdjacenciesChanged,
|
|
201
|
+
},
|
|
202
|
+
counts,
|
|
203
|
+
truncated: Object.values(counts).some((count) => count > mapInlineDiffLimit) ||
|
|
204
|
+
[...semantic.stateMembership, ...semantic.regionMembership].some(({ before, after }) => before.length > mapInlineMembershipIdLimit || after.length > mapInlineMembershipIdLimit) ||
|
|
205
|
+
semantic.definitions.some(({ before, after }) => (before?.length ?? 0) > mapInlineTextLimit || (after?.length ?? 0) > mapInlineTextLimit) ||
|
|
206
|
+
[
|
|
207
|
+
...semantic.states,
|
|
208
|
+
...semantic.ports,
|
|
209
|
+
...semantic.buildingPositions,
|
|
210
|
+
...semantic.unitPositions,
|
|
211
|
+
...semantic.weatherPositions,
|
|
212
|
+
...semantic.entityLocators,
|
|
213
|
+
...semantic.supplyNodes,
|
|
214
|
+
...semantic.railways,
|
|
215
|
+
...semantic.adjacencies,
|
|
216
|
+
...semantic.normalAdjacencies,
|
|
217
|
+
].some(({ key, before, after }) => key.length > 256 ||
|
|
218
|
+
(before?.length ?? 0) > mapInlineTextLimit ||
|
|
219
|
+
(after?.length ?? 0) > mapInlineTextLimit),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
const mapLayerSchema = z.enum([
|
|
223
|
+
'province',
|
|
224
|
+
'state',
|
|
225
|
+
'strategic-region',
|
|
226
|
+
'terrain',
|
|
227
|
+
'continent',
|
|
228
|
+
'owner',
|
|
229
|
+
'controller',
|
|
230
|
+
'cores',
|
|
231
|
+
'claims',
|
|
232
|
+
'coast',
|
|
233
|
+
]);
|
|
234
|
+
const mapOverlaySchema = z.enum([
|
|
235
|
+
'coastlines',
|
|
236
|
+
'ports',
|
|
237
|
+
'victory-points',
|
|
238
|
+
'resources',
|
|
239
|
+
'state-buildings',
|
|
240
|
+
'province-buildings',
|
|
241
|
+
'supply-nodes',
|
|
242
|
+
'railways',
|
|
243
|
+
'adjacencies',
|
|
244
|
+
'building-positions',
|
|
245
|
+
'unit-positions',
|
|
246
|
+
'weather-positions',
|
|
247
|
+
]);
|
|
248
|
+
function validationSummary(validation) {
|
|
249
|
+
return { passed: validation.passed, checks: validation.checks };
|
|
250
|
+
}
|
|
251
|
+
function mapArtifactSourceEvidence(files) {
|
|
252
|
+
const complete = Object.fromEntries(files.map(({ displayPath, sha256 }) => [displayPath, sha256]));
|
|
253
|
+
return { complete, bounded: boundedSourceHashEvidence(complete) };
|
|
254
|
+
}
|
|
255
|
+
export function registerMapTools(server, engine, context) {
|
|
256
|
+
const nudger = new AgentNudger(engine);
|
|
257
|
+
server.registerTool('hoi4.map_scan', {
|
|
258
|
+
title: 'Scan HOI4 map sources',
|
|
259
|
+
description: 'Index province geometry, definitions, states, regions, ownership, networks, adjacencies, positions, locators, ports, and localisation across active roots.',
|
|
260
|
+
inputSchema: z.object({ workspaceId: workspaceIdSchema }).strict(),
|
|
261
|
+
outputSchema: mapScanOutputSchema,
|
|
262
|
+
annotations: artifactProducing,
|
|
263
|
+
}, async ({ workspaceId }, extra) => {
|
|
264
|
+
try {
|
|
265
|
+
const progress = progressReporter(extra);
|
|
266
|
+
await progress.report(0, 3, 'Scanning shared and map indexes');
|
|
267
|
+
const [shared, { snapshot, validation }] = await Promise.all([
|
|
268
|
+
engine.scan(workspaceId, {}, context.principal, progress.signal),
|
|
269
|
+
nudger.validate(workspaceId, context.principal, progress.signal),
|
|
270
|
+
]);
|
|
271
|
+
const workspace = engine.resolver.get(workspaceId, context.principal);
|
|
272
|
+
const sourceEvidence = mapArtifactSourceEvidence(snapshot.files);
|
|
273
|
+
const artifact = await engine.artifacts.putChunked(workspace, `map-scan.${snapshot.revision.slice(0, 16)}.json`, 'application/json', `${canonicalJson({
|
|
274
|
+
schemaVersion: 1,
|
|
275
|
+
revision: snapshot.revision,
|
|
276
|
+
sharedRevision: shared.revision,
|
|
277
|
+
dimensions: snapshot.index.raster === undefined
|
|
278
|
+
? null
|
|
279
|
+
: {
|
|
280
|
+
width: snapshot.index.raster.width,
|
|
281
|
+
height: snapshot.index.raster.height,
|
|
282
|
+
bitsPerPixel: snapshot.index.provinceBitmap?.bitsPerPixel,
|
|
283
|
+
dibSize: snapshot.index.provinceBitmap?.dibSize,
|
|
284
|
+
},
|
|
285
|
+
counts: {
|
|
286
|
+
definitions: snapshot.index.definitions.length,
|
|
287
|
+
states: snapshot.index.states.length,
|
|
288
|
+
regions: snapshot.index.regions.length,
|
|
289
|
+
adjacencies: snapshot.index.adjacencies.length,
|
|
290
|
+
supplyNodes: snapshot.index.supplyNodes.length,
|
|
291
|
+
railways: snapshot.index.railways.length,
|
|
292
|
+
ports: snapshot.index.ports.length,
|
|
293
|
+
locators: snapshot.index.entityLocators.length,
|
|
294
|
+
},
|
|
295
|
+
validation,
|
|
296
|
+
sourceHashes: sourceEvidence.complete,
|
|
297
|
+
})}\n`, {
|
|
298
|
+
kind: 'map-scan',
|
|
299
|
+
toolVersion: PACKAGE_VERSION,
|
|
300
|
+
schemaVersion: 'map-scan.v1',
|
|
301
|
+
sourceHashes: sourceEvidence.bounded.sourceHashes,
|
|
302
|
+
metadata: {
|
|
303
|
+
sharedRevision: shared.revision,
|
|
304
|
+
sourceHashInventory: sourceEvidence.bounded.inventory,
|
|
305
|
+
},
|
|
306
|
+
}, 'Complete map scan and validation summary', progress.signal);
|
|
307
|
+
const result = emptyServiceResult(workspaceId, {
|
|
308
|
+
revision: snapshot.revision,
|
|
309
|
+
sharedRevision: shared.revision,
|
|
310
|
+
width: snapshot.index.raster?.width ?? null,
|
|
311
|
+
height: snapshot.index.raster?.height ?? null,
|
|
312
|
+
definitions: snapshot.index.definitions.length,
|
|
313
|
+
states: snapshot.index.states.length,
|
|
314
|
+
regions: snapshot.index.regions.length,
|
|
315
|
+
ports: snapshot.index.ports.length,
|
|
316
|
+
});
|
|
317
|
+
result.code = 'MAP_SCANNED';
|
|
318
|
+
setInlineFilesScanned(result, snapshot.files.map(({ displayPath }) => displayPath));
|
|
319
|
+
result.diagnostics = validation.diagnostics.slice(0, 100);
|
|
320
|
+
result.artifacts = [publicArtifactLink(artifact)];
|
|
321
|
+
result.validation = validationSummary(validation);
|
|
322
|
+
await progress.report(3, 3, 'Map scan complete');
|
|
323
|
+
return toolResult(result);
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
return errorResult(error, workspaceId);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
server.registerTool('hoi4.map_inspect', {
|
|
330
|
+
title: 'Inspect indexed map entities',
|
|
331
|
+
description: 'Return bounded semantic details for selected province, state, and strategic-region IDs as a resource artifact.',
|
|
332
|
+
inputSchema: z
|
|
333
|
+
.object({
|
|
334
|
+
workspaceId: workspaceIdSchema,
|
|
335
|
+
provinceIds: z.array(z.number().int().min(0)).max(1000).default([]),
|
|
336
|
+
stateIds: z.array(z.number().int().positive()).max(1000).default([]),
|
|
337
|
+
regionIds: z.array(z.number().int().positive()).max(1000).default([]),
|
|
338
|
+
})
|
|
339
|
+
.strict(),
|
|
340
|
+
outputSchema: mapInspectOutputSchema,
|
|
341
|
+
annotations: artifactProducing,
|
|
342
|
+
}, async ({ workspaceId, provinceIds, stateIds, regionIds }, extra) => {
|
|
343
|
+
try {
|
|
344
|
+
const progress = progressReporter(extra);
|
|
345
|
+
await progress.report(0, 3, 'Scanning map index for selected entities');
|
|
346
|
+
const snapshot = await nudger.scan(workspaceId, context.principal, progress.signal);
|
|
347
|
+
const provinces = [...new Set(provinceIds)]
|
|
348
|
+
.sort((a, b) => a - b)
|
|
349
|
+
.map((id) => {
|
|
350
|
+
const definition = snapshot.index.definitionsById.get(id);
|
|
351
|
+
const geometry = snapshot.index.raster?.geometry.get(id);
|
|
352
|
+
return {
|
|
353
|
+
id,
|
|
354
|
+
definition: definition === undefined
|
|
355
|
+
? null
|
|
356
|
+
: {
|
|
357
|
+
color: definition.color,
|
|
358
|
+
type: definition.type,
|
|
359
|
+
coastal: definition.coastal,
|
|
360
|
+
terrain: definition.terrain,
|
|
361
|
+
continent: definition.continent,
|
|
362
|
+
},
|
|
363
|
+
geometry: geometry ?? null,
|
|
364
|
+
stateIds: snapshot.index.stateForProvince(id).map(({ id: state }) => state),
|
|
365
|
+
regionIds: snapshot.index.regionForProvince(id).map(({ id: region }) => region),
|
|
366
|
+
victoryPoints: snapshot.index.victoryPointsByProvince
|
|
367
|
+
.get(id)
|
|
368
|
+
?.map(({ stateId: state, value }) => ({ stateId: state, value })) ?? [],
|
|
369
|
+
provinceBuildings: snapshot.index.provinceBuildingsByProvince
|
|
370
|
+
.get(id)
|
|
371
|
+
?.map(({ stateId: state, buildings }) => ({
|
|
372
|
+
stateId: state,
|
|
373
|
+
buildings: Object.fromEntries(buildings),
|
|
374
|
+
})) ?? [],
|
|
375
|
+
port: (() => {
|
|
376
|
+
const port = snapshot.index.ports.find(({ provinceId }) => provinceId === id);
|
|
377
|
+
return port === undefined
|
|
378
|
+
? null
|
|
379
|
+
: {
|
|
380
|
+
stateId: port.stateId,
|
|
381
|
+
provinceId: port.provinceId,
|
|
382
|
+
level: port.level,
|
|
383
|
+
coastal: port.coastal,
|
|
384
|
+
adjacentSeaProvinceIds: port.adjacentSeaProvinceIds,
|
|
385
|
+
positions: port.positions.map(({ stateId, building, x, y, z, rotation, adjacentSeaProvince }) => ({
|
|
386
|
+
stateId,
|
|
387
|
+
building,
|
|
388
|
+
x,
|
|
389
|
+
y,
|
|
390
|
+
z,
|
|
391
|
+
rotation,
|
|
392
|
+
adjacentSeaProvince,
|
|
393
|
+
})),
|
|
394
|
+
};
|
|
395
|
+
})(),
|
|
396
|
+
};
|
|
397
|
+
});
|
|
398
|
+
const states = [...new Set(stateIds)]
|
|
399
|
+
.sort((a, b) => a - b)
|
|
400
|
+
.map((id) => {
|
|
401
|
+
const state = snapshot.index.statesById.get(id);
|
|
402
|
+
return state === undefined
|
|
403
|
+
? { id, value: null }
|
|
404
|
+
: {
|
|
405
|
+
id,
|
|
406
|
+
value: {
|
|
407
|
+
name: state.name,
|
|
408
|
+
capital: state.capital ?? null,
|
|
409
|
+
manpower: state.manpower,
|
|
410
|
+
category: state.category,
|
|
411
|
+
provinces: state.provinces,
|
|
412
|
+
resources: Object.fromEntries(state.resources),
|
|
413
|
+
owner: state.owner ?? null,
|
|
414
|
+
controller: state.controller ?? null,
|
|
415
|
+
cores: state.cores,
|
|
416
|
+
claims: state.claims,
|
|
417
|
+
victoryPoints: state.victoryPoints.map(({ provinceId, value }) => ({
|
|
418
|
+
provinceId,
|
|
419
|
+
value,
|
|
420
|
+
})),
|
|
421
|
+
stateBuildings: Object.fromEntries(state.stateBuildings),
|
|
422
|
+
provinceBuildings: Object.fromEntries([...state.provinceBuildings].map(([provinceId, buildings]) => [
|
|
423
|
+
String(provinceId),
|
|
424
|
+
Object.fromEntries(buildings),
|
|
425
|
+
])),
|
|
426
|
+
},
|
|
427
|
+
};
|
|
428
|
+
});
|
|
429
|
+
const regions = [...new Set(regionIds)]
|
|
430
|
+
.sort((a, b) => a - b)
|
|
431
|
+
.map((id) => {
|
|
432
|
+
const region = snapshot.index.regionsById.get(id);
|
|
433
|
+
return region === undefined
|
|
434
|
+
? { id, value: null }
|
|
435
|
+
: {
|
|
436
|
+
id,
|
|
437
|
+
value: {
|
|
438
|
+
name: region.name,
|
|
439
|
+
provinces: region.provinces,
|
|
440
|
+
navalTerrain: region.navalTerrain ?? null,
|
|
441
|
+
},
|
|
442
|
+
};
|
|
443
|
+
});
|
|
444
|
+
const data = { schemaVersion: 1, revision: snapshot.revision, provinces, states, regions };
|
|
445
|
+
await progress.report(2, 3, 'Writing bounded map inspection evidence');
|
|
446
|
+
const workspace = engine.resolver.get(workspaceId, context.principal);
|
|
447
|
+
const sourceEvidence = mapArtifactSourceEvidence(snapshot.files);
|
|
448
|
+
const artifact = await engine.artifacts.putChunked(workspace, `map-inspect.${snapshot.revision.slice(0, 16)}.json`, 'application/json', `${canonicalJson({ ...data, sourceHashes: sourceEvidence.complete })}\n`, {
|
|
449
|
+
kind: 'map-inspect',
|
|
450
|
+
toolVersion: PACKAGE_VERSION,
|
|
451
|
+
schemaVersion: 'map-inspect.v1',
|
|
452
|
+
sourceHashes: sourceEvidence.bounded.sourceHashes,
|
|
453
|
+
metadata: { sourceHashInventory: sourceEvidence.bounded.inventory },
|
|
454
|
+
}, 'Selected map entity details', progress.signal);
|
|
455
|
+
const result = emptyServiceResult(workspaceId, {
|
|
456
|
+
revision: snapshot.revision,
|
|
457
|
+
provinceCount: provinces.length,
|
|
458
|
+
stateCount: states.length,
|
|
459
|
+
regionCount: regions.length,
|
|
460
|
+
});
|
|
461
|
+
result.code = 'MAP_INSPECTED';
|
|
462
|
+
setInlineFilesScanned(result, snapshot.files.map(({ displayPath }) => displayPath));
|
|
463
|
+
result.artifacts = [publicArtifactLink(artifact)];
|
|
464
|
+
await progress.report(3, 3, 'Map inspection complete');
|
|
465
|
+
return toolResult(result);
|
|
466
|
+
}
|
|
467
|
+
catch (error) {
|
|
468
|
+
return errorResult(error, workspaceId);
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
server.registerTool('hoi4.map_allocate', {
|
|
472
|
+
title: 'Preview map ID and color allocation',
|
|
473
|
+
description: 'Scan every configured root, then deterministically preview a free state ID or contiguous province ID and collision-free color without writing.',
|
|
474
|
+
inputSchema: z
|
|
475
|
+
.object({ workspaceId: workspaceIdSchema, request: mapAllocationRequestSchema })
|
|
476
|
+
.strict(),
|
|
477
|
+
outputSchema: mapAllocationOutputSchema,
|
|
478
|
+
annotations: artifactProducing,
|
|
479
|
+
}, async ({ workspaceId, request }, extra) => {
|
|
480
|
+
try {
|
|
481
|
+
const progress = progressReporter(extra);
|
|
482
|
+
await progress.report(0, 3, 'Scanning every map source for identifiers and colors');
|
|
483
|
+
const snapshot = await nudger.scan(workspaceId, context.principal, progress.signal);
|
|
484
|
+
const allocation = await allocateMapIdentifiersAsync(snapshot.index, request, progress.signal);
|
|
485
|
+
progress.signal.throwIfAborted();
|
|
486
|
+
await progress.report(2, 3, 'Writing allocation evidence');
|
|
487
|
+
const workspace = engine.resolver.get(workspaceId, context.principal);
|
|
488
|
+
const sourceEvidence = mapArtifactSourceEvidence(snapshot.files);
|
|
489
|
+
const artifact = await engine.artifacts.putChunked(workspace, `map-allocation.${snapshot.revision.slice(0, 16)}.json`, 'application/json', `${canonicalJson({
|
|
490
|
+
schemaVersion: 1,
|
|
491
|
+
revision: snapshot.revision,
|
|
492
|
+
request,
|
|
493
|
+
allocation,
|
|
494
|
+
sourceHashes: sourceEvidence.complete,
|
|
495
|
+
})}\n`, {
|
|
496
|
+
kind: 'map-allocation',
|
|
497
|
+
toolVersion: PACKAGE_VERSION,
|
|
498
|
+
schemaVersion: 'map-allocation.v1',
|
|
499
|
+
sourceHashes: sourceEvidence.bounded.sourceHashes,
|
|
500
|
+
metadata: { sourceHashInventory: sourceEvidence.bounded.inventory },
|
|
501
|
+
}, 'Allocation evidence from every active source root', progress.signal);
|
|
502
|
+
const result = emptyServiceResult(workspaceId, {
|
|
503
|
+
...allocation,
|
|
504
|
+
evidence: allocation.evidence.map(compactAllocationEvidence),
|
|
505
|
+
});
|
|
506
|
+
result.code = 'MAP_ALLOCATION_PREVIEWED';
|
|
507
|
+
setInlineFilesScanned(result, snapshot.files.map(({ displayPath }) => displayPath));
|
|
508
|
+
result.artifacts = [publicArtifactLink(artifact)];
|
|
509
|
+
await progress.report(3, 3, 'Map allocation preview complete');
|
|
510
|
+
return toolResult(result);
|
|
511
|
+
}
|
|
512
|
+
catch (error) {
|
|
513
|
+
return errorResult(error, workspaceId);
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
server.registerTool('hoi4.map_render', {
|
|
517
|
+
title: 'Render map inspection artifacts',
|
|
518
|
+
description: 'Generate deterministic offline PNG, JSON, and pan-and-zoom HTML for one semantic layer and bounded overlays.',
|
|
519
|
+
inputSchema: z
|
|
520
|
+
.object({
|
|
521
|
+
workspaceId: workspaceIdSchema,
|
|
522
|
+
layer: mapLayerSchema.optional(),
|
|
523
|
+
overlays: z.array(mapOverlaySchema).max(12).optional(),
|
|
524
|
+
scale: z.number().int().min(1).max(16).optional(),
|
|
525
|
+
})
|
|
526
|
+
.strict(),
|
|
527
|
+
outputSchema: mapRenderOutputSchema,
|
|
528
|
+
annotations: artifactProducing,
|
|
529
|
+
}, async ({ workspaceId, layer, overlays, scale }, extra) => {
|
|
530
|
+
try {
|
|
531
|
+
const progress = progressReporter(extra);
|
|
532
|
+
await progress.report(0, 3, 'Rendering offline map layer');
|
|
533
|
+
const rendered = await nudger.renderAndStore(workspaceId, {
|
|
534
|
+
...(layer === undefined ? {} : { layer }),
|
|
535
|
+
...(overlays === undefined ? {} : { overlays }),
|
|
536
|
+
...(scale === undefined ? {} : { scale }),
|
|
537
|
+
...(context.principal === undefined ? {} : { principal: context.principal }),
|
|
538
|
+
signal: progress.signal,
|
|
539
|
+
});
|
|
540
|
+
const result = emptyServiceResult(workspaceId, {
|
|
541
|
+
revision: rendered.revision,
|
|
542
|
+
width: rendered.bundle.width,
|
|
543
|
+
height: rendered.bundle.height,
|
|
544
|
+
hashes: rendered.bundle.hashes,
|
|
545
|
+
offlineRepresentation: true,
|
|
546
|
+
});
|
|
547
|
+
result.code = 'MAP_RENDERED';
|
|
548
|
+
setInlineFilesScanned(result, rendered.filesScanned);
|
|
549
|
+
result.artifacts = rendered.artifacts.map(publicArtifactLink);
|
|
550
|
+
await progress.report(3, 3, 'Map render complete');
|
|
551
|
+
return toolResult(result);
|
|
552
|
+
}
|
|
553
|
+
catch (error) {
|
|
554
|
+
return errorResult(error, workspaceId);
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
server.registerTool('hoi4.map_validate', {
|
|
558
|
+
title: 'Validate map workspace',
|
|
559
|
+
description: 'Run static map, bitmap, membership, network, coast, port, locator, reference, and localisation validation without launching the game.',
|
|
560
|
+
inputSchema: z.object({ workspaceId: workspaceIdSchema }).strict(),
|
|
561
|
+
outputSchema: mapValidateOutputSchema,
|
|
562
|
+
annotations: artifactProducing,
|
|
563
|
+
}, async ({ workspaceId }, extra) => {
|
|
564
|
+
try {
|
|
565
|
+
const progress = progressReporter(extra);
|
|
566
|
+
await progress.report(0, 3, 'Scanning and validating map sources');
|
|
567
|
+
const { snapshot, validation } = await nudger.validate(workspaceId, context.principal, progress.signal);
|
|
568
|
+
await progress.report(2, 3, 'Writing map validation evidence');
|
|
569
|
+
const workspace = engine.resolver.get(workspaceId, context.principal);
|
|
570
|
+
const sourceEvidence = mapArtifactSourceEvidence(snapshot.files);
|
|
571
|
+
const artifact = await engine.artifacts.putChunked(workspace, `map-validation.${snapshot.revision.slice(0, 16)}.json`, 'application/json', `${canonicalJson({
|
|
572
|
+
schemaVersion: 1,
|
|
573
|
+
revision: snapshot.revision,
|
|
574
|
+
validation,
|
|
575
|
+
sourceHashes: sourceEvidence.complete,
|
|
576
|
+
})}\n`, {
|
|
577
|
+
kind: 'map-validation',
|
|
578
|
+
toolVersion: PACKAGE_VERSION,
|
|
579
|
+
schemaVersion: 'map-validation.v1',
|
|
580
|
+
sourceHashes: sourceEvidence.bounded.sourceHashes,
|
|
581
|
+
metadata: { sourceHashInventory: sourceEvidence.bounded.inventory },
|
|
582
|
+
}, 'Complete source-linked map validation report', progress.signal);
|
|
583
|
+
const result = emptyServiceResult(workspaceId, {
|
|
584
|
+
revision: snapshot.revision,
|
|
585
|
+
diagnosticCount: validation.diagnostics.length,
|
|
586
|
+
});
|
|
587
|
+
result.code = 'MAP_VALIDATED';
|
|
588
|
+
setInlineFilesScanned(result, snapshot.files.map(({ displayPath }) => displayPath));
|
|
589
|
+
result.diagnostics = validation.diagnostics.slice(0, 100);
|
|
590
|
+
result.artifacts = [publicArtifactLink(artifact)];
|
|
591
|
+
result.validation = validationSummary(validation);
|
|
592
|
+
await progress.report(3, 3, 'Map validation complete');
|
|
593
|
+
return toolResult(result);
|
|
594
|
+
}
|
|
595
|
+
catch (error) {
|
|
596
|
+
return errorResult(error, workspaceId);
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
server.registerTool('hoi4.map_plan', {
|
|
600
|
+
title: 'Dry-run declarative map operations',
|
|
601
|
+
description: 'Plan exact state/localisation, province, hash-bound mask, bitmap-normal/special adjacency, region, network, position, and locator changes with pixel/semantic diffs; never applies them.',
|
|
602
|
+
inputSchema: z
|
|
603
|
+
.object({
|
|
604
|
+
workspaceId: workspaceIdSchema,
|
|
605
|
+
operations: z.array(mapOperationSchema).min(1).max(100),
|
|
606
|
+
diffScale: z.number().int().min(1).max(16).optional(),
|
|
607
|
+
})
|
|
608
|
+
.strict(),
|
|
609
|
+
outputSchema: mapPlanOutputSchema,
|
|
610
|
+
annotations: {
|
|
611
|
+
readOnlyHint: false,
|
|
612
|
+
destructiveHint: false,
|
|
613
|
+
idempotentHint: false,
|
|
614
|
+
openWorldHint: false,
|
|
615
|
+
},
|
|
616
|
+
}, async ({ workspaceId, operations, diffScale }, extra) => {
|
|
617
|
+
try {
|
|
618
|
+
requireServerScope(context, 'hoi4:write');
|
|
619
|
+
const progress = progressReporter(extra);
|
|
620
|
+
await progress.report(0, 5, 'Planning map operations and visual diff');
|
|
621
|
+
const typedOperations = operations;
|
|
622
|
+
const diff = await nudger.renderDiffAndStore(workspaceId, typedOperations, {
|
|
623
|
+
...(diffScale === undefined ? {} : { scale: diffScale }),
|
|
624
|
+
...(context.principal === undefined ? {} : { principal: context.principal }),
|
|
625
|
+
signal: progress.signal,
|
|
626
|
+
});
|
|
627
|
+
await progress.report(3, 5, 'Creating hash-bound map transaction');
|
|
628
|
+
const planned = await nudger.plan({
|
|
629
|
+
workspaceId,
|
|
630
|
+
operations: typedOperations,
|
|
631
|
+
artifacts: diff.artifacts.map(publicArtifactLink),
|
|
632
|
+
...(context.principal === undefined ? {} : { principal: context.principal }),
|
|
633
|
+
signal: progress.signal,
|
|
634
|
+
});
|
|
635
|
+
const transaction = planned.transaction;
|
|
636
|
+
const compactSemantic = compactMapSemanticDiff(diff.bundle.semantic);
|
|
637
|
+
const result = emptyServiceResult(workspaceId, {
|
|
638
|
+
allocations: planned.plan.allocations.slice(0, 100).map(compactAllocationEvidence),
|
|
639
|
+
operationBlockers: planned.plan.blockers
|
|
640
|
+
.slice(0, 100)
|
|
641
|
+
.map(({ code, message, operationId }) => ({ code, message, operationId })),
|
|
642
|
+
expectedChangedBounds: planned.plan.expectedChangedBounds ?? null,
|
|
643
|
+
changedProvinceIds: diff.bundle.changedProvinceIds.slice(0, 256),
|
|
644
|
+
changedProvinceCount: diff.bundle.changedProvinceIds.length,
|
|
645
|
+
semanticDiff: compactSemantic.semantic,
|
|
646
|
+
semanticDiffCounts: compactSemantic.counts,
|
|
647
|
+
semanticDiffTruncated: compactSemantic.truncated,
|
|
648
|
+
expiresAt: transaction.expiresAt,
|
|
649
|
+
transactionFileCount: transaction.files.length,
|
|
650
|
+
transactionArtifactCount: transaction.artifacts.length,
|
|
651
|
+
});
|
|
652
|
+
result.status = transaction.validation.passed ? 'ok' : 'blocked';
|
|
653
|
+
result.code = transaction.validation.passed ? 'MAP_CHANGES_PLANNED' : 'MAP_CHANGES_BLOCKED';
|
|
654
|
+
setInlineFilesScanned(result, diff.filesScanned);
|
|
655
|
+
result.proposedFiles = transaction.files
|
|
656
|
+
.slice(0, 100)
|
|
657
|
+
.map(({ relativePath }) => relativePath);
|
|
658
|
+
result.diagnostics = transaction.diagnostics.slice(0, 100);
|
|
659
|
+
result.transactionId = transaction.transactionId;
|
|
660
|
+
result.planHash = transaction.planHash;
|
|
661
|
+
result.artifacts = [transactionResourceLink(transaction)];
|
|
662
|
+
result.validation = transaction.validation;
|
|
663
|
+
result.rollbackStatus = transaction.rollbackStatus;
|
|
664
|
+
result.blockers = [
|
|
665
|
+
...planned.plan.blockers.map(({ code, message }) => ({
|
|
666
|
+
code,
|
|
667
|
+
message,
|
|
668
|
+
})),
|
|
669
|
+
...transaction.diagnostics
|
|
670
|
+
.filter(({ severity }) => severity === 'error' || severity === 'blocker')
|
|
671
|
+
.map(({ code, message, details }) => ({
|
|
672
|
+
code,
|
|
673
|
+
message,
|
|
674
|
+
...(details === undefined ? {} : { details }),
|
|
675
|
+
})),
|
|
676
|
+
].slice(0, 100);
|
|
677
|
+
await progress.report(5, 5, 'Map dry run complete');
|
|
678
|
+
return toolResult(result);
|
|
679
|
+
}
|
|
680
|
+
catch (error) {
|
|
681
|
+
return errorResult(error, workspaceId);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
//# sourceMappingURL=map.js.map
|