hoi4-agent-tools 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -118
- package/README.md +35 -127
- package/SECURITY.md +5 -7
- package/dist/bin/http.js +0 -1
- package/dist/bin/setup.js +141 -92
- package/dist/bin/stdio.js +0 -1
- package/dist/hoi4_agent_tools/core/artifacts.js +0 -1
- package/dist/hoi4_agent_tools/core/canonical.js +0 -1
- package/dist/hoi4_agent_tools/core/configuration.js +28 -28
- package/dist/hoi4_agent_tools/core/diagnostic-collector.js +0 -1
- package/dist/hoi4_agent_tools/core/diagnostics.js +0 -1
- package/dist/hoi4_agent_tools/core/diff.js +0 -1
- package/dist/hoi4_agent_tools/core/engine.js +6 -21
- package/dist/hoi4_agent_tools/core/image-diff.js +0 -1
- package/dist/hoi4_agent_tools/core/index.js +0 -1
- package/dist/hoi4_agent_tools/core/render-budget.js +0 -1
- package/dist/hoi4_agent_tools/core/result.js +0 -1
- package/dist/hoi4_agent_tools/core/scanner.js +0 -1
- package/dist/hoi4_agent_tools/core/server-state.js +0 -1
- package/dist/hoi4_agent_tools/core/source/encoding.js +0 -1
- package/dist/hoi4_agent_tools/core/source/index.js +0 -1
- package/dist/hoi4_agent_tools/core/source/lexer.js +0 -1
- package/dist/hoi4_agent_tools/core/source/limits.js +0 -1
- package/dist/hoi4_agent_tools/core/source/localisation.js +0 -1
- package/dist/hoi4_agent_tools/core/source/parser.js +0 -1
- package/dist/hoi4_agent_tools/core/source/rewrite.js +0 -1
- package/dist/hoi4_agent_tools/core/svg-text.js +0 -1
- package/dist/hoi4_agent_tools/core/transaction-limits.js +0 -1
- package/dist/hoi4_agent_tools/core/transactions.js +2 -30
- package/dist/hoi4_agent_tools/core/workspace.js +112 -396
- package/dist/hoi4_agent_tools/focus/compiler.js +0 -1
- package/dist/hoi4_agent_tools/focus/continuous-render.js +0 -1
- package/dist/hoi4_agent_tools/focus/drift.js +0 -1
- package/dist/hoi4_agent_tools/focus/geometry.js +0 -1
- package/dist/hoi4_agent_tools/focus/importer.js +0 -1
- package/dist/hoi4_agent_tools/focus/index.js +0 -1
- package/dist/hoi4_agent_tools/focus/layout.js +0 -1
- package/dist/hoi4_agent_tools/focus/limits.js +0 -1
- package/dist/hoi4_agent_tools/focus/lint.js +0 -1
- package/dist/hoi4_agent_tools/focus/model.js +0 -1
- package/dist/hoi4_agent_tools/focus/native-effects.js +0 -1
- package/dist/hoi4_agent_tools/focus/planning.js +0 -1
- package/dist/hoi4_agent_tools/focus/presentation.js +0 -1
- package/dist/hoi4_agent_tools/focus/render.js +0 -1
- package/dist/hoi4_agent_tools/focus/service.js +7 -8
- package/dist/hoi4_agent_tools/focus/source-update.js +1 -2
- package/dist/hoi4_agent_tools/gui/animation-manifest.js +0 -1
- package/dist/hoi4_agent_tools/gui/assets.js +0 -1
- package/dist/hoi4_agent_tools/gui/dds.js +0 -1
- package/dist/hoi4_agent_tools/gui/helpers.js +1 -2
- package/dist/hoi4_agent_tools/gui/index.js +0 -1
- package/dist/hoi4_agent_tools/gui/layout.js +0 -1
- package/dist/hoi4_agent_tools/gui/limits.js +0 -1
- package/dist/hoi4_agent_tools/gui/renderer.js +0 -1
- package/dist/hoi4_agent_tools/gui/scenario.js +0 -1
- package/dist/hoi4_agent_tools/gui/source-graph.js +0 -1
- package/dist/hoi4_agent_tools/gui/source-patch.js +1 -2
- package/dist/hoi4_agent_tools/gui/studio.js +247 -104
- package/dist/hoi4_agent_tools/gui/tga.js +0 -1
- package/dist/hoi4_agent_tools/gui/types.js +0 -1
- package/dist/hoi4_agent_tools/gui/validators.js +0 -1
- package/dist/hoi4_agent_tools/map/bmp.js +0 -1
- package/dist/hoi4_agent_tools/map/diagnostic-limit.js +0 -1
- package/dist/hoi4_agent_tools/map/index.js +0 -1
- package/dist/hoi4_agent_tools/map/limits.js +2 -1
- package/dist/hoi4_agent_tools/map/model.js +0 -1
- package/dist/hoi4_agent_tools/map/operations.js +0 -1
- package/dist/hoi4_agent_tools/map/render.js +0 -1
- package/dist/hoi4_agent_tools/map/service.js +171 -33
- package/dist/hoi4_agent_tools/map/validation.js +0 -1
- package/dist/hoi4_agent_tools/mcp/resources/register.js +61 -187
- package/dist/hoi4_agent_tools/mcp/security/auth.js +1 -2
- package/dist/hoi4_agent_tools/mcp/server/base-tools.js +24 -750
- package/dist/hoi4_agent_tools/mcp/server/create.js +3 -12
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.js +0 -71
- package/dist/hoi4_agent_tools/mcp/server/progress.js +0 -1
- package/dist/hoi4_agent_tools/mcp/server/result.js +24 -30
- package/dist/hoi4_agent_tools/mcp/server/transaction-execution.js +10 -14
- package/dist/hoi4_agent_tools/mcp/tools/focus.js +219 -275
- package/dist/hoi4_agent_tools/mcp/tools/gui.js +149 -250
- package/dist/hoi4_agent_tools/mcp/tools/map.js +256 -337
- package/dist/hoi4_agent_tools/mcp/tools/mods.js +54 -0
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/event-store.js +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/http.js +1 -12
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js +0 -1
- package/dist/hoi4_agent_tools/runtime.js +5 -2
- package/dist/hoi4_agent_tools/schemas/common.js +1 -2
- package/dist/hoi4_agent_tools/schemas/focus.js +0 -1
- package/dist/hoi4_agent_tools/schemas/map.js +0 -1
- package/dist/hoi4_agent_tools/schemas/transaction.js +0 -1
- package/dist/hoi4_agent_tools/version.js +1 -2
- package/docs/README.md +8 -21
- package/docs/development.md +22 -0
- package/docs/focus.md +40 -0
- package/docs/gui.md +37 -0
- package/docs/http.md +53 -0
- package/docs/map.md +39 -0
- package/docs/setup.md +39 -0
- package/package.json +10 -11
- package/server.json +3 -12
- package/dist/bin/http.d.ts +0 -3
- package/dist/bin/http.d.ts.map +0 -1
- package/dist/bin/http.js.map +0 -1
- package/dist/bin/setup.d.ts +0 -3
- package/dist/bin/setup.d.ts.map +0 -1
- package/dist/bin/setup.js.map +0 -1
- package/dist/bin/stdio.d.ts +0 -3
- package/dist/bin/stdio.d.ts.map +0 -1
- package/dist/bin/stdio.js.map +0 -1
- package/dist/hoi4_agent_tools/core/artifacts.d.ts +0 -117
- package/dist/hoi4_agent_tools/core/artifacts.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/artifacts.js.map +0 -1
- package/dist/hoi4_agent_tools/core/canonical.d.ts +0 -13
- package/dist/hoi4_agent_tools/core/canonical.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/canonical.js.map +0 -1
- package/dist/hoi4_agent_tools/core/configuration.d.ts +0 -138
- package/dist/hoi4_agent_tools/core/configuration.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/configuration.js.map +0 -1
- package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts +0 -18
- package/dist/hoi4_agent_tools/core/diagnostic-collector.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/diagnostic-collector.js.map +0 -1
- package/dist/hoi4_agent_tools/core/diagnostics.d.ts +0 -26
- package/dist/hoi4_agent_tools/core/diagnostics.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/diagnostics.js.map +0 -1
- package/dist/hoi4_agent_tools/core/diff.d.ts +0 -22
- package/dist/hoi4_agent_tools/core/diff.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/diff.js.map +0 -1
- package/dist/hoi4_agent_tools/core/engine.d.ts +0 -57
- package/dist/hoi4_agent_tools/core/engine.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/engine.js.map +0 -1
- package/dist/hoi4_agent_tools/core/image-diff.d.ts +0 -14
- package/dist/hoi4_agent_tools/core/image-diff.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/image-diff.js.map +0 -1
- package/dist/hoi4_agent_tools/core/index.d.ts +0 -64
- package/dist/hoi4_agent_tools/core/index.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/index.js.map +0 -1
- package/dist/hoi4_agent_tools/core/index.public.d.ts +0 -16
- package/dist/hoi4_agent_tools/core/index.public.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/index.public.js +0 -16
- package/dist/hoi4_agent_tools/core/index.public.js.map +0 -1
- package/dist/hoi4_agent_tools/core/render-budget.d.ts +0 -51
- package/dist/hoi4_agent_tools/core/render-budget.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/render-budget.js.map +0 -1
- package/dist/hoi4_agent_tools/core/result.d.ts +0 -45
- package/dist/hoi4_agent_tools/core/result.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/result.js.map +0 -1
- package/dist/hoi4_agent_tools/core/scanner.d.ts +0 -28
- package/dist/hoi4_agent_tools/core/scanner.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/scanner.js.map +0 -1
- package/dist/hoi4_agent_tools/core/server-state.d.ts +0 -31
- package/dist/hoi4_agent_tools/core/server-state.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/server-state.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/encoding.d.ts +0 -10
- package/dist/hoi4_agent_tools/core/source/encoding.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/encoding.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/index.d.ts +0 -7
- package/dist/hoi4_agent_tools/core/source/index.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/index.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/lexer.d.ts +0 -30
- package/dist/hoi4_agent_tools/core/source/lexer.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/lexer.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/limits.d.ts +0 -21
- package/dist/hoi4_agent_tools/core/source/limits.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/limits.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/localisation.d.ts +0 -20
- package/dist/hoi4_agent_tools/core/source/localisation.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/localisation.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/parser.d.ts +0 -44
- package/dist/hoi4_agent_tools/core/source/parser.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/parser.js.map +0 -1
- package/dist/hoi4_agent_tools/core/source/rewrite.d.ts +0 -10
- package/dist/hoi4_agent_tools/core/source/rewrite.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/source/rewrite.js.map +0 -1
- package/dist/hoi4_agent_tools/core/svg-text.d.ts +0 -34
- package/dist/hoi4_agent_tools/core/svg-text.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/svg-text.js.map +0 -1
- package/dist/hoi4_agent_tools/core/transaction-limits.d.ts +0 -9
- package/dist/hoi4_agent_tools/core/transaction-limits.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/transaction-limits.js.map +0 -1
- package/dist/hoi4_agent_tools/core/transactions.d.ts +0 -164
- package/dist/hoi4_agent_tools/core/transactions.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/transactions.js.map +0 -1
- package/dist/hoi4_agent_tools/core/workspace.d.ts +0 -68
- package/dist/hoi4_agent_tools/core/workspace.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/core/workspace.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/compiler.d.ts +0 -10
- package/dist/hoi4_agent_tools/focus/compiler.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/compiler.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/continuous-render.d.ts +0 -32
- package/dist/hoi4_agent_tools/focus/continuous-render.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/continuous-render.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/drift.d.ts +0 -22
- package/dist/hoi4_agent_tools/focus/drift.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/drift.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/geometry.d.ts +0 -17
- package/dist/hoi4_agent_tools/focus/geometry.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/geometry.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/importer.d.ts +0 -9
- package/dist/hoi4_agent_tools/focus/importer.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/importer.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/index.d.ts +0 -14
- package/dist/hoi4_agent_tools/focus/index.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/index.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/layout.d.ts +0 -5
- package/dist/hoi4_agent_tools/focus/layout.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/layout.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/limits.d.ts +0 -9
- package/dist/hoi4_agent_tools/focus/limits.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/limits.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/lint.d.ts +0 -14
- package/dist/hoi4_agent_tools/focus/lint.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/lint.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/model.d.ts +0 -307
- package/dist/hoi4_agent_tools/focus/model.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/model.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/native-effects.d.ts +0 -9
- package/dist/hoi4_agent_tools/focus/native-effects.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/native-effects.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/planning.d.ts +0 -15
- package/dist/hoi4_agent_tools/focus/planning.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/planning.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/presentation.d.ts +0 -24
- package/dist/hoi4_agent_tools/focus/presentation.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/presentation.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/render.d.ts +0 -39
- package/dist/hoi4_agent_tools/focus/render.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/render.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/service.d.ts +0 -82
- package/dist/hoi4_agent_tools/focus/service.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/service.js.map +0 -1
- package/dist/hoi4_agent_tools/focus/source-update.d.ts +0 -6
- package/dist/hoi4_agent_tools/focus/source-update.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/focus/source-update.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts +0 -37
- package/dist/hoi4_agent_tools/gui/animation-manifest.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/animation-manifest.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/assets.d.ts +0 -71
- package/dist/hoi4_agent_tools/gui/assets.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/assets.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/dds.d.ts +0 -17
- package/dist/hoi4_agent_tools/gui/dds.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/dds.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/helpers.d.ts +0 -101
- package/dist/hoi4_agent_tools/gui/helpers.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/helpers.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/index.d.ts +0 -15
- package/dist/hoi4_agent_tools/gui/index.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/index.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/layout.d.ts +0 -6
- package/dist/hoi4_agent_tools/gui/layout.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/layout.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/limits.d.ts +0 -25
- package/dist/hoi4_agent_tools/gui/limits.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/limits.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/renderer.d.ts +0 -18
- package/dist/hoi4_agent_tools/gui/renderer.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/renderer.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/scenario.d.ts +0 -66
- package/dist/hoi4_agent_tools/gui/scenario.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/scenario.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/source-graph.d.ts +0 -7
- package/dist/hoi4_agent_tools/gui/source-graph.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/source-graph.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/source-patch.d.ts +0 -13
- package/dist/hoi4_agent_tools/gui/source-patch.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/source-patch.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/studio.d.ts +0 -86
- package/dist/hoi4_agent_tools/gui/studio.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/studio.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/tga.d.ts +0 -16
- package/dist/hoi4_agent_tools/gui/tga.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/tga.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/types.d.ts +0 -322
- package/dist/hoi4_agent_tools/gui/types.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/types.js.map +0 -1
- package/dist/hoi4_agent_tools/gui/validators.d.ts +0 -8
- package/dist/hoi4_agent_tools/gui/validators.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/gui/validators.js.map +0 -1
- package/dist/hoi4_agent_tools/map/bmp.d.ts +0 -62
- package/dist/hoi4_agent_tools/map/bmp.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/bmp.js.map +0 -1
- package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts +0 -5
- package/dist/hoi4_agent_tools/map/diagnostic-limit.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/diagnostic-limit.js.map +0 -1
- package/dist/hoi4_agent_tools/map/index.d.ts +0 -8
- package/dist/hoi4_agent_tools/map/index.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/index.js.map +0 -1
- package/dist/hoi4_agent_tools/map/limits.d.ts +0 -13
- package/dist/hoi4_agent_tools/map/limits.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/limits.js.map +0 -1
- package/dist/hoi4_agent_tools/map/model.d.ts +0 -269
- package/dist/hoi4_agent_tools/map/model.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/model.js.map +0 -1
- package/dist/hoi4_agent_tools/map/operations.d.ts +0 -401
- package/dist/hoi4_agent_tools/map/operations.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/operations.js.map +0 -1
- package/dist/hoi4_agent_tools/map/render.d.ts +0 -90
- package/dist/hoi4_agent_tools/map/render.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/render.js.map +0 -1
- package/dist/hoi4_agent_tools/map/service.d.ts +0 -81
- package/dist/hoi4_agent_tools/map/service.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/service.js.map +0 -1
- package/dist/hoi4_agent_tools/map/validation.d.ts +0 -23
- package/dist/hoi4_agent_tools/map/validation.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/map/validation.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts +0 -4
- package/dist/hoi4_agent_tools/mcp/prompts/register.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/prompts/register.js +0 -72
- package/dist/hoi4_agent_tools/mcp/prompts/register.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts +0 -9
- package/dist/hoi4_agent_tools/mcp/registry/metadata.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/registry/metadata.js +0 -10
- package/dist/hoi4_agent_tools/mcp/registry/metadata.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/resources/register.d.ts +0 -5
- package/dist/hoi4_agent_tools/mcp/resources/register.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/resources/register.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/security/auth.d.ts +0 -24
- package/dist/hoi4_agent_tools/mcp/security/auth.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/security/auth.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts +0 -47
- package/dist/hoi4_agent_tools/mcp/server/base-tools.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/base-tools.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/create.d.ts +0 -5
- package/dist/hoi4_agent_tools/mcp/server/create.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/create.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts +0 -138
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/output-schemas.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/progress.d.ts +0 -8
- package/dist/hoi4_agent_tools/mcp/server/progress.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/progress.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/result.d.ts +0 -232
- package/dist/hoi4_agent_tools/mcp/server/result.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/result.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/transaction-execution.d.ts +0 -31
- package/dist/hoi4_agent_tools/mcp/server/transaction-execution.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/server/transaction-execution.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts +0 -5
- package/dist/hoi4_agent_tools/mcp/tools/focus.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/tools/focus.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts +0 -117
- package/dist/hoi4_agent_tools/mcp/tools/gui.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/tools/gui.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/tools/map.d.ts +0 -5
- package/dist/hoi4_agent_tools/mcp/tools/map.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/tools/map.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts +0 -58
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/bounded-stdio.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts +0 -26
- package/dist/hoi4_agent_tools/mcp/transports/event-store.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/event-store.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/http.d.ts +0 -28
- package/dist/hoi4_agent_tools/mcp/transports/http.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/http.js.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts +0 -15
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/mcp/transports/protocol-gate.js.map +0 -1
- package/dist/hoi4_agent_tools/runtime.d.ts +0 -4
- package/dist/hoi4_agent_tools/runtime.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/runtime.js.map +0 -1
- package/dist/hoi4_agent_tools/schemas/common.d.ts +0 -74
- package/dist/hoi4_agent_tools/schemas/common.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/schemas/common.js.map +0 -1
- package/dist/hoi4_agent_tools/schemas/focus.d.ts +0 -784
- package/dist/hoi4_agent_tools/schemas/focus.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/schemas/focus.js.map +0 -1
- package/dist/hoi4_agent_tools/schemas/index.d.ts +0 -5
- package/dist/hoi4_agent_tools/schemas/index.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/schemas/index.js +0 -5
- package/dist/hoi4_agent_tools/schemas/index.js.map +0 -1
- package/dist/hoi4_agent_tools/schemas/map.d.ts +0 -654
- package/dist/hoi4_agent_tools/schemas/map.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/schemas/map.js.map +0 -1
- package/dist/hoi4_agent_tools/schemas/transaction.d.ts +0 -259
- package/dist/hoi4_agent_tools/schemas/transaction.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/schemas/transaction.js.map +0 -1
- package/dist/hoi4_agent_tools/version.d.ts +0 -6
- package/dist/hoi4_agent_tools/version.d.ts.map +0 -1
- package/dist/hoi4_agent_tools/version.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/docs/adr/0001-runtime-and-language.md +0 -16
- package/docs/adr/0002-lossless-source-model.md +0 -18
- package/docs/adr/0003-image-and-font-codecs.md +0 -18
- package/docs/adr/0004-focus-layout.md +0 -16
- package/docs/adr/0005-offline-rendering.md +0 -18
- package/docs/adr/0006-mcp-sdk-and-protocol.md +0 -16
- package/docs/adr/0007-storage-and-transactions.md +0 -24
- package/docs/adr/0008-test-strategy.md +0 -18
- package/docs/adr/0009-packaging-and-registry.md +0 -16
- package/docs/adr/0010-unsupported-and-refusal-policy.md +0 -18
- package/docs/adr/0011-http-security.md +0 -16
- package/docs/adr/0012-autonomous-rewrites.md +0 -55
- package/docs/adr/README.md +0 -14
- package/docs/agent-integration.md +0 -146
- package/docs/architecture.md +0 -76
- package/docs/artifacts.md +0 -136
- package/docs/compatibility.md +0 -33
- package/docs/completion-report.md +0 -122
- package/docs/configuration.md +0 -305
- package/docs/focus-workflow.md +0 -197
- package/docs/gui-workflow.md +0 -125
- package/docs/limitations.md +0 -32
- package/docs/map-workflow.md +0 -95
- package/docs/performance.md +0 -117
- package/docs/release.md +0 -222
- package/docs/research/mcp-2026-07-10.md +0 -52
- package/docs/research/source-ledger.md +0 -68
- package/docs/security.md +0 -145
- package/docs/self-hosting.md +0 -170
- package/docs/testing.md +0 -43
- package/docs/third-party-notices.md +0 -11
- package/docs/transactions.md +0 -180
- package/docs/troubleshooting.md +0 -54
- package/schemas/configuration.schema.json +0 -795
- package/schemas/continuous-focus-palette.schema.json +0 -325
- package/schemas/focus-plan.schema.json +0 -927
- package/schemas/focus-planning-sidecar.schema.json +0 -379
- package/schemas/gui-animation-source.schema.json +0 -176
- package/schemas/gui-helper.schema.json +0 -301
- package/schemas/gui-scenario.schema.json +0 -298
- package/schemas/map-operation.schema.json +0 -2284
- package/schemas/operation-result.schema.json +0 -344
- package/schemas/transaction-manifest.schema.json +0 -685
package/docs/configuration.md
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
# Configuration and workspaces
|
|
2
|
-
|
|
3
|
-
Pass a config with `--config PATH` or `HOI4_AGENT_CONFIG`. Without either override, the server uses
|
|
4
|
-
`~/.config/hoi4-agent-tools/config.json` on every platform (for example,
|
|
5
|
-
`C:\\Users\\name\\.config\\hoi4-agent-tools\\config.json` on Windows). A different durable absolute
|
|
6
|
-
path is equally valid when the client registration sets `HOI4_AGENT_CONFIG`. Unknown fields are
|
|
7
|
-
rejected.
|
|
8
|
-
The read-only setup discovery command also checks `HOI4_GAME_ROOT` and the path-delimited `HOI4_MOD_ROOTS`; it reports candidates without registering or modifying them.
|
|
9
|
-
|
|
10
|
-
Setup stays read-only unless a write flag is explicit. The recommended write configuration is generated with:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
hoi4-agent-tools-setup --init-config /absolute/path/config.json --workspace /absolute/path/mod --autonomous-writes --server-state /separate/operator/state
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
That writes `"writePolicy": "autonomous"` and `"writeEnabled": true` for the supplied mod. Use `--reviewed-writes` only for the legacy separate review/apply tool sequence; `--enable-writes` remains a compatibility alias for reviewed mode. Autonomous and reviewed flags are mutually exclusive, and both require `--server-state`.
|
|
17
|
-
|
|
18
|
-
The stdio executable accepts newline-delimited JSON-RPC frames up to a fixed 16,777,216-byte
|
|
19
|
-
ceiling, excluding the line-feed delimiter. This transport safety limit is deliberately not a
|
|
20
|
-
configuration field; malformed UTF-8 and oversized terminated or unterminated frames close the
|
|
21
|
-
stdio connection with a stderr diagnostic and no protocol output. Streamable HTTP uses the
|
|
22
|
-
separately configured `http.maxBodyBytes`.
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"version": 1,
|
|
27
|
-
"writePolicy": "autonomous",
|
|
28
|
-
"serverStateRoot": "/var/lib/hoi4-agent-tools-state",
|
|
29
|
-
"transactionTtlSeconds": 3600,
|
|
30
|
-
"transactionMaxJournalBytes": 536870912,
|
|
31
|
-
"transactionMaxJournals": 128,
|
|
32
|
-
"scanMaxFiles": 20000,
|
|
33
|
-
"scanMaxBytes": 134217728,
|
|
34
|
-
"scanMaxFileBytes": 67108864,
|
|
35
|
-
"artifactMaxBytes": 536870912,
|
|
36
|
-
"artifactMaxEntries": 5000,
|
|
37
|
-
"artifactMaxSingleBytes": 134217728,
|
|
38
|
-
"registrationRoots": ["/srv/hoi4/workspaces", "/srv/hoi4/game", "/srv/hoi4/dependencies"],
|
|
39
|
-
"writableRegistrationRoots": ["/srv/hoi4/workspaces"],
|
|
40
|
-
"storageRoots": ["/var/lib/hoi4-agent-tools"],
|
|
41
|
-
"workspaces": [
|
|
42
|
-
{
|
|
43
|
-
"id": "example",
|
|
44
|
-
"name": "Example Mod",
|
|
45
|
-
"kind": "mod",
|
|
46
|
-
"root": "/srv/hoi4/workspaces/example",
|
|
47
|
-
"gameRoot": "/srv/hoi4/game",
|
|
48
|
-
"dependencyRoots": [],
|
|
49
|
-
"dependencies": [
|
|
50
|
-
{
|
|
51
|
-
"root": "/srv/hoi4/dependencies/base",
|
|
52
|
-
"replacePaths": ["common/ideas"]
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"replacePaths": ["common/national_focus"],
|
|
56
|
-
"artifactRoot": "/srv/hoi4/workspaces/example/.hoi4-agent/artifacts",
|
|
57
|
-
"cacheRoot": "/srv/hoi4/workspaces/example/.hoi4-agent/cache",
|
|
58
|
-
"writeEnabled": true
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Server fields
|
|
65
|
-
|
|
66
|
-
All byte values are exact bytes. Defaults are applied when a field is omitted.
|
|
67
|
-
|
|
68
|
-
| Field | Default | Validation and behavior |
|
|
69
|
-
| ---------------------------- | ----------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
|
-
| `version` | required | Must equal the current configuration version, `1`. |
|
|
71
|
-
| `writePolicy` | `"read-only"` | `"read-only"`, recommended `"autonomous"`, or compatibility `"transactions"`. |
|
|
72
|
-
| `serverStateRoot` | omitted | Required for either write policy; absolute canonical operator state used for the private journal key and replay-protection heads. |
|
|
73
|
-
| `transactionTtlSeconds` | `3600` | 60 through 86,400 seconds. |
|
|
74
|
-
| `transactionMaxJournalBytes` | `536870912` | At least 1 MiB; aggregate transaction-journal retention ceiling and per-plan work ceiling. |
|
|
75
|
-
| `transactionMaxJournals` | `128` | 1 through 10,000 journals per workspace cache. |
|
|
76
|
-
| `scanMaxFiles` | `20000` | 1 through 1,000,000 enumerated files per scan. |
|
|
77
|
-
| `scanMaxBytes` | `134217728` | At least 1 MiB of file content per scan. |
|
|
78
|
-
| `scanMaxFileBytes` | `67108864` | At least 64 KiB and no greater than `scanMaxBytes`. |
|
|
79
|
-
| `artifactMaxBytes` | `536870912` | At least 1 MiB across one workspace artifact store; a lower value also bounds logical chunk preparation, which has an independent fixed 536,870,912-byte ceiling. |
|
|
80
|
-
| `artifactMaxEntries` | `5000` | 1 through 100,000 provenance manifests. |
|
|
81
|
-
| `artifactMaxSingleBytes` | `134217728` | At least 1 MiB and no greater than `artifactMaxBytes`; applies to content. Provenance manifests have a separate fixed 1 MiB ceiling. |
|
|
82
|
-
| `registrationRoots` | `[]` | Up to 16 operator-approved source parents for runtime `hoi4.project_register`; this alone never grants writable-mod registration. |
|
|
83
|
-
| `writableRegistrationRoots` | `[]` | Up to 16 narrow descendants of `registrationRoots` that may be runtime `kind: "mod"` roots. Empty fails closed. |
|
|
84
|
-
| `storageRoots` | `[]` | Up to 16 operator-approved parents for artifact and cache directories; not a source-registration allowlist. |
|
|
85
|
-
| `workspaces` | `[]` | Up to 1,000 statically reviewed workspace registrations; configured plus runtime registrations may never exceed 1,000. |
|
|
86
|
-
| `http` | loopback defaults below | Streamable HTTP policy. An omitted/default HTTP block has no credentials, so the HTTP executable refuses to start until authentication is configured. Stdio does not require HTTP authentication. |
|
|
87
|
-
|
|
88
|
-
The configuration also rejects unsafe combined budgets: `scanMaxBytes` multiplied by
|
|
89
|
-
`http.maxConcurrentRequests` must be at most 512 MiB, while `maxBodyBytes` multiplied by
|
|
90
|
-
`maxConcurrentRequests` must be at most 16 MiB. HTTP concurrency has a fixed maximum of two so two
|
|
91
|
-
simultaneous offline renders cannot exceed the supported process-safety model.
|
|
92
|
-
|
|
93
|
-
`serverStateRoot` is mandatory whenever `writePolicy` is not `"read-only"`. It must be absolute,
|
|
94
|
-
resolve to a canonical directory through components that contain no symbolic links or junctions,
|
|
95
|
-
and it must not overlap any configured or runtime source, fixture, artifact, cache, registration,
|
|
96
|
-
writable-registration, or storage root. The server stores the native canonical spelling, including
|
|
97
|
-
expanding harmless Windows 8.3 names, only after checking every existing component for links.
|
|
98
|
-
The server creates one random 32-byte journal HMAC key there with mode `0600`; the surrounding
|
|
99
|
-
POSIX directory must exclude group/other access. Windows operators must grant only the dedicated
|
|
100
|
-
server account access through the directory DACL. Keep the same state root when restarting or
|
|
101
|
-
temporarily changing to read-only mode so existing journals remain verifiable and recoverable. Do
|
|
102
|
-
not copy a state root between unrelated deployments or expose it through a workspace mount.
|
|
103
|
-
The state filesystem and every runtime artifact filesystem must support same-volume hard links and
|
|
104
|
-
atomic rename/replacement. The server does not substitute a weaker ownership-claim or key-creation
|
|
105
|
-
protocol when those primitives are unavailable.
|
|
106
|
-
|
|
107
|
-
## Workspace fields
|
|
108
|
-
|
|
109
|
-
| Field | Default | Validation and behavior |
|
|
110
|
-
| ----------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
111
|
-
| `id` | required | Lowercase identifier matching `[a-z][a-z0-9_-]{0,63}`; unique in the configuration. |
|
|
112
|
-
| `name` | required | Display name, 1 through 200 characters. |
|
|
113
|
-
| `root` | required | Primary source root. Its root kind is selected by `kind`. |
|
|
114
|
-
| `kind` | `"mod"` | `"mod"`, `"game"`, or `"dependency"`. Only a mod primary root can ever be writable. |
|
|
115
|
-
| `gameRoot` | omitted | Optional additional read-only base-game source; it must not overlap another source in the workspace. |
|
|
116
|
-
| `dependencyRoots` | `[]` | Up to 16 ordered read-only dependency roots without replacement metadata. |
|
|
117
|
-
| `dependencies` | `[]` | Up to 16 ordered objects with required `root` and up to 1,000 `replacePaths`; mutually exclusive with non-empty `dependencyRoots`. |
|
|
118
|
-
| `replacePaths` | `[]` | Up to 1,000 safe relative paths owned by the primary source root. |
|
|
119
|
-
| `roots` | conventional roots below | Relative source-family search paths. Unknown root-family names are rejected. |
|
|
120
|
-
| `artifactRoot` | mod default; otherwise required | A mod defaults to `<root>/.hoi4-agent/artifacts`. A game/dependency primary workspace must name an operator-owned path under `storageRoots`. |
|
|
121
|
-
| `cacheRoot` | mod default; otherwise required | A mod defaults to `<root>/.hoi4-agent/cache`. A game/dependency primary workspace must name an operator-owned path under `storageRoots`. |
|
|
122
|
-
| `fixtureRoot` | omitted | Optional read-only fixture source. |
|
|
123
|
-
| `writeEnabled` | `false` | Effective only for `kind: "mod"` when global `writePolicy` is `"autonomous"` or `"transactions"`. |
|
|
124
|
-
|
|
125
|
-
`registrationRoots`, `writableRegistrationRoots`, and `storageRoots` grant different capabilities:
|
|
126
|
-
|
|
127
|
-
- `registrationRoots` is consulted for runtime registration. The requested primary root and every
|
|
128
|
-
requested game, dependency, and fixture source must pass both lexical and canonical containment
|
|
129
|
-
beneath one of these roots. Statically configured `workspaces` come from the operator-reviewed
|
|
130
|
-
config file and are not required to be beneath `registrationRoots`.
|
|
131
|
-
- `writableRegistrationRoots` is a separate, default-empty capability. Every entry must remain
|
|
132
|
-
lexically and canonically beneath `registrationRoots`. A runtime primary root declared as
|
|
133
|
-
`kind: "mod"` must remain beneath one of these narrow roots even when `writeEnabled` is false,
|
|
134
|
-
because mod registration creates generated artifact/cache storage. A game or dependency root
|
|
135
|
-
listed only in `registrationRoots` cannot be relabelled as a writable mod by a caller.
|
|
136
|
-
- `storageRoots` permits generated files only. It never makes a directory eligible as a source.
|
|
137
|
-
Explicit artifact/cache paths outside a writable mod must canonicalize beneath one of these
|
|
138
|
-
roots.
|
|
139
|
-
- A mod may use its defaults or another descendant of the corresponding
|
|
140
|
-
`<mod>/.hoi4-agent/artifacts` or `<mod>/.hoi4-agent/cache` subtree. It may also use an explicit
|
|
141
|
-
path under `storageRoots`. Artifact and cache roots must be distinct, non-overlapping, and must
|
|
142
|
-
not overlap source roots.
|
|
143
|
-
- A `game` or `dependency` primary workspace is read-only and cannot place generated files in its
|
|
144
|
-
source tree. Both generated roots are therefore required and must be explicit operator-owned
|
|
145
|
-
descendants of `storageRoots`.
|
|
146
|
-
|
|
147
|
-
Read-only source roots may be shared only where the workspace-isolation checks permit it; a
|
|
148
|
-
workspace's internal primary/game/dependency/fixture roots must themselves be distinct and
|
|
149
|
-
non-overlapping. Writable mod roots and generated roots are protected from overlap with other
|
|
150
|
-
workspace-owned roots. The server creates approved artifact/cache directories when needed;
|
|
151
|
-
approval comes from containment, not from the directory merely existing.
|
|
152
|
-
|
|
153
|
-
For example, a read-only primary game workspace needs separate generated storage:
|
|
154
|
-
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"storageRoots": ["/var/lib/hoi4-agent-tools"],
|
|
158
|
-
"workspaces": [
|
|
159
|
-
{
|
|
160
|
-
"id": "game-reference",
|
|
161
|
-
"name": "Installed Game Reference",
|
|
162
|
-
"kind": "game",
|
|
163
|
-
"root": "/srv/hoi4/game",
|
|
164
|
-
"artifactRoot": "/var/lib/hoi4-agent-tools/game-reference/artifacts",
|
|
165
|
-
"cacheRoot": "/var/lib/hoi4-agent-tools/game-reference/cache"
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
The same explicit-storage requirement applies when the primary `kind` is `"dependency"`.
|
|
172
|
-
|
|
173
|
-
`dependencyRoots` remains the concise form when dependencies declare no replacement ownership. Use `dependencies` instead when a dependency owns `replace_path` declarations; entries are ordered from lowest to highest precedence, and each replacement hides that subtree only in lower roots. The active mod's `replacePaths` remains the highest-precedence owner. The two dependency forms are mutually exclusive.
|
|
174
|
-
|
|
175
|
-
`hoi4.project_status` returns one authorized workspace per page when no `workspaceId` is supplied;
|
|
176
|
-
follow `nextCursor` until absent. Replacement ownership is summarized with exact counts and bounded
|
|
177
|
-
path samples, so a workspace with many `replace_path` entries cannot inflate a tool response.
|
|
178
|
-
|
|
179
|
-
## Read and write policy
|
|
180
|
-
|
|
181
|
-
`writePolicy` defaults to `read-only`. In this mode the server exposes analysis and evidence tools but no source-mutation path.
|
|
182
|
-
|
|
183
|
-
`autonomous` is the recommended write policy. With `writeEnabled: true` on a mod workspace, it exposes `hoi4.focus_rewrite`, `hoi4.gui_rewrite`, and `hoi4.map_rewrite`. Each tool plans, validates, journals, applies, rebuilds the index, and post-validates inside one call. If application or post-validation fails, exact original bytes are restored automatically. The transaction status/diff/apply/rollback tools are not registered in autonomous mode.
|
|
184
|
-
|
|
185
|
-
`transactions` is an optional compatibility policy for clients that still need a distinct reviewed plan and apply boundary. It exposes the `*_plan_changes`/`map_plan` tools plus `hoi4.transaction_status`, `hoi4.transaction_diff`, `hoi4.transaction_apply`, and `hoi4.transaction_rollback`. It uses the same journal, hash checks, post-validation, and automatic failure recovery as autonomous mode.
|
|
186
|
-
|
|
187
|
-
Both write policies require `serverStateRoot` and `writeEnabled: true` on the target mod. A dependency or game registration remains read-only even if misconfigured. Changing the global policy changes the MCP tool surface; restart the server and reinitialize the MCP session after changing it.
|
|
188
|
-
|
|
189
|
-
The autonomous rewrite tools advertise `destructiveHint: true`. MCP does not require per-call prompts from that annotation, and server configuration cannot override a client's host approval or filesystem policy. A client may still prompt for or refuse a rewrite.
|
|
190
|
-
|
|
191
|
-
`registrationRoots` controls runtime `hoi4.project_register`. A requested root must canonicalize beneath one of these roots, and a runtime mod additionally requires `writableRegistrationRoots`. HTTP principals also need `allowRegistration`. Granting `allowRegistration` permits that principal to register unclaimed sources beneath the configured capability roots, so use narrow roots or static reviewed workspaces for multi-user deployments. Runtime registration does not edit a client configuration or persist raw paths. It atomically records a hash-only owner/workspace claim in the canonical artifact root; later registrations of that physical store must match it. Reassigning a claimed store is therefore an explicit operator operation: stop the server, review/archive the claim and existing evidence, and choose whether to preserve or separately migrate data. The server never deletes or silently rebinds it.
|
|
192
|
-
|
|
193
|
-
Write modes do not accept pre-upgrade unauthenticated journal manifests. Preserve their
|
|
194
|
-
cache directories for operator review, then explicitly archive or remove them together with the
|
|
195
|
-
corresponding protected state decision; the server never guesses a migration or treats a public
|
|
196
|
-
integrity hash as authorization.
|
|
197
|
-
|
|
198
|
-
## Conventional roots
|
|
199
|
-
|
|
200
|
-
Each workspace can override relative root lists:
|
|
201
|
-
|
|
202
|
-
- localisation: `localisation`, `localisation_synced`
|
|
203
|
-
- interface: `interface`
|
|
204
|
-
- GFX: `gfx`
|
|
205
|
-
- map: `map`
|
|
206
|
-
- focuses: `common/national_focus`
|
|
207
|
-
- scripted GUI: `common/scripted_guis`
|
|
208
|
-
- states: `history/states`
|
|
209
|
-
|
|
210
|
-
The exact default `roots` object is:
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"localisation": ["localisation", "localisation_synced"],
|
|
215
|
-
"interface": ["interface"],
|
|
216
|
-
"gfx": ["gfx"],
|
|
217
|
-
"map": ["map"],
|
|
218
|
-
"focus": ["common/national_focus"],
|
|
219
|
-
"scriptedGui": ["common/scripted_guis"],
|
|
220
|
-
"states": ["history/states"]
|
|
221
|
-
}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Adapters can change these paths, not the safety model or source semantics.
|
|
225
|
-
|
|
226
|
-
## HTTP configuration
|
|
227
|
-
|
|
228
|
-
Loopback static token example:
|
|
229
|
-
|
|
230
|
-
```json
|
|
231
|
-
{
|
|
232
|
-
"http": {
|
|
233
|
-
"host": "127.0.0.1",
|
|
234
|
-
"port": 3210,
|
|
235
|
-
"allowedOrigins": ["https://agent.example.test"],
|
|
236
|
-
"trustedProxyAddresses": [],
|
|
237
|
-
"tokens": [
|
|
238
|
-
{
|
|
239
|
-
"principal": "developer",
|
|
240
|
-
"tokenEnv": "HOI4_AGENT_HTTP_TOKEN",
|
|
241
|
-
"workspaceIds": ["example"],
|
|
242
|
-
"allowRegistration": false
|
|
243
|
-
}
|
|
244
|
-
],
|
|
245
|
-
"principals": [],
|
|
246
|
-
"maxBodyBytes": 1048576,
|
|
247
|
-
"headersTimeoutMs": 10000,
|
|
248
|
-
"requestTimeoutMs": 30000,
|
|
249
|
-
"keepAliveTimeoutMs": 5000,
|
|
250
|
-
"maxConnections": 64,
|
|
251
|
-
"maxRequestsPerSocket": 100,
|
|
252
|
-
"maxConcurrentRequests": 2,
|
|
253
|
-
"maxSessions": 128,
|
|
254
|
-
"maxSessionsPerPrincipal": 32,
|
|
255
|
-
"maxEventStreams": 32,
|
|
256
|
-
"maxEventStreamsPerPrincipal": 4,
|
|
257
|
-
"maxSessionEventBytes": 1048576,
|
|
258
|
-
"maxEventStoreBytes": 16777216,
|
|
259
|
-
"requestsPerMinute": 120,
|
|
260
|
-
"sessionTtlSeconds": 3600
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
Secrets are read from named environment variables and are not stored in config. A missing static
|
|
266
|
-
secret, a value shorter than 32 characters, or duplicate secret values make HTTP startup fail. See
|
|
267
|
-
[self-hosting](self-hosting.md) for OAuth configuration.
|
|
268
|
-
|
|
269
|
-
Every HTTP field is listed below. URLs are validated absolute URLs.
|
|
270
|
-
|
|
271
|
-
| Field | Default | Validation and behavior |
|
|
272
|
-
| ----------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
273
|
-
| `host` | `"127.0.0.1"` | Listen address. Static tokens are permitted only on `127.0.0.1`, `localhost`, or `::1`. |
|
|
274
|
-
| `port` | `3210` | 0 through 65,535; `0` requests an ephemeral port. |
|
|
275
|
-
| `publicUrl` | omitted | Canonical HTTP(S) origin or exact `/mcp` endpoint. Required for OAuth. A non-loopback listener or URL requires HTTPS public OAuth policy, including when a public reverse proxy reaches a loopback listener. Credentials, path prefixes, query, and fragment are forbidden. |
|
|
276
|
-
| `allowedOrigins` | `[]` | Exact HTTP(S) origins (`scheme://host[:port]`) without credentials, paths, queries, or fragments; opaque origins such as `null` are rejected. A present `Origin` header must match. Non-loopback deployments require at least one. |
|
|
277
|
-
| `trustedProxyAddresses` | `[]` | Exact IPv4/IPv6 socket-peer addresses allowed to supply `X-Forwarded-For` for the pre-auth rate key only; no CIDR, hostname, other forwarded-header trust, or implicit trust. |
|
|
278
|
-
| `tokens` | `[]` | Static-token grants. Mutually exclusive with `oauth`. |
|
|
279
|
-
| `principals` | `[]` | OAuth subject allowlist and workspace grants. OAuth startup requires at least one entry. |
|
|
280
|
-
| `oauth` | omitted | OAuth/OIDC JWT verification settings. |
|
|
281
|
-
| `maxBodyBytes` | `1048576` | 1,024 through 16,777,216 JSON bytes. |
|
|
282
|
-
| `headersTimeoutMs` | `10000` | 1,000 through 120,000; cannot exceed `requestTimeoutMs`. |
|
|
283
|
-
| `requestTimeoutMs` | `30000` | 1,000 through 300,000 to receive the complete request. |
|
|
284
|
-
| `keepAliveTimeoutMs` | `5000` | 1,000 through 120,000 and strictly less than `headersTimeoutMs`. |
|
|
285
|
-
| `maxConnections` | `64` | 1 through 100,000 accepted server connections. |
|
|
286
|
-
| `maxRequestsPerSocket` | `100` | 1 through 100,000 requests before a socket is retired. |
|
|
287
|
-
| `maxConcurrentRequests` | `2` | 1 through 2 admitted requests, enforced before JSON parsing and authentication. This fixed ceiling bounds concurrent offline render work. |
|
|
288
|
-
| `maxSessions` | `128` | 1 through 10,000 active plus pending MCP sessions globally. |
|
|
289
|
-
| `maxSessionsPerPrincipal` | `32` | 1 through 10,000 active plus pending sessions per principal, also capped by `maxSessions`. |
|
|
290
|
-
| `maxEventStreams` | `32` | 1 through 10,000 simultaneous resumable GET streams globally. |
|
|
291
|
-
| `maxEventStreamsPerPrincipal` | `4` | 1 through 10,000 simultaneous streams per principal. |
|
|
292
|
-
| `maxSessionEventBytes` | `1048576` | 64 KiB through 64 MiB of replay history per session; cannot exceed `maxEventStoreBytes`. |
|
|
293
|
-
| `maxEventStoreBytes` | `16777216` | 64 KiB through 256 MiB of replay history shared across sessions. |
|
|
294
|
-
| `requestsPerMinute` | `120` | 1 through 100,000 in each fixed minute, independently before auth per client address and after auth per principal. |
|
|
295
|
-
| `sessionTtlSeconds` | `3600` | 60 through 86,400; renewed by an authorized request. |
|
|
296
|
-
|
|
297
|
-
Each `tokens` entry requires `principal`, `tokenEnv`, and at least one configured `workspaceId`;
|
|
298
|
-
`allowRegistration` defaults to `false`. Token principals and environment-variable names must be
|
|
299
|
-
unique. Each `principals` entry requires `principal`; `workspaceIds` defaults to `[]` and
|
|
300
|
-
`allowRegistration` to `false`. OAuth principals must be unique, and static-token/OAuth principal
|
|
301
|
-
namespaces must be disjoint. Every granted workspace ID must exist in the static configuration.
|
|
302
|
-
|
|
303
|
-
The `oauth` object requires `issuer`, `jwksUri`, `audience`, and at least one
|
|
304
|
-
`authorizationServers` URL. `requiredScopes` defaults to `["hoi4:read"]`. `algorithms` defaults to
|
|
305
|
-
`["RS256"]` and accepts only `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`, or `EdDSA`.
|
package/docs/focus-workflow.md
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Focus Tree Workbench
|
|
2
|
-
|
|
3
|
-
The workbench imports existing focus source into a structured plan without normalizing away unsupported fields. It models tree/country assignment, branches and lanes, explicit prerequisite groups, exclusions, route locks, bypass/availability, fixed/relative/pinned/automatic positions, planner-only hidden/crisis/conditional routes, convergence, shared support, icons, localisation, AI/filter metadata, linked content, and raw passthrough.
|
|
4
|
-
|
|
5
|
-
Linked reward content is taken from the actual effect grammar. Native effects are distinguished by
|
|
6
|
-
the bundled catalog of all 553 identifiers documented for the supported HOI4 1.19.2 build. Direct scripted-effect calls, including calls nested in
|
|
7
|
-
`IF`/`ELSE`, iterator scopes, and weighted `random_list` entries, link to the shared scripted-effect
|
|
8
|
-
index. Native control/trigger blocks and country, state, character, event-target, or variable scopes
|
|
9
|
-
are traversed without becoming helper links. Decision-category tooltips link to indexed top-level
|
|
10
|
-
categories; decision targets recognized as formables link to the formable symbol; cosmetic tags do
|
|
11
|
-
not masquerade as formables. Missing links retain the exact reward source location.
|
|
12
|
-
|
|
13
|
-
Decision categories are additive database fragments: the category definition under
|
|
14
|
-
`common/decisions/categories` and one or more decision-member blocks may legitimately share an ID.
|
|
15
|
-
The shared index retains those fragments without reporting a duplicate-definition collision while
|
|
16
|
-
still honoring same-relative-file shadowing and load-order source ownership.
|
|
17
|
-
|
|
18
|
-
National focus `cost` values support finite numbers and safe file-scoped constants such as
|
|
19
|
-
`@focus_cost_standard`. Targeted layout updates preserve the exact existing cost lexeme, including
|
|
20
|
-
numeric formatting and comments. A cost token outside the typed model is retained unchanged when
|
|
21
|
-
the plan does not explicitly replace it; the compiler refuses to generate an arbitrary scalar.
|
|
22
|
-
|
|
23
|
-
National focuses and continuous focuses use their actual HOI4 source models. National trees come from the workspace registration's configured `roots.focus` paths. Continuous focuses come from `common/continuous_focus/*.txt` as `continuous_focus_palette = { ... focus = { ... } }`; matching country palettes take precedence over the default palette, and the compiler never emits a `continuous` field inside a national `focus = { ... }` block.
|
|
24
|
-
|
|
25
|
-
## Agent workflow
|
|
26
|
-
|
|
27
|
-
1. `hoi4.project_scan` builds the common workspace/index revision.
|
|
28
|
-
2. `hoi4.focus_scan` imports active national trees, matching continuous-focus palettes, active localisation, sprite definitions, and only the exact texture paths referenced by those sprites.
|
|
29
|
-
3. `hoi4.focus_lint` separates syntax, reference, layout, and design diagnostics. Omit `mode` for national-tree compatibility, or pass `mode: "continuous"` with an optional `paletteId` to lint a palette directly.
|
|
30
|
-
4. `hoi4.focus_layout` calculates stable integer coordinates. Pinned positions and existing coordinates anchor incremental changes.
|
|
31
|
-
5. `hoi4.focus_render` returns deterministic HTML, SVG, PNG, JSON, and generated-source-map resources. National mode also returns the graph layout and hash-bound planning sidecar; a uniform `reviewScale` from `0.25` through `1.0` keeps unusually wide or deep trees within bounded raster limits without changing logical geometry or source coordinates. Continuous mode accepts palette columns and renders the actual continuous-focus source model.
|
|
32
|
-
6. In autonomous mode, `hoi4.focus_rewrite` accepts either a national plan (the default when `mode` is omitted) or `mode: "continuous"` with a continuous-palette plan. It makes source-preserving range edits where possible, produces before/proposed/bitmap-diff evidence, journals exact recovery bytes, applies, rebuilds the index, and post-validates in one call. National plans may set `horizontalSpacing`, `verticalSpacing`, `padding`, and a uniform `reviewScale` for both review renders; those pixel-space settings do not alter focus coordinates or compiled HOI4 source. National plans also maintain the adjacent planning sidecar. To create a first tree or palette in a new mod source file, set `createIfMissing: true`; without it, missing sources and IDs refuse. Creation never appends a different target to an existing source file, never copies a read-only game/dependency file into a shadowing mod path, and restores newly created source and sidecar files automatically if the rewrite fails.
|
|
33
|
-
7. Check `execution`, drift, diagnostics, validation, changed files, source maps, and diff artifacts. `execution: "planned"` means validation blocked the proposal without changing source; `execution: "applied"` means post-write validation succeeded.
|
|
34
|
-
|
|
35
|
-
With the optional `"transactions"` compatibility policy, use `hoi4.focus_plan_changes`, page through `hoi4.transaction_diff`, and call `hoi4.transaction_apply` with the exact plan hash instead. The same core validation and recovery engine is used.
|
|
36
|
-
|
|
37
|
-
## Repairing an existing large tree
|
|
38
|
-
|
|
39
|
-
Imported authored coordinates are fixed by design. A plain `hoi4.focus_layout` call therefore
|
|
40
|
-
audits an existing layout without silently rearranging it. To opt a badly structured tree into a
|
|
41
|
-
full cleanup, the coding agent must make the movement policy explicit:
|
|
42
|
-
|
|
43
|
-
1. Scan, lint, and render the baseline, then read the complete imported plan resource. Use the same
|
|
44
|
-
national `reviewScale` for baseline, transaction, and final renders when the default canvas is too
|
|
45
|
-
large.
|
|
46
|
-
2. Preserve every prerequisite group, exclusion, route lock, reward, raw passthrough entry, source
|
|
47
|
-
location, and provenance value.
|
|
48
|
-
3. Model the intended route architecture with `branchGroups`, `laneGroups`, `branchId`, and
|
|
49
|
-
`laneId`. Give lanes stable order and, where appropriate, horizontal bounds.
|
|
50
|
-
4. Keep only deliberate trunk or convergence anchors fixed/pinned. Change every movable focus to
|
|
51
|
-
`{ "mode": "auto", "pinned": false }`; `preferredX` and `preferredY` may retain the authored
|
|
52
|
-
route intent without making those coordinates mandatory.
|
|
53
|
-
5. Submit the complete plan to `hoi4.focus_rewrite`. The call performs layout, compilation,
|
|
54
|
-
lint, source-preserving range edits, deterministic before/proposed rendering, bitmap diffing,
|
|
55
|
-
journaling, application, index rebuild, and post-write validation.
|
|
56
|
-
For an unusually wide or deep tree, set a uniform national `reviewScale` between `0.25` and
|
|
57
|
-
`1.0`; `0.4` is appropriate for a very large comparison. It scales nodes, text, connectors, and
|
|
58
|
-
the viewport together, avoiding artificial overlap. The same scale governs both sides of the
|
|
59
|
-
comparison and affects only artifact pixels, never source-grid coordinates. Explicit spacing and
|
|
60
|
-
padding remain available when the artifact's logical presentation itself needs adjustment.
|
|
61
|
-
6. Inspect the returned validation and evidence links. Rescan, lint, and render when additional
|
|
62
|
-
final evidence is useful. A blocked proposal changes nothing; failure after replacement begins
|
|
63
|
-
restores every affected file automatically.
|
|
64
|
-
|
|
65
|
-
This workflow is suitable for hundreds of focuses. The solver keeps parents above children,
|
|
66
|
-
rejects visible overlap and duplicate coordinates, separates bounded lanes, validates relative
|
|
67
|
-
chains, and minimizes avoidable connector crossings. It never changes gameplay relationships to
|
|
68
|
-
make a picture look cleaner.
|
|
69
|
-
|
|
70
|
-
## Authoring a large tree
|
|
71
|
-
|
|
72
|
-
For a new tree, translate route requirements into the strict public schema at
|
|
73
|
-
`hoi4-agent://schema/focus-plan`. A robust plan uses a centered entry/trunk, bounded political or
|
|
74
|
-
strategic lanes, separately modelled shared-support lanes, exact AND/OR prerequisite groups,
|
|
75
|
-
reciprocal route exclusions, explicit convergence and capstones, automatic positions, and complete
|
|
76
|
-
localisation/icon/AI/link metadata. Unsupported Clausewitz blocks belong in `rawPassthrough` so they
|
|
77
|
-
round-trip instead of being approximated.
|
|
78
|
-
|
|
79
|
-
This minimal national plan is schema-valid. It intentionally omits an icon and reward; a production
|
|
80
|
-
tree should add complete presentation and gameplay data before rewriting:
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"schemaVersion": 1,
|
|
85
|
-
"id": "example_tree",
|
|
86
|
-
"default": false,
|
|
87
|
-
"branchGroups": [
|
|
88
|
-
{
|
|
89
|
-
"id": "constitutional",
|
|
90
|
-
"label": "Constitutional route",
|
|
91
|
-
"family": "politics",
|
|
92
|
-
"focusIds": ["example_entry"],
|
|
93
|
-
"laneId": "centre",
|
|
94
|
-
"major": true,
|
|
95
|
-
"hidden": false,
|
|
96
|
-
"crisis": false,
|
|
97
|
-
"conditional": false,
|
|
98
|
-
"aiStrategyIds": []
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"laneGroups": [
|
|
102
|
-
{ "id": "left", "label": "Left route", "order": 0, "minimumX": -12, "maximumX": -5 },
|
|
103
|
-
{ "id": "centre", "label": "Constitutional trunk", "order": 1, "minimumX": -2, "maximumX": 2 },
|
|
104
|
-
{ "id": "right", "label": "Right route", "order": 2, "minimumX": 5, "maximumX": 12 }
|
|
105
|
-
],
|
|
106
|
-
"entryFocusIds": ["example_entry"],
|
|
107
|
-
"focuses": [
|
|
108
|
-
{
|
|
109
|
-
"id": "example_entry",
|
|
110
|
-
"label": "Example entry",
|
|
111
|
-
"branchId": "constitutional",
|
|
112
|
-
"laneId": "centre",
|
|
113
|
-
"prerequisites": { "operator": "and", "groups": [] },
|
|
114
|
-
"mutuallyExclusive": [],
|
|
115
|
-
"routeLocks": [],
|
|
116
|
-
"position": { "mode": "auto", "pinned": false, "preferredX": 0, "preferredY": 0 },
|
|
117
|
-
"visibility": "normal",
|
|
118
|
-
"convergence": false,
|
|
119
|
-
"sharedSupport": false,
|
|
120
|
-
"icons": [],
|
|
121
|
-
"localisation": {
|
|
122
|
-
"titleKey": "example_entry",
|
|
123
|
-
"descriptionKey": "example_entry_desc",
|
|
124
|
-
"workingLabel": "Example entry"
|
|
125
|
-
},
|
|
126
|
-
"ai": { "majorRoute": true, "strategyIds": [] },
|
|
127
|
-
"filters": ["FOCUS_FILTER_POLITICAL"],
|
|
128
|
-
"links": [],
|
|
129
|
-
"rawPassthrough": []
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
"sharedFocusIds": [],
|
|
133
|
-
"continuousFocusPaletteIds": [],
|
|
134
|
-
"continuousFocusIds": [],
|
|
135
|
-
"rawPassthrough": [],
|
|
136
|
-
"provenance": {
|
|
137
|
-
"sourcePath": "plan:example_tree",
|
|
138
|
-
"sourceHash": "0000000000000000000000000000000000000000000000000000000000000000",
|
|
139
|
-
"importedPlanHash": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Within each focus, one `prerequisites.groups` entry represents one Clausewitz `prerequisite` block
|
|
145
|
-
whose listed focuses are OR alternatives. Multiple group entries are AND requirements. For a new
|
|
146
|
-
target, use `sourcePath: "plan:<tree-id>"` and 64 zeroes for both initial hashes, then call
|
|
147
|
-
`hoi4.focus_rewrite` with `createIfMissing: true`. Use that convention only for a missing
|
|
148
|
-
target. Existing sources normally use imported, hash-bound provenance; resolving intentional
|
|
149
|
-
plan/source drift additionally requires explicit `authority: "plan"`. The server refuses to append
|
|
150
|
-
a different tree to an occupied source file and still requires complete pre-write and post-write validation.
|
|
151
|
-
|
|
152
|
-
## Prerequisite and route semantics
|
|
153
|
-
|
|
154
|
-
One `prerequisite` block containing several `focus` entries is an OR group. Several prerequisite blocks are ANDed. The importer preserves that grouping exactly. It never flattens prerequisites into a graph that changes meaning.
|
|
155
|
-
|
|
156
|
-
Structured route locks compile only to valid trigger fields: selection conditions use `available`, while branch visibility uses `allow_branch`. `all`, `any`, exclusion, and impossible locks compile to direct conditions, `OR`, `NOT`, and `always = no` respectively. Hidden/crisis labels are design metadata, not Clausewitz keys; re-import enrichment restores them from the sidecar without emitting invalid `hidden =` or `crisis =` markers.
|
|
157
|
-
|
|
158
|
-
## Planning sidecar
|
|
159
|
-
|
|
160
|
-
Branch/lane assignment, shared-support status, working labels, planner visibility/reveal intent, terminal/payoff classification, and major-route AI notes are design metadata rather than HOI4 fields. A source file such as `common/national_focus/example.txt` therefore has an adjacent `example.focus-plan.json` sidecar.
|
|
161
|
-
|
|
162
|
-
The sidecar records the exact generated source SHA-256. Enrichment is explicit and succeeds only for the matching tree and source hash; stale or mismatched sidecars produce diagnostics and do not silently override source truth. Source-only imports remain valid when no sidecar exists.
|
|
163
|
-
|
|
164
|
-
## Localisation and sprite resolution
|
|
165
|
-
|
|
166
|
-
Scan and render select active localisation and sprite symbols through the shared load-order index. Rendered titles use the active language value, and icons use frame zero from the active sprite's real `texturefile` and `noOfFrames` definition. Sprite strips are cropped to the resolved frame rather than displayed as a whole image.
|
|
167
|
-
|
|
168
|
-
Raster discovery is deliberately exact: the shared workspace scan does not walk every `gfx/**/*.dds` or `gfx/**/*.png` file. After resolving referenced sprites, the asset catalog scans only their normalized texture paths. Missing localisation, sprite, texture, or unsupported-frame diagnostics retain the originating focus/icon source location.
|
|
169
|
-
|
|
170
|
-
## Layout contract
|
|
171
|
-
|
|
172
|
-
Hard constraints keep parents above children, coordinates unique, visible nodes non-overlapping, automatic nodes inside configured lane bounds, pinned nodes fixed, and relative-position chains valid. Automatic preferred coordinates are clamped to their lane; a full lane raises `FOCUS_LAYOUT_LANE_CAPACITY_BLOCKED`. Fixed, relative, or prior-stable coordinates outside their declared lane are preserved as evidence but produce a blocking `FOCUS_LAYOUT_LANE_BOUNDS_VIOLATION`. The solver records every move and unsatisfied constraint. It never changes a prerequisite, silently stacks nodes, or invents a route.
|
|
173
|
-
|
|
174
|
-
Mutual-exclusion relationships are also layout constraints: newly placed automatic endpoints must retain at least the configured `nodeSpacing` in horizontal focus-grid columns. Fixed, relative, pinned, and prior-layout coordinates are stability anchors. The solver does not move those anchors to improve mutual-exclusion spacing or connector routing; it emits `FOCUS_LAYOUT_MUTUAL_EXCLUSION_SPACING_UNSATISFIED` with the movable and preserved endpoints when authored constraints make the gap impossible.
|
|
175
|
-
|
|
176
|
-
For each new automatic node, the solver evaluates integer candidates in deterministic distance and direction order, rejects visible overlap and mutual-exclusion violations, and chooses the nearest candidate with the fewest connector crossings. A crossing-only move is recorded as `moved_to_reduce_crossings` with its before/after count. Remaining crossings produce `FOCUS_LAYOUT_CONNECTOR_CROSSING_UNSATISFIED` with the preserved endpoints and reason. Supplying a previous layout makes its existing automatic nodes stable anchors, so a small addition cannot reshuffle an accepted tree.
|
|
177
|
-
|
|
178
|
-
Weak dangling branches, terminal payoff, missing AI, and repeated generic rewards remain deterministic design warnings. Layout heuristics never become automatic gameplay edits.
|
|
179
|
-
|
|
180
|
-
## Drift and source maps
|
|
181
|
-
|
|
182
|
-
The plan records imported source and semantic hashes. If both saved plan and hand-edited script diverge, regeneration is blocked until the coding agent explicitly identifies the authoritative source. Raw fields remain attached to source ranges either way. An explicitly created target reports `target_missing` drift with `requiresAuthority: false`; that status means there is no prior target to reconcile, not that an existing source was overwritten.
|
|
183
|
-
|
|
184
|
-
Every compiled or proposed focus block receives a source-map entry containing the focus ID, generated location, planning-node location when available, and imported source location when available. National render artifacts use `<tree>.focus.source-map.json`; continuous renders use `<palette>.continuous.source-map.json`. Rewrite journals retain the corresponding proposed source map and all review artifacts after success or automatic restoration.
|
|
185
|
-
|
|
186
|
-
## Artifacts
|
|
187
|
-
|
|
188
|
-
Each rendered node includes its ID, resolved title/working label, resolved icon frame or diagnostic, coordinates, prerequisite type, exclusions, branch family, planner visibility/convergence/terminal state, AI metadata, and source-linked diagnostics. HTML search and filters inspect evidence only; they cannot write source.
|
|
189
|
-
|
|
190
|
-
National-tree renders store `<tree>.focus.html`, `.svg`, `.png`, `.json`, `.source-map.json`, and `.plan.json`. Continuous-palette renders use the same core artifact store and produce `<palette>.continuous.html`, `.svg`, `.png`, `.json`, and `.source-map.json`. The JSON embeds the same complete generated-source map that is also stored separately, and all formats carry content hashes plus source/render provenance.
|
|
191
|
-
|
|
192
|
-
A national focus rewrite also stores `<tree>.focus.proposed-validation.json`. It contains every
|
|
193
|
-
diagnostic and validation check from re-importing, laying out, and linting the compiled proposal.
|
|
194
|
-
When that complete set is larger than the fixed transaction-manifest allowance, the manifest keeps
|
|
195
|
-
a blocker-first bounded summary and an explicit resource diagnostic; it never drops findings from
|
|
196
|
-
the validation decision. The rewrite boundary uses the same pattern for oversized post-write
|
|
197
|
-
diagnostics.
|