@calltelemetry/ct-lab-mcp 0.1.5 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -1
- package/dist/bin/ct-lab-mcp.d.ts +3 -0
- package/dist/bin/ct-lab-mcp.d.ts.map +1 -1
- package/dist/bin/ct-lab-mcp.js +47 -8
- package/dist/bin/ct-lab-mcp.js.map +1 -1
- package/dist/src/appliance/commands.d.ts.map +1 -1
- package/dist/src/appliance/commands.js +24 -0
- package/dist/src/appliance/commands.js.map +1 -1
- package/dist/src/appliance/executor.d.ts.map +1 -1
- package/dist/src/appliance/executor.js +7 -1
- package/dist/src/appliance/executor.js.map +1 -1
- package/dist/src/appliance/mock.d.ts +6 -0
- package/dist/src/appliance/mock.d.ts.map +1 -1
- package/dist/src/appliance/mock.js +27 -6
- package/dist/src/appliance/mock.js.map +1 -1
- package/dist/src/appliance/types.d.ts +20 -1
- package/dist/src/appliance/types.d.ts.map +1 -1
- package/dist/src/appliance/types.js.map +1 -1
- package/dist/src/canonical/bridge.d.ts +28 -0
- package/dist/src/canonical/bridge.d.ts.map +1 -0
- package/dist/src/canonical/bridge.js +179 -0
- package/dist/src/canonical/bridge.js.map +1 -0
- package/dist/src/canonical/cli.d.ts +8 -0
- package/dist/src/canonical/cli.d.ts.map +1 -0
- package/dist/src/canonical/cli.js +9 -0
- package/dist/src/canonical/cli.js.map +1 -0
- package/dist/src/canonical/index.d.ts +4 -0
- package/dist/src/canonical/index.d.ts.map +1 -0
- package/dist/src/canonical/index.js +4 -0
- package/dist/src/canonical/index.js.map +1 -0
- package/dist/src/canonical/types.d.ts +32 -0
- package/dist/src/canonical/types.d.ts.map +1 -0
- package/dist/src/canonical/types.js +2 -0
- package/dist/src/canonical/types.js.map +1 -0
- package/dist/src/credentials/errors.d.ts +16 -0
- package/dist/src/credentials/errors.d.ts.map +1 -0
- package/dist/src/credentials/errors.js +21 -0
- package/dist/src/credentials/errors.js.map +1 -0
- package/dist/src/credentials/resolver.d.ts +16 -0
- package/dist/src/credentials/resolver.d.ts.map +1 -1
- package/dist/src/credentials/resolver.js +104 -10
- package/dist/src/credentials/resolver.js.map +1 -1
- package/dist/src/credentials/types.d.ts +8 -0
- package/dist/src/credentials/types.d.ts.map +1 -1
- package/dist/src/diagnostics/collector.d.ts +37 -0
- package/dist/src/diagnostics/collector.d.ts.map +1 -0
- package/dist/src/diagnostics/collector.js +452 -0
- package/dist/src/diagnostics/collector.js.map +1 -0
- package/dist/src/diagnostics/types.d.ts +103 -0
- package/dist/src/diagnostics/types.d.ts.map +1 -0
- package/dist/src/diagnostics/types.js +8 -0
- package/dist/src/diagnostics/types.js.map +1 -0
- package/dist/src/hypervisors/esxi/client.d.ts +1 -0
- package/dist/src/hypervisors/esxi/client.d.ts.map +1 -1
- package/dist/src/hypervisors/esxi/client.js +15 -3
- package/dist/src/hypervisors/esxi/client.js.map +1 -1
- package/dist/src/hypervisors/esxi/mock.d.ts +1 -0
- package/dist/src/hypervisors/esxi/mock.d.ts.map +1 -1
- package/dist/src/hypervisors/esxi/mock.js +4 -0
- package/dist/src/hypervisors/esxi/mock.js.map +1 -1
- package/dist/src/hypervisors/manager.d.ts.map +1 -1
- package/dist/src/hypervisors/manager.js +37 -3
- package/dist/src/hypervisors/manager.js.map +1 -1
- package/dist/src/hypervisors/proxmox/client.d.ts +13 -1
- package/dist/src/hypervisors/proxmox/client.d.ts.map +1 -1
- package/dist/src/hypervisors/proxmox/client.js +485 -4
- package/dist/src/hypervisors/proxmox/client.js.map +1 -1
- package/dist/src/hypervisors/proxmox/mock.d.ts +1 -0
- package/dist/src/hypervisors/proxmox/mock.d.ts.map +1 -1
- package/dist/src/hypervisors/proxmox/mock.js +4 -0
- package/dist/src/hypervisors/proxmox/mock.js.map +1 -1
- package/dist/src/hypervisors/types.d.ts +119 -2
- package/dist/src/hypervisors/types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/proxmox/mock.d.ts +1 -1
- package/dist/src/proxmox/mock.d.ts.map +1 -1
- package/dist/src/proxmox/mock.js +103 -1
- package/dist/src/proxmox/mock.js.map +1 -1
- package/dist/src/server.d.ts +2 -0
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +4 -0
- package/dist/src/server.js.map +1 -1
- package/dist/src/slot/manager.d.ts +26 -1
- package/dist/src/slot/manager.d.ts.map +1 -1
- package/dist/src/slot/manager.js +278 -1
- package/dist/src/slot/manager.js.map +1 -1
- package/dist/src/slot/types.d.ts +49 -0
- package/dist/src/slot/types.d.ts.map +1 -1
- package/dist/src/slot/types.js +18 -0
- package/dist/src/slot/types.js.map +1 -1
- package/dist/src/tools/canonical-guard.d.ts +7 -0
- package/dist/src/tools/canonical-guard.d.ts.map +1 -0
- package/dist/src/tools/canonical-guard.js +38 -0
- package/dist/src/tools/canonical-guard.js.map +1 -0
- package/dist/src/tools/credential-status.d.ts +29 -0
- package/dist/src/tools/credential-status.d.ts.map +1 -0
- package/dist/src/tools/credential-status.js +81 -0
- package/dist/src/tools/credential-status.js.map +1 -0
- package/dist/src/tools/cube-provision.d.ts +288 -0
- package/dist/src/tools/cube-provision.d.ts.map +1 -0
- package/dist/src/tools/cube-provision.js +892 -0
- package/dist/src/tools/cube-provision.js.map +1 -0
- package/dist/src/tools/cube-tools.d.ts +137 -0
- package/dist/src/tools/cube-tools.d.ts.map +1 -0
- package/dist/src/tools/cube-tools.js +292 -0
- package/dist/src/tools/cube-tools.js.map +1 -0
- package/dist/src/tools/cucm-emulator-tool.d.ts +85 -0
- package/dist/src/tools/cucm-emulator-tool.d.ts.map +1 -0
- package/dist/src/tools/cucm-emulator-tool.js +191 -0
- package/dist/src/tools/cucm-emulator-tool.js.map +1 -0
- package/dist/src/tools/cucm-trunk.d.ts +165 -0
- package/dist/src/tools/cucm-trunk.d.ts.map +1 -0
- package/dist/src/tools/cucm-trunk.js +354 -0
- package/dist/src/tools/cucm-trunk.js.map +1 -0
- package/dist/src/tools/diagnostics.d.ts +58 -0
- package/dist/src/tools/diagnostics.d.ts.map +1 -0
- package/dist/src/tools/diagnostics.js +212 -0
- package/dist/src/tools/diagnostics.js.map +1 -0
- package/dist/src/tools/guest-agent.d.ts +34 -0
- package/dist/src/tools/guest-agent.d.ts.map +1 -0
- package/dist/src/tools/guest-agent.js +133 -0
- package/dist/src/tools/guest-agent.js.map +1 -0
- package/dist/src/tools/index.d.ts +11 -0
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +154 -1
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/lab-preflight.d.ts +21 -0
- package/dist/src/tools/lab-preflight.d.ts.map +1 -0
- package/dist/src/tools/lab-preflight.js +22 -0
- package/dist/src/tools/lab-preflight.js.map +1 -0
- package/dist/src/tools/list-hosts.d.ts +11 -0
- package/dist/src/tools/list-hosts.d.ts.map +1 -1
- package/dist/src/tools/list-hosts.js.map +1 -1
- package/dist/src/tools/list-inventory.d.ts.map +1 -1
- package/dist/src/tools/list-inventory.js +21 -0
- package/dist/src/tools/list-inventory.js.map +1 -1
- package/dist/src/tools/network-tools.d.ts +65 -0
- package/dist/src/tools/network-tools.d.ts.map +1 -0
- package/dist/src/tools/network-tools.js +200 -0
- package/dist/src/tools/network-tools.js.map +1 -0
- package/dist/src/tools/provision-tools.d.ts.map +1 -1
- package/dist/src/tools/provision-tools.js +26 -0
- package/dist/src/tools/provision-tools.js.map +1 -1
- package/dist/src/tools/purge-slots.d.ts.map +1 -1
- package/dist/src/tools/purge-slots.js +4 -0
- package/dist/src/tools/purge-slots.js.map +1 -1
- package/dist/src/tools/server-management.d.ts +51 -0
- package/dist/src/tools/server-management.d.ts.map +1 -0
- package/dist/src/tools/server-management.js +175 -0
- package/dist/src/tools/server-management.js.map +1 -0
- package/dist/src/tools/slot-tools.d.ts.map +1 -1
- package/dist/src/tools/slot-tools.js +7 -0
- package/dist/src/tools/slot-tools.js.map +1 -1
- package/dist/src/tools/storage-tools.d.ts +177 -0
- package/dist/src/tools/storage-tools.d.ts.map +1 -1
- package/dist/src/tools/storage-tools.js +420 -0
- package/dist/src/tools/storage-tools.js.map +1 -1
- package/dist/src/tools/update-cli.d.ts +62 -0
- package/dist/src/tools/update-cli.d.ts.map +1 -0
- package/dist/src/tools/update-cli.js +142 -0
- package/dist/src/tools/update-cli.js.map +1 -0
- package/dist/src/tools/vm-action.d.ts +6 -6
- package/dist/src/tools/vm-action.d.ts.map +1 -1
- package/dist/src/tools/vm-action.js +7 -1
- package/dist/src/tools/vm-action.js.map +1 -1
- package/dist/src/types/mcp.d.ts +5 -1
- package/dist/src/types/mcp.d.ts.map +1 -1
- package/dist/src/types/mcp.js +14 -0
- package/dist/src/types/mcp.js.map +1 -1
- package/dist/src/types/proxmox.d.ts +1 -0
- package/dist/src/types/proxmox.d.ts.map +1 -1
- package/dist/src/utils/formatters.d.ts +7 -0
- package/dist/src/utils/formatters.d.ts.map +1 -1
- package/dist/src/utils/formatters.js +48 -5
- package/dist/src/utils/formatters.js.map +1 -1
- package/package.json +2 -3
package/dist/src/slot/types.js
CHANGED
|
@@ -64,4 +64,22 @@ export class DatastoreCapacityExceededError extends Error {
|
|
|
64
64
|
this.availableGb = availableGb;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
+
export class CubeNotFoundError extends Error {
|
|
68
|
+
code = "CUBE_NOT_FOUND";
|
|
69
|
+
constructor(message) {
|
|
70
|
+
super(message);
|
|
71
|
+
this.name = "CubeNotFoundError";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class CubeAlreadyClaimedError extends Error {
|
|
75
|
+
code = "CUBE_LOCKED";
|
|
76
|
+
holderLinearIssue;
|
|
77
|
+
expiresAt;
|
|
78
|
+
constructor(cubeId, holderLinearIssue, expiresAt) {
|
|
79
|
+
super(`CUBE '${cubeId}' is currently locked by Linear issue '${holderLinearIssue || "UNKNOWN"}' (lease expires at ${expiresAt || "N/A"}).`);
|
|
80
|
+
this.name = "CubeAlreadyClaimedError";
|
|
81
|
+
this.holderLinearIssue = holderLinearIssue;
|
|
82
|
+
this.expiresAt = expiresAt;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
67
85
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/slot/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/slot/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuUH;;GAEG;AAEH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IACrC,IAAI,GAAG,mBAAmB,CAAC;IAC3B,MAAM,CAAS;IACf,QAAQ,CAAS;IACjB,cAAc,CAAS;IAEhC,YAAY,OAAe,EAAE,SAAiB,SAAS,EAAE,QAAQ,GAAG,CAAC,EAAE,cAAc,GAAG,CAAC;QACvF,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAC3C,IAAI,GAAG,0BAA0B,CAAC;IAClC,eAAe,CAAS;IACxB,qBAAqB,CAAS;IAEvC,YACE,UAAkB,wFAAwF,EAC1G,eAAe,GAAG,CAAC,EACnB,qBAAqB,GAAG,CAAC;QAEzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;QAC1C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACrD,CAAC;CACF;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CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,IAAI,GAAG,aAAa,CAAC;IACrB,iBAAiB,CAAU;IAC3B,SAAS,CAAU;IAE5B,YAAY,MAAc,EAAE,iBAA0B,EAAE,SAAkB;QACxE,KAAK,CAAC,SAAS,MAAM,0CAA0C,iBAAiB,IAAI,SAAS,uBAAuB,SAAS,IAAI,KAAK,IAAI,CAAC,CAAC;QAC5I,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolContext } from "./list-hosts.js";
|
|
2
|
+
import { CanonicalLabBridge } from "../canonical/bridge.js";
|
|
3
|
+
import { CallToolResult } from "../types/mcp.js";
|
|
4
|
+
export declare function canonicalMode(context: ToolContext): boolean;
|
|
5
|
+
export declare function canonicalOperationBlocked(operation: string, hint: string): CallToolResult;
|
|
6
|
+
export declare function runCanonicalOperation(bridge: CanonicalLabBridge | undefined, operation: string, args: string[]): Promise<CallToolResult>;
|
|
7
|
+
//# sourceMappingURL=canonical-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-guard.d.ts","sourceRoot":"","sources":["../../../src/tools/canonical-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAkD,MAAM,iBAAiB,CAAC;AAEjG,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAE3D;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAMzF;AAUD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,kBAAkB,GAAG,SAAS,EACtC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,cAAc,CAAC,CA4BzB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createToolErrorResult, createToolSuccessResult } from "../types/mcp.js";
|
|
2
|
+
export function canonicalMode(context) {
|
|
3
|
+
return context.canonicalBridge?.isRequired === true;
|
|
4
|
+
}
|
|
5
|
+
export function canonicalOperationBlocked(operation, hint) {
|
|
6
|
+
return createToolErrorResult("CANONICAL_OPERATION_REQUIRES_BRIDGE", `${operation} is disabled in canonical lab mode: ${hint}`, { operation, canonicalAuthority: "plugins/ct-lab/skills/lab-inventory/scripts/lab-inventory" });
|
|
7
|
+
}
|
|
8
|
+
function parseJson(stdout) {
|
|
9
|
+
try {
|
|
10
|
+
return JSON.parse(stdout);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return stdout;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export async function runCanonicalOperation(bridge, operation, args) {
|
|
17
|
+
if (!bridge) {
|
|
18
|
+
return createToolErrorResult("CANONICAL_INVENTORY_UNAVAILABLE", "canonical lab bridge is not available", { operation });
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const result = await bridge.run(args);
|
|
22
|
+
const payload = {
|
|
23
|
+
success: result.exitCode === 0,
|
|
24
|
+
operation,
|
|
25
|
+
command: result.command,
|
|
26
|
+
result: parseJson(result.stdout),
|
|
27
|
+
...(result.stderr ? { stderr: result.stderr } : {}),
|
|
28
|
+
};
|
|
29
|
+
if (result.exitCode !== 0) {
|
|
30
|
+
return createToolErrorResult("CANONICAL_OPERATION_FAILED", result.stderr || result.stdout || `${operation} failed in canonical lab CLI`, payload);
|
|
31
|
+
}
|
|
32
|
+
return createToolSuccessResult(result.stdout || `${operation} completed in canonical lab CLI`, payload);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return createToolErrorResult("CANONICAL_INVENTORY_UNAVAILABLE", error instanceof Error ? error.message : String(error), { operation });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=canonical-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-guard.js","sourceRoot":"","sources":["../../../src/tools/canonical-guard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEjG,MAAM,UAAU,aAAa,CAAC,OAAoB;IAChD,OAAO,OAAO,CAAC,eAAe,EAAE,UAAU,KAAK,IAAI,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,SAAiB,EAAE,IAAY;IACvE,OAAO,qBAAqB,CAC1B,qCAAqC,EACrC,GAAG,SAAS,uCAAuC,IAAI,EAAE,EACzD,EAAE,SAAS,EAAE,kBAAkB,EAAE,2DAA2D,EAAE,CAC/F,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,MAAc;IAC/B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC;IAChB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAsC,EACtC,SAAiB,EACjB,IAAc;IAEd,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,qBAAqB,CAAC,iCAAiC,EAAE,uCAAuC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1H,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG;YACd,OAAO,EAAE,MAAM,CAAC,QAAQ,KAAK,CAAC;YAC9B,SAAS;YACT,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;YAChC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpD,CAAC;QACF,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,qBAAqB,CAC1B,4BAA4B,EAC5B,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,8BAA8B,EAC5E,OAAO,CACR,CAAC;QACJ,CAAC;QACD,OAAO,uBAAuB,CAAC,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC1G,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,OAAO,qBAAqB,CAC1B,iCAAiC,EACjC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACtD,EAAE,SAAS,EAAE,CACd,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool: credential_status
|
|
3
|
+
*
|
|
4
|
+
* Self-check / "doctor" tool. Reports which credential tier this server
|
|
5
|
+
* instance actually resolved, which hosts/executors are real vs mock, and
|
|
6
|
+
* probes live reachability for each registered hypervisor driver so an
|
|
7
|
+
* agent can gate on real evidence before trusting any other tool's output.
|
|
8
|
+
*
|
|
9
|
+
* This exists because ct-lab-mcp previously fell back to a fully synthetic
|
|
10
|
+
* mock mode silently whenever credentials were unavailable, and every other
|
|
11
|
+
* tool call would then fabricate plausible-looking success. See QA-395.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
import { CallToolResult } from "../types/mcp.js";
|
|
15
|
+
import { ToolContext } from "./list-hosts.js";
|
|
16
|
+
export declare const CredentialStatusInputShape: {
|
|
17
|
+
probe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const CredentialStatusInputSchema: z.ZodObject<{
|
|
20
|
+
probe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
probe: boolean;
|
|
23
|
+
}, {
|
|
24
|
+
probe?: boolean | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export type CredentialStatusInput = z.infer<typeof CredentialStatusInputSchema>;
|
|
27
|
+
export type CredentialStatusRawInput = z.input<typeof CredentialStatusInputSchema>;
|
|
28
|
+
export declare function handleCredentialStatus(rawArgs: CredentialStatusRawInput | undefined, context: ToolContext): Promise<CallToolResult>;
|
|
29
|
+
//# sourceMappingURL=credential-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status.d.ts","sourceRoot":"","sources":["../../../src/tools/credential-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,eAAO,MAAM,0BAA0B;;CAMtC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;EAAuC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEnF,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,wBAAwB,YAAK,EACtC,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CAgFzB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool: credential_status
|
|
3
|
+
*
|
|
4
|
+
* Self-check / "doctor" tool. Reports which credential tier this server
|
|
5
|
+
* instance actually resolved, which hosts/executors are real vs mock, and
|
|
6
|
+
* probes live reachability for each registered hypervisor driver so an
|
|
7
|
+
* agent can gate on real evidence before trusting any other tool's output.
|
|
8
|
+
*
|
|
9
|
+
* This exists because ct-lab-mcp previously fell back to a fully synthetic
|
|
10
|
+
* mock mode silently whenever credentials were unavailable, and every other
|
|
11
|
+
* tool call would then fabricate plausible-looking success. See QA-395.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
export const CredentialStatusInputShape = {
|
|
15
|
+
probe: z
|
|
16
|
+
.boolean()
|
|
17
|
+
.optional()
|
|
18
|
+
.default(true)
|
|
19
|
+
.describe("Whether to perform a live getHostCapacity() round-trip against each registered driver (default: true)."),
|
|
20
|
+
};
|
|
21
|
+
export const CredentialStatusInputSchema = z.object(CredentialStatusInputShape);
|
|
22
|
+
export async function handleCredentialStatus(rawArgs = {}, context) {
|
|
23
|
+
const args = CredentialStatusInputSchema.parse(rawArgs);
|
|
24
|
+
const tier = context.credentials?.tier ?? "unknown";
|
|
25
|
+
const mockPermitted = Boolean(context.mockPermitted);
|
|
26
|
+
const hostReports = [];
|
|
27
|
+
const drivers = context.hypervisorManager?.getAllDrivers() ?? [];
|
|
28
|
+
for (const driver of drivers) {
|
|
29
|
+
const report = {
|
|
30
|
+
hostName: driver.hostName,
|
|
31
|
+
hypervisor: driver.hypervisorType,
|
|
32
|
+
isMock: driver.isMock,
|
|
33
|
+
reachable: "not_probed",
|
|
34
|
+
};
|
|
35
|
+
if (args.probe) {
|
|
36
|
+
const start = Date.now();
|
|
37
|
+
try {
|
|
38
|
+
const capacity = await driver.getHostCapacity();
|
|
39
|
+
report.reachable = capacity.status === "online";
|
|
40
|
+
report.endpoint = capacity.endpoint;
|
|
41
|
+
report.elapsedMs = Date.now() - start;
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
report.reachable = false;
|
|
45
|
+
report.error = err instanceof Error ? err.message : String(err);
|
|
46
|
+
report.elapsedMs = Date.now() - start;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
hostReports.push(report);
|
|
50
|
+
}
|
|
51
|
+
const applianceExecutorIsMock = context.credentials?.tier === "mock_fallback" || mockPermitted;
|
|
52
|
+
const anyMockHost = hostReports.some((h) => h.isMock);
|
|
53
|
+
const allRealAndReachable = !anyMockHost &&
|
|
54
|
+
!applianceExecutorIsMock &&
|
|
55
|
+
(!args.probe || hostReports.every((h) => h.reachable === true));
|
|
56
|
+
let md = `### 🩺 ct-lab-mcp Credential & Transport Self-Check\n\n`;
|
|
57
|
+
md += `**Resolved credential tier:** \`${tier}\` \n`;
|
|
58
|
+
md += `**Mock mode explicitly permitted for this server instance:** ${mockPermitted ? "⚠️ true" : "false"} \n`;
|
|
59
|
+
md += `**Verdict:** ${allRealAndReachable ? "🟢 All registered transports are real and reachable." : "⚠️ At least one transport is mock and/or unreachable — do not trust other tool results as observed fact without checking each result's own mock/transportEvidence fields."}\n\n`;
|
|
60
|
+
md += "| Host | Hypervisor | Mock | Reachable | Endpoint | Elapsed (ms) |\n";
|
|
61
|
+
md += "|---|---|---|---|---|---|\n";
|
|
62
|
+
for (const h of hostReports) {
|
|
63
|
+
md += `| \`${h.hostName}\` | ${h.hypervisor} | ${h.isMock ? "⚠️ true" : "false"} | ${h.reachable === "not_probed" ? "not probed" : h.reachable ? "🟢 yes" : "🔴 no" + (h.error ? ` (${h.error})` : "")} | ${h.endpoint || "-"} | ${h.elapsedMs ?? "-"} |\n`;
|
|
64
|
+
}
|
|
65
|
+
if (drivers.length === 0) {
|
|
66
|
+
md += "\n_No hypervisor drivers are registered on this server instance._\n";
|
|
67
|
+
}
|
|
68
|
+
const structuredContent = {
|
|
69
|
+
tier,
|
|
70
|
+
mockPermitted,
|
|
71
|
+
applianceExecutorIsMock,
|
|
72
|
+
allRealAndReachable,
|
|
73
|
+
hosts: hostReports,
|
|
74
|
+
};
|
|
75
|
+
md += `\n\`\`\`json\n${JSON.stringify(structuredContent, null, 2)}\n\`\`\``;
|
|
76
|
+
return {
|
|
77
|
+
content: [{ type: "text", text: md }],
|
|
78
|
+
structuredContent,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=credential-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status.js","sourceRoot":"","sources":["../../../src/tools/credential-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,CAAC;SACL,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,wGAAwG,CAAC;CACtH,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;AAIhF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,UAAoC,EAAE,EACtC,OAAoB;IAEpB,MAAM,IAAI,GAAG,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAExD,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,IAAI,SAAS,CAAC;IACpD,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAErD,MAAM,WAAW,GAQZ,EAAE,CAAC;IAER,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACjE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,M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iB,EAAE,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;QACrC,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools: provision_cube & setup_cube_xcc
|
|
3
|
+
*
|
|
4
|
+
* Automates end-to-end provisioning, host ranking & slot partition allocation,
|
|
5
|
+
* aggressive config wiping, licensing activation (network-advantage / dna-advantage
|
|
6
|
+
* with mandatory write memory & reboot cycle), and XCC / WSAPI integration on Cisco
|
|
7
|
+
* Cat8000v CUBE routers for reliable UAT testing.
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import { CallToolResult } from "../types/mcp.js";
|
|
11
|
+
import { ToolContext } from "./list-hosts.js";
|
|
12
|
+
export declare const ProvisionCubeInputShape: {
|
|
13
|
+
host: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
hypervisor: z.ZodOptional<z.ZodEnum<["proxmox", "esxi"]>>;
|
|
15
|
+
vmid: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
name: z.ZodOptional<z.ZodString>;
|
|
17
|
+
linearIssue: z.ZodOptional<z.ZodString>;
|
|
18
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
19
|
+
vlan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
20
|
+
ipAddress: z.ZodOptional<z.ZodString>;
|
|
21
|
+
gatewayIp: z.ZodOptional<z.ZodString>;
|
|
22
|
+
applianceIp: z.ZodOptional<z.ZodString>;
|
|
23
|
+
xccRemoteUrl: z.ZodOptional<z.ZodString>;
|
|
24
|
+
cucmIp: z.ZodOptional<z.ZodString>;
|
|
25
|
+
templateVmid: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
wipeExistingConfig: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
27
|
+
activateLicenseAndReboot: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
28
|
+
licenseLevel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
profile: z.ZodDefault<z.ZodOptional<z.ZodEnum<["minimal", "standard", "performance"]>>>;
|
|
30
|
+
memoryMb: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
topologyRole: z.ZodDefault<z.ZodOptional<z.ZodEnum<["cucm-edge", "att-pstn", "verizon-peer", "dual-cube-peer"]>>>;
|
|
33
|
+
peerTargetHost: z.ZodOptional<z.ZodString>;
|
|
34
|
+
peerTargetPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
|
+
outboundPattern: z.ZodOptional<z.ZodString>;
|
|
36
|
+
inboundPattern: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
37
|
+
codec: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
38
|
+
dtmfRelay: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
39
|
+
syncCucmTrunk: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
40
|
+
cucmTrunkName: z.ZodOptional<z.ZodString>;
|
|
41
|
+
};
|
|
42
|
+
export declare const provisionCubeSchema: {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
inputSchema: {
|
|
46
|
+
type: "object";
|
|
47
|
+
properties: {
|
|
48
|
+
host: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
name: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
linearIssue: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
purpose: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
vmid: {
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
vlan: {
|
|
69
|
+
type: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
ipAddress: {
|
|
73
|
+
type: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
gatewayIp: {
|
|
77
|
+
type: string;
|
|
78
|
+
description: string;
|
|
79
|
+
};
|
|
80
|
+
applianceIp: {
|
|
81
|
+
type: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
cucmIp: {
|
|
85
|
+
type: string;
|
|
86
|
+
description: string;
|
|
87
|
+
};
|
|
88
|
+
wipeExistingConfig: {
|
|
89
|
+
type: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
activateLicenseAndReboot: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export declare const ProvisionCubeInputSchema: z.ZodObject<{
|
|
100
|
+
host: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
101
|
+
hypervisor: z.ZodOptional<z.ZodEnum<["proxmox", "esxi"]>>;
|
|
102
|
+
vmid: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
name: z.ZodOptional<z.ZodString>;
|
|
104
|
+
linearIssue: z.ZodOptional<z.ZodString>;
|
|
105
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
106
|
+
vlan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
107
|
+
ipAddress: z.ZodOptional<z.ZodString>;
|
|
108
|
+
gatewayIp: z.ZodOptional<z.ZodString>;
|
|
109
|
+
applianceIp: z.ZodOptional<z.ZodString>;
|
|
110
|
+
xccRemoteUrl: z.ZodOptional<z.ZodString>;
|
|
111
|
+
cucmIp: z.ZodOptional<z.ZodString>;
|
|
112
|
+
templateVmid: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
wipeExistingConfig: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
114
|
+
activateLicenseAndReboot: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
115
|
+
licenseLevel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
116
|
+
profile: z.ZodDefault<z.ZodOptional<z.ZodEnum<["minimal", "standard", "performance"]>>>;
|
|
117
|
+
memoryMb: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
cpuCores: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
topologyRole: z.ZodDefault<z.ZodOptional<z.ZodEnum<["cucm-edge", "att-pstn", "verizon-peer", "dual-cube-peer"]>>>;
|
|
120
|
+
peerTargetHost: z.ZodOptional<z.ZodString>;
|
|
121
|
+
peerTargetPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
122
|
+
outboundPattern: z.ZodOptional<z.ZodString>;
|
|
123
|
+
inboundPattern: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
124
|
+
codec: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
125
|
+
dtmfRelay: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
126
|
+
syncCucmTrunk: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
127
|
+
cucmTrunkName: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
host: string;
|
|
130
|
+
vlan: number;
|
|
131
|
+
wipeExistingConfig: boolean;
|
|
132
|
+
activateLicenseAndReboot: boolean;
|
|
133
|
+
licenseLevel: string;
|
|
134
|
+
profile: "standard" | "minimal" | "performance";
|
|
135
|
+
topologyRole: "cucm-edge" | "att-pstn" | "verizon-peer" | "dual-cube-peer";
|
|
136
|
+
peerTargetPort: number;
|
|
137
|
+
inboundPattern: string;
|
|
138
|
+
codec: string;
|
|
139
|
+
dtmfRelay: string;
|
|
140
|
+
syncCucmTrunk: boolean;
|
|
141
|
+
name?: string | undefined;
|
|
142
|
+
memoryMb?: number | undefined;
|
|
143
|
+
vmid?: number | undefined;
|
|
144
|
+
ipAddress?: string | undefined;
|
|
145
|
+
linearIssue?: string | undefined;
|
|
146
|
+
hypervisor?: "proxmox" | "esxi" | undefined;
|
|
147
|
+
cpuCores?: number | undefined;
|
|
148
|
+
purpose?: string | undefined;
|
|
149
|
+
gatewayIp?: string | undefined;
|
|
150
|
+
applianceIp?: string | undefined;
|
|
151
|
+
xccRemoteUrl?: string | undefined;
|
|
152
|
+
cucmIp?: string | undefined;
|
|
153
|
+
templateVmid?: number | undefined;
|
|
154
|
+
peerTargetHost?: string | undefined;
|
|
155
|
+
outboundPattern?: string | undefined;
|
|
156
|
+
cucmTrunkName?: string | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
name?: string | undefined;
|
|
159
|
+
memoryMb?: number | undefined;
|
|
160
|
+
host?: string | undefined;
|
|
161
|
+
vmid?: number | undefined;
|
|
162
|
+
ipAddress?: string | undefined;
|
|
163
|
+
linearIssue?: string | undefined;
|
|
164
|
+
hypervisor?: "proxmox" | "esxi" | undefined;
|
|
165
|
+
vlan?: number | undefined;
|
|
166
|
+
cpuCores?: number | undefined;
|
|
167
|
+
purpose?: string | undefined;
|
|
168
|
+
gatewayIp?: string | undefined;
|
|
169
|
+
applianceIp?: string | undefined;
|
|
170
|
+
xccRemoteUrl?: string | undefined;
|
|
171
|
+
cucmIp?: string | undefined;
|
|
172
|
+
templateVmid?: number | undefined;
|
|
173
|
+
wipeExistingConfig?: boolean | undefined;
|
|
174
|
+
activateLicenseAndReboot?: boolean | undefined;
|
|
175
|
+
licenseLevel?: string | undefined;
|
|
176
|
+
profile?: "standard" | "minimal" | "performance" | undefined;
|
|
177
|
+
topologyRole?: "cucm-edge" | "att-pstn" | "verizon-peer" | "dual-cube-peer" | undefined;
|
|
178
|
+
peerTargetHost?: string | undefined;
|
|
179
|
+
peerTargetPort?: number | undefined;
|
|
180
|
+
outboundPattern?: string | undefined;
|
|
181
|
+
inboundPattern?: string | undefined;
|
|
182
|
+
codec?: string | undefined;
|
|
183
|
+
dtmfRelay?: string | undefined;
|
|
184
|
+
syncCucmTrunk?: boolean | undefined;
|
|
185
|
+
cucmTrunkName?: string | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
export declare function handleProvisionCube(args: Record<string, unknown>, context: ToolContext): Promise<CallToolResult>;
|
|
188
|
+
export declare const SetupCubeXccInputShape: {
|
|
189
|
+
targetIp: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
190
|
+
target: z.ZodOptional<z.ZodString>;
|
|
191
|
+
topologyRole: z.ZodDefault<z.ZodOptional<z.ZodEnum<["cucm-edge", "att-pstn", "verizon-peer", "dual-cube-peer"]>>>;
|
|
192
|
+
applianceIp: z.ZodOptional<z.ZodString>;
|
|
193
|
+
cucmIp: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
194
|
+
peerTargetHost: z.ZodOptional<z.ZodString>;
|
|
195
|
+
peerTargetPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
196
|
+
outboundPattern: z.ZodOptional<z.ZodString>;
|
|
197
|
+
inboundPattern: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
198
|
+
codec: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
199
|
+
dtmfRelay: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
200
|
+
wipeExistingConfig: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
201
|
+
sipTransport: z.ZodDefault<z.ZodOptional<z.ZodEnum<["tcp", "udp"]>>>;
|
|
202
|
+
syncCucmTrunk: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
203
|
+
cucmTrunkName: z.ZodOptional<z.ZodString>;
|
|
204
|
+
};
|
|
205
|
+
export declare const setupCubeXccSchema: {
|
|
206
|
+
name: string;
|
|
207
|
+
description: string;
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: "object";
|
|
210
|
+
properties: {
|
|
211
|
+
targetIp: {
|
|
212
|
+
type: string;
|
|
213
|
+
description: string;
|
|
214
|
+
};
|
|
215
|
+
topologyRole: {
|
|
216
|
+
type: string;
|
|
217
|
+
description: string;
|
|
218
|
+
};
|
|
219
|
+
applianceIp: {
|
|
220
|
+
type: string;
|
|
221
|
+
description: string;
|
|
222
|
+
};
|
|
223
|
+
cucmIp: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
peerTargetHost: {
|
|
228
|
+
type: string;
|
|
229
|
+
description: string;
|
|
230
|
+
};
|
|
231
|
+
wipeExistingConfig: {
|
|
232
|
+
type: string;
|
|
233
|
+
description: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
export declare const SetupCubeXccInputSchema: z.ZodObject<{
|
|
239
|
+
targetIp: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
240
|
+
target: z.ZodOptional<z.ZodString>;
|
|
241
|
+
topologyRole: z.ZodDefault<z.ZodOptional<z.ZodEnum<["cucm-edge", "att-pstn", "verizon-peer", "dual-cube-peer"]>>>;
|
|
242
|
+
applianceIp: z.ZodOptional<z.ZodString>;
|
|
243
|
+
cucmIp: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
244
|
+
peerTargetHost: z.ZodOptional<z.ZodString>;
|
|
245
|
+
peerTargetPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
246
|
+
outboundPattern: z.ZodOptional<z.ZodString>;
|
|
247
|
+
inboundPattern: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
248
|
+
codec: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
249
|
+
dtmfRelay: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
250
|
+
wipeExistingConfig: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
251
|
+
sipTransport: z.ZodDefault<z.ZodOptional<z.ZodEnum<["tcp", "udp"]>>>;
|
|
252
|
+
syncCucmTrunk: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
253
|
+
cucmTrunkName: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
targetIp: string;
|
|
256
|
+
cucmIp: string;
|
|
257
|
+
wipeExistingConfig: boolean;
|
|
258
|
+
topologyRole: "cucm-edge" | "att-pstn" | "verizon-peer" | "dual-cube-peer";
|
|
259
|
+
peerTargetPort: number;
|
|
260
|
+
inboundPattern: string;
|
|
261
|
+
codec: string;
|
|
262
|
+
dtmfRelay: string;
|
|
263
|
+
syncCucmTrunk: boolean;
|
|
264
|
+
sipTransport: "tcp" | "udp";
|
|
265
|
+
target?: string | undefined;
|
|
266
|
+
applianceIp?: string | undefined;
|
|
267
|
+
peerTargetHost?: string | undefined;
|
|
268
|
+
outboundPattern?: string | undefined;
|
|
269
|
+
cucmTrunkName?: string | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
targetIp?: string | undefined;
|
|
272
|
+
target?: string | undefined;
|
|
273
|
+
applianceIp?: string | undefined;
|
|
274
|
+
cucmIp?: string | undefined;
|
|
275
|
+
wipeExistingConfig?: boolean | undefined;
|
|
276
|
+
topologyRole?: "cucm-edge" | "att-pstn" | "verizon-peer" | "dual-cube-peer" | undefined;
|
|
277
|
+
peerTargetHost?: string | undefined;
|
|
278
|
+
peerTargetPort?: number | undefined;
|
|
279
|
+
outboundPattern?: string | undefined;
|
|
280
|
+
inboundPattern?: string | undefined;
|
|
281
|
+
codec?: string | undefined;
|
|
282
|
+
dtmfRelay?: string | undefined;
|
|
283
|
+
syncCucmTrunk?: boolean | undefined;
|
|
284
|
+
cucmTrunkName?: string | undefined;
|
|
285
|
+
sipTransport?: "tcp" | "udp" | undefined;
|
|
286
|
+
}>;
|
|
287
|
+
export declare function handleSetupCubeXcc(args: Record<string, unknown>, context: ToolContext): Promise<CallToolResult>;
|
|
288
|
+
//# sourceMappingURL=cube-provision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cube-provision.d.ts","sourceRoot":"","sources":["../../../src/tools/cube-provision.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAoE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmInC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD/B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAC;AAE1E,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CAyZzB;AAMD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAwElC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC9B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC;AAExE,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CAoMzB"}
|