jinzd-ai-cli 0.4.49 → 0.4.51

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/README.md CHANGED
@@ -140,7 +140,7 @@ aicli
140
140
 
141
141
  ## Built-in Tools (Agentic)
142
142
 
143
- AI autonomously invokes these 19 tools during conversations:
143
+ AI autonomously invokes these 24 tools during conversations:
144
144
 
145
145
  | Tool | Safety | Description |
146
146
  |------|--------|-------------|
@@ -163,6 +163,11 @@ AI autonomously invokes these 19 tools during conversations:
163
163
  | `task_create` | write | Start a command running in the background |
164
164
  | `task_list` | safe | List background tasks and their status/output |
165
165
  | `task_stop` | write | Stop a running background task |
166
+ | `git_status` | safe | Show working tree status (branch, staged, modified, untracked) |
167
+ | `git_diff` | safe | Show file diffs (staged/unstaged, stat summary) |
168
+ | `git_log` | safe | Show commit history (oneline/full, filter by file/author) |
169
+ | `git_commit` | write | Create a git commit (stage files, message) |
170
+ | `notebook_edit` | write | Edit Jupyter notebook cells (add/edit/delete/move) |
166
171
 
167
172
  **Safety levels**: `safe` = auto-execute, `write` = diff preview + confirmation, `destructive` = prominent warning + confirmation.
168
173
 
package/README.zh-CN.md CHANGED
@@ -132,7 +132,7 @@ aicli
132
132
 
133
133
  ## 内置工具(Agentic 能力)
134
134
 
135
- AI 在对话中可自主调用 19 个工具:
135
+ AI 在对话中可自主调用 24 个工具:
136
136
 
137
137
  | 工具 | 安全级别 | 说明 |
138
138
  |------|---------|------|
@@ -155,6 +155,11 @@ AI 在对话中可自主调用 19 个工具:
155
155
  | `task_create` | 写入 | 在后台启动命令 |
156
156
  | `task_list` | 安全 | 列出后台任务及其状态/输出 |
157
157
  | `task_stop` | 写入 | 停止运行中的后台任务 |
158
+ | `git_status` | 安全 | 显示工作区状态(分支、暂存、已修改、未跟踪) |
159
+ | `git_diff` | 安全 | 显示文件差异(暂存/未暂存,统计摘要) |
160
+ | `git_log` | 安全 | 显示提交历史(单行/完整,按文件/作者过滤) |
161
+ | `git_commit` | 写入 | 创建 git 提交(暂存文件、提交信息) |
162
+ | `notebook_edit` | 写入 | 编辑 Jupyter notebook 单元格(增/改/删/移动) |
158
163
 
159
164
  **安全级别**:`安全` = 自动执行,`写入` = diff 预览 + 确认,`破坏性` = 醒目警告 + 确认。
160
165
 
@@ -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.49";
9
+ var VERSION = "0.4.51";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -84,7 +84,8 @@ var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
84
84
  - When the user asks you to "read", "understand", "review", "analyze", "examine", or "look at" files or a project, your task is only to **read and summarize**, then wait for the user's next instruction. Do not automatically start executing tasks described in the project.
85
85
  - Only begin using write/execute tools when the user **explicitly requests** an action (e.g., "generate", "create", "modify", "run", "start", etc.).
86
86
  - Project context files (CLAUDE.md, AICLI.md) provide background information about the project. They are NOT instructions to start working. Only use them as reference when the user asks a project-related question or task.
87
- - If you are unsure about the user's intent, use the ask_user tool to confirm with the user, rather than assuming and executing on your own.`;
87
+ - If you are unsure about the user's intent, use the ask_user tool to confirm with the user, rather than assuming and executing on your own.
88
+ - **Do NOT abuse ask_user for redundant confirmations**: When the user has already given a clear, explicit instruction (e.g., "write lesson 142", "generate file X", "create the report"), execute it immediately. Do NOT ask "are you sure?" or request details that can be found in project documents. Repeatedly asking the user to confirm wastes their time and is extremely frustrating. Only use ask_user when critical information is genuinely missing and cannot be inferred from context files.`;
88
89
  function buildUserIdentityPrompt(profile) {
89
90
  const lines = [];
90
91
  const displayName = profile.nickname || profile.name;
@@ -7,7 +7,7 @@ import {
7
7
  ProviderNotFoundError,
8
8
  RateLimitError,
9
9
  schemaToJsonSchema
10
- } from "./chunk-KVYVWJYK.js";
10
+ } from "./chunk-VTMHZCWZ.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-NFIYEIFJ.js";
23
+ } from "./chunk-KGJYHTC2.js";
24
24
 
25
25
  // src/config/config-manager.ts
26
26
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
@@ -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.49";
11
+ var VERSION = "0.4.51";
12
12
  var APP_NAME = "ai-cli";
13
13
  var CONFIG_DIR_NAME = ".aicli";
14
14
  var CONFIG_FILE_NAME = "config.json";
@@ -87,7 +87,8 @@ var AGENTIC_BEHAVIOR_GUIDELINE = `# Important Behavioral Guidelines
87
87
  - When the user asks you to "read", "understand", "review", "analyze", "examine", or "look at" files or a project, your task is only to **read and summarize**, then wait for the user's next instruction. Do not automatically start executing tasks described in the project.
88
88
  - Only begin using write/execute tools when the user **explicitly requests** an action (e.g., "generate", "create", "modify", "run", "start", etc.).
89
89
  - Project context files (CLAUDE.md, AICLI.md) provide background information about the project. They are NOT instructions to start working. Only use them as reference when the user asks a project-related question or task.
90
- - If you are unsure about the user's intent, use the ask_user tool to confirm with the user, rather than assuming and executing on your own.`;
90
+ - If you are unsure about the user's intent, use the ask_user tool to confirm with the user, rather than assuming and executing on your own.
91
+ - **Do NOT abuse ask_user for redundant confirmations**: When the user has already given a clear, explicit instruction (e.g., "write lesson 142", "generate file X", "create the report"), execute it immediately. Do NOT ask "are you sure?" or request details that can be found in project documents. Repeatedly asking the user to confirm wastes their time and is extremely frustrating. Only use ask_user when critical information is genuinely missing and cannot be inferred from context files.`;
91
92
  function buildUserIdentityPrompt(profile) {
92
93
  const lines = [];
93
94
  const displayName = profile.nickname || profile.name;
@@ -9,7 +9,7 @@ import {
9
9
  SUBAGENT_DEFAULT_MAX_ROUNDS,
10
10
  SUBAGENT_MAX_ROUNDS_LIMIT,
11
11
  runTestsTool
12
- } from "./chunk-NFIYEIFJ.js";
12
+ } from "./chunk-KGJYHTC2.js";
13
13
 
14
14
  // src/tools/builtin/bash.ts
15
15
  import { execSync } from "child_process";
@@ -385,7 +385,7 @@ ${content}`);
385
385
  }
386
386
  }
387
387
  async function runTaskMode(config, providers, configManager, topic) {
388
- const { TaskOrchestrator } = await import("./task-orchestrator-ITCC3NZL.js");
388
+ const { TaskOrchestrator } = await import("./task-orchestrator-ZKJOZB5S.js");
389
389
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
390
390
  let interrupted = false;
391
391
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  saveDevState,
25
25
  sessionHasMeaningfulContent,
26
26
  setupProxy
27
- } from "./chunk-47CNWVOC.js";
27
+ } from "./chunk-5JJKUQTS.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-KVYVWJYK.js";
40
+ } from "./chunk-VTMHZCWZ.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-NFIYEIFJ.js";
64
+ } from "./chunk-KGJYHTC2.js";
65
65
 
66
66
  // src/index.ts
67
67
  import { program } from "commander";
@@ -199,7 +199,7 @@ var Renderer = class {
199
199
  console.log(theme.dim(" Gemini (Google) \xB7 Zhipu (GLM) \xB7 OpenRouter \xB7 Ollama (Local, no API key)"));
200
200
  console.log(HR);
201
201
  const mcpToolCount = mcpInfo?.tools ?? 0;
202
- const toolTotal = 19 + pluginCount + mcpToolCount;
202
+ const toolTotal = 24 + pluginCount + mcpToolCount;
203
203
  const extras = [];
204
204
  if (pluginCount > 0) extras.push(`${pluginCount} plugin(s)`);
205
205
  if (mcpToolCount > 0) extras.push(`${mcpToolCount} MCP`);
@@ -224,6 +224,11 @@ var Renderer = class {
224
224
  console.log(tool("task_create", "Start a command running in the background"));
225
225
  console.log(tool("task_list", "List background tasks and their status/output"));
226
226
  console.log(tool("task_stop", "Stop a running background task"));
227
+ console.log(tool("git_status", "Show working tree status (branch, staged, modified, untracked)"));
228
+ console.log(tool("git_diff", "Show file diffs (staged/unstaged, stat summary)"));
229
+ console.log(tool("git_log", "Show commit history (oneline/full, filter by file/author)"));
230
+ console.log(tool("git_commit", "Create a git commit (stage files, message, stage_all)"));
231
+ console.log(tool("notebook_edit", "Edit Jupyter notebook cells (add/edit/delete/move)"));
227
232
  console.log(HR);
228
233
  console.log(theme.dim(" REPL Commands (40):"));
229
234
  console.log(theme.dim(" /help /about /provider /model /clear /compact /plan /session"));
@@ -2099,7 +2104,7 @@ ${hint}` : "")
2099
2104
  usage: "/test [command|filter]",
2100
2105
  async execute(args, ctx) {
2101
2106
  try {
2102
- const { executeTests } = await import("./run-tests-K6IYLG6T.js");
2107
+ const { executeTests } = await import("./run-tests-Q2JYJVLK.js");
2103
2108
  const argStr = args.join(" ").trim();
2104
2109
  let testArgs = {};
2105
2110
  if (argStr) {
@@ -5469,7 +5474,7 @@ program.command("web").description("Start Web UI server with browser-based chat
5469
5474
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
5470
5475
  process.exit(1);
5471
5476
  }
5472
- const { startWebServer } = await import("./server-F3UVAUXJ.js");
5477
+ const { startWebServer } = await import("./server-4K2VEKN7.js");
5473
5478
  await startWebServer({ port, host: options.host });
5474
5479
  });
5475
5480
  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 +5707,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
5702
5707
  }),
5703
5708
  config.get("customProviders")
5704
5709
  );
5705
- const { startHub } = await import("./hub-TNV3IFDX.js");
5710
+ const { startHub } = await import("./hub-F4TORNUA.js");
5706
5711
  await startHub(
5707
5712
  {
5708
5713
  topic: topic ?? "",
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-NFIYEIFJ.js";
5
+ } from "./chunk-KGJYHTC2.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-2K5YVZJI.js";
4
+ } from "./chunk-3QRYIBN3.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-47CNWVOC.js";
18
+ } from "./chunk-5JJKUQTS.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-KVYVWJYK.js";
36
+ } from "./chunk-VTMHZCWZ.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-NFIYEIFJ.js";
55
+ } from "./chunk-KGJYHTC2.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-K6IYLG6T.js");
1609
+ const { executeTests } = await import("./run-tests-Q2JYJVLK.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-KVYVWJYK.js";
7
+ } from "./chunk-VTMHZCWZ.js";
8
8
  import "./chunk-4BKXL7SM.js";
9
9
  import {
10
10
  SUBAGENT_ALLOWED_TOOLS
11
- } from "./chunk-NFIYEIFJ.js";
11
+ } from "./chunk-KGJYHTC2.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.49",
3
+ "version": "0.4.51",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",