hoi4-agent-tools 4.20.2 → 4.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/bin/stdio.js +5 -2
  3. package/dist/hoi4_agent_tools/core/engine.js +17 -3
  4. package/dist/hoi4_agent_tools/core/workspace.js +116 -18
  5. package/dist/hoi4_agent_tools/mcp/server/create-modern-operations.js +9 -0
  6. package/dist/hoi4_agent_tools/mcp/server/request-lifecycle.js +4 -0
  7. package/dist/hoi4_agent_tools/mcp/server/startup-failure.js +19 -0
  8. package/dist/hoi4_agent_tools/runtime.js +82 -18
  9. package/dist/hoi4_agent_tools/schemas/transaction.js +3 -2
  10. package/dist/hoi4_agent_tools/technology/source-analysis.js +3 -1
  11. package/dist/hoi4_agent_tools/version.js +1 -1
  12. package/docs/troubleshooting.md +11 -11
  13. package/engine/bin/darwin-arm64/hoi4-engine +0 -0
  14. package/engine/bin/linux-arm64/hoi4-engine +0 -0
  15. package/engine/bin/linux-x64/hoi4-engine +0 -0
  16. package/engine/bin/manifest.json +8 -8
  17. package/engine/bin/win32-x64/hoi4-engine.exe +0 -0
  18. package/npm-shrinkwrap.json +2 -2
  19. package/package.json +1 -1
  20. package/schemas/configuration.schema.json +1 -1
  21. package/schemas/continuous-focus-palette.schema.json +1 -1
  22. package/schemas/custom-weighted-pool.schema.json +1 -1
  23. package/schemas/decision-inspect-input.schema.json +1 -1
  24. package/schemas/error-log-input.schema.json +1 -1
  25. package/schemas/event-feature-manifest.schema.json +1 -1
  26. package/schemas/focus-plan.schema.json +1 -1
  27. package/schemas/focus-planning-sidecar.schema.json +1 -1
  28. package/schemas/geography-model.schema.json +1 -1
  29. package/schemas/gui-animation-source.schema.json +1 -1
  30. package/schemas/gui-helper.schema.json +1 -1
  31. package/schemas/gui-scenario.schema.json +1 -1
  32. package/schemas/helper-expansion-request.schema.json +1 -1
  33. package/schemas/helper-expansion-summary.schema.json +1 -1
  34. package/schemas/impact-inspect-input.schema.json +1 -1
  35. package/schemas/map-operation.schema.json +1 -1
  36. package/schemas/mechanic-test-input.schema.json +1 -1
  37. package/schemas/mod-index-input.schema.json +1 -1
  38. package/schemas/operation-result.schema.json +1 -1
  39. package/schemas/package-check-input.schema.json +1 -1
  40. package/schemas/package-manifest.schema.json +1 -1
  41. package/schemas/probability-analysis-result.schema.json +1 -1
  42. package/schemas/probability-compare-input.schema.json +1 -1
  43. package/schemas/probability-evaluate-input.schema.json +1 -1
  44. package/schemas/probability-inspect-input.schema.json +1 -1
  45. package/schemas/probability-render-input.schema.json +1 -1
  46. package/schemas/probability-scenario-set.schema.json +1 -1
  47. package/schemas/probability-sequence-input.schema.json +1 -1
  48. package/schemas/probability-simulate-input.schema.json +1 -1
  49. package/schemas/probability-sweep-input.schema.json +1 -1
  50. package/schemas/reference-context-input.schema.json +1 -1
  51. package/schemas/reference-read-input.schema.json +1 -1
  52. package/schemas/reference-search-input.schema.json +1 -1
  53. package/schemas/reference-sheets.schema.json +1 -1
  54. package/schemas/scenario-suite.schema.json +1 -1
  55. package/schemas/scenario-test-input.schema.json +1 -1
  56. package/schemas/script-validate-input.schema.json +1 -1
  57. package/schemas/shared-scenario.schema.json +1 -1
  58. package/schemas/source-lookup-input.schema.json +1 -1
  59. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.20.3 - 2026-11-27
6
+
7
+ - Fixed recovery of an interrupted rewrite of more than 1,024 files, which failed with `TRANSACTION_MANIFEST_INVALID` and blocked rewrites of that workspace. Such rewrites replace files in batches of up to 256, but the journal check accepted at most 16 pending files per batch.
8
+ - The MCP transport has started its move to Rust (ADR 0089 step 8, packet P15): the new `hoi4-server` crate holds the stdio and Streamable HTTP transports with bearer authentication (static tokens and the OAuth claim rules), Origin, Host and request-target checks, principal-to-workspace grants, request, body, rate, session and stream limits, credential-bound session isolation and the protocol gate. Its negative tests are ported from the TypeScript transport and drive the server over TCP. Nothing calls it yet: the TypeScript server stays the server until the tools are wired.
9
+ - The stdio server answers `initialize` and `tools/list` before it has loaded the workspaces (issue 292). It used to resolve every mod under the configured mod roots first, which took 14.6 s with one real configuration and up to 26 s with six servers starting at once, so a client with a startup timeout showed the server connected with no tools. The server now reads the configuration, answers the handshake and the tool list from its profiles and plugins, and loads the workspaces in the background; a tool call, a resource read or any other request that needs a workspace waits for the loading, as it already waited for journal recovery. A configuration or workspace error that used to stop the server at startup no longer ends the process: it is written to stderr as a `startup_failed` event with the same `code`, and each call that needs a workspace fails with that code (for example `CONFIG_READ_FAILED`, `CONFIG_INVALID`, `WORKSPACE_MOD_ROOT_UNSAFE`). The HTTP server still loads everything before it listens. `createEngine` gets a `workspaces: 'background'` option for this, and `WorkspaceResolver` gets `prepare` and `populate`, the two halves of `create`.
10
+ - Fixed `hoi4.tech_inspect` reporting `force_use_small_tech_layout` as an unsupported field on every technology without it or with `= no`. Only a value that is not a literal `yes` or `no` is reported now.
11
+
5
12
  ## 4.20.2 - 2026-11-27
6
13
 
7
14
  - Fixed `hoi4.gui_inspect` and `hoi4.gui_render` refusing with `GUI_LOCALISATION_BUDGET_BLOCKED` on a mod that has `localisation/replace/` files in many languages. Since 4.20.1 the scan read the replace files of every language. It now reads only those of the preview's languages (`replace/**/*_l_<language>.yml`), so replace files in other languages no longer count toward the 500,000-candidate ceiling.
package/dist/bin/stdio.js CHANGED
@@ -24,9 +24,12 @@ function idleExitMinutes(configured) {
24
24
  return minutes;
25
25
  }
26
26
  async function main() {
27
- // The handshake must not wait for journal recovery; the transport holds workspace requests.
27
+ // The handshake and the tool list must not wait for the workspaces to load or for journal
28
+ // recovery: the transport holds every request that needs a workspace until both are done. A
29
+ // configuration or workspace error is reported on stderr and by the first call that needs a
30
+ // workspace.
28
31
  const engine = await createEngine(undefined, {
29
- recovery: 'background',
32
+ workspaces: 'background',
30
33
  defaultProfiles: DEFAULT_PROFILES,
31
34
  });
32
35
  // Plugins load only from the paths the server configuration lists (M-14).
@@ -107,6 +107,7 @@ export class CoreEngine {
107
107
  #scanAdmissionQueue = [];
108
108
  #activeScanAdmissions = new Set();
109
109
  #recovery;
110
+ #startup;
110
111
  constructor(resolver, services = {}) {
111
112
  this.resolver = resolver;
112
113
  const state = resolver.serverState();
@@ -142,9 +143,22 @@ export class CoreEngine {
142
143
  this.#recovery = recovery;
143
144
  return recovery;
144
145
  }
145
- /** Settles when the latest {@link initialize} has finished, at once when none was started. */
146
- recovered() {
147
- return this.#recovery ?? Promise.resolve();
146
+ /**
147
+ * Run `work` in the background as part of startup, and hold {@link recovered} until it
148
+ * finishes. A stdio server uses this to load the workspaces after it has answered the client
149
+ * handshake. The work reports its own failure (for example through
150
+ * `resolver.failStartup`); a rejection here only ends the wait.
151
+ */
152
+ deferStartup(work) {
153
+ this.#startup = work().catch(() => undefined);
154
+ }
155
+ /**
156
+ * Settles when the deferred startup and the latest {@link initialize} have finished, at once
157
+ * when neither was started.
158
+ */
159
+ async recovered() {
160
+ await this.#startup;
161
+ await this.#recovery;
148
162
  }
149
163
  async #recoverWorkspaces() {
150
164
  for (const workspace of this.resolver.list()) {
@@ -385,10 +385,26 @@ export class WorkspaceResolver {
385
385
  #serverStateRoot;
386
386
  #serverState;
387
387
  #defaultWorkspaceId;
388
+ /** `prepared`: roots checked, no workspace loaded yet. `ready`: every workspace is loaded. */
389
+ #state = 'prepared';
390
+ #population;
391
+ #startupError;
388
392
  constructor(configuration) {
389
393
  this.configuration = configuration;
390
394
  }
395
+ /** Check the configured roots and load every workspace. */
391
396
  static async create(configuration) {
397
+ const resolver = await WorkspaceResolver.prepare(configuration);
398
+ await resolver.populate();
399
+ return resolver;
400
+ }
401
+ /**
402
+ * The quick half of {@link create}: check the configured roots and open the server state. The
403
+ * resolver answers `config()` and `serverState()` at once, and no workspace is loaded until
404
+ * {@link populate} runs. A stdio server uses this to answer its handshake while the slow
405
+ * half, which reads every mod folder, is still running.
406
+ */
407
+ static async prepare(configuration) {
392
408
  const resolver = new WorkspaceResolver(configuration);
393
409
  if (configuration.serverStateRoot !== undefined) {
394
410
  resolver.#serverStateRoot = await canonicalPath(configuration.serverStateRoot);
@@ -426,38 +442,111 @@ export class WorkspaceResolver {
426
442
  }
427
443
  }
428
444
  }
445
+ if (configuration.serverStateRoot !== undefined) {
446
+ // No key is written while a configured workspace overlaps the state root; the full
447
+ // check of each workspace runs later, in `populate`.
448
+ await resolver.#assertServerStateClearOfConfiguredWorkspaces();
449
+ resolver.#serverState = await ServerState.create(configuration.serverStateRoot);
450
+ resolver.#serverStateRoot = resolver.#serverState.root;
451
+ }
452
+ return resolver;
453
+ }
454
+ /** The cheap part of the registration checks: every configured root against the state root. */
455
+ async #assertServerStateClearOfConfiguredWorkspaces() {
456
+ const stateRoot = this.#serverStateRoot;
457
+ if (stateRoot === undefined)
458
+ return;
459
+ for (const configured of this.configuration.workspaces) {
460
+ const registration = this.withGlobalWorkspaceDefaults(configured);
461
+ const candidates = [
462
+ registration.root,
463
+ registration.gameRoot,
464
+ registration.artifactRoot,
465
+ registration.cacheRoot,
466
+ registration.fixtureRoot,
467
+ registration.wikiRoot,
468
+ registration.scriptDocsRoot,
469
+ ...registration.dependencyRoots,
470
+ ...registration.dependencies.map(({ root }) => root),
471
+ ].filter((candidate) => candidate !== undefined);
472
+ for (const candidate of candidates) {
473
+ if (pathsOverlap(stateRoot, await canonicalPath(candidate))) {
474
+ throw new ServiceError('SERVER_STATE_ROOT_OVERLAP', 'Server state root must not overlap a workspace source or generated-storage root', { workspaceId: registration.id });
475
+ }
476
+ }
477
+ }
478
+ }
479
+ /**
480
+ * The slow half of {@link create}: resolve every configured workspace and discover the mods
481
+ * under the mod roots. It runs once; later calls return the same promise, which rejects with
482
+ * the same error.
483
+ */
484
+ populate() {
485
+ if (this.#startupError !== undefined)
486
+ return Promise.reject(this.#startupError);
487
+ this.#population ??= this.#populate().then(() => {
488
+ this.#state = 'ready';
489
+ }, (error) => {
490
+ throw this.failStartup(error);
491
+ });
492
+ return this.#population;
493
+ }
494
+ /**
495
+ * Make every workspace lookup fail with `error`, the reason the server could not start. A
496
+ * stdio server keeps answering its handshake and reports this on the first call that needs
497
+ * a workspace.
498
+ */
499
+ failStartup(error) {
500
+ this.#startupError ??=
501
+ error instanceof ServiceError
502
+ ? error
503
+ : new ServiceError('INTERNAL_ERROR', error instanceof Error ? error.message : String(error));
504
+ return this.#startupError;
505
+ }
506
+ /** The reason the server could not start, when it could not. */
507
+ startupError() {
508
+ return this.#startupError;
509
+ }
510
+ #assertUsable() {
511
+ if (this.#startupError !== undefined)
512
+ throw this.#startupError;
513
+ if (this.#state !== 'ready')
514
+ throw new ServiceError('WORKSPACE_STARTUP_PENDING', 'The workspaces are still loading; retry in a moment');
515
+ }
516
+ async #populate() {
517
+ const configuration = this.configuration;
518
+ this.#state = 'populating';
429
519
  for (const configured of configuration.workspaces) {
430
520
  if (configured.id === CURRENT_WORKSPACE_ID) {
431
521
  throw new ServiceError('WORKSPACE_ID_RESERVED', `Workspace ID is reserved for the current working mod: ${CURRENT_WORKSPACE_ID}`);
432
522
  }
433
- const registration = resolver.withGlobalWorkspaceDefaults(configured);
434
- const workspace = await resolver.resolveRegistration(registration);
435
- if (resolver.#byId.has(workspace.id)) {
523
+ const registration = this.withGlobalWorkspaceDefaults(configured);
524
+ const workspace = await this.resolveRegistration(registration);
525
+ if (this.#byId.has(workspace.id)) {
436
526
  throw new ServiceError('WORKSPACE_DUPLICATE', `Duplicate workspace ID: ${workspace.id}`);
437
527
  }
438
- resolver.assertWorkspaceIsolation(workspace);
439
- resolver.#byId.set(workspace.id, workspace);
528
+ this.assertWorkspaceIsolation(workspace);
529
+ this.#byId.set(workspace.id, workspace);
440
530
  }
441
- await resolver.discoverModWorkspaces();
531
+ await this.discoverModWorkspaces();
442
532
  if (configuration.defaultWorkspace !== undefined) {
443
- const id = resolver.resolveWorkspaceId(configuration.defaultWorkspace);
444
- if (resolver.#byId.get(id)?.registration.kind !== 'mod') {
533
+ const id = this.#resolveWorkspaceId(configuration.defaultWorkspace);
534
+ if (this.#byId.get(id)?.registration.kind !== 'mod') {
445
535
  throw new ServiceError('WORKSPACE_DEFAULT_UNKNOWN', `The configured default workspace is not a registered mod workspace: ${configuration.defaultWorkspace}`, { defaultWorkspace: configuration.defaultWorkspace });
446
536
  }
447
- resolver.#defaultWorkspaceId = id;
537
+ this.#defaultWorkspaceId = id;
448
538
  }
449
- if (configuration.serverStateRoot !== undefined) {
450
- resolver.#serverState = await ServerState.create(configuration.serverStateRoot);
451
- resolver.#serverStateRoot = resolver.#serverState.root;
452
- }
453
- return resolver;
454
539
  }
455
540
  config() {
456
541
  return this.configuration;
457
542
  }
458
543
  /** Resolve the implicit workspace used by local coding-agent calls. */
459
544
  resolveCurrentWorkspaceId(principal) {
460
- const workspaces = this.list(principal).filter(({ registration }) => registration.kind === 'mod');
545
+ this.#assertUsable();
546
+ return this.#resolveCurrentWorkspaceId(principal);
547
+ }
548
+ #resolveCurrentWorkspaceId(principal) {
549
+ const workspaces = this.#list(principal).filter(({ registration }) => registration.kind === 'mod');
461
550
  if (workspaces.length === 0) {
462
551
  throw new ServiceError('WORKSPACE_CONTEXT_NOT_FOUND', 'No writable mod workspace is configured for the MCP server', workspaceCandidates(workspaces));
463
552
  }
@@ -475,8 +564,9 @@ export class WorkspaceResolver {
475
564
  }
476
565
  /** Resolve the active mod from filesystem roots advertised by the connected MCP client. */
477
566
  async resolveClientWorkspaceId(rootPaths, principal) {
567
+ this.#assertUsable();
478
568
  const canonicalRoots = await Promise.all(rootPaths.map((rootPath) => canonicalPath(rootPath)));
479
- const workspaces = this.list(principal).filter(({ registration }) => registration.kind === 'mod');
569
+ const workspaces = this.#list(principal).filter(({ registration }) => registration.kind === 'mod');
480
570
  const matches = workspaces.filter((workspace) => canonicalRoots.some((rootPath) => isWithin(workspace.modRoot, rootPath) || isWithin(rootPath, workspace.modRoot)));
481
571
  if (matches.length === 1)
482
572
  return matches[0].id;
@@ -526,14 +616,18 @@ export class WorkspaceResolver {
526
616
  throw new ServiceError('WORKSPACE_SOURCE_AMBIGUOUS', `The requested source exists in more than one mod workspace: ${relativePath}`, { relativePath, workspaceIds: matches });
527
617
  }
528
618
  resolveWorkspaceId(workspaceId, principal) {
619
+ this.#assertUsable();
620
+ return this.#resolveWorkspaceId(workspaceId, principal);
621
+ }
622
+ #resolveWorkspaceId(workspaceId, principal) {
529
623
  if (workspaceId === CURRENT_WORKSPACE_ID)
530
- return this.resolveCurrentWorkspaceId(principal);
624
+ return this.#resolveCurrentWorkspaceId(principal);
531
625
  if (this.#byId.has(workspaceId))
532
626
  return workspaceId;
533
627
  const alias = requestedWorkspaceAlias(workspaceId);
534
628
  // A folder name as the file manager shows it ("My Mod") names the same mod as its slug.
535
629
  const slug = workspaceAliasSlug(alias);
536
- const matches = this.list(principal).filter((workspace) => {
630
+ const matches = this.#list(principal).filter((workspace) => {
537
631
  if (workspace.registration.kind !== 'mod')
538
632
  return false;
539
633
  const aliases = workspaceAliases(workspace);
@@ -613,6 +707,10 @@ export class WorkspaceResolver {
613
707
  }
614
708
  }
615
709
  list(principal) {
710
+ this.#assertUsable();
711
+ return this.#list(principal);
712
+ }
713
+ #list(principal) {
616
714
  const allowed = principal === undefined ? undefined : this.allowedWorkspaceIds(principal);
617
715
  return [...this.#byId.values()]
618
716
  .filter((workspace) => allowed === undefined || allowed.has(workspace.id))
@@ -17,6 +17,7 @@ import { referenceTools } from '../tools/reference.js';
17
17
  import { isReferenceTool, ReferenceToolService } from '../../reference/operations.js';
18
18
  import { ModernTaskAdapter, TASKS_EXTENSION } from './modern-tasks.js';
19
19
  import { SERVER_INSTRUCTIONS } from './instructions.js';
20
+ import { startupFailureResult } from './startup-failure.js';
20
21
  import { jobProgressReporter, modernProgressReporter, withProgressHeartbeat } from './progress.js';
21
22
  import { taskToolCatalog } from './task-tool-catalog.js';
22
23
  import { isListed, profileInstructions, resolveProfiles } from './tool-profiles.js';
@@ -100,6 +101,14 @@ export function createModernOperationServer(engine, context = {}, tasks = new Op
100
101
  const definition = definitions.find(({ name }) => name === request.params.name);
101
102
  if (definition === undefined)
102
103
  throw new ProtocolError(ProtocolErrorCode.InvalidParams, 'Unknown tool');
104
+ const startupFailure = startupFailureResult(engine, definition.name);
105
+ if (startupFailure !== undefined)
106
+ return CallToolResultSchema.parse({
107
+ ...startupFailure,
108
+ resultType: 'complete',
109
+ ttlMs: 0,
110
+ cacheScope: 'private',
111
+ });
103
112
  const input = definition.inputSchema.safeParse(normalizeToolArguments(definition.name, request.params.arguments ?? {}));
104
113
  if (!input.success) {
105
114
  // A tool error, not a protocol error, so the model sees which field to correct.
@@ -4,6 +4,7 @@ import { normalizeToolArguments } from '../../schemas/lenient-arguments.js';
4
4
  import { referenceTools } from '../tools/reference.js';
5
5
  import { jobControlTools } from '../tools/job.js';
6
6
  import { invalidArgumentsResult } from './argument-errors.js';
7
+ import { startupFailureResult } from './startup-failure.js';
7
8
  import { taskToolCatalog } from './task-tool-catalog.js';
8
9
  import { jobProgressReporter, progressReporter, withProgressHeartbeat } from './progress.js';
9
10
  import { withTaskRequestSignal } from './task-request-context.js';
@@ -37,6 +38,9 @@ export function installRequestLifecycle(server, engine) {
37
38
  return handler(request, extra);
38
39
  const params = request.params;
39
40
  if (params !== undefined && typeof params.name === 'string') {
41
+ const failed = startupFailureResult(engine, params.name);
42
+ if (failed !== undefined)
43
+ return Promise.resolve(failed);
40
44
  params.arguments = normalizeToolArguments(params.name, params.arguments);
41
45
  // Answer invalid arguments with a tool error that names the fields and a working call.
42
46
  const schema = params.task === undefined ? inputSchema(params.name) : undefined;
@@ -0,0 +1,19 @@
1
+ import { DOMAIN_TOOL_NAMES } from '../../core/domain-tools.js';
2
+ import { isJobControlTool } from '../../core/job-controls.js';
3
+ import { errorResult } from '../../core/operation-result.js';
4
+ const domainTools = new Set(DOMAIN_TOOL_NAMES);
5
+ /**
6
+ * The answer to a call that needs a workspace when the server could not load its workspaces: the
7
+ * error that stopped the startup, in the ordinary tool-error envelope with its code. The stdio
8
+ * server keeps running after such an error (it answered the handshake before loading), and the
9
+ * client library would otherwise reduce the thrown error to its message. Tools that need no
10
+ * workspace, and every call on a server that started, get `undefined` and run as usual.
11
+ */
12
+ export function startupFailureResult(engine, toolName) {
13
+ const failure = engine.resolver.startupError();
14
+ if (failure === undefined)
15
+ return undefined;
16
+ if (!domainTools.has(toolName) && !isJobControlTool(toolName))
17
+ return undefined;
18
+ return errorResult(failure);
19
+ }
@@ -2,6 +2,7 @@ import { lstat, readdir, stat } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { homedir, tmpdir } from 'node:os';
4
4
  import { loadConfiguration, serverConfigurationSchema, } from './core/configuration.js';
5
+ import { canonicalJson } from './core/canonical.js';
5
6
  import { CoreEngine } from './core/engine.js';
6
7
  import { ServiceError } from './core/result.js';
7
8
  import { WorkspaceResolver } from './core/workspace.js';
@@ -238,10 +239,9 @@ async function configurationExists(configPath) {
238
239
  return false;
239
240
  }
240
241
  }
241
- export async function createEngine(configPath = configurationPath(), options = {}) {
242
- let configuration;
242
+ async function loadStartupConfiguration(configPath) {
243
243
  try {
244
- configuration = await loadConfiguration(configPath);
244
+ return await loadConfiguration(configPath);
245
245
  }
246
246
  catch (error) {
247
247
  const useAutomaticConfiguration = configPath === defaultConfigurationPath() &&
@@ -252,18 +252,22 @@ export async function createEngine(configPath = configurationPath(), options = {
252
252
  if (!useAutomaticConfiguration)
253
253
  throw error;
254
254
  // Outside a mod there is no workspace, and the documentation tools still answer.
255
- configuration = await automaticConfiguration(process.cwd(), { allowNoMod: true });
255
+ return automaticConfiguration(process.cwd(), { allowNoMod: true });
256
256
  }
257
- // The stdio server lists the core tools unless the client or the file asks for more.
258
- const profiles = parseProfilesEnv(process.env[PROFILES_ENV]) ??
259
- configuration.profiles ??
260
- options.defaultProfiles;
261
- if (profiles !== undefined)
262
- configuration = { ...configuration, profiles: [...profiles] };
263
- // The command-line servers read a fetched docs pack from the user's data folder by default.
264
- if (configuration.docsRoot === undefined)
265
- configuration = { ...configuration, docsRoot: defaultDocsRoot() };
266
- const resolver = await WorkspaceResolver.create(configuration);
257
+ }
258
+ /** A startup failure on stderr, where the operator's log shows why the server cannot serve. */
259
+ function reportStartupFailure(error) {
260
+ process.stderr.write(`${canonicalJson({
261
+ level: 'error',
262
+ event: 'startup_failed',
263
+ code: typeof error === 'object' && error !== null && 'code' in error
264
+ ? String(error.code)
265
+ : 'INTERNAL_ERROR',
266
+ message: error instanceof Error ? error.message : String(error),
267
+ })}
268
+ `);
269
+ }
270
+ async function sweepTemporaryDirectoriesOf(resolver) {
267
271
  await sweepTemporaryDirectories(tmpdir(), {
268
272
  protectedRoots: [
269
273
  ...resolver
@@ -276,11 +280,71 @@ export async function createEngine(configPath = configurationPath(), options = {
276
280
  ...(resolver.serverState() === undefined ? [] : [resolver.serverState().root]),
277
281
  ],
278
282
  }).catch(() => undefined);
283
+ }
284
+ export async function createEngine(configPath = configurationPath(), options = {}) {
285
+ const background = options.workspaces === 'background';
286
+ // The error that stops the server, which a background start reports instead of throwing.
287
+ let startupError;
288
+ let configuration;
289
+ try {
290
+ configuration = await loadStartupConfiguration(configPath);
291
+ }
292
+ catch (error) {
293
+ if (!background)
294
+ throw error;
295
+ startupError = error;
296
+ // The tool list still comes from the profiles, and the documentation tools still answer.
297
+ configuration = serverConfigurationSchema.parse({ version: CONFIG_VERSION });
298
+ }
299
+ // The stdio server lists the core tools unless the client or the file asks for more.
300
+ const profiles = parseProfilesEnv(process.env[PROFILES_ENV]) ??
301
+ configuration.profiles ??
302
+ options.defaultProfiles;
303
+ if (profiles !== undefined)
304
+ configuration = { ...configuration, profiles: [...profiles] };
305
+ // The command-line servers read a fetched docs pack from the user's data folder by default.
306
+ if (configuration.docsRoot === undefined)
307
+ configuration = { ...configuration, docsRoot: defaultDocsRoot() };
308
+ if (!background) {
309
+ const resolver = await WorkspaceResolver.create(configuration);
310
+ await sweepTemporaryDirectoriesOf(resolver);
311
+ const engine = new CoreEngine(resolver);
312
+ // A failed background recovery is the caller's to report through `engine.recovered()`.
313
+ if (options.recovery === 'background')
314
+ engine.initialize().catch(() => undefined);
315
+ else
316
+ await engine.initialize();
317
+ return engine;
318
+ }
319
+ let resolver;
320
+ try {
321
+ resolver = await WorkspaceResolver.prepare(configuration);
322
+ }
323
+ catch (error) {
324
+ startupError ??= error;
325
+ resolver = await WorkspaceResolver.prepare({
326
+ ...serverConfigurationSchema.parse({ version: CONFIG_VERSION }),
327
+ ...(configuration.profiles === undefined ? {} : { profiles: configuration.profiles }),
328
+ ...(configuration.docsRoot === undefined ? {} : { docsRoot: configuration.docsRoot }),
329
+ });
330
+ }
279
331
  const engine = new CoreEngine(resolver);
280
- // A failed background recovery is the caller's to report through `engine.recovered()`.
281
- if (options.recovery === 'background')
332
+ if (startupError !== undefined) {
333
+ resolver.failStartup(startupError);
334
+ reportStartupFailure(startupError);
335
+ return engine;
336
+ }
337
+ engine.deferStartup(async () => {
338
+ try {
339
+ await resolver.populate();
340
+ }
341
+ catch (error) {
342
+ reportStartupFailure(error);
343
+ return;
344
+ }
345
+ await sweepTemporaryDirectoriesOf(resolver);
346
+ // A failed recovery is reported through `engine.recovered()`.
282
347
  engine.initialize().catch(() => undefined);
283
- else
284
- await engine.initialize();
348
+ });
285
349
  return engine;
286
350
  }
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod/v4';
2
- import { TRANSACTION_MAX_APPLIED_FILES, TRANSACTION_MAX_ARTIFACTS, TRANSACTION_MAX_DIAGNOSTICS, TRANSACTION_MAX_FILES, TRANSACTION_MAX_OPERATIONS, TRANSACTION_MAX_PENDING_FILES, TRANSACTION_MAX_READ_DEPENDENCIES, TRANSACTION_MAX_VALIDATION_CHECKS, } from '../core/transaction-limits.js';
2
+ import { TRANSACTION_MAX_APPLIED_FILES, TRANSACTION_MAX_ARTIFACTS, TRANSACTION_MAX_BATCH_FILES, TRANSACTION_MAX_DIAGNOSTICS, TRANSACTION_MAX_FILES, TRANSACTION_MAX_OPERATIONS, TRANSACTION_MAX_READ_DEPENDENCIES, TRANSACTION_MAX_VALIDATION_CHECKS, } from '../core/transaction-limits.js';
3
3
  import { TRANSACTION_VERSION } from '../version.js';
4
4
  import { diagnosticSchema, workspaceIdSchema, workspaceRelativePathSchema } from './common.js';
5
5
  const sha256Schema = z.string().regex(/^[a-f0-9]{64}$/u);
@@ -113,7 +113,8 @@ export const transactionManifestSchema = z
113
113
  stagedIdentity: fileIdentitySchema.nullable(),
114
114
  })
115
115
  .strict())
116
- .max(TRANSACTION_MAX_PENDING_FILES)
116
+ // A batch records one pending entry per file, and large applies use batches up to this size.
117
+ .max(TRANSACTION_MAX_BATCH_FILES)
117
118
  .optional(),
118
119
  rollbackStatus: z.enum(['available', 'applied', 'failed']),
119
120
  failure: z.object({ code: identifierSchema, message: summarySchema }).strict().optional(),
@@ -366,7 +366,9 @@ function parseTechnologyDefinitions(file, document, fragment) {
366
366
  location: placement.location,
367
367
  reason: 'The source coordinate expression is not a resolvable file-local numeric constant',
368
368
  }))
369
- .concat(layoutSize === 'unknown'
369
+ .concat(
370
+ // A missing field and a literal `no` are both plain sources, not unsupported ones.
371
+ layoutExpression !== undefined && smallLayout === undefined
370
372
  ? [
371
373
  {
372
374
  field: 'force_use_small_tech_layout',
@@ -1,6 +1,6 @@
1
1
  import { LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/sdk/types.js';
2
2
  export const PACKAGE_NAME = 'hoi4-agent-tools';
3
- export const PACKAGE_VERSION = '4.20.2';
3
+ export const PACKAGE_VERSION = '4.20.3';
4
4
  export const MCP_PROTOCOL_VERSION = LATEST_PROTOCOL_VERSION;
5
5
  export const CONFIG_VERSION = 1;
6
6
  export const TRANSACTION_VERSION = 2;
@@ -5,17 +5,17 @@ This page lists the codes you are most likely to meet, then the checks for probl
5
5
 
6
6
  ## Setup and connection
7
7
 
8
- | Symptom | Cause and fix |
9
- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
10
- | The client lists no `hoi4.*` tools | The server did not start. Run `hoi4-agent-tools-setup --diagnose`, which checks the Node.js version (22.19 or newer, or 24), the image library and the configured paths. Then restart the client. |
11
- | `WORKSPACE_CONTEXT_NOT_FOUND` | The server does not know which mod you mean. Pass `workspaceId` (an ID or the mod folder name, such as `"my_mod"`; the error lists them), open the mod folder as the client's working directory, set `defaultWorkspace`, or configure the mod with `--mod-root` or a workspace in the [configuration file](configuration.md). |
12
- | `WORKSPACE_CONTEXT_AMBIGUOUS` | The working directory is inside more than one configured mod. Pass `workspaceId`, or open the one folder you mean. |
13
- | `WORKSPACE_NOT_REGISTERED` | The `workspaceId` is not in the configuration. Use `"current"`, or a workspace id from the configuration file. |
14
- | Renders lack icons or fonts, native commands are unresolved | The game folder is not configured. Set `--game-root` (or `gameRoot`) to the Hearts of Iron IV folder; `hoi4-agent-tools-setup --discover` prints the folders it can find. |
15
- | `ERROR_LOG_NOT_FOUND` | Launch the game once, or set `gameUserRoot` to the folder that holds `logs/`, `mod/` and `save games/` (with OneDrive that is often under `OneDrive\Documents`). |
16
- | `AUTH_INVALID` over HTTP | The bearer token is missing, expired or for another server. See the [HTTP guide](http.md). |
17
- | Startup or a call times out in the client | A cold scan of a large mod takes minutes. Raise the client's startup and tool timeouts (the printed Codex entries use 120 and 600 seconds), or use [background jobs](jobs.md). The stdio server answers the handshake before it checks retained rewrite journals; the first tool call waits for that check. |
18
- | Many idle `node` processes | Some clients keep a server per subagent. Set `HOI4_AGENT_STDIO_IDLE_EXIT_MINUTES`; see [Server lifetime](setup.md#server-lifetime). |
8
+ | Symptom | Cause and fix |
9
+ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
10
+ | The client lists no `hoi4.*` tools | The server did not start. Run `hoi4-agent-tools-setup --diagnose`, which checks the Node.js version (22.19 or newer, or 24), the image library and the configured paths. Then restart the client. |
11
+ | `WORKSPACE_CONTEXT_NOT_FOUND` | The server does not know which mod you mean. Pass `workspaceId` (an ID or the mod folder name, such as `"my_mod"`; the error lists them), open the mod folder as the client's working directory, set `defaultWorkspace`, or configure the mod with `--mod-root` or a workspace in the [configuration file](configuration.md). |
12
+ | `WORKSPACE_CONTEXT_AMBIGUOUS` | The working directory is inside more than one configured mod. Pass `workspaceId`, or open the one folder you mean. |
13
+ | `WORKSPACE_NOT_REGISTERED` | The `workspaceId` is not in the configuration. Use `"current"`, or a workspace id from the configuration file. |
14
+ | Renders lack icons or fonts, native commands are unresolved | The game folder is not configured. Set `--game-root` (or `gameRoot`) to the Hearts of Iron IV folder; `hoi4-agent-tools-setup --discover` prints the folders it can find. |
15
+ | `ERROR_LOG_NOT_FOUND` | Launch the game once, or set `gameUserRoot` to the folder that holds `logs/`, `mod/` and `save games/` (with OneDrive that is often under `OneDrive\Documents`). |
16
+ | `AUTH_INVALID` over HTTP | The bearer token is missing, expired or for another server. See the [HTTP guide](http.md). |
17
+ | Startup or a call times out in the client | A cold scan of a large mod takes minutes. Raise the client's startup and tool timeouts (the printed Codex entries use 120 and 600 seconds), or use [background jobs](jobs.md). The stdio server answers the handshake and the tool list before it loads the workspaces and checks retained rewrite journals; the first tool call waits for both. A configuration or workspace error is written to stderr as `startup_failed`, and every call that needs a workspace fails with its code. |
18
+ | Many idle `node` processes | Some clients keep a server per subagent. Set `HOI4_AGENT_STDIO_IDLE_EXIT_MINUTES`; see [Server lifetime](setup.md#server-lifetime). |
19
19
 
20
20
  ## Arguments and results
21
21
 
Binary file
Binary file
Binary file
@@ -4,23 +4,23 @@
4
4
  "binaries": {
5
5
  "darwin-arm64": {
6
6
  "file": "darwin-arm64/hoi4-engine",
7
- "sha256": "7a515361a74ea68802b1b730535b7eb9ca00634912e2c6e76f846d8cdac50532",
8
- "size": 5332720
7
+ "sha256": "18f9f1d4992d3da02d86bb7dd44cb0385b3f5c475e5b615c186fc8191ce121fa",
8
+ "size": 5332624
9
9
  },
10
10
  "linux-arm64": {
11
11
  "file": "linux-arm64/hoi4-engine",
12
- "sha256": "61310845bb5dbcc4eae49c88159da62c263e2c3c44d1c8a555afc7215fac1400",
13
- "size": 5635832
12
+ "sha256": "e09c2c7b8a5fde9e02f626e51990c2f557b2fb898b1854009d0ac3f59654a736",
13
+ "size": 5636352
14
14
  },
15
15
  "linux-x64": {
16
16
  "file": "linux-x64/hoi4-engine",
17
- "sha256": "66c15c1bed9da19a85ca842ca19c70b6eb1fc995ac71543893e8548b229ba796",
18
- "size": 6208144
17
+ "sha256": "7222b7f9da5381c67552ac2c21e944001738eb30922a0ae67963434557408e48",
18
+ "size": 6215744
19
19
  },
20
20
  "win32-x64": {
21
21
  "file": "win32-x64/hoi4-engine.exe",
22
- "sha256": "fa4be35babe58ec16ee1c34ef373124f23218c4b0b9c34b3f9279d05241d2976",
23
- "size": 5149184
22
+ "sha256": "a2428d3243f21d7afea6f228d3849eb16c7a30a3f16fcdf30221e0d93eb15cc2",
23
+ "size": 5151744
24
24
  }
25
25
  }
26
26
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "hoi4-agent-tools",
3
- "version": "4.20.2",
3
+ "version": "4.20.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "hoi4-agent-tools",
9
- "version": "4.20.2",
9
+ "version": "4.20.3",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@fontsource-variable/roboto": "5.3.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hoi4-agent-tools",
3
3
  "mcpName": "io.github.klimPaskov/hoi4-agent-tools",
4
- "version": "4.20.2",
4
+ "version": "4.20.3",
5
5
  "description": "Build HOI4 mods: focus trees, events, decisions, worlds, GUI previews, docs and AI balance.",
6
6
  "type": "module",
7
7
  "license": "Apache-2.0",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/configuration.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/configuration.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/continuous-focus-palette.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/continuous-focus-palette.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/custom-weighted-pool.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/custom-weighted-pool.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/decision-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/decision-inspect-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/error-log-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/error-log-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/event-feature-manifest.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/event-feature-manifest.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/focus-plan.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/focus-plan.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/focus-planning-sidecar.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/focus-planning-sidecar.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/geography-model.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/geography-model.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/gui-animation-source.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/gui-animation-source.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/gui-helper.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/gui-helper.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/gui-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/gui-scenario.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/helper-expansion-request.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/helper-expansion-request.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/helper-expansion-summary.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/helper-expansion-summary.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/impact-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/impact-inspect-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/map-operation.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/map-operation.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "oneOf": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/mechanic-test-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/mechanic-test-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/mod-index-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/mod-index-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/operation-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/operation-result.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/package-check-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/package-check-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/package-manifest.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/package-manifest.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-analysis-result.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-analysis-result.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-compare-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-compare-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-evaluate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-evaluate-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-inspect-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-inspect-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-render-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-render-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-scenario-set.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-scenario-set.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-sequence-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-sequence-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-simulate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-simulate-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/probability-sweep-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/probability-sweep-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/reference-context-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/reference-context-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/reference-read-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/reference-read-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/reference-search-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/reference-search-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/reference-sheets.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/reference-sheets.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/scenario-suite.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/scenario-suite.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/scenario-test-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/scenario-test-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/script-validate-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/script-validate-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/shared-scenario.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/shared-scenario.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.2/schemas/source-lookup-input.schema.json",
2
+ "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v4.20.3/schemas/source-lookup-input.schema.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
4
  "type": "object",
5
5
  "properties": {
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.klimPaskov/hoi4-agent-tools",
4
4
  "title": "HOI4 Agent Tools",
5
5
  "description": "Build HOI4 mods: focus trees, events, decisions, worlds, GUI previews, docs and AI balance.",
6
- "version": "4.20.2",
6
+ "version": "4.20.3",
7
7
  "repository": {
8
8
  "url": "https://github.com/klimPaskov/hoi4-agent-tools",
9
9
  "source": "github"
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "hoi4-agent-tools",
16
- "version": "4.20.2",
16
+ "version": "4.20.3",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  }