@blogic-cz/agent-tools 0.2.1 → 0.2.3

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.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "CLI tools for AI coding agent workflows — GitHub, database, Kubernetes, Azure DevOps, logs, and sessions",
5
5
  "keywords": [
6
6
  "agent",
@@ -34,7 +34,17 @@
34
34
  ],
35
35
  "type": "module",
36
36
  "imports": {
37
- "#src/*": "./src/*"
37
+ "#shared": "./src/shared/index.ts",
38
+ "#shared/*": "./src/shared/*.ts",
39
+ "#config": "./src/config/index.ts",
40
+ "#config/*": "./src/config/*.ts",
41
+ "#gh/*": "./src/gh-tool/*.ts",
42
+ "#k8s/*": "./src/k8s-tool/*.ts",
43
+ "#db/*": "./src/db-tool/*.ts",
44
+ "#logs/*": "./src/logs-tool/*.ts",
45
+ "#az/*": "./src/az-tool/*.ts",
46
+ "#guard": "./src/credential-guard/index.ts",
47
+ "#session/*": "./src/session-tool/*.ts"
38
48
  },
39
49
  "exports": {
40
50
  ".": "./src/index.ts",
@@ -121,6 +121,10 @@
121
121
  "description": "Database name.",
122
122
  "type": "string"
123
123
  },
124
+ "password": {
125
+ "description": "Plain-text database password. Use for local development only; prefer passwordEnvVar for non-local environments.",
126
+ "type": "string"
127
+ },
124
128
  "passwordEnvVar": {
125
129
  "description": "Name of the environment variable holding the database password.",
126
130
  "type": "string"
@@ -3,7 +3,7 @@ import { Command, Flag } from "effect/unstable/cli";
3
3
  import { BunRuntime, BunServices } from "@effect/platform-bun";
4
4
  import { Console, Effect, Layer, Option } from "effect";
5
5
 
6
- import { formatAny, formatOption, formatOutput, renderCauseToStderr, VERSION } from "#src/shared";
6
+ import { formatAny, formatOption, formatOutput, renderCauseToStderr, VERSION } from "#shared";
7
7
  import {
8
8
  findFailedJobs,
9
9
  getBuildJobSummary,
@@ -12,7 +12,7 @@ import {
12
12
  getBuildTimeline,
13
13
  } from "./build";
14
14
  import { AzService, AzServiceLayer } from "./service";
15
- import { ConfigServiceLayer } from "#src/config";
15
+ import { ConfigServiceLayer } from "#config";
16
16
 
17
17
  // ---------------------------------------------------------------------------
18
18
  // Common flags shared across build subcommands
@@ -2,12 +2,12 @@ import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
2
2
  import { Effect, Layer, ServiceMap, Stream, Option } from "effect";
3
3
 
4
4
  import type { InvokeParams } from "./types";
5
- import type { AzureConfig } from "#src/config/types";
5
+ import type { AzureConfig } from "#config/types";
6
6
 
7
7
  import { DIRECT_AZ_COMMANDS, STANDALONE_AZ_COMMANDS } from "./config";
8
8
  import { AzSecurityError, AzCommandError, AzTimeoutError, AzParseError } from "./errors";
9
9
  import { isCommandAllowed, isInvokeAllowed } from "./security";
10
- import { ConfigService, getToolConfig } from "#src/config";
10
+ import { ConfigService, getToolConfig } from "#config";
11
11
 
12
12
  export class AzService extends ServiceMap.Service<
13
13
  AzService,
@@ -33,6 +33,7 @@ const DbEnvConfigSchema = Schema.Struct({
33
33
  port: Schema.Number,
34
34
  user: Schema.String,
35
35
  database: Schema.String,
36
+ password: Schema.optionalKey(Schema.String),
36
37
  passwordEnvVar: Schema.optionalKey(Schema.String),
37
38
  });
38
39
 
@@ -19,6 +19,8 @@ export type DbEnvConfig = {
19
19
  port: number;
20
20
  user: string;
21
21
  database: string;
22
+ /** Plain-text password for local development. Prefer passwordEnvVar for non-local environments. */
23
+ password?: string;
22
24
  /** Name of environment variable holding the password, e.g. "DB_TEST_PWD" */
23
25
  passwordEnvVar?: string;
24
26
  };
@@ -14,7 +14,7 @@
14
14
  * at infrastructure level (K8s RBAC, file permissions, etc.)
15
15
  */
16
16
 
17
- import type { CliToolOverride, CredentialGuardConfig } from "#src/config/types.ts";
17
+ import type { CliToolOverride, CredentialGuardConfig } from "#config/types.ts";
18
18
 
19
19
  // ============================================================================
20
20
  // TYPES
@@ -1,7 +1,7 @@
1
1
  import { Effect, Layer, ServiceMap } from "effect";
2
2
 
3
- import { ConfigService, getToolConfig } from "#src/config";
4
- import type { DatabaseConfig } from "#src/config";
3
+ import { ConfigService, getToolConfig } from "#config";
4
+ import type { DatabaseConfig } from "#config";
5
5
 
6
6
  /**
7
7
  * DbConfigService wraps the resolved DatabaseConfig for the selected profile.
@@ -5,8 +5,8 @@ import { Console, Effect, Layer, Option } from "effect";
5
5
 
6
6
  import type { SchemaMode } from "./types";
7
7
 
8
- import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#src/shared";
9
- import { ConfigService, ConfigServiceLayer, getDefaultEnvironment } from "#src/config";
8
+ import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#shared";
9
+ import { ConfigService, ConfigServiceLayer, getDefaultEnvironment } from "#config";
10
10
  import { makeDbConfigLayer } from "./config-service";
11
11
  import { DbConnectionError } from "./errors";
12
12
  import { DbService } from "./service";
@@ -1,4 +1,4 @@
1
- import type { Environment, OutputFormat } from "#src/shared";
1
+ import type { Environment, OutputFormat } from "#shared";
2
2
  export type { Environment, OutputFormat };
3
3
 
4
4
  export type SchemaMode = "tables" | "columns" | "full" | "relationships";
@@ -3,7 +3,7 @@ import { Command } from "effect/unstable/cli";
3
3
  import { BunRuntime, BunServices } from "@effect/platform-bun";
4
4
  import { Effect, Layer } from "effect";
5
5
 
6
- import { renderCauseToStderr, VERSION } from "#src/shared";
6
+ import { renderCauseToStderr, VERSION } from "#shared";
7
7
  import {
8
8
  issueListCommand,
9
9
  issueViewCommand,
@@ -1,7 +1,7 @@
1
1
  import { Command, Flag } from "effect/unstable/cli";
2
2
  import { Effect, Option } from "effect";
3
3
 
4
- import { formatOption, logFormatted } from "#src/shared";
4
+ import { formatOption, logFormatted } from "#shared";
5
5
  import { GitHubCommandError } from "./errors";
6
6
  import { GitHubService } from "./service";
7
7
 
@@ -1,15 +1,15 @@
1
1
  import { Command, Flag } from "effect/unstable/cli";
2
2
  import { Effect, Option } from "effect";
3
3
 
4
- import type { PRStatusResult } from "#src/gh-tool/types";
4
+ import type { PRStatusResult } from "#gh/types";
5
5
 
6
- import { formatOption, logFormatted } from "#src/shared";
6
+ import { formatOption, logFormatted } from "#shared";
7
7
  import {
8
8
  CI_CHECK_WATCH_TIMEOUT_MS,
9
9
  DEFAULT_DELETE_BRANCH,
10
10
  DEFAULT_MERGE_STRATEGY,
11
11
  MERGE_STRATEGIES,
12
- } from "#src/gh-tool/config";
12
+ } from "#gh/config";
13
13
 
14
14
  import {
15
15
  createPR,
@@ -1,15 +1,9 @@
1
1
  import { Console, Effect, Option } from "effect";
2
2
 
3
- import type {
4
- BranchPRDetail,
5
- CheckResult,
6
- MergeResult,
7
- MergeStrategy,
8
- PRInfo,
9
- } from "#src/gh-tool/types";
10
-
11
- import { GitHubCommandError, GitHubMergeError, GitHubTimeoutError } from "#src/gh-tool/errors";
12
- import { GitHubService } from "#src/gh-tool/service";
3
+ import type { BranchPRDetail, CheckResult, MergeResult, MergeStrategy, PRInfo } from "#gh/types";
4
+
5
+ import { GitHubCommandError, GitHubMergeError, GitHubTimeoutError } from "#gh/errors";
6
+ import { GitHubService } from "#gh/service";
13
7
 
14
8
  import type { ButStatusJson, PRViewJsonResult } from "./helpers";
15
9
  import { runLocalCommand } from "./helpers";
@@ -1,7 +1,7 @@
1
1
  import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
2
2
  import { Effect, Stream } from "effect";
3
3
 
4
- import { GitHubCommandError } from "#src/gh-tool/errors";
4
+ import { GitHubCommandError } from "#gh/errors";
5
5
 
6
6
  export type LocalCommandResult = {
7
7
  stdout: string;
@@ -7,10 +7,10 @@ import type {
7
7
  IsoTimestamp,
8
8
  ReviewComment,
9
9
  ReviewThread,
10
- } from "#src/gh-tool/types";
10
+ } from "#gh/types";
11
11
 
12
- import { GitHubCommandError } from "#src/gh-tool/errors";
13
- import { GitHubService } from "#src/gh-tool/service";
12
+ import { GitHubCommandError } from "#gh/errors";
13
+ import { GitHubService } from "#gh/service";
14
14
 
15
15
  import { viewPR } from "./core";
16
16
 
@@ -1,7 +1,7 @@
1
1
  import { Command, Flag } from "effect/unstable/cli";
2
2
  import { Effect, Option } from "effect";
3
3
 
4
- import { formatOption, logFormatted } from "#src/shared";
4
+ import { formatOption, logFormatted } from "#shared";
5
5
  import { GitHubCommandError } from "./errors";
6
6
  import { GitHubService } from "./service";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { Command, Flag } from "effect/unstable/cli";
2
2
  import { Console, Effect, Option } from "effect";
3
3
 
4
- import { formatOption, logFormatted } from "#src/shared";
4
+ import { formatOption, logFormatted } from "#shared";
5
5
  import { GitHubCommandError, GitHubNotFoundError } from "./errors";
6
6
  import { GitHubService } from "./service";
7
7
 
@@ -5,15 +5,10 @@ import { Console, Effect, Layer, Option } from "effect";
5
5
 
6
6
  import type { CommandResult } from "./types";
7
7
 
8
- import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#src/shared";
8
+ import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#shared";
9
9
  import { K8sService, K8sServiceLayer } from "./service";
10
- import {
11
- ConfigService,
12
- ConfigServiceLayer,
13
- getDefaultEnvironment,
14
- getToolConfig,
15
- } from "#src/config";
16
- import type { K8sConfig } from "#src/config";
10
+ import { ConfigService, ConfigServiceLayer, getDefaultEnvironment, getToolConfig } from "#config";
11
+ import type { K8sConfig } from "#config";
17
12
  import { K8sContextError } from "./errors";
18
13
 
19
14
  /**
@@ -4,8 +4,8 @@ import { Effect, Layer, Option, Ref, ServiceMap, Stream } from "effect";
4
4
  import type { CommandResult, Environment } from "./types";
5
5
 
6
6
  import { K8sCommandError, K8sContextError, K8sTimeoutError } from "./errors";
7
- import { ConfigService, getToolConfig } from "#src/config";
8
- import type { K8sConfig } from "#src/config";
7
+ import { ConfigService, getToolConfig } from "#config";
8
+ import type { K8sConfig } from "#config";
9
9
 
10
10
  export class K8sService extends ServiceMap.Service<
11
11
  K8sService,
@@ -20,8 +20,8 @@ import { Console, Effect, Layer, Option, Result } from "effect";
20
20
 
21
21
  import type { Environment, LogResult, ReadOptions } from "./types";
22
22
 
23
- import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#src/shared";
24
- import { ConfigService, ConfigServiceLayer, getDefaultEnvironment } from "#src/config";
23
+ import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#shared";
24
+ import { ConfigService, ConfigServiceLayer, getDefaultEnvironment } from "#config";
25
25
  import { LogsConfigError, LogsNotFoundError, LogsReadError, LogsTimeoutError } from "./errors";
26
26
  import { LogsService, LogsServiceLayer } from "./service";
27
27
 
@@ -3,10 +3,10 @@ import { Effect, Layer, Result, ServiceMap, Stream } from "effect";
3
3
 
4
4
  import type { Environment, LogFile, ReadOptions } from "./types";
5
5
 
6
- import { K8sCommandError } from "#src/k8s-tool/errors";
7
- import { K8sService, K8sServiceLayer } from "#src/k8s-tool/service";
8
- import { ConfigService, ConfigServiceLayer, getToolConfig } from "#src/config/loader";
9
- import type { LogsConfig } from "#src/config/types";
6
+ import { K8sCommandError } from "#k8s/errors";
7
+ import { K8sService, K8sServiceLayer } from "#k8s/service";
8
+ import { ConfigService, ConfigServiceLayer, getToolConfig } from "#config/loader";
9
+ import type { LogsConfig } from "#config/types";
10
10
  import { LogsNotFoundError, LogsReadError, type LogsError } from "./errors";
11
11
 
12
12
  export const parseLogFiles = (output: string): LogFile[] => {
@@ -1,4 +1,4 @@
1
- import type { Environment, OutputFormat } from "#src/shared";
1
+ import type { Environment, OutputFormat } from "#shared";
2
2
  export type { Environment, OutputFormat };
3
3
 
4
4
  export type LogFile = {
@@ -2,7 +2,7 @@ import { Effect, Layer, ServiceMap } from "effect";
2
2
  import { homedir } from "node:os";
3
3
  import { join } from "node:path";
4
4
 
5
- import { loadConfig } from "#src/config/loader";
5
+ import { loadConfig } from "#config/loader";
6
6
 
7
7
  /**
8
8
  * Resolves the OpenCode storage base path from config or default.
@@ -13,7 +13,7 @@ import { Console, Effect, Layer, Result } from "effect";
13
13
 
14
14
  import type { MessageSummary, SessionResult } from "./types";
15
15
 
16
- import { formatOption, formatOutput, VERSION } from "#src/shared";
16
+ import { formatOption, formatOutput, VERSION } from "#shared";
17
17
  import { ResolvedPaths, ResolvedPathsLayer } from "./config";
18
18
  import { SessionStorageNotFoundError } from "./errors";
19
19
  import { formatDate, SessionService, SessionServiceLayer, truncate } from "./service";
@@ -1,4 +1,4 @@
1
- import type { OutputFormat } from "#src/shared";
1
+ import type { OutputFormat } from "#shared";
2
2
 
3
3
  export type { OutputFormat };
4
4