@aristanetworks/eos-mcp-server 0.8.1-beta → 0.9.0-beta

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 (44) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +17 -14
  3. package/dist/commands/probe.js +2 -1
  4. package/dist/commands/probe.js.map +1 -1
  5. package/dist/config/diagnostics.d.ts +5 -0
  6. package/dist/config/diagnostics.js +5 -1
  7. package/dist/config/diagnostics.js.map +1 -1
  8. package/dist/config/loadConfig.js +1 -0
  9. package/dist/config/loadConfig.js.map +1 -1
  10. package/dist/config/schema.d.ts +95 -1
  11. package/dist/config/schema.js +14 -1
  12. package/dist/config/schema.js.map +1 -1
  13. package/dist/connection/eosDeviceReader.d.ts +6 -1
  14. package/dist/connection/eosDeviceReader.js +14 -3
  15. package/dist/connection/eosDeviceReader.js.map +1 -1
  16. package/dist/diagnostics/executor.d.ts +7 -3
  17. package/dist/diagnostics/executor.js +16 -13
  18. package/dist/diagnostics/executor.js.map +1 -1
  19. package/dist/diagnostics/types.d.ts +19 -2
  20. package/dist/mcp/createServer.js +20 -3
  21. package/dist/mcp/createServer.js.map +1 -1
  22. package/dist/mcp/tools/ping.d.ts +2 -2
  23. package/dist/operations/eapiSlots.d.ts +68 -0
  24. package/dist/operations/eapiSlots.js +237 -0
  25. package/dist/operations/eapiSlots.js.map +1 -0
  26. package/dist/operations/readExecution.js +1 -1
  27. package/dist/operations/readExecution.js.map +1 -1
  28. package/dist/serverInfo/buildServerInfo.js +2 -0
  29. package/dist/serverInfo/buildServerInfo.js.map +1 -1
  30. package/dist/serverInfo/types.d.ts +2 -0
  31. package/docs/CODE_WALKTHROUGH.md +3 -3
  32. package/docs/DEMO_SKILLS_YOUTUBE.md +346 -0
  33. package/docs/DESIGN.md +3 -3
  34. package/docs/DIAGNOSTICS.md +14 -11
  35. package/docs/adr/0005-multi-destination-ping.md +4 -0
  36. package/docs/adr/0006-in-memory-timed-diagnostic-capacity.md +2 -0
  37. package/docs/adr/0007-per-device-diagnostic-concurrency.md +16 -0
  38. package/docs/adr/0008-read-only-tool-annotations.md +16 -0
  39. package/docs/adr/0009-shared-per-device-eapi-slots.md +40 -0
  40. package/docs/research/eos-linter-integration.md +70 -0
  41. package/package.json +1 -1
  42. package/dist/diagnostics/concurrency.d.ts +0 -29
  43. package/dist/diagnostics/concurrency.js +0 -115
  44. package/dist/diagnostics/concurrency.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.9.0-beta
6
+
7
+ - **Breaking:** `diagnostics.deviceConcurrency` now limits each device instead of the whole server process, and its default drops from 5 to 3, the measured cEOS 4.34.3M eAPI concurrency. The new `diagnostics.maxConcurrentDiagnostics` (default 32) caps the whole server; `deviceConcurrency` must not exceed it. Pings to different devices no longer queue behind one another, a ping waiting on a busy device no longer holds up one to a free device, and uncertain slots on one device no longer block others. A configuration that used `deviceConcurrency` to cap the whole server should also set `maxConcurrentDiagnostics`. The capacity snapshot adds `device_limit` and a per-host `devices` breakdown, and server info adds `limits.diagnostics.max_concurrent_diagnostics`. See [ADR 0007](docs/adr/0007-per-device-diagnostic-concurrency.md).
8
+ - Every tool now advertises MCP `readOnlyHint: true`, and `eos_ping` also `openWorldHint: true`, so clients such as Claude Code and Codex can run independent EOS calls concurrently. Previously Claude Code ran several pings or show commands issued together one at a time, and Codex needed `supports_parallel_tool_calls = true`, which the README's Codex examples no longer set. Some clients may also prompt less often before a ping; inventory diagnostic permission and server-side limits are unchanged. See [ADR 0008](docs/adr/0008-read-only-tool-annotations.md).
9
+ - **Breaking:** reads and diagnostics now share each device's eAPI slots across all calls. Top-level `deviceConcurrency` now limits the requests one device runs at once, reads and diagnostics together, and its default drops from 5 to 3, the measured cEOS 4.34.3M eAPI concurrency. Its old per-call role moves to the new `readFanOut` (default 10, hosts one read call contacts at once). `diagnostics.deviceConcurrency` drops from 3 to 2 and must not exceed the top-level value, so concurrent pings always leave a slot for show commands; on cEOS, three 10-packet pings could otherwise delay every read to that device for about 10 s, the default `readTimeoutMs`. `readTimeoutMs` now starts once a read's slot is granted. The capacity snapshot adds `eapi_device_limit` and per-host `read_active_count` and `read_queued_count`; server info adds `limits.read_fan_out`. A configuration that raised only `diagnostics.deviceConcurrency` must also raise the top-level value. See [ADR 0009](docs/adr/0009-shared-per-device-eapi-slots.md).
10
+
5
11
  ## 0.8.1-beta
6
12
 
7
13
  - **Breaking:** removes the durable diagnostic ledger and its exclusive lock, so several MCP servers (for example two chat sessions, or the desktop app alongside Claude Code) can use the same inventory at once. Previously a second server failed to start whenever any host allowed diagnostics, losing every tool. See [ADR 0006](docs/adr/0006-in-memory-timed-diagnostic-capacity.md), which supersedes ADRs 0002 to 0004.
package/README.md CHANGED
@@ -87,7 +87,7 @@ No install step is needed. `npx` downloads the package on first use and caches i
87
87
  npx -y @aristanetworks/eos-mcp-server --help
88
88
  ```
89
89
 
90
- The [MCP client examples](#connect-to-an-mcp-client) below use `npx`. `-y` skips npm's install confirmation prompt, which an MCP client can't answer. Without a version, npx checks the registry for the latest release each time it launches the server. To pin a specific release, append a version, for example `@aristanetworks/eos-mcp-server@0.8.1-beta`.
90
+ The [MCP client examples](#connect-to-an-mcp-client) below use `npx`. `-y` skips npm's install confirmation prompt, which an MCP client can't answer. Without a version, npx checks the registry for the latest release each time it launches the server. To pin a specific release, append a version, for example `@aristanetworks/eos-mcp-server@0.9.0-beta`.
91
91
 
92
92
  ### Or install globally
93
93
 
@@ -142,7 +142,8 @@ inventory: ./inventory.yml
142
142
  actor: lab-user
143
143
  readTimeoutMs: 10000
144
144
  overallOperationTimeoutMs: 30000
145
- deviceConcurrency: 5
145
+ deviceConcurrency: 3
146
+ readFanOut: 10
146
147
  maxReadTargets: 50
147
148
  maxShowCommandsPerRequest: 5
148
149
  maxLoggingMessagesPerRequest: 1000
@@ -153,7 +154,8 @@ diagnostics:
153
154
  maxPingCount: 10
154
155
  maxProbesPerRequest: 100
155
156
  maxDestinationsPerRequest: 16
156
- deviceConcurrency: 5
157
+ deviceConcurrency: 2
158
+ maxConcurrentDiagnostics: 32
157
159
  pingReplyTimeoutMs: 1000
158
160
  commandTimeoutMs: 30000
159
161
  httpTimeoutMs: 35000
@@ -175,7 +177,8 @@ Supported config fields:
175
177
  - `caFile`
176
178
  - `readTimeoutMs`
177
179
  - `overallOperationTimeoutMs`
178
- - `deviceConcurrency`
180
+ - `deviceConcurrency` — eAPI requests one device may run at once across all calls, reads and diagnostics together (default 3, the measured cEOS limit)
181
+ - `readFanOut` — hosts one read call contacts at once (default 10)
179
182
  - `maxReadTargets`
180
183
  - `maxShowCommandsPerRequest`
181
184
  - `maxLoggingMessagesPerRequest`
@@ -190,7 +193,7 @@ Supported config fields:
190
193
 
191
194
  For read tools, `readTimeoutMs` applies to each device eAPI request. `overallOperationTimeoutMs`, when set, bounds the whole read-tool call and aborts in-flight device requests once the limit is reached. `maxLoggingMessagesPerRequest` caps `eos_show_logging.message_count` and defaults to 1000. `maxResponseSizeBytes` limits both the buffered HTTP response from each device and the final serialized result of device read operations. `eapiVersion` selects the eAPI JSON output schema sent as the `runCmds` `version` parameter: `latest` (the default) returns the current schema for each command, and `1` pins the original schema for consumers that depend on it. It only affects JSON output, so `eos_get_running_config` and `eos_show_logging` are unchanged.
192
195
 
193
- `eos_ping` uses its own configurable `diagnostics` timeouts and per-server concurrency, while sharing `maxReadTargets` and `maxResponseSizeBytes`. Omitted diagnostic settings retain the defaults shown above; invalid or contradictory settings fail validation. Ping requires explicit inventory permission and has no automatic retries. Response IDs and protocol envelopes are validated before output is accepted. When a ping's remote completion is unknown (timeout, cancellation, lost connection), its slot is held for `commandTimeoutMs` and then freed automatically; inspect the running server's `eos_get_server_info.diagnostics.capacity`. Capacity lives in memory, so several MCP servers can use the same inventory at once. See [Network diagnostics](docs/DIAGNOSTICS.md), including the distinction between a reply timeout, command budget, and remote process termination.
196
+ `eos_ping` uses its own configurable `diagnostics` timeouts and concurrency (per device, under a per-server ceiling), while sharing `maxReadTargets` and `maxResponseSizeBytes`. Omitted diagnostic settings retain the defaults shown above; invalid or contradictory settings fail validation. Ping requires explicit inventory permission and has no automatic retries. Response IDs and protocol envelopes are validated before output is accepted. When a ping's remote completion is unknown (timeout, cancellation, lost connection), its slot is held for `commandTimeoutMs` and then freed automatically; inspect the running server's `eos_get_server_info.diagnostics.capacity`. Capacity lives in memory, so several MCP servers can use the same inventory at once. See [Network diagnostics](docs/DIAGNOSTICS.md), including the distinction between a reply timeout, command budget, and remote process termination.
194
197
 
195
198
  `actor` and `logFile` remain sanitized runtime metadata and do not enable a general tool-call audit log.
196
199
 
@@ -271,7 +274,6 @@ With just an inventory file:
271
274
 
272
275
  ```toml
273
276
  [mcp_servers.eos]
274
- supports_parallel_tool_calls = true
275
277
  command = "npx"
276
278
  args = ["-y", "@aristanetworks/eos-mcp-server", "serve", "--inventory", "/absolute/path/to/inventory.yml"]
277
279
  env_vars = ["EOS_MCP_PASSWORD"]
@@ -281,19 +283,20 @@ Or with a [server config file](#server-config-file) for additional options:
281
283
 
282
284
  ```toml
283
285
  [mcp_servers.eos]
284
- supports_parallel_tool_calls = true
285
286
  command = "npx"
286
287
  args = ["-y", "@aristanetworks/eos-mcp-server", "serve", "--config", "/absolute/path/to/eos-mcp-server.yml"]
287
288
  env_vars = ["EOS_MCP_PASSWORD"]
288
289
  ```
289
290
 
290
- Set `supports_parallel_tool_calls = true` under `[mcp_servers.eos]` to let
291
- Codex dispatch independent tool calls, including pings, concurrently. Without
292
- this opt-in, tools that omit the MCP read-only annotation may run serially even
293
- when requested together. Reload Codex after changing the setting. The server
294
- still enforces its configured diagnostic concurrency and packet limits.
291
+ Every EOS tool, including `eos_ping`, advertises the MCP `readOnlyHint`
292
+ annotation, so Codex and Claude Code can run independent tool calls
293
+ concurrently without further configuration. With older server versions, which
294
+ omit the annotation, add `supports_parallel_tool_calls = true` under
295
+ `[mcp_servers.eos]` to get the same behavior in Codex. The server still enforces
296
+ its configured diagnostic permission, concurrency and packet limits
297
+ ([ADR 0008](docs/adr/0008-read-only-tool-annotations.md)).
295
298
  A single `eos_ping` call with several `destinations` already runs them
296
- concurrently on the server, so this setting matters for other independent
299
+ concurrently on the server, so client concurrency matters for other independent
297
300
  calls, such as show commands on different devices or pings that need different
298
301
  VRFs, sources, or counts.
299
302
 
@@ -605,7 +608,7 @@ Input:
605
608
 
606
609
  ### `eos_ping`
607
610
 
608
- Runs bounded ping from an inventory host or group to one or more destinations, requiring inherited `mcp_diagnostics_allowed: true`. It generates traffic without changing configuration. Each destination must be a unicast IPv4/IPv6 literal, and duplicates are rejected, including different spellings of the same IPv6 address; use a one-element `destinations` array for a single ping. Destinations run concurrently within the server's diagnostic concurrency, up to 16 per call by default. Optional VRF and source IP apply to every destination and never silently fall back. Count defaults to 3 per destination and is capped at 10 unless changed in settings.
611
+ Runs bounded ping from an inventory host or group to one or more destinations, requiring inherited `mcp_diagnostics_allowed: true`. It generates traffic without changing configuration. Each destination must be a unicast IPv4/IPv6 literal, and duplicates are rejected, including different spellings of the same IPv6 address; use a one-element `destinations` array for a single ping. Destinations run concurrently, up to `diagnostics.deviceConcurrency` at once per device (default 2, leaving a slot of the device's shared eAPI limit for reads), with up to 16 destinations per call by default. Optional VRF and source IP apply to every destination and never silently fall back. Count defaults to 3 per destination and is capped at 10 unless changed in settings.
609
612
 
610
613
  ```json
611
614
  {
@@ -1,5 +1,6 @@
1
1
  import { EapiDeviceReader } from "../connection/eosDeviceReader.js";
2
2
  import { EapiClient } from "../eapi/client.js";
3
+ import { EapiSlots, eapiSlotLimits } from "../operations/eapiSlots.js";
3
4
  import { loadInventoryModel } from "../inventory/loadInventory.js";
4
5
  import { probeDevices } from "../probe/probeDevices.js";
5
6
  import { AppError } from "../core/errors.js";
@@ -9,7 +10,7 @@ export async function runProbe(config, target, asJson) {
9
10
  throw new AppError("cli_missing_inventory", "probe requires an inventory path via --inventory or config file");
10
11
  }
11
12
  const model = await loadInventoryModel(config.inventoryPath);
12
- const result = await probeDevices(model, config, { target, include_raw: false }, new EapiDeviceReader(config, new EapiClient()));
13
+ const result = await probeDevices(model, config, { target, include_raw: false }, new EapiDeviceReader(config, new EapiClient(), new EapiSlots(eapiSlotLimits(config), config.diagnostics.commandTimeoutMs)));
13
14
  if (asJson) {
14
15
  console.log(prettyJson(result));
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/commands/probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAA4B,EAAE,MAAc,EAAE,MAAe;IAC1F,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;QAC1B,MAAM,IAAI,QAAQ,CAAC,uBAAuB,EAAE,iEAAiE,CAAC,CAAC;IACjH,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,kBAAkB,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,MAAM,YAAY,CAC/B,KAAK,EACL,MAAM,EACN,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,EAC9B,IAAI,gBAAgB,CAAC,MAAM,EAAE,IAAI,UAAU,EAAE,CAAC,CAC/C,CAAC;IAEF,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CA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+6,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
6
6
  maxProbesPerRequest: z.ZodDefault<z.ZodNumber>;
7
7
  maxDestinationsPerRequest: z.ZodDefault<z.ZodNumber>;
8
8
  deviceConcurrency: z.ZodDefault<z.ZodNumber>;
9
+ maxConcurrentDiagnostics: z.ZodDefault<z.ZodNumber>;
9
10
  pingReplyTimeoutMs: z.ZodDefault<z.ZodNumber>;
10
11
  commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
11
12
  httpTimeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -17,6 +18,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
17
18
  maxProbesPerRequest: number;
18
19
  maxDestinationsPerRequest: number;
19
20
  deviceConcurrency: number;
21
+ maxConcurrentDiagnostics: number;
20
22
  pingReplyTimeoutMs: number;
21
23
  commandTimeoutMs: number;
22
24
  httpTimeoutMs: number;
@@ -30,6 +32,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
30
32
  maxProbesPerRequest?: number | undefined;
31
33
  maxDestinationsPerRequest?: number | undefined;
32
34
  deviceConcurrency?: number | undefined;
35
+ maxConcurrentDiagnostics?: number | undefined;
33
36
  pingReplyTimeoutMs?: number | undefined;
34
37
  commandTimeoutMs?: number | undefined;
35
38
  httpTimeoutMs?: number | undefined;
@@ -41,6 +44,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
41
44
  maxProbesPerRequest: number;
42
45
  maxDestinationsPerRequest: number;
43
46
  deviceConcurrency: number;
47
+ maxConcurrentDiagnostics: number;
44
48
  pingReplyTimeoutMs: number;
45
49
  commandTimeoutMs: number;
46
50
  httpTimeoutMs: number;
@@ -54,6 +58,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
54
58
  maxProbesPerRequest?: number | undefined;
55
59
  maxDestinationsPerRequest?: number | undefined;
56
60
  deviceConcurrency?: number | undefined;
61
+ maxConcurrentDiagnostics?: number | undefined;
57
62
  pingReplyTimeoutMs?: number | undefined;
58
63
  commandTimeoutMs?: number | undefined;
59
64
  httpTimeoutMs?: number | undefined;
@@ -8,7 +8,8 @@ export const diagnosticsConfigSchema = z.object({
8
8
  maxPingCount: positiveInteger.default(10),
9
9
  maxProbesPerRequest: positiveInteger.default(100),
10
10
  maxDestinationsPerRequest: positiveInteger.default(16),
11
- deviceConcurrency: positiveInteger.default(5),
11
+ deviceConcurrency: positiveInteger.default(2),
12
+ maxConcurrentDiagnostics: positiveInteger.default(32),
12
13
  pingReplyTimeoutMs: positiveInteger.multipleOf(1000).default(1000),
13
14
  commandTimeoutMs: positiveInteger.default(30_000),
14
15
  httpTimeoutMs: positiveInteger.default(35_000),
@@ -24,6 +25,9 @@ export const diagnosticsConfigSchema = z.object({
24
25
  if (config.maxPingCount > config.maxProbesPerRequest) {
25
26
  invalid("maxPingCount", "Must not exceed maxProbesPerRequest");
26
27
  }
28
+ if (config.deviceConcurrency > config.maxConcurrentDiagnostics) {
29
+ invalid("deviceConcurrency", "Must not exceed maxConcurrentDiagnostics");
30
+ }
27
31
  if (pingExecutionBoundMs(config.maxPingCount, config.pingReplyTimeoutMs) > config.commandTimeoutMs) {
28
32
  invalid("commandTimeoutMs", "Must cover maxPingCount * (pingReplyTimeoutMs + 1000) + 1000 ms");
29
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/config/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uEAAuE;AACvE,MAAM,YAAY,GAAG,aAAa,CAAC;AACnC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAEtE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,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AAM,CAAC,gBAAgB,EAAE,CAAC;QACnG,OAAO,CAAC,kBAAkB,EAAE,iEAAiE,CAAC,CAAC;IACjG,CAAC;IACD,IAAI,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,gBAAgB,GAAG,IAAI,EAAE,CAAC;QAC1D,OAAO,CAAC,eAAe,EAAE,kDAAkD,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,+FAA+F;AAC/F,MAAM,UAAU,oBAAoB,CAAC,KAAa,EAAE,cAAsB;IACxE,OAAO,KAAK,GAAG,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,IAAI,CAAC;AAChD,CAAC"}
@@ -27,6 +27,7 @@ export async function loadServerConfig(options) {
27
27
  readTimeoutMs: fileConfig.readTimeoutMs,
28
28
  overallOperationTimeoutMs: fileConfig.overallOperationTimeoutMs,
29
29
  deviceConcurrency: fileConfig.deviceConcurrency,
30
+ readFanOut: fileConfig.readFanOut,
30
31
  maxReadTargets: fileConfig.maxReadTargets,
31
32
  maxShowCommandsPerRequest: fileConfig.maxShowCommandsPerRequest,
32
33
  maxLoggingMessagesPerRequest: fileConfig.maxLoggingMessagesPerRequest,
@@ -1 +1 @@
1
- {"version":3,"file":"loadConfig.js","sourceRoot":"","sources":["../../src/config/loadConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAmB;IACxD,IAAI,UAAU,GAAqB,EAAE,C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Default<z.ZodNumber>;
9
9
  maxDestinationsPerRequest: z.ZodDefault<z.ZodNumber>;
10
10
  deviceConcurrency: z.ZodDefault<z.ZodNumber>;
11
+ maxConcurrentDiagnostics: z.ZodDefault<z.ZodNumber>;
11
12
  pingReplyTimeoutMs: z.ZodDefault<z.ZodNumber>;
12
13
  commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
13
14
  httpTimeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -19,6 +20,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
19
20
  maxProbesPerRequest: number;
20
21
  maxDestinationsPerRequest: number;
21
22
  deviceConcurrency: number;
23
+ maxConcurrentDiagnostics: number;
22
24
  pingReplyTimeoutMs: number;
23
25
  commandTimeoutMs: number;
24
26
  httpTimeoutMs: number;
@@ -32,6 +34,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
32
34
  maxProbesPerRequest?: number | undefined;
33
35
  maxDestinationsPerRequest?: number | undefined;
34
36
  deviceConcurrency?: number | undefined;
37
+ maxConcurrentDiagnostics?: number | undefined;
35
38
  pingReplyTimeoutMs?: number | undefined;
36
39
  commandTimeoutMs?: number | undefined;
37
40
  httpTimeoutMs?: number | undefined;
@@ -43,6 +46,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
43
46
  maxProbesPerRequest: number;
44
47
  maxDestinationsPerRequest: number;
45
48
  deviceConcurrency: number;
49
+ maxConcurrentDiagnostics: number;
46
50
  pingReplyTimeoutMs: number;
47
51
  commandTimeoutMs: number;
48
52
  httpTimeoutMs: number;
@@ -56,6 +60,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
56
60
  maxProbesPerRequest?: number | undefined;
57
61
  maxDestinationsPerRequest?: number | undefined;
58
62
  deviceConcurrency?: number | undefined;
63
+ maxConcurrentDiagnostics?: number | undefined;
59
64
  pingReplyTimeoutMs?: number | undefined;
60
65
  commandTimeoutMs?: number | undefined;
61
66
  httpTimeoutMs?: number | undefined;
@@ -69,6 +74,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
69
74
  readTimeoutMs: z.ZodOptional<z.ZodNumber>;
70
75
  overallOperationTimeoutMs: z.ZodOptional<z.ZodNumber>;
71
76
  deviceConcurrency: z.ZodOptional<z.ZodNumber>;
77
+ readFanOut: z.ZodOptional<z.ZodNumber>;
72
78
  maxReadTargets: z.ZodOptional<z.ZodNumber>;
73
79
  maxShowCommandsPerRequest: z.ZodOptional<z.ZodNumber>;
74
80
  maxLoggingMessagesPerRequest: z.ZodOptional<z.ZodNumber>;
@@ -101,6 +107,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
101
107
  maxProbesPerRequest: number;
102
108
  maxDestinationsPerRequest: number;
103
109
  deviceConcurrency: number;
110
+ maxConcurrentDiagnostics: number;
104
111
  pingReplyTimeoutMs: number;
105
112
  commandTimeoutMs: number;
106
113
  httpTimeoutMs: number;
@@ -113,6 +120,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
113
120
  logFile?: string | undefined;
114
121
  caFile?: string | undefined;
115
122
  readTimeoutMs?: number | undefined;
123
+ readFanOut?: number | undefined;
116
124
  maxReadTargets?: number | undefined;
117
125
  maxShowCommandsPerRequest?: number | undefined;
118
126
  maxLoggingMessagesPerRequest?: number | undefined;
@@ -136,6 +144,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
136
144
  maxProbesPerRequest?: number | undefined;
137
145
  maxDestinationsPerRequest?: number | undefined;
138
146
  deviceConcurrency?: number | undefined;
147
+ maxConcurrentDiagnostics?: number | undefined;
139
148
  pingReplyTimeoutMs?: number | undefined;
140
149
  commandTimeoutMs?: number | undefined;
141
150
  httpTimeoutMs?: number | undefined;
@@ -147,6 +156,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
147
156
  logFile?: string | undefined;
148
157
  caFile?: string | undefined;
149
158
  readTimeoutMs?: number | undefined;
159
+ readFanOut?: number | undefined;
150
160
  maxReadTargets?: number | undefined;
151
161
  maxShowCommandsPerRequest?: number | undefined;
152
162
  maxLoggingMessagesPerRequest?: number | undefined;
@@ -160,7 +170,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
160
170
  mcpPasswordEnv?: string | undefined;
161
171
  } | undefined;
162
172
  }>;
163
- export declare const resolvedServerConfigSchema: z.ZodObject<{
173
+ export declare const resolvedServerConfigSchema: z.ZodEffects<z.ZodObject<{
164
174
  configPath: z.ZodOptional<z.ZodString>;
165
175
  diagnostics: z.ZodDefault<z.ZodEffects<z.ZodObject<{
166
176
  stateFile: z.ZodOptional<z.ZodNever>;
@@ -169,6 +179,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
169
179
  maxProbesPerRequest: z.ZodDefault<z.ZodNumber>;
170
180
  maxDestinationsPerRequest: z.ZodDefault<z.ZodNumber>;
171
181
  deviceConcurrency: z.ZodDefault<z.ZodNumber>;
182
+ maxConcurrentDiagnostics: z.ZodDefault<z.ZodNumber>;
172
183
  pingReplyTimeoutMs: z.ZodDefault<z.ZodNumber>;
173
184
  commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
174
185
  httpTimeoutMs: z.ZodDefault<z.ZodNumber>;
@@ -180,6 +191,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
180
191
  maxProbesPerRequest: number;
181
192
  maxDestinationsPerRequest: number;
182
193
  deviceConcurrency: number;
194
+ maxConcurrentDiagnostics: number;
183
195
  pingReplyTimeoutMs: number;
184
196
  commandTimeoutMs: number;
185
197
  httpTimeoutMs: number;
@@ -193,6 +205,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
193
205
  maxProbesPerRequest?: number | undefined;
194
206
  maxDestinationsPerRequest?: number | undefined;
195
207
  deviceConcurrency?: number | undefined;
208
+ maxConcurrentDiagnostics?: number | undefined;
196
209
  pingReplyTimeoutMs?: number | undefined;
197
210
  commandTimeoutMs?: number | undefined;
198
211
  httpTimeoutMs?: number | undefined;
@@ -204,6 +217,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
204
217
  maxProbesPerRequest: number;
205
218
  maxDestinationsPerRequest: number;
206
219
  deviceConcurrency: number;
220
+ maxConcurrentDiagnostics: number;
207
221
  pingReplyTimeoutMs: number;
208
222
  commandTimeoutMs: number;
209
223
  httpTimeoutMs: number;
@@ -217,6 +231,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
217
231
  maxProbesPerRequest?: number | undefined;
218
232
  maxDestinationsPerRequest?: number | undefined;
219
233
  deviceConcurrency?: number | undefined;
234
+ maxConcurrentDiagnostics?: number | undefined;
220
235
  pingReplyTimeoutMs?: number | undefined;
221
236
  commandTimeoutMs?: number | undefined;
222
237
  httpTimeoutMs?: number | undefined;
@@ -229,7 +244,10 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
229
244
  caFile: z.ZodOptional<z.ZodString>;
230
245
  readTimeoutMs: z.ZodDefault<z.ZodNumber>;
231
246
  overallOperationTimeoutMs: z.ZodOptional<z.ZodNumber>;
247
+ /** eAPI slots one host may hold across all calls, reads and diagnostics (ADR 0009). */
232
248
  deviceConcurrency: z.ZodDefault<z.ZodNumber>;
249
+ /** Hosts one read call contacts at once. */
250
+ readFanOut: z.ZodDefault<z.ZodNumber>;
233
251
  maxReadTargets: z.ZodDefault<z.ZodNumber>;
234
252
  maxShowCommandsPerRequest: z.ZodDefault<z.ZodNumber>;
235
253
  maxLoggingMessagesPerRequest: z.ZodDefault<z.ZodNumber>;
@@ -260,6 +278,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
260
278
  maxProbesPerRequest: number;
261
279
  maxDestinationsPerRequest: number;
262
280
  deviceConcurrency: number;
281
+ maxConcurrentDiagnostics: number;
263
282
  pingReplyTimeoutMs: number;
264
283
  commandTimeoutMs: number;
265
284
  httpTimeoutMs: number;
@@ -268,6 +287,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
268
287
  stateFile?: undefined;
269
288
  };
270
289
  readTimeoutMs: number;
290
+ readFanOut: number;
271
291
  maxReadTargets: number;
272
292
  maxShowCommandsPerRequest: number;
273
293
  maxLoggingMessagesPerRequest: number;
@@ -296,6 +316,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
296
316
  maxProbesPerRequest?: number | undefined;
297
317
  maxDestinationsPerRequest?: number | undefined;
298
318
  deviceConcurrency?: number | undefined;
319
+ maxConcurrentDiagnostics?: number | undefined;
299
320
  pingReplyTimeoutMs?: number | undefined;
300
321
  commandTimeoutMs?: number | undefined;
301
322
  httpTimeoutMs?: number | undefined;
@@ -306,6 +327,79 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
306
327
  logFile?: string | undefined;
307
328
  caFile?: string | undefined;
308
329
  readTimeoutMs?: number | undefined;
330
+ readFanOut?: number | undefined;
331
+ maxReadTargets?: number | undefined;
332
+ maxShowCommandsPerRequest?: number | undefined;
333
+ maxLoggingMessagesPerRequest?: number | undefined;
334
+ maxResponseSizeBytes?: number | undefined;
335
+ eapiVersion?: 1 | "latest" | undefined;
336
+ secretEnvPrefixes?: string[] | undefined;
337
+ defaultConnection?: {
338
+ ansibleUser?: string | undefined;
339
+ ansibleHttpapiPort?: number | undefined;
340
+ mcpValidateCerts?: boolean | undefined;
341
+ mcpPasswordEnv?: string | undefined;
342
+ } | undefined;
343
+ configPath?: string | undefined;
344
+ inventoryPath?: string | undefined;
345
+ }>, {
346
+ deviceConcurrency: number;
347
+ diagnostics: {
348
+ defaultPingCount: number;
349
+ maxPingCount: number;
350
+ maxProbesPerRequest: number;
351
+ maxDestinationsPerRequest: number;
352
+ deviceConcurrency: number;
353
+ maxConcurrentDiagnostics: number;
354
+ pingReplyTimeoutMs: number;
355
+ commandTimeoutMs: number;
356
+ httpTimeoutMs: number;
357
+ overallOperationTimeoutMs: number;
358
+ nativeRequestTimeout: boolean;
359
+ stateFile?: undefined;
360
+ };
361
+ readTimeoutMs: number;
362
+ readFanOut: number;
363
+ maxReadTargets: number;
364
+ maxShowCommandsPerRequest: number;
365
+ maxLoggingMessagesPerRequest: number;
366
+ maxResponseSizeBytes: number;
367
+ eapiVersion: 1 | "latest";
368
+ secretEnvPrefixes: string[];
369
+ defaultConnection: {
370
+ ansibleUser?: string | undefined;
371
+ ansibleHttpapiPort?: number | undefined;
372
+ mcpValidateCerts?: boolean | undefined;
373
+ mcpPasswordEnv?: string | undefined;
374
+ };
375
+ overallOperationTimeoutMs?: number | undefined;
376
+ actor?: string | undefined;
377
+ logFile?: string | undefined;
378
+ caFile?: string | undefined;
379
+ configPath?: string | undefined;
380
+ inventoryPath?: string | undefined;
381
+ }, {
382
+ deviceConcurrency?: number | undefined;
383
+ overallOperationTimeoutMs?: number | undefined;
384
+ diagnostics?: {
385
+ stateFile?: undefined;
386
+ defaultPingCount?: number | undefined;
387
+ maxPingCount?: number | undefined;
388
+ maxProbesPerRequest?: number | undefined;
389
+ maxDestinationsPerRequest?: number | undefined;
390
+ deviceConcurrency?: number | undefined;
391
+ maxConcurrentDiagnostics?: number | undefined;
392
+ pingReplyTimeoutMs?: number | undefined;
393
+ commandTimeoutMs?: number | undefined;
394
+ httpTimeoutMs?: number | undefined;
395
+ overallOperationTimeoutMs?: number | undefined;
396
+ nativeRequestTimeout?: boolean | undefined;
397
+ } | undefined;
398
+ actor?: string | undefined;
399
+ logFile?: string | undefined;
400
+ caFile?: string | undefined;
401
+ readTimeoutMs?: number | undefined;
402
+ readFanOut?: number | undefined;
309
403
  maxReadTargets?: number | undefined;
310
404
  maxShowCommandsPerRequest?: number | undefined;
311
405
  maxLoggingMessagesPerRequest?: number | undefined;
@@ -12,6 +12,7 @@ export const serverConfigFileSchema = z
12
12
  readTimeoutMs: z.number().int().positive().optional(),
13
13
  overallOperationTimeoutMs: z.number().int().positive().optional(),
14
14
  deviceConcurrency: z.number().int().positive().optional(),
15
+ readFanOut: z.number().int().positive().optional(),
15
16
  maxReadTargets: z.number().int().positive().optional(),
16
17
  maxShowCommandsPerRequest: z.number().int().positive().optional(),
17
18
  maxLoggingMessagesPerRequest: z.number().int().positive().max(9999).optional(),
@@ -38,7 +39,10 @@ export const resolvedServerConfigSchema = z
38
39
  caFile: z.string().min(1).optional(),
39
40
  readTimeoutMs: z.number().int().positive().default(10_000),
40
41
  overallOperationTimeoutMs: z.number().int().positive().optional(),
41
- deviceConcurrency: z.number().int().positive().default(5),
42
+ /** eAPI slots one host may hold across all calls, reads and diagnostics (ADR 0009). */
43
+ deviceConcurrency: z.number().int().positive().default(3),
44
+ /** Hosts one read call contacts at once. */
45
+ readFanOut: z.number().int().positive().default(10),
42
46
  maxReadTargets: z.number().int().positive().default(50),
43
47
  maxShowCommandsPerRequest: z.number().int().positive().default(5),
44
48
  maxLoggingMessagesPerRequest: z.number().int().positive().max(9999).default(1000),
@@ -53,5 +57,14 @@ export const resolvedServerConfigSchema = z
53
57
  mcpPasswordEnv: z.string().min(1).optional()
54
58
  })
55
59
  .default({})
60
+ })
61
+ .superRefine((config, context) => {
62
+ if (config.diagnostics.deviceConcurrency > config.deviceConcurrency) {
63
+ context.addIssue({
64
+ code: z.ZodIssueCode.custom,
65
+ path: ["diagnostics", "deviceConcurrency"],
66
+ message: "Must not exceed the top-level deviceConcurrency, which covers reads and diagnostics together"
67
+ });
68
+ }
56
69
  });
57
70
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,uBAAuB,CAAC,Q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@ -1,6 +1,7 @@
1
1
  import type { ResolvedServerConfig } from "../config/schema.js";
2
2
  import type { EosCommandResult, EosCommandRunner, EapiOutputMode, RunShowCommandOptions } from "../eapi/types.js";
3
3
  import type { InventoryHostModel } from "../inventory/types.js";
4
+ import type { EapiSlots } from "../operations/eapiSlots.js";
4
5
  /**
5
6
  * Runs EOS read commands for an inventory host.
6
7
  *
@@ -10,9 +11,13 @@ import type { InventoryHostModel } from "../inventory/types.js";
10
11
  export interface EosDeviceReader {
11
12
  runShowCommands(host: InventoryHostModel, commands: string[], outputMode: EapiOutputMode, options?: RunShowCommandOptions): Promise<EosCommandResult[]>;
12
13
  }
14
+ /** Each request first waits for one of the host's shared eAPI slots and frees it when the request
15
+ * settles (ADR 0009), so `readTimeoutMs` starts at dispatch, not while queued.
16
+ */
13
17
  export declare class EapiDeviceReader implements EosDeviceReader {
14
18
  private readonly config;
15
19
  private readonly runner;
16
- constructor(config: ResolvedServerConfig, runner: EosCommandRunner);
20
+ private readonly slots;
21
+ constructor(config: ResolvedServerConfig, runner: EosCommandRunner, slots: EapiSlots);
17
22
  runShowCommands(host: InventoryHostModel, commands: string[], outputMode: EapiOutputMode, options?: RunShowCommandOptions): Promise<EosCommandResult[]>;
18
23
  }
@@ -1,13 +1,24 @@
1
1
  import { resolveEapiConnection } from "./resolveConnection.js";
2
+ /** Each request first waits for one of the host's shared eAPI slots and frees it when the request
3
+ * settles (ADR 0009), so `readTimeoutMs` starts at dispatch, not while queued.
4
+ */
2
5
  export class EapiDeviceReader {
3
6
  config;
4
7
  runner;
5
- constructor(config, runner) {
8
+ slots;
9
+ constructor(config, runner, slots) {
6
10
  this.config = config;
7
11
  this.runner = runner;
12
+ this.slots = slots;
8
13
  }
9
- runShowCommands(host, commands, outputMode, options) {
10
- return this.runner.runShowCommands(resolveEapiConnection(this.config, host), commands, outputMode, options);
14
+ async runShowCommands(host, commands, outputMode, options) {
15
+ const release = await this.slots.acquireRead(options?.signal, host.inventoryHostname);
16
+ try {
17
+ return await this.runner.runShowCommands(resolveEapiConnection(this.config, host), commands, outputMode, options);
18
+ }
19
+ finally {
20
+ release();
21
+ }
11
22
  }
12
23
  }
13
24
  //# sourceMappingURL=eosDeviceReader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"eosDeviceReader.js","sourceRoot":"","sources":["../../src/connection/eosDeviceReader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAiB/D,MAAM,OAAO,gBAAgB;IAER;IACA;IAFnB,YACmB,MAA4B,EAC5B,MAAwB;QADxB,WAAM,GAAN,MAAM,CAAsB;QAC5B,WAAM,GAAN,MAAM,CAAkB;IACxC,CAAC;IAEJ,eAAe,CACb,IAAwB,EACxB,QAAkB,EAClB,UAA0B,EAC1B,OAA+B;QAE/B,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAChC,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EACxC,QAAQ,EACR,UAAU,EACV,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"eosDeviceReader.js","sourceRoot":"","sources":["../../src/connection/eosDeviceReader.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAiB/D;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAER;IACA;IACA;IAHnB,YACmB,MAA4B,EAC5B,MAAwB,EACxB,KAAgB;QAFhB,WAAM,GAAN,MAAM,CAAsB;QAC5B,WAAM,GAAN,MAAM,CAAkB;QACxB,UAAK,GAAL,KAAK,CAAW;IAChC,CAAC;IAEJ,KAAK,CAAC,eAAe,CACnB,IAAwB,EACxB,QAAkB,EAClB,UAA0B,EAC1B,OAA+B;QAE/B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACtF,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CACtC,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EACxC,QAAQ,EACR,UAAU,EACV,OAAO,CACR,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF"}
@@ -1,6 +1,7 @@
1
1
  import type { ResolvedServerConfig } from "../config/schema.js";
2
2
  import type { InventoryModel } from "../inventory/types.js";
3
3
  import { type ReadDeviceResultBase, type ReadOperationResultEnvelope } from "../operations/readExecution.js";
4
+ import { EapiSlots } from "../operations/eapiSlots.js";
4
5
  import type { DiagnosticCapacitySnapshot, DiagnosticDeviceRunner, DiagnosticFinding, DiagnosticRequest, ResolvedDiagnosticRequest } from "./types.js";
5
6
  export interface DiagnosticDeviceResult extends ReadDeviceResultBase {
6
7
  destination: string;
@@ -10,14 +11,17 @@ export interface DiagnosticDeviceResult extends ReadDeviceResultBase {
10
11
  export type DiagnosticResult = ReadOperationResultEnvelope<DiagnosticDeviceResult> & {
11
12
  request: ResolvedDiagnosticRequest;
12
13
  };
13
- /** Owns policy, budgets, fan-out, global admission, cancellation, and result normalization. */
14
+ /** Owns policy, budgets, fan-out, cancellation, and result normalization. Admission, per device and
15
+ * server-wide, belongs to the EapiSlots it shares with read tools.
16
+ */
14
17
  export declare class DiagnosticExecutor {
15
18
  private readonly model;
16
19
  private readonly config;
17
20
  private readonly runner;
18
- private readonly concurrency;
21
+ private readonly slots;
19
22
  private readonly shutdown;
20
- constructor(model: InventoryModel, config: ResolvedServerConfig, runner: DiagnosticDeviceRunner);
23
+ /** A running server passes its shared `slots`; tests may omit it to get a private instance. */
24
+ constructor(model: InventoryModel, config: ResolvedServerConfig, runner: DiagnosticDeviceRunner, slots?: EapiSlots);
21
25
  close(): void;
22
26
  getCapacity(): DiagnosticCapacitySnapshot;
23
27
  execute(options: {