@calltelemetry/ct-lab-mcp 0.8.70 → 0.8.71
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/README.md +3 -0
- package/dist/src/proxmox/mock.d.ts.map +1 -1
- package/dist/src/proxmox/mock.js +28 -0
- package/dist/src/proxmox/mock.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +1 -0
- package/dist/src/server.js.map +1 -1
- package/dist/src/tools/claimed-import-qcow.d.ts +1 -1
- package/dist/src/tools/claimed-import-qcow.d.ts.map +1 -1
- package/dist/src/tools/claimed-import-qcow.js +11 -1
- package/dist/src/tools/claimed-import-qcow.js.map +1 -1
- package/dist/src/tools/cube-provision.d.ts +11 -0
- package/dist/src/tools/cube-provision.d.ts.map +1 -1
- package/dist/src/tools/cube-provision.js +12 -3
- package/dist/src/tools/cube-provision.js.map +1 -1
- package/dist/src/tools/host-migrate-vm.d.ts.map +1 -1
- package/dist/src/tools/host-migrate-vm.js +10 -1
- package/dist/src/tools/host-migrate-vm.js.map +1 -1
- package/dist/src/tools/import-qcow.d.ts +1 -1
- package/dist/src/tools/import-qcow.d.ts.map +1 -1
- package/dist/src/tools/import-qcow.js +13 -3
- package/dist/src/tools/import-qcow.js.map +1 -1
- package/dist/src/tools/index.js +4 -4
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/provision-tools.d.ts.map +1 -1
- package/dist/src/tools/provision-tools.js +36 -2
- package/dist/src/tools/provision-tools.js.map +1 -1
- package/dist/src/tools/quick-provision.d.ts +2 -0
- package/dist/src/tools/quick-provision.d.ts.map +1 -1
- package/dist/src/tools/quick-provision.js +15 -1
- package/dist/src/tools/quick-provision.js.map +1 -1
- package/dist/src/tools/sandbox-tools.d.ts.map +1 -1
- package/dist/src/tools/sandbox-tools.js +11 -1
- package/dist/src/tools/sandbox-tools.js.map +1 -1
- package/dist/src/tools/storage-tools.d.ts +19 -0
- package/dist/src/tools/storage-tools.d.ts.map +1 -1
- package/dist/src/tools/storage-tools.js +15 -0
- package/dist/src/tools/storage-tools.js.map +1 -1
- package/dist/src/tools/thin-storage-policy.d.ts +99 -0
- package/dist/src/tools/thin-storage-policy.d.ts.map +1 -0
- package/dist/src/tools/thin-storage-policy.js +236 -0
- package/dist/src/tools/thin-storage-policy.js.map +1 -0
- package/dist/src/tools/vm-action.d.ts +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thin-only guest disk policy (REL-1588, operator decision 2026-10-08:
|
|
3
|
+
* "Never thick disks").
|
|
4
|
+
*
|
|
5
|
+
* Every guest disk this server creates, clones or imports on Proxmox must live
|
|
6
|
+
* on thin-provisioned storage: `lvmthin` always, `zfspool` only when the pool
|
|
7
|
+
* is proven `sparse`. Anything else (plain `lvm`, `dir`, `nfs`, `iscsi`,
|
|
8
|
+
* `cifs`, `rbd`, an unknown or undeterminable type) is REFUSED with the stable
|
|
9
|
+
* code THICK_STORAGE_REFUSED before the mutating canonical call is made.
|
|
10
|
+
*
|
|
11
|
+
* Fail closed: when the storage type cannot be proven (host unreachable,
|
|
12
|
+
* malformed receipt, pool missing from the host, ...) the request is refused
|
|
13
|
+
* with the same code and a message that says the type could not be determined.
|
|
14
|
+
*
|
|
15
|
+
* Scope note: this module owns the TypeScript layer only. The canonical shell
|
|
16
|
+
* transports in ct-meta carry their own independent guard
|
|
17
|
+
* (`proxmox-thin-storage.sh`); this layer refuses earlier and with a typed
|
|
18
|
+
* error, it does not replace that one. Nothing here builds Proxmox disk
|
|
19
|
+
* options, so discard=on is owned by the transports/templates, not by this
|
|
20
|
+
* server (see docs in README).
|
|
21
|
+
*
|
|
22
|
+
* Storage that is NOT a guest-disk target is deliberately out of scope:
|
|
23
|
+
* `importStorage` (the dir storage that holds the downloaded image before it is
|
|
24
|
+
* imported) and ESXi datastores.
|
|
25
|
+
*/
|
|
26
|
+
import { createToolErrorResult } from "../types/mcp.js";
|
|
27
|
+
import { parseCanonicalHostCapacity } from "./storage-tools.js";
|
|
28
|
+
import { PROXMOX_SLOT_POLICIES, } from "./proxmox-host-policy.js";
|
|
29
|
+
/** Stable, machine-matchable error code for every thin-only refusal. */
|
|
30
|
+
export const THICK_STORAGE_REFUSED = "THICK_STORAGE_REFUSED";
|
|
31
|
+
/**
|
|
32
|
+
* The thin pool on every Proxmox lab host (`local-lvm`, type `lvmthin`). This is
|
|
33
|
+
* also the canonical CLI's default VM-disk storage, so an omitted `storage` is
|
|
34
|
+
* enforced against this pool rather than skipped.
|
|
35
|
+
*/
|
|
36
|
+
export const DEFAULT_THIN_STORAGE = "local-lvm";
|
|
37
|
+
const CANONICAL_PROXMOX_HOSTS = ["proxmox-lab", "proxmox-minis-lab"];
|
|
38
|
+
export class ThickStorageRefusedError extends Error {
|
|
39
|
+
code = THICK_STORAGE_REFUSED;
|
|
40
|
+
details;
|
|
41
|
+
constructor(message, details) {
|
|
42
|
+
super(message);
|
|
43
|
+
this.name = "ThickStorageRefusedError";
|
|
44
|
+
this.details = details;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** True when a Proxmox storage of this type provides thin guest disks. */
|
|
48
|
+
export function isThinGuestDiskStorage(storageType, options = {}) {
|
|
49
|
+
const type = (storageType ?? "").trim().toLowerCase();
|
|
50
|
+
if (type === "lvmthin")
|
|
51
|
+
return true;
|
|
52
|
+
// ZFS zvols are thin only when the pool is configured sparse.
|
|
53
|
+
if (type === "zfspool")
|
|
54
|
+
return options.sparse === true;
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Pure policy check. Throws ThickStorageRefusedError (code THICK_STORAGE_REFUSED)
|
|
59
|
+
* unless the storage type is thin. An undefined/blank/"unknown" type means the
|
|
60
|
+
* type could not be determined and is refused as such (fail closed).
|
|
61
|
+
*/
|
|
62
|
+
export function assertThinStorage(storageType, options) {
|
|
63
|
+
const thinPool = options.thinPool ?? DEFAULT_THIN_STORAGE;
|
|
64
|
+
const type = (storageType ?? "").trim();
|
|
65
|
+
const where = options.hostAssetId ? ` on host '${options.hostAssetId}'` : "";
|
|
66
|
+
const base = {
|
|
67
|
+
storage: options.storage,
|
|
68
|
+
thinPool,
|
|
69
|
+
...(options.hostAssetId ? { hostAssetId: options.hostAssetId } : {}),
|
|
70
|
+
};
|
|
71
|
+
if (!type || type.toLowerCase() === "unknown") {
|
|
72
|
+
throw new ThickStorageRefusedError(`${THICK_STORAGE_REFUSED}: the type of storage '${options.storage}'${where} could not be determined, so it cannot be proven thin. `
|
|
73
|
+
+ `Guest disks must be thin-provisioned (lvmthin, or zfspool with sparse=1) with discard=on; refusing fail-closed. `
|
|
74
|
+
+ `Use thin pool '${thinPool}'. No Proxmox change was made.`, { ...base, reason: "storage_type_undeterminable" });
|
|
75
|
+
}
|
|
76
|
+
if (isThinGuestDiskStorage(type, { sparse: options.sparse }))
|
|
77
|
+
return;
|
|
78
|
+
const detail = type.toLowerCase() === "zfspool"
|
|
79
|
+
? "zfspool is thin only with sparse=1, which was not proven"
|
|
80
|
+
: "not thin-provisioned";
|
|
81
|
+
throw new ThickStorageRefusedError(`${THICK_STORAGE_REFUSED}: storage '${options.storage}'${where} has type '${type}' (${detail}). `
|
|
82
|
+
+ `Guest disks must be thin-provisioned (lvmthin, or zfspool with sparse=1) with discard=on; never thick. `
|
|
83
|
+
+ `Use thin pool '${thinPool}' instead. No Proxmox change was made.`, { ...base, reason: "thick_storage_type", storageType: type });
|
|
84
|
+
}
|
|
85
|
+
function refusalResult(error, operation) {
|
|
86
|
+
return createToolErrorResult(error.code, error.message, { operation, ...error.details });
|
|
87
|
+
}
|
|
88
|
+
function undeterminable(storage, hostAssetId, why, thinPool) {
|
|
89
|
+
const where = hostAssetId ? ` on host '${hostAssetId}'` : "";
|
|
90
|
+
return new ThickStorageRefusedError(`${THICK_STORAGE_REFUSED}: the type of storage '${storage}'${where} could not be determined (${why}), so it cannot be proven thin. `
|
|
91
|
+
+ `Guest disks must be thin-provisioned (lvmthin, or zfspool with sparse=1) with discard=on; refusing fail-closed. `
|
|
92
|
+
+ `Use thin pool '${thinPool}'. No Proxmox change was made.`, {
|
|
93
|
+
reason: "storage_type_undeterminable",
|
|
94
|
+
storage,
|
|
95
|
+
thinPool,
|
|
96
|
+
...(hostAssetId ? { hostAssetId } : {}),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function canonicalHostAlias(hostAssetId) {
|
|
100
|
+
return hostAssetId === "proxmox-mini" ? "proxmox-minis-lab" : hostAssetId;
|
|
101
|
+
}
|
|
102
|
+
function defaultThinPoolFor(hostAssetId) {
|
|
103
|
+
return PROXMOX_SLOT_POLICIES[hostAssetId]?.storage ?? DEFAULT_THIN_STORAGE;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Canonical-mode guard. Resolves the storage type through the same
|
|
107
|
+
* `host capacity` read path as list_storage (no new credentials) and refuses
|
|
108
|
+
* thick or undeterminable storage. Returns an error result to hand straight
|
|
109
|
+
* back to the caller, or undefined when the request may proceed. It must be
|
|
110
|
+
* called BEFORE the mutating canonical CLI call.
|
|
111
|
+
*/
|
|
112
|
+
export async function guardCanonicalThinStorage(bridge, request) {
|
|
113
|
+
const requestedHost = request.hostAssetId?.trim();
|
|
114
|
+
const hosts = !requestedHost || requestedHost === "auto"
|
|
115
|
+
? [...CANONICAL_PROXMOX_HOSTS]
|
|
116
|
+
: [canonicalHostAlias(requestedHost)];
|
|
117
|
+
const auto = hosts.length > 1;
|
|
118
|
+
let verified = 0;
|
|
119
|
+
let missingOn;
|
|
120
|
+
try {
|
|
121
|
+
for (const hostAssetId of hosts) {
|
|
122
|
+
// An omitted storage means the canonical CLI default pool: still enforce it.
|
|
123
|
+
const storage = request.storage?.trim() || defaultThinPoolFor(hostAssetId);
|
|
124
|
+
const fallbackThin = defaultThinPoolFor(hostAssetId);
|
|
125
|
+
if (!bridge) {
|
|
126
|
+
throw undeterminable(storage, hostAssetId, "the canonical lab bridge is not available", fallbackThin);
|
|
127
|
+
}
|
|
128
|
+
let result;
|
|
129
|
+
try {
|
|
130
|
+
result = await bridge.run(["host", "capacity", "--asset-id", hostAssetId]);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
throw undeterminable(storage, hostAssetId, `host capacity failed: ${error instanceof Error ? error.message : String(error)}`, fallbackThin);
|
|
134
|
+
}
|
|
135
|
+
if (result.timedOut || result.exitCode !== 0) {
|
|
136
|
+
throw undeterminable(storage, hostAssetId, result.timedOut ? "host capacity timed out" : `host capacity exited ${result.exitCode}`, fallbackThin);
|
|
137
|
+
}
|
|
138
|
+
const capacity = parseCanonicalHostCapacity(result.stdout, hostAssetId);
|
|
139
|
+
if (!capacity) {
|
|
140
|
+
throw undeterminable(storage, hostAssetId, "host capacity returned an invalid receipt", fallbackThin);
|
|
141
|
+
}
|
|
142
|
+
// ESXi datastores are outside the Proxmox thin-only decision.
|
|
143
|
+
if (capacity.hypervisor !== "proxmox")
|
|
144
|
+
continue;
|
|
145
|
+
const thinPool = capacity.pools.find((pool) => pool.type.toLowerCase() === "lvmthin" && pool.content?.split(",").includes("images"))?.storage ?? fallbackThin;
|
|
146
|
+
const pool = capacity.pools.find((candidate) => candidate.storage === storage);
|
|
147
|
+
if (!pool) {
|
|
148
|
+
const known = capacity.pools.map((p) => p.storage).join(", ") || "none";
|
|
149
|
+
// With host=auto the canonical CLI cannot place on a host that lacks the
|
|
150
|
+
// pool, so only an exact host (or every host lacking it) is undeterminable.
|
|
151
|
+
if (!auto) {
|
|
152
|
+
throw undeterminable(storage, hostAssetId, `the pool is not defined on that host; known pools: ${known}`, thinPool);
|
|
153
|
+
}
|
|
154
|
+
missingOn ??= { storage, hostAssetId, known, thinPool };
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
assertThinStorage(pool.type, { storage, hostAssetId, thinPool, sparse: pool.sparse });
|
|
158
|
+
verified += 1;
|
|
159
|
+
}
|
|
160
|
+
if (auto && verified === 0 && missingOn) {
|
|
161
|
+
throw undeterminable(missingOn.storage, undefined, `the pool is not defined on any canonical Proxmox host; known pools on ${missingOn.hostAssetId}: ${missingOn.known}`, missingOn.thinPool);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
if (error instanceof ThickStorageRefusedError)
|
|
166
|
+
return refusalResult(error, request.operation);
|
|
167
|
+
throw error;
|
|
168
|
+
}
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Legacy (non-canonical) clone guard. A clone lands on the explicit `storage`
|
|
173
|
+
* when one is given and otherwise on the storage that holds the source
|
|
174
|
+
* template's disks, so both are resolved against the driver's own storage list.
|
|
175
|
+
* ESXi drivers are out of scope. Missing driver capability fails closed.
|
|
176
|
+
*/
|
|
177
|
+
export async function guardLegacyCloneThinStorage(plan, request) {
|
|
178
|
+
const { driver } = plan;
|
|
179
|
+
if (driver.hypervisorType !== "proxmox")
|
|
180
|
+
return undefined;
|
|
181
|
+
const hostAssetId = plan.host;
|
|
182
|
+
const fallbackThin = defaultThinPoolFor(canonicalHostAlias(hostAssetId));
|
|
183
|
+
try {
|
|
184
|
+
let targets;
|
|
185
|
+
if (request.storage?.trim()) {
|
|
186
|
+
targets = [request.storage.trim()];
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
if (!driver.getVmStorage) {
|
|
190
|
+
throw undeterminable(String(plan.source), hostAssetId, "the clone source's disks cannot be read", fallbackThin);
|
|
191
|
+
}
|
|
192
|
+
let report;
|
|
193
|
+
try {
|
|
194
|
+
report = await driver.getVmStorage(plan.source);
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
throw undeterminable(String(plan.source), hostAssetId, `reading the clone source's disks failed: ${error instanceof Error ? error.message : String(error)}`, fallbackThin);
|
|
198
|
+
}
|
|
199
|
+
targets = [...new Set(report.disks.map((disk) => disk.storage))];
|
|
200
|
+
if (targets.length === 0) {
|
|
201
|
+
throw undeterminable(String(plan.source), hostAssetId, "the clone source reports no disks", fallbackThin);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (!driver.listStorage) {
|
|
205
|
+
throw undeterminable(targets[0], hostAssetId, "the host cannot list its storage pools", fallbackThin);
|
|
206
|
+
}
|
|
207
|
+
let pools;
|
|
208
|
+
try {
|
|
209
|
+
pools = await driver.listStorage();
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
throw undeterminable(targets[0], hostAssetId, `listing storage pools failed: ${error instanceof Error ? error.message : String(error)}`, fallbackThin);
|
|
213
|
+
}
|
|
214
|
+
const thinPool = pools.find((pool) => pool.type.toLowerCase() === "lvmthin" && pool.content?.split(",").includes("images"))
|
|
215
|
+
?.storage ?? fallbackThin;
|
|
216
|
+
for (const storage of targets) {
|
|
217
|
+
const pool = pools.find((candidate) => candidate.storage === storage);
|
|
218
|
+
if (!pool) {
|
|
219
|
+
throw undeterminable(storage, hostAssetId, "the pool is not defined on that host", thinPool);
|
|
220
|
+
}
|
|
221
|
+
assertThinStorage(pool.type, {
|
|
222
|
+
storage,
|
|
223
|
+
hostAssetId,
|
|
224
|
+
thinPool,
|
|
225
|
+
sparse: pool.sparse,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
if (error instanceof ThickStorageRefusedError)
|
|
231
|
+
return refusalResult(error, request.operation);
|
|
232
|
+
throw error;
|
|
233
|
+
}
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=thin-storage-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thin-storage-policy.js","sourceRoot":"","sources":["../../../src/tools/thin-storage-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAkB,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM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AAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;YACtE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,MAAM,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,sCAAsC,EAAE,QAAQ,CAAC,CAAC;YAC/F,CAAC;YACD,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE;gBAC3B,OAAO;gBACP,WAAW;gBACX,QAAQ;gBACR,MAAM,EAAG,IAA6B,CAAC,MAAM;aAC9C,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,wBAAwB;YAAE,OAAO,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAC9F,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -143,11 +143,11 @@ export declare const VmActionInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
143
143
|
receiptFile?: string | undefined;
|
|
144
144
|
confirmAssetId?: string | undefined;
|
|
145
145
|
targetHost?: string | undefined;
|
|
146
|
+
vmIdOrName?: string | number | undefined;
|
|
146
147
|
confirmVmid?: string | number | undefined;
|
|
147
148
|
smbiosUuid?: string | undefined;
|
|
148
149
|
confirmHostAssetId?: string | undefined;
|
|
149
150
|
confirmSmbiosUuid?: string | undefined;
|
|
150
|
-
vmIdOrName?: string | number | undefined;
|
|
151
151
|
cloneOptions?: {
|
|
152
152
|
full: boolean;
|
|
153
153
|
name?: string | undefined;
|
|
@@ -176,13 +176,13 @@ export declare const VmActionInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
176
176
|
force?: boolean | undefined;
|
|
177
177
|
confirmAssetId?: string | undefined;
|
|
178
178
|
targetHost?: string | undefined;
|
|
179
|
+
vmIdOrName?: string | number | undefined;
|
|
179
180
|
confirmVmid?: string | number | undefined;
|
|
180
181
|
smbiosUuid?: string | undefined;
|
|
181
182
|
confirmHostAssetId?: string | undefined;
|
|
182
183
|
confirmSmbiosUuid?: string | undefined;
|
|
183
184
|
ackUntracked?: boolean | undefined;
|
|
184
185
|
ackManualCleanup?: boolean | undefined;
|
|
185
|
-
vmIdOrName?: string | number | undefined;
|
|
186
186
|
cloneOptions?: {
|
|
187
187
|
name?: string | undefined;
|
|
188
188
|
tags?: string | string[] | undefined;
|
|
@@ -213,11 +213,11 @@ export declare const VmActionInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
213
213
|
receiptFile?: string | undefined;
|
|
214
214
|
confirmAssetId?: string | undefined;
|
|
215
215
|
targetHost?: string | undefined;
|
|
216
|
+
vmIdOrName?: string | number | undefined;
|
|
216
217
|
confirmVmid?: string | number | undefined;
|
|
217
218
|
smbiosUuid?: string | undefined;
|
|
218
219
|
confirmHostAssetId?: string | undefined;
|
|
219
220
|
confirmSmbiosUuid?: string | undefined;
|
|
220
|
-
vmIdOrName?: string | number | undefined;
|
|
221
221
|
cloneOptions?: {
|
|
222
222
|
full: boolean;
|
|
223
223
|
name?: string | undefined;
|
|
@@ -246,13 +246,13 @@ export declare const VmActionInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
246
246
|
force?: boolean | undefined;
|
|
247
247
|
confirmAssetId?: string | undefined;
|
|
248
248
|
targetHost?: string | undefined;
|
|
249
|
+
vmIdOrName?: string | number | undefined;
|
|
249
250
|
confirmVmid?: string | number | undefined;
|
|
250
251
|
smbiosUuid?: string | undefined;
|
|
251
252
|
confirmHostAssetId?: string | undefined;
|
|
252
253
|
confirmSmbiosUuid?: string | undefined;
|
|
253
254
|
ackUntracked?: boolean | undefined;
|
|
254
255
|
ackManualCleanup?: boolean | undefined;
|
|
255
|
-
vmIdOrName?: string | number | undefined;
|
|
256
256
|
cloneOptions?: {
|
|
257
257
|
name?: string | undefined;
|
|
258
258
|
tags?: string | string[] | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calltelemetry/ct-lab-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.71",
|
|
4
4
|
"description": "Expanded Model Context Protocol (MCP) server for Call Telemetry lab, fleet, and appliance management across Proxmox VE and VMware ESXi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/index.js",
|