jinzd-ai-cli 0.4.105 → 0.4.106

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.
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-B6NUQVYK.js";
4
+ } from "./chunk-OSGGBJSW.js";
5
5
  import "./chunk-2ZD3YTVM.js";
6
- import "./chunk-LX5FXZVP.js";
6
+ import "./chunk-ITHFJSJQ.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
 
9
9
  // src/cli/batch.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.105";
4
+ var VERSION = "0.4.106";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-3BICTI5M.js";
6
6
  import {
7
7
  runTestsTool
8
- } from "./chunk-LVX667WL.js";
8
+ } from "./chunk-W7ZG4KRQ.js";
9
9
  import {
10
10
  EnvLoader,
11
11
  NetworkError,
@@ -18,7 +18,7 @@ import {
18
18
  SUBAGENT_ALLOWED_TOOLS,
19
19
  SUBAGENT_DEFAULT_MAX_ROUNDS,
20
20
  SUBAGENT_MAX_ROUNDS_LIMIT
21
- } from "./chunk-LX5FXZVP.js";
21
+ } from "./chunk-ITHFJSJQ.js";
22
22
  import {
23
23
  fileCheckpoints
24
24
  } from "./chunk-4BKXL7SM.js";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-LX5FXZVP.js";
11
+ } from "./chunk-ITHFJSJQ.js";
12
12
 
13
13
  // src/config/config-manager.ts
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -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.105";
9
+ var VERSION = "0.4.106";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -133,7 +133,7 @@ var AUTHOR_EMAIL = "zhengdong.jin@gmail.com";
133
133
  var DESCRIPTION = "Cross-platform REPL-style AI conversation tool with multi-provider and agentic tool calling support";
134
134
 
135
135
  // src/tools/builtin/run-tests.ts
136
- var FILTER_WHITELIST = /^[\w.\-/:#\s*?|^()\[\]@+]{1,200}$/;
136
+ var FILTER_WHITELIST = /^[\w.\-/:#\s*?()\[\]@+]{1,200}$/;
137
137
  var IS_WINDOWS = platform() === "win32";
138
138
  function detectNodeTestFramework(cwd, pkg) {
139
139
  const devDeps = pkg.devDependencies ?? {};
@@ -413,7 +413,7 @@ async function executeTests(args) {
413
413
  const customCmd = args["command"] ? String(args["command"]).trim() : "";
414
414
  const filter = args["filter"] ? String(args["filter"]).trim() : "";
415
415
  if (filter && !FILTER_WHITELIST.test(filter)) {
416
- return `Error: filter contains characters that are not allowed in test names. Allowed: word chars, dots, dashes, slashes, colons, parens, spaces, and basic glob/regex meta (* ? | ^). Rejected: quotes, semicolons, backticks, redirects, and shell metacharacters.
416
+ return `Error: filter contains characters that are not allowed in test names. Allowed: word chars, dots, dashes, slashes, colons, parens, spaces, and glob (*?). Rejected: quotes, semicolons, pipes, backticks, redirects, and shell metacharacters.
417
417
  Got: ${filter.slice(0, 60)}${filter.length > 60 ? "..." : ""}`;
418
418
  }
419
419
  let command;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  schemaToJsonSchema,
4
4
  truncateForPersist
5
- } from "./chunk-RFKT3T5S.js";
5
+ } from "./chunk-ML7ISZ7A.js";
6
6
  import {
7
7
  AuthError,
8
8
  ProviderError,
@@ -18,7 +18,7 @@ import {
18
18
  MCP_PROTOCOL_VERSION,
19
19
  MCP_TOOL_PREFIX,
20
20
  VERSION
21
- } from "./chunk-LX5FXZVP.js";
21
+ } from "./chunk-ITHFJSJQ.js";
22
22
  import {
23
23
  redactJson
24
24
  } from "./chunk-ANYYM4CF.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-LX5FXZVP.js";
4
+ } from "./chunk-ITHFJSJQ.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -9,7 +9,7 @@ import { existsSync, readFileSync, readdirSync } from "fs";
9
9
  import { join } from "path";
10
10
  import { platform } from "os";
11
11
  import chalk from "chalk";
12
- var FILTER_WHITELIST = /^[\w.\-/:#\s*?|^()\[\]@+]{1,200}$/;
12
+ var FILTER_WHITELIST = /^[\w.\-/:#\s*?()\[\]@+]{1,200}$/;
13
13
  var IS_WINDOWS = platform() === "win32";
14
14
  function detectNodeTestFramework(cwd, pkg) {
15
15
  const devDeps = pkg.devDependencies ?? {};
@@ -289,7 +289,7 @@ async function executeTests(args) {
289
289
  const customCmd = args["command"] ? String(args["command"]).trim() : "";
290
290
  const filter = args["filter"] ? String(args["filter"]).trim() : "";
291
291
  if (filter && !FILTER_WHITELIST.test(filter)) {
292
- return `Error: filter contains characters that are not allowed in test names. Allowed: word chars, dots, dashes, slashes, colons, parens, spaces, and basic glob/regex meta (* ? | ^). Rejected: quotes, semicolons, backticks, redirects, and shell metacharacters.
292
+ return `Error: filter contains characters that are not allowed in test names. Allowed: word chars, dots, dashes, slashes, colons, parens, spaces, and glob (*?). Rejected: quotes, semicolons, pipes, backticks, redirects, and shell metacharacters.
293
293
  Got: ${filter.slice(0, 60)}${filter.length > 60 ? "..." : ""}`;
294
294
  }
295
295
  let command;
@@ -36,7 +36,7 @@ import {
36
36
  TEST_TIMEOUT,
37
37
  VERSION,
38
38
  buildUserIdentityPrompt
39
- } from "./chunk-LX5FXZVP.js";
39
+ } from "./chunk-ITHFJSJQ.js";
40
40
  import "./chunk-PDX44BCA.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -36,7 +36,7 @@ import {
36
36
  VERSION,
37
37
  buildUserIdentityPrompt,
38
38
  runTestsTool
39
- } from "./chunk-VOF6OTZB.js";
39
+ } from "./chunk-RD4RCKIB.js";
40
40
  import {
41
41
  hasSemanticIndex,
42
42
  semanticSearch
@@ -11754,7 +11754,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
11754
11754
  case "test": {
11755
11755
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
11756
11756
  try {
11757
- const { executeTests } = await import("./run-tests-IMVI43CZ.js");
11757
+ const { executeTests } = await import("./run-tests-6FVJND6Q.js");
11758
11758
  const argStr = args.join(" ").trim();
11759
11759
  let testArgs = {};
11760
11760
  if (argStr) {
@@ -386,7 +386,7 @@ ${content}`);
386
386
  }
387
387
  }
388
388
  async function runTaskMode(config, providers, configManager, topic) {
389
- const { TaskOrchestrator } = await import("./task-orchestrator-UEZOFXQX.js");
389
+ const { TaskOrchestrator } = await import("./task-orchestrator-32DSRTMN.js");
390
390
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
391
391
  let interrupted = false;
392
392
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -25,10 +25,10 @@ import {
25
25
  saveDevState,
26
26
  sessionHasMeaningfulContent,
27
27
  setupProxy
28
- } from "./chunk-F7XJ67XB.js";
28
+ } from "./chunk-RSZ75E2W.js";
29
29
  import {
30
30
  ConfigManager
31
- } from "./chunk-B6NUQVYK.js";
31
+ } from "./chunk-OSGGBJSW.js";
32
32
  import {
33
33
  ToolExecutor,
34
34
  ToolRegistry,
@@ -47,10 +47,10 @@ import {
47
47
  spawnAgentContext,
48
48
  theme,
49
49
  undoStack
50
- } from "./chunk-RFKT3T5S.js";
50
+ } from "./chunk-ML7ISZ7A.js";
51
51
  import "./chunk-3BICTI5M.js";
52
52
  import "./chunk-2DXY7UGF.js";
53
- import "./chunk-LVX667WL.js";
53
+ import "./chunk-W7ZG4KRQ.js";
54
54
  import "./chunk-2ZD3YTVM.js";
55
55
  import {
56
56
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -73,7 +73,7 @@ import {
73
73
  SKILLS_DIR_NAME,
74
74
  VERSION,
75
75
  buildUserIdentityPrompt
76
- } from "./chunk-LX5FXZVP.js";
76
+ } from "./chunk-ITHFJSJQ.js";
77
77
  import {
78
78
  formatGitContextForPrompt,
79
79
  getGitContext,
@@ -1594,7 +1594,7 @@ ${text}
1594
1594
  const { join: join6 } = await import("path");
1595
1595
  const { existsSync: existsSync6 } = await import("fs");
1596
1596
  const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
1597
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-HK5BB5EZ.js");
1597
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-FVJPGHS7.js");
1598
1598
  const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
1599
1599
  const cwd = process.cwd();
1600
1600
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2644,7 +2644,7 @@ ${hint}` : "")
2644
2644
  usage: "/test [command|filter]",
2645
2645
  async execute(args, ctx) {
2646
2646
  try {
2647
- const { executeTests } = await import("./run-tests-VQ3YZB75.js");
2647
+ const { executeTests } = await import("./run-tests-UZGGOXOS.js");
2648
2648
  const argStr = args.join(" ").trim();
2649
2649
  let testArgs = {};
2650
2650
  if (argStr) {
@@ -6800,7 +6800,7 @@ program.command("web").description("Start Web UI server with browser-based chat
6800
6800
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
6801
6801
  process.exit(1);
6802
6802
  }
6803
- const { startWebServer } = await import("./server-ZVY3CKTJ.js");
6803
+ const { startWebServer } = await import("./server-CWDCYN3N.js");
6804
6804
  await startWebServer({ port, host: options.host });
6805
6805
  });
6806
6806
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | migrate <name>)").action(async (action, username) => {
@@ -6923,7 +6923,7 @@ program.command("sessions").description("List recent conversation sessions").act
6923
6923
  });
6924
6924
  program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
6925
6925
  try {
6926
- const batch = await import("./batch-NPK4USGH.js");
6926
+ const batch = await import("./batch-PF2EB4BE.js");
6927
6927
  switch (action) {
6928
6928
  case "submit":
6929
6929
  if (!arg) {
@@ -6966,7 +6966,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
6966
6966
  }
6967
6967
  });
6968
6968
  program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
6969
- const { startMcpServer } = await import("./server-XDBIWNRW.js");
6969
+ const { startMcpServer } = await import("./server-5MJQOIZU.js");
6970
6970
  await startMcpServer({
6971
6971
  allowDestructive: !!options.allowDestructive,
6972
6972
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7093,7 +7093,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
7093
7093
  }),
7094
7094
  config.get("customProviders")
7095
7095
  );
7096
- const { startHub } = await import("./hub-5VFGLTHY.js");
7096
+ const { startHub } = await import("./hub-3KDAZUH4.js");
7097
7097
  await startHub(
7098
7098
  {
7099
7099
  topic: topic ?? "",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-VOF6OTZB.js";
4
+ } from "./chunk-RD4RCKIB.js";
5
5
  import "./chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  executeTests,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-LVX667WL.js";
6
- import "./chunk-LX5FXZVP.js";
5
+ } from "./chunk-W7ZG4KRQ.js";
6
+ import "./chunk-ITHFJSJQ.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
  export {
9
9
  executeTests,
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  getDangerLevel,
5
5
  schemaToJsonSchema
6
- } from "./chunk-RFKT3T5S.js";
6
+ } from "./chunk-ML7ISZ7A.js";
7
7
  import "./chunk-3BICTI5M.js";
8
8
  import "./chunk-2DXY7UGF.js";
9
- import "./chunk-LVX667WL.js";
9
+ import "./chunk-W7ZG4KRQ.js";
10
10
  import "./chunk-2ZD3YTVM.js";
11
11
  import {
12
12
  VERSION
13
- } from "./chunk-LX5FXZVP.js";
13
+ } from "./chunk-ITHFJSJQ.js";
14
14
  import "./chunk-4BKXL7SM.js";
15
15
  import "./chunk-ANYYM4CF.js";
16
16
  import "./chunk-KHYD3WXE.js";
@@ -18,10 +18,10 @@ import {
18
18
  loadDevState,
19
19
  persistToolRound,
20
20
  setupProxy
21
- } from "./chunk-F7XJ67XB.js";
21
+ } from "./chunk-RSZ75E2W.js";
22
22
  import {
23
23
  ConfigManager
24
- } from "./chunk-B6NUQVYK.js";
24
+ } from "./chunk-OSGGBJSW.js";
25
25
  import {
26
26
  ToolExecutor,
27
27
  ToolRegistry,
@@ -39,10 +39,10 @@ import {
39
39
  spawnAgentContext,
40
40
  truncateOutput,
41
41
  undoStack
42
- } from "./chunk-RFKT3T5S.js";
42
+ } from "./chunk-ML7ISZ7A.js";
43
43
  import "./chunk-3BICTI5M.js";
44
44
  import "./chunk-2DXY7UGF.js";
45
- import "./chunk-LVX667WL.js";
45
+ import "./chunk-W7ZG4KRQ.js";
46
46
  import "./chunk-2ZD3YTVM.js";
47
47
  import {
48
48
  AGENTIC_BEHAVIOR_GUIDELINE,
@@ -62,7 +62,7 @@ import {
62
62
  SKILLS_DIR_NAME,
63
63
  VERSION,
64
64
  buildUserIdentityPrompt
65
- } from "./chunk-LX5FXZVP.js";
65
+ } from "./chunk-ITHFJSJQ.js";
66
66
  import {
67
67
  formatGitContextForPrompt,
68
68
  getGitContext,
@@ -2383,7 +2383,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
2383
2383
  case "test": {
2384
2384
  this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
2385
2385
  try {
2386
- const { executeTests } = await import("./run-tests-VQ3YZB75.js");
2386
+ const { executeTests } = await import("./run-tests-UZGGOXOS.js");
2387
2387
  const argStr = args.join(" ").trim();
2388
2388
  let testArgs = {};
2389
2389
  if (argStr) {
@@ -4,14 +4,14 @@ import {
4
4
  getDangerLevel,
5
5
  googleSearchContext,
6
6
  truncateOutput
7
- } from "./chunk-RFKT3T5S.js";
7
+ } from "./chunk-ML7ISZ7A.js";
8
8
  import "./chunk-3BICTI5M.js";
9
9
  import "./chunk-2DXY7UGF.js";
10
- import "./chunk-LVX667WL.js";
10
+ import "./chunk-W7ZG4KRQ.js";
11
11
  import "./chunk-2ZD3YTVM.js";
12
12
  import {
13
13
  SUBAGENT_ALLOWED_TOOLS
14
- } from "./chunk-LX5FXZVP.js";
14
+ } from "./chunk-ITHFJSJQ.js";
15
15
  import "./chunk-4BKXL7SM.js";
16
16
  import "./chunk-ANYYM4CF.js";
17
17
  import "./chunk-KHYD3WXE.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.105",
3
+ "version": "0.4.106",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",