@blogic-cz/agent-tools 0.14.0 → 0.14.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogic-cz/agent-tools",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "CLI tools for AI coding agent workflows — GitHub, database, Kubernetes, Azure DevOps, logs, sessions, and audit",
5
5
  "keywords": [
6
6
  "agent",
@@ -209,6 +209,10 @@
209
209
  "namespace": {
210
210
  "description": "Kubectl namespace for tunnel commands.",
211
211
  "type": "string"
212
+ },
213
+ "service": {
214
+ "description": "Kubernetes service name used as the port-forward target. Defaults to postgresql.",
215
+ "type": "string"
212
216
  }
213
217
  },
214
218
  "required": ["context", "namespace"]
@@ -95,6 +95,7 @@ const DatabaseConfigSchema = Schema.Struct({
95
95
  Schema.Struct({
96
96
  context: Schema.String,
97
97
  namespace: Schema.String,
98
+ service: Schema.optionalKey(Schema.String),
98
99
  }),
99
100
  ),
100
101
  tunnelTimeoutMs: Schema.optionalKey(Schema.Number),
@@ -84,6 +84,7 @@ export type DatabaseConfig = {
84
84
  kubectl?: {
85
85
  context: string;
86
86
  namespace: string;
87
+ service?: string;
87
88
  };
88
89
  tunnelTimeoutMs?: number;
89
90
  remotePort?: number;
@@ -67,6 +67,7 @@ export class DbService extends Context.Service<
67
67
 
68
68
  const kubectlContext = dbConfig.kubectl?.context;
69
69
  const kubectlNamespace = dbConfig.kubectl?.namespace;
70
+ const kubectlService = dbConfig.kubectl?.service ?? "postgresql";
70
71
  const tunnelTimeoutMs = dbConfig.tunnelTimeoutMs ?? 5000;
71
72
  const remotePort = dbConfig.remotePort ?? 5432;
72
73
 
@@ -213,7 +214,7 @@ export class DbService extends Context.Service<
213
214
  kubectlContext,
214
215
  "--namespace",
215
216
  kubectlNamespace,
216
- "svc/postgresql",
217
+ `svc/${kubectlService}`,
217
218
  `${config.port}:${remotePort}`,
218
219
  ],
219
220
  { stdout: "pipe", stderr: "pipe" },