@aristanetworks/eos-mcp-server 0.8.0-beta → 0.8.1-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.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -30
- package/dist/cli.d.ts +1 -4
- package/dist/cli.js +4 -63
- package/dist/cli.js.map +1 -1
- package/dist/config/diagnostics.d.ts +10 -5
- package/dist/config/diagnostics.js +3 -2
- package/dist/config/diagnostics.js.map +1 -1
- package/dist/config/loadConfig.js +1 -5
- package/dist/config/loadConfig.js.map +1 -1
- package/dist/config/schema.d.ts +28 -14
- package/dist/diagnostics/concurrency.d.ts +7 -11
- package/dist/diagnostics/concurrency.js +38 -80
- package/dist/diagnostics/concurrency.js.map +1 -1
- package/dist/diagnostics/eapiRunner.js +7 -1
- package/dist/diagnostics/eapiRunner.js.map +1 -1
- package/dist/diagnostics/executor.d.ts +1 -2
- package/dist/diagnostics/executor.js +2 -3
- package/dist/diagnostics/executor.js.map +1 -1
- package/dist/diagnostics/types.d.ts +3 -4
- package/dist/eapi/client.js +5 -4
- package/dist/eapi/client.js.map +1 -1
- package/dist/eapi/types.d.ts +3 -0
- package/dist/eapi/types.js.map +1 -1
- package/dist/index.js +0 -10
- package/dist/index.js.map +1 -1
- package/dist/mcp/createServer.js +2 -19
- package/dist/mcp/createServer.js.map +1 -1
- package/dist/mcp/tools/ping.d.ts +0 -7
- package/dist/mcp/tools/ping.js +13 -26
- package/dist/mcp/tools/ping.js.map +1 -1
- package/dist/serverInfo/buildServerInfo.js +2 -1
- package/dist/serverInfo/buildServerInfo.js.map +1 -1
- package/dist/serverInfo/types.d.ts +1 -0
- package/docs/CHECKPOINT.md +3 -6
- package/docs/CODE_WALKTHROUGH.md +6 -11
- package/docs/DESIGN.md +3 -3
- package/docs/DIAGNOSTICS.md +18 -69
- package/docs/IMPLEMENTATION_PLAN.md +2 -2
- package/docs/adr/0002-fail-closed-diagnostic-reservations.md +2 -0
- package/docs/adr/0003-durable-diagnostic-ledger.md +2 -0
- package/docs/adr/0004-offline-operator-attested-release.md +2 -0
- package/docs/adr/0005-multi-destination-ping.md +1 -1
- package/docs/adr/0006-in-memory-timed-diagnostic-capacity.md +21 -0
- package/docs/research/eos-diagnostic-lifecycle.md +2 -0
- package/package.json +1 -1
- package/dist/commands/inspectDiagnostics.d.ts +0 -3
- package/dist/commands/inspectDiagnostics.js +0 -35
- package/dist/commands/inspectDiagnostics.js.map +0 -1
- package/dist/commands/releaseDiagnostics.d.ts +0 -9
- package/dist/commands/releaseDiagnostics.js +0 -87
- package/dist/commands/releaseDiagnostics.js.map +0 -1
- package/dist/diagnostics/journal.d.ts +0 -14
- package/dist/diagnostics/journal.js +0 -317
- package/dist/diagnostics/journal.js.map +0 -1
- package/dist/diagnostics/journalTypes.d.ts +0 -8
- package/dist/diagnostics/journalTypes.js +0 -2
- package/dist/diagnostics/journalTypes.js.map +0 -1
- package/dist/diagnostics/releaseEvidence.d.ts +0 -502
- package/dist/diagnostics/releaseEvidence.js +0 -115
- package/dist/diagnostics/releaseEvidence.js.map +0 -1
- package/dist/diagnostics/reservationSchema.d.ts +0 -49
- package/dist/diagnostics/reservationSchema.js +0 -18
- package/dist/diagnostics/reservationSchema.js.map +0 -1
- package/dist/diagnostics/statePath.d.ts +0 -4
- package/dist/diagnostics/statePath.js +0 -25
- package/dist/diagnostics/statePath.js.map +0 -1
- package/dist/utils/privateFile.d.ts +0 -3
- package/dist/utils/privateFile.js +0 -7
- package/dist/utils/privateFile.js.map +0 -1
- package/docs/examples/diagnostic-release-evidence.template.json +0 -26
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.8.1-beta
|
|
6
|
+
|
|
7
|
+
- **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.
|
|
8
|
+
- When a ping's remote completion is unknown (timeout, cancellation, lost connection, malformed or uncorrelated response), its slot is now held for `diagnostics.commandTimeoutMs` and then freed automatically instead of indefinitely; a late confirmed response frees it sooner. New work queues behind held slots within the overall deadline. Server info reports `releases_at` for each uncertain reservation. `deviceConcurrency` now limits each server process rather than an inventory.
|
|
9
|
+
- Ping requests now send EOS's native `runCmds.requestTimeout`, set to `diagnostics.commandTimeoutMs`, so the switch itself interrupts a ping that outlives its budget. On by default; set `diagnostics.nativeRequestTimeout: false` if an EOS version rejects the field. Server info reports it as `limits.diagnostics.native_request_timeout`. Verified on cEOS 4.34.3M only.
|
|
10
|
+
- Removes the `inspect-diagnostics` and `release-diagnostics` commands, fencing attestations and release audit, the `diagnostics.stateFile` setting (now rejected with guidance), the `diagnostic_capacity_uncertain` and `diagnostic_state_*` errors, and the capacity snapshot's `scope`, `storage_error_code` and `rpc_request_id` fields (`reservation_id` is the wire RPC ID). Old ledger files under `~/.local/state/eos-mcp-server/` are no longer read and can be deleted.
|
|
11
|
+
|
|
5
12
|
## 0.8.0-beta
|
|
6
13
|
|
|
7
14
|
0.7.0-beta was not published to npm, so upgrading from 0.6.1-beta picks up both this section and the 0.7.0-beta section below.
|
package/README.md
CHANGED
|
@@ -56,8 +56,6 @@ Implemented local CLI commands:
|
|
|
56
56
|
- `validate-inventory`
|
|
57
57
|
- `print-server-info`
|
|
58
58
|
- `probe`
|
|
59
|
-
- `inspect-diagnostics` (offline, read-only ledger inspection)
|
|
60
|
-
- `release-diagnostics` (offline, explicitly attested and audited operator release)
|
|
61
59
|
|
|
62
60
|
## Requirements
|
|
63
61
|
|
|
@@ -89,7 +87,7 @@ No install step is needed. `npx` downloads the package on first use and caches i
|
|
|
89
87
|
npx -y @aristanetworks/eos-mcp-server --help
|
|
90
88
|
```
|
|
91
89
|
|
|
92
|
-
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.
|
|
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`.
|
|
93
91
|
|
|
94
92
|
### Or install globally
|
|
95
93
|
|
|
@@ -151,8 +149,6 @@ maxLoggingMessagesPerRequest: 1000
|
|
|
151
149
|
maxResponseSizeBytes: 1048576
|
|
152
150
|
eapiVersion: latest
|
|
153
151
|
diagnostics:
|
|
154
|
-
# Optional: otherwise use the private, inventory-keyed XDG state directory.
|
|
155
|
-
# stateFile: ./private/diagnostics.sqlite
|
|
156
152
|
defaultPingCount: 3
|
|
157
153
|
maxPingCount: 10
|
|
158
154
|
maxProbesPerRequest: 100
|
|
@@ -162,6 +158,7 @@ diagnostics:
|
|
|
162
158
|
commandTimeoutMs: 30000
|
|
163
159
|
httpTimeoutMs: 35000
|
|
164
160
|
overallOperationTimeoutMs: 60000
|
|
161
|
+
nativeRequestTimeout: true
|
|
165
162
|
secretEnvPrefixes:
|
|
166
163
|
- EOS_MCP_
|
|
167
164
|
defaultConnection:
|
|
@@ -193,9 +190,9 @@ Supported config fields:
|
|
|
193
190
|
|
|
194
191
|
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.
|
|
195
192
|
|
|
196
|
-
`eos_ping` uses its own configurable `diagnostics` timeouts and server
|
|
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.
|
|
197
194
|
|
|
198
|
-
`actor` and `logFile` remain sanitized runtime metadata and do not enable a general tool-call audit log.
|
|
195
|
+
`actor` and `logFile` remain sanitized runtime metadata and do not enable a general tool-call audit log.
|
|
199
196
|
|
|
200
197
|
`defaultConnection.mcpPasswordEnv` is a fallback password source. A host or inherited inventory value for `mcp_password_env` or `ansible_password` overrides it. Setting both `mcp_password_env` and `ansible_password` for the same host remains invalid.
|
|
201
198
|
|
|
@@ -552,29 +549,6 @@ eos-mcp-server print-server-info --inventory inventory.yml
|
|
|
552
549
|
eos-mcp-server print-server-info --config eos-mcp-server.yml --json
|
|
553
550
|
```
|
|
554
551
|
|
|
555
|
-
### `inspect-diagnostics`
|
|
556
|
-
|
|
557
|
-
Inspect existing persisted reservations without credentials, device access, ownership takeover, or reset. `diagnostics.stateFile` can select a ledger; otherwise the same canonical inventory identity determines the default path.
|
|
558
|
-
|
|
559
|
-
```bash
|
|
560
|
-
eos-mcp-server inspect-diagnostics --config eos-mcp-server.yml --json
|
|
561
|
-
eos-mcp-server inspect-diagnostics --inventory inventory.yml --json
|
|
562
|
-
```
|
|
563
|
-
|
|
564
|
-
Recorded state does not prove remote completion. Preserve the state files on private, persistent local storage; see [Network diagnostics](docs/DIAGNOSTICS.md#offline-inspection-and-operator-recovery).
|
|
565
|
-
|
|
566
|
-
### `release-diagnostics`
|
|
567
|
-
|
|
568
|
-
Offline local-state administration only: stop the ledger owner, independently establish that running **and accepted queued** work is fenced against later execution/replay, and prepare a private JSON attestation. This is operator authority, not machine-confirmed EOS completion.
|
|
569
|
-
|
|
570
|
-
```bash
|
|
571
|
-
eos-mcp-server release-diagnostics --config eos-mcp-server.yml \
|
|
572
|
-
--reservation-id '<exact-id>' --evidence-file ./evidence.json \
|
|
573
|
-
--confirm-fenced --json
|
|
574
|
-
```
|
|
575
|
-
|
|
576
|
-
There is no wildcard or release-all operation. Audit and selected deletions commit atomically; unselected reservations remain held. See the [required workflow and intentionally invalid template](docs/DIAGNOSTICS.md#operator-release-workflow) before use. No device command, credential resolution, or evidence-reference fetch is performed. Protect the CLI and ledger owner's OS privileges; the attestation is not a cryptographic proof of human presence or fencing truth.
|
|
577
|
-
|
|
578
552
|
### `probe`
|
|
579
553
|
|
|
580
554
|
Probe a host or group target using the same logic as the MCP tool.
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CommandName = "serve" | "validate-inventory" | "print-server-info" | "probe"
|
|
1
|
+
export type CommandName = "serve" | "validate-inventory" | "print-server-info" | "probe";
|
|
2
2
|
export interface CliOptions {
|
|
3
3
|
command: CommandName;
|
|
4
4
|
explicitCommand?: boolean;
|
|
@@ -10,9 +10,6 @@ export interface CliOptions {
|
|
|
10
10
|
json?: boolean;
|
|
11
11
|
inventoryOnly?: boolean;
|
|
12
12
|
target?: string;
|
|
13
|
-
reservationIds?: string[];
|
|
14
|
-
evidenceFile?: string;
|
|
15
|
-
confirmFenced?: boolean;
|
|
16
13
|
}
|
|
17
14
|
export declare function parseCliArgs(argv: string[]): CliOptions;
|
|
18
15
|
export declare function printHelp(cli: CliOptions): void;
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppError } from "./core/errors.js";
|
|
2
2
|
import { APP_NAME, APP_VERSION } from "./core/version.js";
|
|
3
|
-
const COMMAND_NAMES = new Set(["serve", "validate-inventory", "print-server-info", "probe"
|
|
3
|
+
const COMMAND_NAMES = new Set(["serve", "validate-inventory", "print-server-info", "probe"]);
|
|
4
4
|
const OPTION_NAMES = new Set([
|
|
5
5
|
"--help",
|
|
6
6
|
"-h",
|
|
@@ -11,10 +11,7 @@ const OPTION_NAMES = new Set([
|
|
|
11
11
|
"--actor",
|
|
12
12
|
"--json",
|
|
13
13
|
"--inventory-only",
|
|
14
|
-
"--target"
|
|
15
|
-
"--reservation-id",
|
|
16
|
-
"--evidence-file",
|
|
17
|
-
"--confirm-fenced"
|
|
14
|
+
"--target"
|
|
18
15
|
]);
|
|
19
16
|
const COMMAND_OPTIONS = {
|
|
20
17
|
"serve": new Set([
|
|
@@ -28,9 +25,7 @@ const COMMAND_OPTIONS = {
|
|
|
28
25
|
]),
|
|
29
26
|
"validate-inventory": new Set(["--help", "-h", "--version", "-V", "--config", "--inventory", "--inventory-only", "--json"]),
|
|
30
27
|
"print-server-info": new Set(["--help", "-h", "--version", "-V", "--config", "--inventory", "--json"]),
|
|
31
|
-
"probe": new Set(["--help", "-h", "--version", "-V", "--config", "--inventory", "--target", "--json"])
|
|
32
|
-
"inspect-diagnostics": new Set(["--help", "-h", "--version", "-V", "--config", "--inventory", "--json"]),
|
|
33
|
-
"release-diagnostics": new Set(["--help", "-h", "--version", "-V", "--config", "--inventory", "--json", "--reservation-id", "--evidence-file", "--confirm-fenced"])
|
|
28
|
+
"probe": new Set(["--help", "-h", "--version", "-V", "--config", "--inventory", "--target", "--json"])
|
|
34
29
|
};
|
|
35
30
|
export function parseCliArgs(argv) {
|
|
36
31
|
let command = "serve";
|
|
@@ -98,32 +93,6 @@ export function parseCliArgs(argv) {
|
|
|
98
93
|
options.inventoryOnly = true;
|
|
99
94
|
index += 1;
|
|
100
95
|
break;
|
|
101
|
-
case "--reservation-id": {
|
|
102
|
-
const value = argv[index + 1];
|
|
103
|
-
if (!value || value.startsWith("-"))
|
|
104
|
-
throw new AppError("cli_missing_value", "Missing value for --reservation-id");
|
|
105
|
-
if (options.reservationIds?.includes(value))
|
|
106
|
-
throw new AppError("cli_duplicate_option", "Duplicate reservation ID");
|
|
107
|
-
(options.reservationIds ??= []).push(value);
|
|
108
|
-
index += 2;
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
case "--evidence-file": {
|
|
112
|
-
const value = argv[index + 1];
|
|
113
|
-
if (!value || value.startsWith("-"))
|
|
114
|
-
throw new AppError("cli_missing_value", "Missing value for --evidence-file");
|
|
115
|
-
if (options.evidenceFile !== undefined)
|
|
116
|
-
throw new AppError("cli_duplicate_option", "Duplicate --evidence-file");
|
|
117
|
-
options.evidenceFile = value;
|
|
118
|
-
index += 2;
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
case "--confirm-fenced":
|
|
122
|
-
if (options.confirmFenced !== undefined)
|
|
123
|
-
throw new AppError("cli_duplicate_option", "Duplicate --confirm-fenced");
|
|
124
|
-
options.confirmFenced = true;
|
|
125
|
-
index += 1;
|
|
126
|
-
break;
|
|
127
96
|
case "--target": {
|
|
128
97
|
const value = argv[index + 1];
|
|
129
98
|
if (!value) {
|
|
@@ -155,8 +124,6 @@ Commands:
|
|
|
155
124
|
validate-inventory Validate an inventory file
|
|
156
125
|
print-server-info Print server runtime/config summary
|
|
157
126
|
probe Probe device readiness for a target
|
|
158
|
-
inspect-diagnostics Inspect persisted reservations and release audit (read-only)
|
|
159
|
-
release-diagnostics Offline, audited operator-attested reservation release
|
|
160
127
|
|
|
161
128
|
Global options:
|
|
162
129
|
--config <path> Path to server config YAML file
|
|
@@ -205,37 +172,11 @@ Options:
|
|
|
205
172
|
--target <name> Host or group name to probe (required)
|
|
206
173
|
--json Output as JSON
|
|
207
174
|
-h, --help Show this help message`;
|
|
208
|
-
const HELP_INSPECT_DIAGNOSTICS = `Usage: ${APP_NAME} inspect-diagnostics [options]
|
|
209
|
-
|
|
210
|
-
Read the diagnostic ledger without device access, ownership takeover, or reset.
|
|
211
|
-
Recorded state is not proof of remote completion.
|
|
212
|
-
|
|
213
|
-
Options:
|
|
214
|
-
--config <path> Settings file, including optional diagnostics.stateFile
|
|
215
|
-
--inventory <path> Inventory identity used for the default ledger path
|
|
216
|
-
--json Output persisted reservations as JSON
|
|
217
|
-
-h, --help Show this help message`;
|
|
218
|
-
const HELP_RELEASE_DIAGNOSTICS = `Usage: ${APP_NAME} release-diagnostics [options]
|
|
219
|
-
|
|
220
|
-
Release only explicit reservations after independently verified fencing.
|
|
221
|
-
Requires exclusive offline ledger ownership. No device commands or MCP reset.
|
|
222
|
-
The evidence is operator authority, not machine-confirmed EOS completion.
|
|
223
|
-
|
|
224
|
-
Options:
|
|
225
|
-
--config <path> Settings file selecting the existing ledger
|
|
226
|
-
--inventory <path> Expected canonical inventory identity
|
|
227
|
-
--reservation-id <id> Exact reservation to release (repeat for a batch)
|
|
228
|
-
--evidence-file <path> Private UTF-8 JSON fencing attestation (max 65536 bytes)
|
|
229
|
-
--confirm-fenced Confirm running, queued and replayable work is fenced
|
|
230
|
-
--json Output committed release metadata or error as JSON
|
|
231
|
-
-h, --help Show this help message`;
|
|
232
175
|
const COMMAND_HELP = {
|
|
233
176
|
"serve": HELP_SERVE,
|
|
234
177
|
"validate-inventory": HELP_VALIDATE_INVENTORY,
|
|
235
178
|
"print-server-info": HELP_PRINT_SERVER_INFO,
|
|
236
|
-
"probe": HELP_PROBE
|
|
237
|
-
"inspect-diagnostics": HELP_INSPECT_DIAGNOSTICS,
|
|
238
|
-
"release-diagnostics": HELP_RELEASE_DIAGNOSTICS
|
|
179
|
+
"probe": HELP_PROBE
|
|
239
180
|
};
|
|
240
181
|
export function printHelp(cli) {
|
|
241
182
|
const helpText = cli.explicitCommand ? COMMAND_HELP[cli.command] : HELP_TOP;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources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,YAAY,GAAgC;IAChD,OAAO,EAAE,UAAU;IACnB,oBAAoB,EAAE,uBAAuB;IAC7C,mBAAmB,EAAE,sBAAsB;IAC3C,OAAO,EAAE,UAAU;CACpB,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,GAAe;IACvC,MAAM,QAAQ,GAAG,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
-
stateFile: z.ZodOptional<z.
|
|
3
|
+
stateFile: z.ZodOptional<z.ZodNever>;
|
|
4
4
|
defaultPingCount: z.ZodDefault<z.ZodNumber>;
|
|
5
5
|
maxPingCount: z.ZodDefault<z.ZodNumber>;
|
|
6
6
|
maxProbesPerRequest: z.ZodDefault<z.ZodNumber>;
|
|
@@ -10,6 +10,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
10
10
|
commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
11
11
|
httpTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
12
12
|
overallOperationTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
nativeRequestTimeout: z.ZodDefault<z.ZodBoolean>;
|
|
13
14
|
}, "strict", z.ZodTypeAny, {
|
|
14
15
|
defaultPingCount: number;
|
|
15
16
|
maxPingCount: number;
|
|
@@ -20,9 +21,10 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
20
21
|
commandTimeoutMs: number;
|
|
21
22
|
httpTimeoutMs: number;
|
|
22
23
|
overallOperationTimeoutMs: number;
|
|
23
|
-
|
|
24
|
+
nativeRequestTimeout: boolean;
|
|
25
|
+
stateFile?: undefined;
|
|
24
26
|
}, {
|
|
25
|
-
stateFile?:
|
|
27
|
+
stateFile?: undefined;
|
|
26
28
|
defaultPingCount?: number | undefined;
|
|
27
29
|
maxPingCount?: number | undefined;
|
|
28
30
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -32,6 +34,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
32
34
|
commandTimeoutMs?: number | undefined;
|
|
33
35
|
httpTimeoutMs?: number | undefined;
|
|
34
36
|
overallOperationTimeoutMs?: number | undefined;
|
|
37
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
35
38
|
}>, {
|
|
36
39
|
defaultPingCount: number;
|
|
37
40
|
maxPingCount: number;
|
|
@@ -42,9 +45,10 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
42
45
|
commandTimeoutMs: number;
|
|
43
46
|
httpTimeoutMs: number;
|
|
44
47
|
overallOperationTimeoutMs: number;
|
|
45
|
-
|
|
48
|
+
nativeRequestTimeout: boolean;
|
|
49
|
+
stateFile?: undefined;
|
|
46
50
|
}, {
|
|
47
|
-
stateFile?:
|
|
51
|
+
stateFile?: undefined;
|
|
48
52
|
defaultPingCount?: number | undefined;
|
|
49
53
|
maxPingCount?: number | undefined;
|
|
50
54
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -54,6 +58,7 @@ export declare const diagnosticsConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
54
58
|
commandTimeoutMs?: number | undefined;
|
|
55
59
|
httpTimeoutMs?: number | undefined;
|
|
56
60
|
overallOperationTimeoutMs?: number | undefined;
|
|
61
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
57
62
|
}>;
|
|
58
63
|
/** Conservative bound: finite probes, fixed 1s spacing, reply waits, and scheduling margin. */
|
|
59
64
|
export declare function pingExecutionBoundMs(count: number, replyTimeoutMs: number): number;
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
const MAX_TIMER_MS = 2_147_483_647;
|
|
4
4
|
const positiveInteger = z.number().int().positive().max(MAX_TIMER_MS);
|
|
5
5
|
export const diagnosticsConfigSchema = z.object({
|
|
6
|
-
stateFile: z.
|
|
6
|
+
stateFile: z.never({ message: "Removed: diagnostic capacity is now held in memory (ADR 0006); delete this setting" }).optional(),
|
|
7
7
|
defaultPingCount: positiveInteger.default(3),
|
|
8
8
|
maxPingCount: positiveInteger.default(10),
|
|
9
9
|
maxProbesPerRequest: positiveInteger.default(100),
|
|
@@ -12,7 +12,8 @@ export const diagnosticsConfigSchema = z.object({
|
|
|
12
12
|
pingReplyTimeoutMs: positiveInteger.multipleOf(1000).default(1000),
|
|
13
13
|
commandTimeoutMs: positiveInteger.default(30_000),
|
|
14
14
|
httpTimeoutMs: positiveInteger.default(35_000),
|
|
15
|
-
overallOperationTimeoutMs: positiveInteger.default(60_000)
|
|
15
|
+
overallOperationTimeoutMs: positiveInteger.default(60_000),
|
|
16
|
+
nativeRequestTimeout: z.boolean().default(true)
|
|
16
17
|
}).strict().superRefine((config, context) => {
|
|
17
18
|
const invalid = (path, message) => {
|
|
18
19
|
context.addIssue({ code: z.ZodIssueCode.custom, path: [path], message });
|
|
@@ -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;IA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EAAE,OAAe,EAAQ,EAAE;QACtD,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC,CAAC;IACF,IAAI,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;QAClD,OAAO,CAAC,kBAAkB,EAAE,8BAA8B,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC;QACrD,OAAO,CAAC,cAAc,EAAE,qCAAqC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,oBAAoB,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,kBAAkB,CAAC,GAAG,MAAM,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"}
|
|
@@ -41,11 +41,7 @@ export async function loadServerConfig(options) {
|
|
|
41
41
|
if (options.actor !== undefined) {
|
|
42
42
|
merged.actor = options.actor;
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
if (config.diagnostics.stateFile !== undefined) {
|
|
46
|
-
config.diagnostics.stateFile = resolveMaybePath(config.diagnostics.stateFile, resolvedConfigPath) ?? config.diagnostics.stateFile;
|
|
47
|
-
}
|
|
48
|
-
return config;
|
|
44
|
+
return parseConfigSchema(() => resolvedServerConfigSchema.parse(merged), "config_resolved_invalid");
|
|
49
45
|
}
|
|
50
46
|
async function readConfigFile(configPath) {
|
|
51
47
|
try {
|
|
@@ -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,CAAC;IACtC,IAAI,kBAAsC,CAAC;IAE3C,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,kBAAkB,GAAG,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC5D,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,kBAAkB,CAAC,CAAC;QACtD,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvF,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,QAAQ,CAAC,qBAAqB,EAAE,+BAA+B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,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CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;IACnC,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const serverConfigFileSchema: z.ZodObject<{
|
|
3
3
|
version: z.ZodOptional<z.ZodLiteral<1>>;
|
|
4
4
|
diagnostics: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
5
|
-
stateFile: z.ZodOptional<z.
|
|
5
|
+
stateFile: z.ZodOptional<z.ZodNever>;
|
|
6
6
|
defaultPingCount: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
maxPingCount: z.ZodDefault<z.ZodNumber>;
|
|
8
8
|
maxProbesPerRequest: z.ZodDefault<z.ZodNumber>;
|
|
@@ -12,6 +12,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
12
12
|
commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
13
13
|
httpTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
14
14
|
overallOperationTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
nativeRequestTimeout: z.ZodDefault<z.ZodBoolean>;
|
|
15
16
|
}, "strict", z.ZodTypeAny, {
|
|
16
17
|
defaultPingCount: number;
|
|
17
18
|
maxPingCount: number;
|
|
@@ -22,9 +23,10 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
22
23
|
commandTimeoutMs: number;
|
|
23
24
|
httpTimeoutMs: number;
|
|
24
25
|
overallOperationTimeoutMs: number;
|
|
25
|
-
|
|
26
|
+
nativeRequestTimeout: boolean;
|
|
27
|
+
stateFile?: undefined;
|
|
26
28
|
}, {
|
|
27
|
-
stateFile?:
|
|
29
|
+
stateFile?: undefined;
|
|
28
30
|
defaultPingCount?: number | undefined;
|
|
29
31
|
maxPingCount?: number | undefined;
|
|
30
32
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -34,6 +36,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
34
36
|
commandTimeoutMs?: number | undefined;
|
|
35
37
|
httpTimeoutMs?: number | undefined;
|
|
36
38
|
overallOperationTimeoutMs?: number | undefined;
|
|
39
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
37
40
|
}>, {
|
|
38
41
|
defaultPingCount: number;
|
|
39
42
|
maxPingCount: number;
|
|
@@ -44,9 +47,10 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
44
47
|
commandTimeoutMs: number;
|
|
45
48
|
httpTimeoutMs: number;
|
|
46
49
|
overallOperationTimeoutMs: number;
|
|
47
|
-
|
|
50
|
+
nativeRequestTimeout: boolean;
|
|
51
|
+
stateFile?: undefined;
|
|
48
52
|
}, {
|
|
49
|
-
stateFile?:
|
|
53
|
+
stateFile?: undefined;
|
|
50
54
|
defaultPingCount?: number | undefined;
|
|
51
55
|
maxPingCount?: number | undefined;
|
|
52
56
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -56,6 +60,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
56
60
|
commandTimeoutMs?: number | undefined;
|
|
57
61
|
httpTimeoutMs?: number | undefined;
|
|
58
62
|
overallOperationTimeoutMs?: number | undefined;
|
|
63
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
59
64
|
}>>;
|
|
60
65
|
inventory: z.ZodOptional<z.ZodString>;
|
|
61
66
|
actor: z.ZodOptional<z.ZodString>;
|
|
@@ -100,7 +105,8 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
100
105
|
commandTimeoutMs: number;
|
|
101
106
|
httpTimeoutMs: number;
|
|
102
107
|
overallOperationTimeoutMs: number;
|
|
103
|
-
|
|
108
|
+
nativeRequestTimeout: boolean;
|
|
109
|
+
stateFile?: undefined;
|
|
104
110
|
} | undefined;
|
|
105
111
|
inventory?: string | undefined;
|
|
106
112
|
actor?: string | undefined;
|
|
@@ -124,7 +130,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
124
130
|
overallOperationTimeoutMs?: number | undefined;
|
|
125
131
|
version?: 1 | undefined;
|
|
126
132
|
diagnostics?: {
|
|
127
|
-
stateFile?:
|
|
133
|
+
stateFile?: undefined;
|
|
128
134
|
defaultPingCount?: number | undefined;
|
|
129
135
|
maxPingCount?: number | undefined;
|
|
130
136
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -134,6 +140,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
134
140
|
commandTimeoutMs?: number | undefined;
|
|
135
141
|
httpTimeoutMs?: number | undefined;
|
|
136
142
|
overallOperationTimeoutMs?: number | undefined;
|
|
143
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
137
144
|
} | undefined;
|
|
138
145
|
inventory?: string | undefined;
|
|
139
146
|
actor?: string | undefined;
|
|
@@ -156,7 +163,7 @@ export declare const serverConfigFileSchema: z.ZodObject<{
|
|
|
156
163
|
export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
157
164
|
configPath: z.ZodOptional<z.ZodString>;
|
|
158
165
|
diagnostics: z.ZodDefault<z.ZodEffects<z.ZodObject<{
|
|
159
|
-
stateFile: z.ZodOptional<z.
|
|
166
|
+
stateFile: z.ZodOptional<z.ZodNever>;
|
|
160
167
|
defaultPingCount: z.ZodDefault<z.ZodNumber>;
|
|
161
168
|
maxPingCount: z.ZodDefault<z.ZodNumber>;
|
|
162
169
|
maxProbesPerRequest: z.ZodDefault<z.ZodNumber>;
|
|
@@ -166,6 +173,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
166
173
|
commandTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
167
174
|
httpTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
168
175
|
overallOperationTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
176
|
+
nativeRequestTimeout: z.ZodDefault<z.ZodBoolean>;
|
|
169
177
|
}, "strict", z.ZodTypeAny, {
|
|
170
178
|
defaultPingCount: number;
|
|
171
179
|
maxPingCount: number;
|
|
@@ -176,9 +184,10 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
176
184
|
commandTimeoutMs: number;
|
|
177
185
|
httpTimeoutMs: number;
|
|
178
186
|
overallOperationTimeoutMs: number;
|
|
179
|
-
|
|
187
|
+
nativeRequestTimeout: boolean;
|
|
188
|
+
stateFile?: undefined;
|
|
180
189
|
}, {
|
|
181
|
-
stateFile?:
|
|
190
|
+
stateFile?: undefined;
|
|
182
191
|
defaultPingCount?: number | undefined;
|
|
183
192
|
maxPingCount?: number | undefined;
|
|
184
193
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -188,6 +197,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
188
197
|
commandTimeoutMs?: number | undefined;
|
|
189
198
|
httpTimeoutMs?: number | undefined;
|
|
190
199
|
overallOperationTimeoutMs?: number | undefined;
|
|
200
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
191
201
|
}>, {
|
|
192
202
|
defaultPingCount: number;
|
|
193
203
|
maxPingCount: number;
|
|
@@ -198,9 +208,10 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
198
208
|
commandTimeoutMs: number;
|
|
199
209
|
httpTimeoutMs: number;
|
|
200
210
|
overallOperationTimeoutMs: number;
|
|
201
|
-
|
|
211
|
+
nativeRequestTimeout: boolean;
|
|
212
|
+
stateFile?: undefined;
|
|
202
213
|
}, {
|
|
203
|
-
stateFile?:
|
|
214
|
+
stateFile?: undefined;
|
|
204
215
|
defaultPingCount?: number | undefined;
|
|
205
216
|
maxPingCount?: number | undefined;
|
|
206
217
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -210,6 +221,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
210
221
|
commandTimeoutMs?: number | undefined;
|
|
211
222
|
httpTimeoutMs?: number | undefined;
|
|
212
223
|
overallOperationTimeoutMs?: number | undefined;
|
|
224
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
213
225
|
}>>;
|
|
214
226
|
inventoryPath: z.ZodOptional<z.ZodString>;
|
|
215
227
|
actor: z.ZodOptional<z.ZodString>;
|
|
@@ -252,7 +264,8 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
252
264
|
commandTimeoutMs: number;
|
|
253
265
|
httpTimeoutMs: number;
|
|
254
266
|
overallOperationTimeoutMs: number;
|
|
255
|
-
|
|
267
|
+
nativeRequestTimeout: boolean;
|
|
268
|
+
stateFile?: undefined;
|
|
256
269
|
};
|
|
257
270
|
readTimeoutMs: number;
|
|
258
271
|
maxReadTargets: number;
|
|
@@ -277,7 +290,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
277
290
|
deviceConcurrency?: number | undefined;
|
|
278
291
|
overallOperationTimeoutMs?: number | undefined;
|
|
279
292
|
diagnostics?: {
|
|
280
|
-
stateFile?:
|
|
293
|
+
stateFile?: undefined;
|
|
281
294
|
defaultPingCount?: number | undefined;
|
|
282
295
|
maxPingCount?: number | undefined;
|
|
283
296
|
maxProbesPerRequest?: number | undefined;
|
|
@@ -287,6 +300,7 @@ export declare const resolvedServerConfigSchema: z.ZodObject<{
|
|
|
287
300
|
commandTimeoutMs?: number | undefined;
|
|
288
301
|
httpTimeoutMs?: number | undefined;
|
|
289
302
|
overallOperationTimeoutMs?: number | undefined;
|
|
303
|
+
nativeRequestTimeout?: boolean | undefined;
|
|
290
304
|
} | undefined;
|
|
291
305
|
actor?: string | undefined;
|
|
292
306
|
logFile?: string | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DiagnosticCapacitySnapshot, DiagnosticRequest } from "./types.js";
|
|
2
|
-
import type { DiagnosticJournal } from "./journalTypes.js";
|
|
3
2
|
interface DiagnosticReservationIntent {
|
|
4
3
|
inventoryHostname: string;
|
|
5
4
|
diagnostic: DiagnosticRequest["kind"];
|
|
@@ -9,25 +8,22 @@ export interface DiagnosticReservation {
|
|
|
9
8
|
complete(): void;
|
|
10
9
|
markUncertain(reasonCode: string): void;
|
|
11
10
|
}
|
|
12
|
-
/** One instance per server
|
|
11
|
+
/** One instance per server process. A slot with unknown remote completion stays held for the
|
|
12
|
+
* execution budget, then frees itself; a late confirmed response frees it sooner (ADR 0006).
|
|
13
|
+
*/
|
|
13
14
|
export declare class DiagnosticConcurrency {
|
|
14
15
|
private readonly limit;
|
|
15
|
-
private readonly
|
|
16
|
+
private readonly uncertainHoldMs;
|
|
17
|
+
/** Held slots; an uncertain slot carries the timer that frees it. */
|
|
16
18
|
private readonly reservations;
|
|
17
19
|
private readonly waiting;
|
|
18
|
-
private storageError;
|
|
19
20
|
private closed;
|
|
20
|
-
constructor(limit: number,
|
|
21
|
+
constructor(limit: number, uncertainHoldMs: number);
|
|
21
22
|
close(): void;
|
|
22
23
|
snapshot(): DiagnosticCapacitySnapshot;
|
|
23
|
-
assertUsableCapacity(): void;
|
|
24
24
|
acquire(signal: AbortSignal, intent: DiagnosticReservationIntent): Promise<DiagnosticReservation>;
|
|
25
25
|
private reserve;
|
|
26
|
-
private
|
|
26
|
+
private free;
|
|
27
27
|
private markUncertain;
|
|
28
|
-
private isUncertainExhausted;
|
|
29
|
-
private failStorage;
|
|
30
|
-
private rejectWaiters;
|
|
31
|
-
private capacityError;
|
|
32
28
|
}
|
|
33
29
|
export {};
|