jinzd-ai-cli 0.4.27 → 0.4.28

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.
@@ -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.27";
11
+ var VERSION = "0.4.28";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
@@ -9,7 +9,7 @@ import {
9
9
  SUBAGENT_DEFAULT_MAX_ROUNDS,
10
10
  SUBAGENT_MAX_ROUNDS_LIMIT,
11
11
  runTestsTool
12
- } from "./chunk-LVEJKGIN.js";
12
+ } from "./chunk-7SW4XRDJ.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.27";
9
+ var VERSION = "0.4.28";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -7,7 +7,7 @@ import {
7
7
  ProviderNotFoundError,
8
8
  RateLimitError,
9
9
  schemaToJsonSchema
10
- } from "./chunk-22KSHJZJ.js";
10
+ } from "./chunk-EWJQOJSB.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-LVEJKGIN.js";
23
+ } from "./chunk-7SW4XRDJ.js";
24
24
 
25
25
  // src/config/config-manager.ts
26
26
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -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-42RXTDZD.js");
390
+ const { TaskOrchestrator } = await import("./task-orchestrator-TDBWMIH4.js");
391
391
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
392
392
  let interrupted = false;
393
393
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  saveDevState,
21
21
  sessionHasMeaningfulContent,
22
22
  setupProxy
23
- } from "./chunk-MONMUTCS.js";
23
+ } from "./chunk-SAJICC6G.js";
24
24
  import {
25
25
  ToolExecutor,
26
26
  ToolRegistry,
@@ -33,7 +33,7 @@ import {
33
33
  spawnAgentContext,
34
34
  theme,
35
35
  undoStack
36
- } from "./chunk-22KSHJZJ.js";
36
+ } from "./chunk-EWJQOJSB.js";
37
37
  import {
38
38
  fileCheckpoints
39
39
  } from "./chunk-4BKXL7SM.js";
@@ -57,7 +57,7 @@ import {
57
57
  SKILLS_DIR_NAME,
58
58
  VERSION,
59
59
  buildUserIdentityPrompt
60
- } from "./chunk-LVEJKGIN.js";
60
+ } from "./chunk-7SW4XRDJ.js";
61
61
 
62
62
  // src/index.ts
63
63
  import { program } from "commander";
@@ -2083,7 +2083,7 @@ ${hint}` : "")
2083
2083
  usage: "/test [command|filter]",
2084
2084
  async execute(args, ctx) {
2085
2085
  try {
2086
- const { executeTests } = await import("./run-tests-6PMTHGR3.js");
2086
+ const { executeTests } = await import("./run-tests-QRH2Z2OH.js");
2087
2087
  const argStr = args.join(" ").trim();
2088
2088
  let testArgs = {};
2089
2089
  if (argStr) {
@@ -3089,17 +3089,27 @@ var CustomCommandManager = class {
3089
3089
  // src/repl/notify.ts
3090
3090
  import { spawn } from "child_process";
3091
3091
  import { platform as platform2 } from "os";
3092
+ function safeSpawn(cmd, args) {
3093
+ let child;
3094
+ try {
3095
+ child = spawn(cmd, args, { detached: true, stdio: "ignore" });
3096
+ } catch {
3097
+ return;
3098
+ }
3099
+ child.on("error", () => {
3100
+ });
3101
+ child.unref();
3102
+ }
3092
3103
  function sendNotification(title, body) {
3093
3104
  const plat = platform2();
3094
3105
  try {
3095
3106
  if (plat === "darwin") {
3096
3107
  const safeTitle = title.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
3097
3108
  const safeBody = body.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
3098
- spawn(
3099
- "osascript",
3100
- ["-e", `display notification "${safeBody}" with title "${safeTitle}"`],
3101
- { detached: true, stdio: "ignore" }
3102
- ).unref();
3109
+ safeSpawn("osascript", [
3110
+ "-e",
3111
+ `display notification "${safeBody}" with title "${safeTitle}"`
3112
+ ]);
3103
3113
  } else if (plat === "win32") {
3104
3114
  const safeTitle = title.replace(/`/g, "``").replace(/"/g, '`"');
3105
3115
  const safeBody = body.replace(/`/g, "``").replace(/"/g, '`"');
@@ -3114,13 +3124,16 @@ function sendNotification(title, body) {
3114
3124
  "Start-Sleep -Milliseconds 3500",
3115
3125
  "$n.Dispose()"
3116
3126
  ].join("; ");
3117
- spawn(
3118
- "powershell",
3119
- ["-NoProfile", "-NonInteractive", "-WindowStyle", "Hidden", "-Command", script],
3120
- { detached: true, stdio: "ignore" }
3121
- ).unref();
3127
+ safeSpawn("powershell", [
3128
+ "-NoProfile",
3129
+ "-NonInteractive",
3130
+ "-WindowStyle",
3131
+ "Hidden",
3132
+ "-Command",
3133
+ script
3134
+ ]);
3122
3135
  } else {
3123
- spawn("notify-send", [title, body], { detached: true, stdio: "ignore" }).unref();
3136
+ safeSpawn("notify-send", [title, body]);
3124
3137
  }
3125
3138
  } catch {
3126
3139
  }
@@ -5365,7 +5378,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5365
5378
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5366
5379
  process.exit(1);
5367
5380
  }
5368
- const { startWebServer } = await import("./server-PVBEJXS6.js");
5381
+ const { startWebServer } = await import("./server-46ANSDN7.js");
5369
5382
  await startWebServer({ port, host: options.host });
5370
5383
  });
5371
5384
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
@@ -5598,7 +5611,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
5598
5611
  }),
5599
5612
  config.get("customProviders")
5600
5613
  );
5601
- const { startHub } = await import("./hub-VYCI73QC.js");
5614
+ const { startHub } = await import("./hub-QJBT4RDT.js");
5602
5615
  await startHub(
5603
5616
  {
5604
5617
  topic: topic ?? "",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-H7OVRCEJ.js";
4
+ } from "./chunk-L7OCMF5F.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-LVEJKGIN.js";
5
+ } from "./chunk-7SW4XRDJ.js";
6
6
  export {
7
7
  executeTests,
8
8
  runTestsTool
@@ -15,7 +15,7 @@ import {
15
15
  hadPreviousWriteToolCalls,
16
16
  loadDevState,
17
17
  setupProxy
18
- } from "./chunk-MONMUTCS.js";
18
+ } from "./chunk-SAJICC6G.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-22KSHJZJ.js";
36
+ } from "./chunk-EWJQOJSB.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-LVEJKGIN.js";
55
+ } from "./chunk-7SW4XRDJ.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-6PMTHGR3.js");
1609
+ const { executeTests } = await import("./run-tests-QRH2Z2OH.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-22KSHJZJ.js";
7
+ } from "./chunk-EWJQOJSB.js";
8
8
  import "./chunk-4BKXL7SM.js";
9
9
  import {
10
10
  SUBAGENT_ALLOWED_TOOLS
11
- } from "./chunk-LVEJKGIN.js";
11
+ } from "./chunk-7SW4XRDJ.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.27",
3
+ "version": "0.4.28",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",