@kwirthmagnify/kwirth-common-ai 0.5.16 → 0.5.18

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/dist/back.d.ts CHANGED
@@ -72,6 +72,10 @@ export declare const tools: {
72
72
  services?: undefined;
73
73
  configMaps?: undefined;
74
74
  }>;
75
+ readonly get_service_yaml: import("ai").Tool<{
76
+ namespace: string;
77
+ name: string;
78
+ }, any>;
75
79
  readonly get_cluster_usage: import("ai").Tool<Record<string, never>, {
76
80
  error: string;
77
81
  vcpus?: undefined;
package/dist/back.js CHANGED
@@ -272,6 +272,24 @@ exports.tools = {
272
272
  }
273
273
  }
274
274
  }),
275
+ get_service_yaml: (0, ai_1.tool)({
276
+ description: 'Returns the full Kubernetes Service manifest (equivalent to kubectl get service -o yaml) for a given namespace and service name.',
277
+ inputSchema: zod_1.z.object({
278
+ namespace: zod_1.z.string().describe('Namespace where the service lives'),
279
+ name: zod_1.z.string().describe('Name of the service')
280
+ }),
281
+ execute: async ({ namespace, name }) => {
282
+ var _a;
283
+ ctx().trace('get_service_yaml', { namespace, name });
284
+ try {
285
+ const svc = await ctx().clusterInfo.coreApi.readNamespacedService({ name, namespace });
286
+ return svc;
287
+ }
288
+ catch (err) {
289
+ return { error: (_a = err.message) !== null && _a !== void 0 ? _a : String(err) };
290
+ }
291
+ }
292
+ }),
275
293
  // ── CURRENT USAGE ────────────────────────────────────────────────────────
276
294
  get_cluster_usage: (0, ai_1.tool)({
277
295
  description: 'Returns current overall cluster resource usage: CPU%, memory%, network Mbps, total vCPUs and total memory GB.',
@@ -568,6 +586,7 @@ exports.toolInfoList = [
568
586
  { name: 'get_cluster_data', description: 'Returns general cluster info: name, flavour (AKS/EKS/GKE/k3s/k3d), total vCPUs, total memory, node count and readiness status.' },
569
587
  { name: 'get_workload_data', description: 'Returns all workloads in the cluster: deployments, statefulsets, daemonsets, pods and services. Optionally filter by namespace.' },
570
588
  { name: 'get_space_data', description: 'Returns all resources in a specific Kubernetes namespace: pods (with restart count), deployments, services, configmap names.' },
589
+ { name: 'get_service_yaml', description: 'Returns the full Kubernetes Service manifest (equivalent to kubectl get service -o yaml) for a given namespace and service name.' },
571
590
  { name: 'get_cluster_usage', description: 'Returns current overall cluster resource usage: CPU%, memory%, network Mbps, total vCPUs and total memory GB.' },
572
591
  { name: 'get_node_usage', description: 'Returns current CPU and memory usage for one node or all nodes from the latest metrics reading.' },
573
592
  { name: 'get_deployment_usage', description: 'Returns current aggregated CPU and memory usage for all pods belonging to a specific deployment.' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwirthmagnify/kwirth-common-ai",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
4
4
  "description": "Shared AI/LLM types and utilities for Kwirth AI plugins",
5
5
  "scripts": {
6
6
  "build": "del .\\dist\\* /s /q 2>nul & tsc"
@@ -30,8 +30,12 @@
30
30
  },
31
31
  "typesVersions": {
32
32
  "*": {
33
- "back": ["dist/back.d.ts"],
34
- "front": ["dist/front.d.ts"]
33
+ "back": [
34
+ "dist/back.d.ts"
35
+ ],
36
+ "front": [
37
+ "dist/front.d.ts"
38
+ ]
35
39
  }
36
40
  },
37
41
  "files": [