@blogic-cz/agent-tools 0.2.1 → 0.2.2
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 +12 -2
- package/src/az-tool/index.ts +2 -2
- package/src/az-tool/service.ts +2 -2
- package/src/credential-guard/index.ts +1 -1
- package/src/db-tool/config-service.ts +2 -2
- package/src/db-tool/index.ts +2 -2
- package/src/db-tool/types.ts +1 -1
- package/src/gh-tool/index.ts +1 -1
- package/src/gh-tool/issue.ts +1 -1
- package/src/gh-tool/pr/commands.ts +3 -3
- package/src/gh-tool/pr/core.ts +4 -10
- package/src/gh-tool/pr/helpers.ts +1 -1
- package/src/gh-tool/pr/review.ts +3 -3
- package/src/gh-tool/repo.ts +1 -1
- package/src/gh-tool/workflow.ts +1 -1
- package/src/k8s-tool/index.ts +3 -8
- package/src/k8s-tool/service.ts +2 -2
- package/src/logs-tool/index.ts +2 -2
- package/src/logs-tool/service.ts +4 -4
- package/src/logs-tool/types.ts +1 -1
- package/src/session-tool/config.ts +1 -1
- package/src/session-tool/index.ts +1 -1
- package/src/session-tool/types.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blogic-cz/agent-tools",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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
|
-
"#
|
|
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",
|
package/src/az-tool/index.ts
CHANGED
|
@@ -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 "#
|
|
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 "#
|
|
15
|
+
import { ConfigServiceLayer } from "#config";
|
|
16
16
|
|
|
17
17
|
// ---------------------------------------------------------------------------
|
|
18
18
|
// Common flags shared across build subcommands
|
package/src/az-tool/service.ts
CHANGED
|
@@ -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 "#
|
|
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 "#
|
|
10
|
+
import { ConfigService, getToolConfig } from "#config";
|
|
11
11
|
|
|
12
12
|
export class AzService extends ServiceMap.Service<
|
|
13
13
|
AzService,
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* at infrastructure level (K8s RBAC, file permissions, etc.)
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type { CliToolOverride, CredentialGuardConfig } from "#
|
|
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 "#
|
|
4
|
-
import type { DatabaseConfig } from "#
|
|
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.
|
package/src/db-tool/index.ts
CHANGED
|
@@ -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 "#
|
|
9
|
-
import { ConfigService, ConfigServiceLayer, getDefaultEnvironment } from "#
|
|
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";
|
package/src/db-tool/types.ts
CHANGED
package/src/gh-tool/index.ts
CHANGED
|
@@ -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 "#
|
|
6
|
+
import { renderCauseToStderr, VERSION } from "#shared";
|
|
7
7
|
import {
|
|
8
8
|
issueListCommand,
|
|
9
9
|
issueViewCommand,
|
package/src/gh-tool/issue.ts
CHANGED
|
@@ -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 "#
|
|
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 "#
|
|
4
|
+
import type { PRStatusResult } from "#gh/types";
|
|
5
5
|
|
|
6
|
-
import { formatOption, logFormatted } from "#
|
|
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 "#
|
|
12
|
+
} from "#gh/config";
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
15
|
createPR,
|
package/src/gh-tool/pr/core.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { Console, Effect, Option } from "effect";
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 "#
|
|
4
|
+
import { GitHubCommandError } from "#gh/errors";
|
|
5
5
|
|
|
6
6
|
export type LocalCommandResult = {
|
|
7
7
|
stdout: string;
|
package/src/gh-tool/pr/review.ts
CHANGED
|
@@ -7,10 +7,10 @@ import type {
|
|
|
7
7
|
IsoTimestamp,
|
|
8
8
|
ReviewComment,
|
|
9
9
|
ReviewThread,
|
|
10
|
-
} from "#
|
|
10
|
+
} from "#gh/types";
|
|
11
11
|
|
|
12
|
-
import { GitHubCommandError } from "#
|
|
13
|
-
import { GitHubService } from "#
|
|
12
|
+
import { GitHubCommandError } from "#gh/errors";
|
|
13
|
+
import { GitHubService } from "#gh/service";
|
|
14
14
|
|
|
15
15
|
import { viewPR } from "./core";
|
|
16
16
|
|
package/src/gh-tool/repo.ts
CHANGED
|
@@ -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 "#
|
|
4
|
+
import { formatOption, logFormatted } from "#shared";
|
|
5
5
|
import { GitHubCommandError } from "./errors";
|
|
6
6
|
import { GitHubService } from "./service";
|
|
7
7
|
|
package/src/gh-tool/workflow.ts
CHANGED
|
@@ -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 "#
|
|
4
|
+
import { formatOption, logFormatted } from "#shared";
|
|
5
5
|
import { GitHubCommandError, GitHubNotFoundError } from "./errors";
|
|
6
6
|
import { GitHubService } from "./service";
|
|
7
7
|
|
package/src/k8s-tool/index.ts
CHANGED
|
@@ -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 "#
|
|
8
|
+
import { formatOption, formatOutput, renderCauseToStderr, VERSION } from "#shared";
|
|
9
9
|
import { K8sService, K8sServiceLayer } from "./service";
|
|
10
|
-
import {
|
|
11
|
-
|
|
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
|
/**
|
package/src/k8s-tool/service.ts
CHANGED
|
@@ -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 "#
|
|
8
|
-
import type { K8sConfig } from "#
|
|
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,
|
package/src/logs-tool/index.ts
CHANGED
|
@@ -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 "#
|
|
24
|
-
import { ConfigService, ConfigServiceLayer, getDefaultEnvironment } from "#
|
|
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
|
|
package/src/logs-tool/service.ts
CHANGED
|
@@ -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 "#
|
|
7
|
-
import { K8sService, K8sServiceLayer } from "#
|
|
8
|
-
import { ConfigService, ConfigServiceLayer, getToolConfig } from "#
|
|
9
|
-
import type { LogsConfig } from "#
|
|
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[] => {
|
package/src/logs-tool/types.ts
CHANGED
|
@@ -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 "#
|
|
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 "#
|
|
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";
|