@blogic-cz/agent-tools 0.14.3 → 0.14.4

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.3",
3
+ "version": "0.14.4",
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",
@@ -183,6 +183,7 @@ export class DbService extends Context.Service<
183
183
  dbConfig,
184
184
  (command, _label) => executeShellCommand(command),
185
185
  effect,
186
+ { tryWithoutPrerequisites: true },
186
187
  ).pipe(
187
188
  Effect.mapError((error) =>
188
189
  isPrerequisiteRunError(error)
@@ -220,6 +220,7 @@ export class K8sService extends Context.Service<
220
220
  command: fullCommand,
221
221
  };
222
222
  }),
223
+ { tryWithoutPrerequisites: true },
223
224
  ).pipe(
224
225
  Effect.mapError((error) =>
225
226
  isPrerequisiteRunError(error)
@@ -116,6 +116,7 @@ export const runWithProfilePrerequisites = <A, E, CommandError>(
116
116
  profile: ProfilePrerequisites,
117
117
  runCommand: PrerequisiteCommandRunner<CommandError>,
118
118
  effect: Effect.Effect<A, E, never>,
119
+ options?: { tryWithoutPrerequisites?: boolean },
119
120
  ): Effect.Effect<A, E | PrerequisiteRunError, never> => {
120
121
  const prerequisites = normalizeProfilePrerequisites(profile);
121
122
  const vpnPrerequisites = prerequisites.filter((prerequisite) => prerequisite.type === "vpn");
@@ -125,6 +126,13 @@ export const runWithProfilePrerequisites = <A, E, CommandError>(
125
126
  }
126
127
 
127
128
  return Effect.gen(function* () {
129
+ if (options?.tryWithoutPrerequisites) {
130
+ const directResult = yield* effect.pipe(Effect.result);
131
+ if (Result.isSuccess(directResult)) {
132
+ return directResult.success;
133
+ }
134
+ }
135
+
128
136
  const startedDrivers: Array<{ driver: ResolvedVpnDriver; cooldownMs: number }> = [];
129
137
 
130
138
  for (const prerequisite of vpnPrerequisites) {