@blogic-cz/agent-tools 0.4.0 → 0.4.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.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "CLI tools for AI coding agent workflows — GitHub, database, Kubernetes, Azure DevOps, logs, and sessions",
5
5
  "keywords": [
6
6
  "agent",
@@ -79,10 +79,11 @@ export class DbService extends ServiceMap.Service<
79
79
 
80
80
  const envVars: Record<string, string> = {};
81
81
  const regex = /^export\s+([A-Z_][A-Z0-9_]*)=["']?([^"'\n]+)["']?/gm;
82
- let match: RegExpExecArray | null;
82
+ let match = regex.exec(content);
83
83
 
84
- while ((match = regex.exec(content)) !== null) {
84
+ while (match !== null) {
85
85
  envVars[match[1]] = match[2];
86
+ match = regex.exec(content);
86
87
  }
87
88
 
88
89
  yield* Ref.set(zshrcEnvCache, envVars);
@@ -214,7 +215,7 @@ export class DbService extends ServiceMap.Service<
214
215
  ) => {
215
216
  const args = [
216
217
  "-h",
217
- "localhost",
218
+ config.host,
218
219
  "-p",
219
220
  String(config.port),
220
221
  "-U",
@@ -506,14 +507,18 @@ export class DbService extends ServiceMap.Service<
506
507
  }
507
508
 
508
509
  const isLocal = LOCALHOST_HOSTS.has(envConfig.host);
510
+ const isLocalEnvironment = env === "local";
511
+ const needsTunnel = dbConfig.kubectl !== undefined && !isLocalEnvironment && isLocal;
509
512
 
510
513
  return {
514
+ host: envConfig.host,
511
515
  user: envConfig.user,
512
516
  database: envConfig.database,
517
+ password: envConfig.password,
513
518
  passwordEnvVar: envConfig.passwordEnvVar,
514
519
  port: envConfig.port,
515
- needsTunnel: !isLocal && dbConfig.kubectl !== undefined,
516
- allowMutations: isLocal,
520
+ needsTunnel,
521
+ allowMutations: isLocalEnvironment,
517
522
  };
518
523
  };
519
524
 
@@ -4,6 +4,7 @@ export type { Environment, OutputFormat };
4
4
  export type SchemaMode = "tables" | "columns" | "full" | "relationships";
5
5
 
6
6
  export type DbConfig = {
7
+ host: string;
7
8
  user: string;
8
9
  database: string;
9
10
  password?: string;