jinzd-ai-cli 0.4.37 → 0.4.38

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.
@@ -7,7 +7,7 @@ import {
7
7
  ProviderNotFoundError,
8
8
  RateLimitError,
9
9
  schemaToJsonSchema
10
- } from "./chunk-O7VAWXPG.js";
10
+ } from "./chunk-OZER6O2H.js";
11
11
  import {
12
12
  APP_NAME,
13
13
  CONFIG_DIR_NAME,
@@ -20,7 +20,7 @@ import {
20
20
  MCP_TOOL_PREFIX,
21
21
  PLUGINS_DIR_NAME,
22
22
  VERSION
23
- } from "./chunk-C7JYZYKR.js";
23
+ } from "./chunk-XPQEGIFO.js";
24
24
 
25
25
  // src/config/config-manager.ts
26
26
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -2097,7 +2097,9 @@ var OpenRouterProvider = class extends OpenAICompatibleProvider {
2097
2097
 
2098
2098
  // src/providers/ollama.ts
2099
2099
  var OllamaProvider = class extends OpenAICompatibleProvider {
2100
- defaultBaseUrl = "http://localhost:11434/v1";
2100
+ // 127.0.0.1 而非 localhost:Node.js 18+ 在 Windows 上优先解析 localhost 为 IPv6 (::1),
2101
+ // 但 Ollama 默认只监听 IPv4,导致连接失败。
2102
+ defaultBaseUrl = "http://127.0.0.1:11434/v1";
2101
2103
  defaultTimeout = 12e4;
2102
2104
  // 本地推理可能较慢,默认 2 分钟
2103
2105
  /** 动态模型列表 */
@@ -2105,7 +2107,7 @@ var OllamaProvider = class extends OpenAICompatibleProvider {
2105
2107
  /** 是否已成功连接过 Ollama */
2106
2108
  connected = false;
2107
2109
  /** base URL(不含 /v1),用于错误提示 */
2108
- ollamaHost = "http://localhost:11434";
2110
+ ollamaHost = "http://127.0.0.1:11434";
2109
2111
  info = {
2110
2112
  id: "ollama",
2111
2113
  displayName: "Ollama (Local)",
@@ -9,7 +9,7 @@ import {
9
9
  SUBAGENT_DEFAULT_MAX_ROUNDS,
10
10
  SUBAGENT_MAX_ROUNDS_LIMIT,
11
11
  runTestsTool
12
- } from "./chunk-C7JYZYKR.js";
12
+ } from "./chunk-XPQEGIFO.js";
13
13
 
14
14
  // src/tools/builtin/bash.ts
15
15
  import { execSync } from "child_process";
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.37";
9
+ var VERSION = "0.4.38";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -8,7 +8,7 @@ import { platform } from "os";
8
8
  import chalk from "chalk";
9
9
 
10
10
  // src/core/constants.ts
11
- var VERSION = "0.4.37";
11
+ var VERSION = "0.4.38";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
@@ -387,7 +387,7 @@ ${content}`);
387
387
  }
388
388
  }
389
389
  async function runTaskMode(config, providers, configManager, topic) {
390
- const { TaskOrchestrator } = await import("./task-orchestrator-XZIBEKWJ.js");
390
+ const { TaskOrchestrator } = await import("./task-orchestrator-XNINKBSB.js");
391
391
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
392
392
  let interrupted = false;
393
393
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  saveDevState,
25
25
  sessionHasMeaningfulContent,
26
26
  setupProxy
27
- } from "./chunk-ZV7MW5A3.js";
27
+ } from "./chunk-3UUFCRRL.js";
28
28
  import {
29
29
  ToolExecutor,
30
30
  ToolRegistry,
@@ -37,7 +37,7 @@ import {
37
37
  spawnAgentContext,
38
38
  theme,
39
39
  undoStack
40
- } from "./chunk-O7VAWXPG.js";
40
+ } from "./chunk-OZER6O2H.js";
41
41
  import {
42
42
  fileCheckpoints
43
43
  } from "./chunk-4BKXL7SM.js";
@@ -61,7 +61,7 @@ import {
61
61
  SKILLS_DIR_NAME,
62
62
  VERSION,
63
63
  buildUserIdentityPrompt
64
- } from "./chunk-C7JYZYKR.js";
64
+ } from "./chunk-XPQEGIFO.js";
65
65
 
66
66
  // src/index.ts
67
67
  import { program } from "commander";
@@ -2098,7 +2098,7 @@ ${hint}` : "")
2098
2098
  usage: "/test [command|filter]",
2099
2099
  async execute(args, ctx) {
2100
2100
  try {
2101
- const { executeTests } = await import("./run-tests-BIQILO4M.js");
2101
+ const { executeTests } = await import("./run-tests-3QVMT5WL.js");
2102
2102
  const argStr = args.join(" ").trim();
2103
2103
  let testArgs = {};
2104
2104
  if (argStr) {
@@ -5469,7 +5469,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5469
5469
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5470
5470
  process.exit(1);
5471
5471
  }
5472
- const { startWebServer } = await import("./server-NQVJVMEY.js");
5472
+ const { startWebServer } = await import("./server-G6ALWI6B.js");
5473
5473
  await startWebServer({ port, host: options.host });
5474
5474
  });
5475
5475
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
@@ -5702,7 +5702,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
5702
5702
  }),
5703
5703
  config.get("customProviders")
5704
5704
  );
5705
- const { startHub } = await import("./hub-27WTJE3J.js");
5705
+ const { startHub } = await import("./hub-VQPJKWKE.js");
5706
5706
  await startHub(
5707
5707
  {
5708
5708
  topic: topic ?? "",
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-C7JYZYKR.js";
5
+ } from "./chunk-XPQEGIFO.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-Q35HRYGB.js";
4
+ } from "./chunk-TNRYHTGD.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -15,7 +15,7 @@ import {
15
15
  hadPreviousWriteToolCalls,
16
16
  loadDevState,
17
17
  setupProxy
18
- } from "./chunk-ZV7MW5A3.js";
18
+ } from "./chunk-3UUFCRRL.js";
19
19
  import {
20
20
  AuthManager
21
21
  } from "./chunk-BYNY5JPB.js";
@@ -33,7 +33,7 @@ import {
33
33
  spawnAgentContext,
34
34
  truncateOutput,
35
35
  undoStack
36
- } from "./chunk-O7VAWXPG.js";
36
+ } from "./chunk-OZER6O2H.js";
37
37
  import "./chunk-4BKXL7SM.js";
38
38
  import {
39
39
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -52,7 +52,7 @@ import {
52
52
  SKILLS_DIR_NAME,
53
53
  VERSION,
54
54
  buildUserIdentityPrompt
55
- } from "./chunk-C7JYZYKR.js";
55
+ } from "./chunk-XPQEGIFO.js";
56
56
 
57
57
  // src/web/server.ts
58
58
  import express from "express";
@@ -1606,7 +1606,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
1606
1606
  case "test": {
1607
1607
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1608
1608
  try {
1609
- const { executeTests } = await import("./run-tests-BIQILO4M.js");
1609
+ const { executeTests } = await import("./run-tests-3QVMT5WL.js");
1610
1610
  const argStr = args.join(" ").trim();
1611
1611
  let testArgs = {};
1612
1612
  if (argStr) {
@@ -4,11 +4,11 @@ import {
4
4
  getDangerLevel,
5
5
  googleSearchContext,
6
6
  truncateOutput
7
- } from "./chunk-O7VAWXPG.js";
7
+ } from "./chunk-OZER6O2H.js";
8
8
  import "./chunk-4BKXL7SM.js";
9
9
  import {
10
10
  SUBAGENT_ALLOWED_TOOLS
11
- } from "./chunk-C7JYZYKR.js";
11
+ } from "./chunk-XPQEGIFO.js";
12
12
 
13
13
  // src/hub/task-orchestrator.ts
14
14
  import { createInterface } from "readline";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.37",
3
+ "version": "0.4.38",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",