@johpaz/hive-cli 1.0.5 → 1.0.6

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": "@johpaz/hive-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Hive CLI — Command line interface for the Hive AI Gateway",
5
5
  "bin": {
6
6
  "hive": "src/index.ts"
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@clack/prompts": "^1.0.1",
18
- "@johpaz/hive-core": "^1.0.5",
18
+ "@johpaz/hive-core": "^1.0.6",
19
19
  "js-yaml": "latest"
20
20
  },
21
21
  "devDependencies": {
@@ -51,7 +51,7 @@ export async function start(flags: string[]): Promise<void> {
51
51
  ║ ██║ ██║██║ ╚████╔╝ ███████╗ ║
52
52
  ║ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚══════╝ ║
53
53
  ║ ║
54
- ║ Personal AI Gateway — v1.0.5
54
+ ║ Personal AI Gateway — v1.0.6
55
55
  ╚════════════════════════════════════════════╝
56
56
  `);
57
57
 
@@ -3,7 +3,7 @@ import * as fs from "fs";
3
3
  import * as path from "path";
4
4
  import * as yaml from "js-yaml";
5
5
 
6
- const VERSION = "1.0.5";
6
+ const VERSION = "1.0.6";
7
7
 
8
8
  const DEFAULT_MODELS: Record<string, string> = {
9
9
  anthropic: "claude-sonnet-4-6",
@@ -229,18 +229,42 @@ async function generateConfig(config: OnboardConfig): Promise<void> {
229
229
  fs.mkdirSync(hiveDir, { recursive: true });
230
230
  }
231
231
 
232
+ const baseUrlMap: Record<string, string> = {
233
+ gemini: "https://generativelanguage.googleapis.com/v1beta",
234
+ deepseek: "https://api.deepseek.com/v1",
235
+ kimi: "https://api.moonshot.cn/v1",
236
+ ollama: "http://localhost:11434/api",
237
+ };
238
+
239
+ const providersConfig: Record<string, Record<string, unknown>> = {};
240
+
241
+ if (config.provider !== "ollama" && config.apiKey) {
242
+ providersConfig[config.provider] = {
243
+ apiKey: config.apiKey,
244
+ };
245
+ if (baseUrlMap[config.provider]) {
246
+ providersConfig[config.provider].baseUrl = baseUrlMap[config.provider];
247
+ }
248
+ } else if (config.provider === "ollama") {
249
+ providersConfig[config.provider] = {
250
+ baseUrl: baseUrlMap[config.provider],
251
+ };
252
+ }
253
+
232
254
  const configObj: Record<string, unknown> = {
233
255
  name: config.agentName,
234
256
  version: VERSION,
235
257
  gateway: {
236
- port: 18790,
237
258
  host: "127.0.0.1",
238
- token: generateToken(),
259
+ port: 18790,
260
+ authToken: generateToken(),
239
261
  },
240
- model: {
241
- provider: config.provider,
242
- name: config.model,
243
- apiKey: config.provider === "ollama" ? "" : config.apiKey,
262
+ models: {
263
+ defaultProvider: config.provider,
264
+ defaults: {
265
+ [config.provider]: config.model,
266
+ },
267
+ providers: providersConfig,
244
268
  },
245
269
  agents: {
246
270
  list: [
@@ -255,13 +279,10 @@ async function generateConfig(config: OnboardConfig): Promise<void> {
255
279
  },
256
280
  channels: {},
257
281
  skills: {
258
- watch: true,
259
282
  allowBundled: [],
260
- denyBundled: [],
261
283
  },
262
284
  sessions: {
263
285
  pruneAfterHours: 168,
264
- pruneInterval: 24,
265
286
  },
266
287
  logging: {
267
288
  level: "info",
@@ -270,16 +291,6 @@ async function generateConfig(config: OnboardConfig): Promise<void> {
270
291
  },
271
292
  };
272
293
 
273
- if (config.provider === "gemini") {
274
- (configObj.model as Record<string, unknown>).baseUrl = "https://generativelanguage.googleapis.com/v1beta";
275
- } else if (config.provider === "deepseek") {
276
- (configObj.model as Record<string, unknown>).baseUrl = "https://api.deepseek.com/v1";
277
- } else if (config.provider === "kimi") {
278
- (configObj.model as Record<string, unknown>).baseUrl = "https://api.moonshot.cn/v1";
279
- } else if (config.provider === "ollama") {
280
- (configObj.model as Record<string, unknown>).baseUrl = "http://localhost:11434/api";
281
- }
282
-
283
294
  if (config.channel === "telegram" && config.channelToken) {
284
295
  configObj.channels = {
285
296
  telegram: {
package/src/index.ts CHANGED
@@ -14,7 +14,7 @@ import { securityAudit } from "./commands/security";
14
14
  import { installService } from "./commands/service";
15
15
  import { update } from "./commands/update";
16
16
 
17
- const VERSION = "1.0.5";
17
+ const VERSION = "1.0.6";
18
18
 
19
19
  const HELP = `
20
20
  🐝 Hive — Personal AI Gateway v${VERSION}