@simonfestl/husky-cli 1.38.3 → 1.38.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.
@@ -52,7 +52,10 @@ gotessCommand
52
52
  const smsRequestTime = Date.now();
53
53
  console.log(" SMS sent! Waiting for code via webhook");
54
54
  const config = getConfig();
55
- const apiUrl = config.apiUrl || "https://husky-api-474966775596.europe-west1.run.app";
55
+ const apiUrl = process.env.HUSKY_API_URL || config.apiUrl;
56
+ if (!apiUrl) {
57
+ throw new Error("API URL not configured. Run: husky config set api-url <url>");
58
+ }
56
59
  const code = await pollSmsCode(apiUrl, smsRequestTime);
57
60
  if (!code) {
58
61
  console.error("\n ✗ Timeout waiting for SMS code");
@@ -296,7 +296,7 @@ async function showCliConfig() {
296
296
  }
297
297
  async function setApiUrl() {
298
298
  const url = await input({
299
- message: "API URL (e.g., https://your-dashboard.run.app):",
299
+ message: "API URL (e.g., https://your-api.run.app):",
300
300
  validate: (value) => {
301
301
  if (!value)
302
302
  return "URL is required";
@@ -1,12 +1,21 @@
1
1
  import { Command } from "commander";
2
- const API_URL = process.env.HUSKY_API_URL || "https://huskyv0-dashboard-474966775596.europe-west1.run.app";
3
- const API_KEY = process.env.HUSKY_API_KEY || "";
2
+ import { getConfig } from "./config.js";
3
+ function resolveApiConfig() {
4
+ const config = getConfig();
5
+ const apiUrl = process.env.HUSKY_API_URL || config.apiUrl;
6
+ const apiKey = process.env.HUSKY_API_KEY || config.apiKey || "";
7
+ if (!apiUrl) {
8
+ throw new Error("API URL not configured. Run: husky config set api-url <url>");
9
+ }
10
+ return { apiUrl, apiKey };
11
+ }
4
12
  async function fetchApi(path, options = {}) {
5
- const response = await fetch(`${API_URL}${path}`, {
13
+ const { apiUrl, apiKey } = resolveApiConfig();
14
+ const response = await fetch(`${apiUrl}${path}`, {
6
15
  ...options,
7
16
  headers: {
8
17
  "Content-Type": "application/json",
9
- "x-api-key": API_KEY,
18
+ "x-api-key": apiKey,
10
19
  ...options.headers,
11
20
  },
12
21
  });
@@ -29,7 +29,7 @@ export class QdrantClient {
29
29
  if (!qdrantConfig.url || qdrantConfig.url === 'http://localhost:6333') {
30
30
  if (!process.env.QDRANT_URL && !process.env[`${env}_QDRANT_URL`] && !process.env.HUSKY_QDRANT_URL) {
31
31
  throw new Error('Missing Qdrant URL. Configure with:\n' +
32
- ' husky config set qdrant-url http://10.132.0.46:6333\n' +
32
+ ' husky config set qdrant-url http://localhost:6333\n' +
33
33
  'Or set env var: HUSKY_QDRANT_URL\n\n' +
34
34
  'Note: Internal Qdrant VM - no API key needed (VPC secured)');
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonfestl/husky-cli",
3
- "version": "1.38.3",
3
+ "version": "1.38.4",
4
4
  "description": "CLI for Huskyv0 Task Orchestration with Claude Agent SDK",
5
5
  "type": "module",
6
6
  "bin": {