jinzd-ai-cli 0.4.234 → 0.4.236

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.
Files changed (29) hide show
  1. package/README.md +5 -5
  2. package/dist/{auth-FSTAKSYF.js → auth-PE3Z5OHS.js} +1 -1
  3. package/dist/{batch-T3FRX4B6.js → batch-HZI7QAE7.js} +2 -2
  4. package/dist/{chunk-AFT6VFMI.js → chunk-7VAE3I3D.js} +1 -1
  5. package/dist/{chunk-3KTSJ2EL.js → chunk-CGQARJMP.js} +1 -1
  6. package/dist/{chunk-ETJ5X6V7.js → chunk-MFWAL5S2.js} +1 -1
  7. package/dist/{chunk-6MJMHHRK.js → chunk-O4QYY6SF.js} +3 -3
  8. package/dist/{chunk-5DTEEWYC.js → chunk-QDP3NUPX.js} +3 -3
  9. package/dist/{chunk-JVKAL5Q3.js → chunk-RYQBBEMM.js} +33 -3
  10. package/dist/{chunk-E5RLXMSU.js → chunk-SBSWH2EG.js} +89 -56
  11. package/dist/{chunk-TAXIG7HH.js → chunk-SCFGLRB3.js} +1 -1
  12. package/dist/{chunk-II6RZRTF.js → chunk-T6EIBUKW.js} +115 -18
  13. package/dist/{chunk-5VPRZMZB.js → chunk-TT7YURG3.js} +3 -3
  14. package/dist/{chunk-L5PNAQ6O.js → chunk-VBAW4ZPY.js} +1 -1
  15. package/dist/{ci-GJ53GPLA.js → ci-FYLCHRN3.js} +4 -4
  16. package/dist/{ci-format-AXE4QCI6.js → ci-format-TH2ZTFKU.js} +2 -2
  17. package/dist/{constants-DC4EXFSB.js → constants-BF6YNKRW.js} +1 -1
  18. package/dist/{doctor-cli-HKREND6Q.js → doctor-cli-B6GE4BYJ.js} +4 -4
  19. package/dist/electron-server.js +312 -151
  20. package/dist/{hub-LTTKRGZC.js → hub-QBQCKEPE.js} +1 -1
  21. package/dist/index.js +2439 -2437
  22. package/dist/{pr-4VODJVRV.js → pr-KV2WK7SU.js} +4 -4
  23. package/dist/{run-tests-QR2PYR2P.js → run-tests-DI6WEYHX.js} +1 -1
  24. package/dist/{run-tests-G5BNTMWQ.js → run-tests-MEHC73SQ.js} +2 -2
  25. package/dist/{server-EO6VQHKL.js → server-ETIGAZX5.js} +4 -4
  26. package/dist/{server-64WZVZZN.js → server-KZAP5JN3.js} +34 -33
  27. package/dist/{task-orchestrator-4INCZMLT.js → task-orchestrator-WS724BUX.js} +4 -4
  28. package/dist/{usage-T3HFMNNV.js → usage-DHZR5PG7.js} +2 -2
  29. package/package.json +2 -4
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-6MJMHHRK.js";
6
- import "./chunk-TAXIG7HH.js";
5
+ } from "./chunk-O4QYY6SF.js";
6
+ import "./chunk-SCFGLRB3.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -15,11 +15,11 @@ import {
15
15
  import "./chunk-O3XSFPYH.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-L5PNAQ6O.js";
18
+ } from "./chunk-VBAW4ZPY.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-3KTSJ2EL.js";
22
+ } from "./chunk-CGQARJMP.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-ETJ5X6V7.js";
4
+ } from "./chunk-MFWAL5S2.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-AFT6VFMI.js";
6
- import "./chunk-3KTSJ2EL.js";
5
+ } from "./chunk-7VAE3I3D.js";
6
+ import "./chunk-CGQARJMP.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-E5RLXMSU.js";
4
+ } from "./chunk-SBSWH2EG.js";
5
5
  import "./chunk-K3CF65QH.js";
6
6
  import "./chunk-UUSRWSSX.js";
7
7
  import "./chunk-CKH4KQ4E.js";
8
8
  import "./chunk-BXP6YZ2P.js";
9
9
  import {
10
10
  runTool
11
- } from "./chunk-II6RZRTF.js";
11
+ } from "./chunk-T6EIBUKW.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  schemaToJsonSchema
@@ -16,10 +16,10 @@ import {
16
16
  import "./chunk-5ULLIOVC.js";
17
17
  import "./chunk-HOSJZMQS.js";
18
18
  import "./chunk-4BKXL7SM.js";
19
- import "./chunk-AFT6VFMI.js";
19
+ import "./chunk-7VAE3I3D.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-3KTSJ2EL.js";
22
+ } from "./chunk-CGQARJMP.js";
23
23
  import "./chunk-5MYPIQ3Y.js";
24
24
  import "./chunk-KHYD3WXE.js";
25
25
  import "./chunk-KCEO2XJ4.js";
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  AuthManager,
13
13
  TOKEN_EXPIRY_MS
14
- } from "./chunk-JVKAL5Q3.js";
14
+ } from "./chunk-RYQBBEMM.js";
15
15
  import {
16
16
  McpManager,
17
17
  SkillManager,
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-5VPRZMZB.js";
26
+ } from "./chunk-TT7YURG3.js";
27
27
  import {
28
28
  buildReviewPrompt,
29
29
  buildSecurityReviewPrompt
@@ -67,7 +67,7 @@ import {
67
67
  truncateOutput,
68
68
  undoStack,
69
69
  updateMemoryApproval
70
- } from "./chunk-E5RLXMSU.js";
70
+ } from "./chunk-SBSWH2EG.js";
71
71
  import "./chunk-K3CF65QH.js";
72
72
  import "./chunk-UUSRWSSX.js";
73
73
  import "./chunk-CKH4KQ4E.js";
@@ -84,7 +84,7 @@ import {
84
84
  buildDoctorReport,
85
85
  formatDoctorReport,
86
86
  loadContextFiles
87
- } from "./chunk-5DTEEWYC.js";
87
+ } from "./chunk-QDP3NUPX.js";
88
88
  import {
89
89
  ProviderRegistry
90
90
  } from "./chunk-QYQI7ZWK.js";
@@ -102,7 +102,7 @@ import {
102
102
  runTool,
103
103
  setPluginEnabled,
104
104
  trustPlugin
105
- } from "./chunk-II6RZRTF.js";
105
+ } from "./chunk-T6EIBUKW.js";
106
106
  import {
107
107
  CONTENT_ONLY_STREAM_REMINDER,
108
108
  TEE_FINAL_USER_NUDGE,
@@ -121,7 +121,7 @@ import {
121
121
  } from "./chunk-O3XSFPYH.js";
122
122
  import {
123
123
  ConfigManager
124
- } from "./chunk-L5PNAQ6O.js";
124
+ } from "./chunk-VBAW4ZPY.js";
125
125
  import "./chunk-5ULLIOVC.js";
126
126
  import {
127
127
  formatGitContextForPrompt,
@@ -129,7 +129,7 @@ import {
129
129
  getGitRoot
130
130
  } from "./chunk-HOSJZMQS.js";
131
131
  import "./chunk-4BKXL7SM.js";
132
- import "./chunk-AFT6VFMI.js";
132
+ import "./chunk-7VAE3I3D.js";
133
133
  import {
134
134
  AGENTIC_BEHAVIOR_GUIDELINE,
135
135
  AUTHOR,
@@ -146,7 +146,7 @@ import {
146
146
  SKILLS_DIR_NAME,
147
147
  VERSION,
148
148
  buildUserIdentityPrompt
149
- } from "./chunk-3KTSJ2EL.js";
149
+ } from "./chunk-CGQARJMP.js";
150
150
  import "./chunk-5MYPIQ3Y.js";
151
151
  import "./chunk-KHYD3WXE.js";
152
152
  import {
@@ -160,8 +160,8 @@ import {
160
160
  import express from "express";
161
161
  import { createServer } from "http";
162
162
  import { WebSocketServer } from "ws";
163
- import { join as join4, dirname as dirname4, resolve as resolve4, relative, sep } from "path";
164
- import { existsSync as existsSync5, readFileSync as readFileSync5, readdirSync as readdirSync4, statSync as statSync4, realpathSync } from "fs";
163
+ import { join as join4, dirname as dirname3, resolve as resolve4, relative, sep } from "path";
164
+ import { existsSync as existsSync4, readFileSync as readFileSync4, readdirSync as readdirSync3, statSync as statSync3, realpathSync } from "fs";
165
165
  import { networkInterfaces } from "os";
166
166
 
167
167
  // src/web/tool-executor-web.ts
@@ -464,12 +464,13 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
464
464
  return { callId: call.id, content: message, isError: true };
465
465
  }
466
466
  }
467
- if (networkPermission?.action === "confirm" && dangerLevel === "safe") {
467
+ const requiresHardConfirmation = permission.action === "confirm" && permission.hardBoundary === true;
468
+ if ((networkPermission?.action === "confirm" || requiresHardConfirmation) && dangerLevel === "safe") {
468
469
  this.sendToolCallStart(call);
469
470
  toolCallStarted = true;
470
471
  const confirmed = await this.confirm(call, "write");
471
472
  if (!confirmed) {
472
- const rejectionMsg = `[User cancelled] The user declined network access for ${call.name}. Do not retry without asking.`;
473
+ const rejectionMsg = `[User cancelled] The user declined permission for ${call.name}. Do not retry without asking.`;
473
474
  this.sendToolCallResult(call, rejectionMsg, true);
474
475
  return { callId: call.id, content: rejectionMsg, isError: true };
475
476
  }
@@ -486,7 +487,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
486
487
  this.sendToolCallResult(call, rejectionMsg, true);
487
488
  return { callId: call.id, content: rejectionMsg, isError: true };
488
489
  }
489
- if (classification.decision === "auto-approve") {
490
+ if (classification.decision === "auto-approve" && !requiresHardConfirmation) {
490
491
  this.send({ type: "info", message: `\u26A1 Auto-approved (/auto: ${classification.ruleId})` });
491
492
  try {
492
493
  const rawContent = await runTool(tool, call.arguments, call.name);
@@ -504,7 +505,7 @@ var ToolExecutorWeb = class _ToolExecutorWeb {
504
505
  }
505
506
  }
506
507
  }
507
- if (this.sessionAutoApprove && dangerLevel === "write") {
508
+ if (this.sessionAutoApprove && dangerLevel === "write" && !requiresHardConfirmation) {
508
509
  try {
509
510
  const rawContent = await runTool(tool, call.arguments, call.name);
510
511
  const content = truncateOutput(rawContent, call.name);
@@ -668,8 +669,8 @@ function loadMemoryContent(configDir) {
668
669
  }
669
670
 
670
671
  // src/web/session-handler.ts
671
- import { mkdirSync as mkdirSync3, createWriteStream as createWriteStream3 } from "fs";
672
- import { join as join3, dirname as dirname3 } from "path";
672
+ import { mkdirSync as mkdirSync2, createWriteStream as createWriteStream2 } from "fs";
673
+ import { join as join3, dirname as dirname2 } from "path";
673
674
 
674
675
  // src/web/commands/provider-commands.ts
675
676
  async function handleProvider(args, ctx) {
@@ -1593,7 +1594,7 @@ async function handleSecurityReview(args, ctx) {
1593
1594
  async function handleTest(args, ctx) {
1594
1595
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1595
1596
  try {
1596
- const { executeTests } = await import("./run-tests-G5BNTMWQ.js");
1597
+ const { executeTests } = await import("./run-tests-MEHC73SQ.js");
1597
1598
  const argStr = args.join(" ").trim();
1598
1599
  let testArgs = {};
1599
1600
  if (argStr) {
@@ -2921,7 +2922,7 @@ Try: /compact to reduce context, /clear to reset, or switch to a larger-context
2921
2922
  this.send({ type: "response_done", content, usage });
2922
2923
  if (pendingTeeSave && isCleanDocumentBody(content)) {
2923
2924
  try {
2924
- mkdirSync3(dirname3(pendingTeeSave), { recursive: true });
2925
+ mkdirSync2(dirname2(pendingTeeSave), { recursive: true });
2925
2926
  const bodyToSave = stripOuterCodeFence(content);
2926
2927
  atomicWriteFileSync(pendingTeeSave, bodyToSave);
2927
2928
  undoStack.push(pendingTeeSave, `save_last_response (deferred): ${pendingTeeSave}`);
@@ -3097,8 +3098,8 @@ ${summaryContent}`,
3097
3098
  let isError = false;
3098
3099
  let summary;
3099
3100
  try {
3100
- mkdirSync3(dirname3(saveToFile), { recursive: true });
3101
- fileStream = createWriteStream3(saveToFile);
3101
+ mkdirSync2(dirname2(saveToFile), { recursive: true });
3102
+ fileStream = createWriteStream2(saveToFile);
3102
3103
  const teeSystemPrompt = stripToolCallReminder(systemPrompt ?? "") + CONTENT_ONLY_STREAM_REMINDER;
3103
3104
  const teeExtraMessages = extraMessages.length > 0 ? [...extraMessages, { role: "user", content: TEE_FINAL_USER_NUDGE }] : [{ role: "user", content: TEE_FINAL_USER_NUDGE }];
3104
3105
  const chatRequest = {
@@ -3666,7 +3667,7 @@ function getModuleDir() {
3666
3667
  if (typeof import.meta?.url === "string") {
3667
3668
  const url = new URL(import.meta.url);
3668
3669
  const filePath = url.pathname.replace(/^\/([A-Z]:)/i, "$1");
3669
- return dirname4(filePath);
3670
+ return dirname3(filePath);
3670
3671
  }
3671
3672
  } catch {
3672
3673
  }
@@ -3739,7 +3740,7 @@ async function startWebServer(options = {}) {
3739
3740
  }
3740
3741
  let skillManager = null;
3741
3742
  const skillsDir = join4(config.getConfigDir(), SKILLS_DIR_NAME);
3742
- if (existsSync5(skillsDir)) {
3743
+ if (existsSync4(skillsDir)) {
3743
3744
  skillManager = new SkillManager(skillsDir, config.get("ui").skillSizeWarn);
3744
3745
  skillManager.loadSkills(pluginAssets.skillDirs);
3745
3746
  const count = skillManager.listSkills().length;
@@ -3811,13 +3812,13 @@ async function startWebServer(options = {}) {
3811
3812
  };
3812
3813
  const moduleDir = getModuleDir();
3813
3814
  let clientDir = join4(moduleDir, "web", "client");
3814
- if (!existsSync5(clientDir)) {
3815
+ if (!existsSync4(clientDir)) {
3815
3816
  clientDir = join4(moduleDir, "client");
3816
3817
  }
3817
- if (!existsSync5(clientDir)) {
3818
+ if (!existsSync4(clientDir)) {
3818
3819
  clientDir = join4(moduleDir, "..", "..", "src", "web", "client");
3819
3820
  }
3820
- if (!existsSync5(clientDir)) {
3821
+ if (!existsSync4(clientDir)) {
3821
3822
  clientDir = join4(process.cwd(), "src", "web", "client");
3822
3823
  }
3823
3824
  console.log(` Static files: ${clientDir}`);
@@ -3902,7 +3903,7 @@ async function startWebServer(options = {}) {
3902
3903
  }
3903
3904
  try {
3904
3905
  const SKIP = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "dist-cjs", "release", "__pycache__", ".next", ".nuxt", "coverage", ".cache"]);
3905
- const entries = readdirSync4(targetDir, { withFileTypes: true });
3906
+ const entries = readdirSync3(targetDir, { withFileTypes: true });
3906
3907
  const files = entries.filter((e) => !SKIP.has(e.name) && !e.name.startsWith(".")).slice(0, 50).map((e) => ({
3907
3908
  name: e.name,
3908
3909
  path: relative(cwd, join4(targetDir, e.name)).replace(/\\/g, "/"),
@@ -3946,7 +3947,7 @@ async function startWebServer(options = {}) {
3946
3947
  const authUser = req._authUser;
3947
3948
  const histDir = authUser ? getUserShared(authUser).config.getHistoryDir() : config.getHistoryDir();
3948
3949
  const filePath = join4(histDir, `${id}.json`);
3949
- if (!existsSync5(filePath)) {
3950
+ if (!existsSync4(filePath)) {
3950
3951
  res.status(404).json({ error: "Session not found" });
3951
3952
  return;
3952
3953
  }
@@ -3961,7 +3962,7 @@ async function startWebServer(options = {}) {
3961
3962
  res.status(404).json({ error: "Session not found" });
3962
3963
  return;
3963
3964
  }
3964
- const data = JSON.parse(readFileSync5(filePath, "utf-8"));
3965
+ const data = JSON.parse(readFileSync4(filePath, "utf-8"));
3965
3966
  res.json({ session: data });
3966
3967
  } catch (err) {
3967
3968
  res.status(500).json({ error: err instanceof Error ? err.message : String(err) });
@@ -3987,12 +3988,12 @@ async function startWebServer(options = {}) {
3987
3988
  return;
3988
3989
  }
3989
3990
  try {
3990
- const stat = statSync4(fullPath);
3991
+ const stat = statSync3(fullPath);
3991
3992
  if (stat.size > 512 * 1024) {
3992
3993
  res.json({ error: `File too large (${(stat.size / 1024).toFixed(0)} KB, max 512 KB)` });
3993
3994
  return;
3994
3995
  }
3995
- const content = readFileSync5(fullPath, "utf-8");
3996
+ const content = readFileSync4(fullPath, "utf-8");
3996
3997
  res.json({ content, size: stat.size });
3997
3998
  } catch {
3998
3999
  res.json({ error: "Cannot read file" });
@@ -4248,16 +4249,16 @@ function resolveProjectMcpPath() {
4248
4249
  const gitRoot = getGitRoot(cwd);
4249
4250
  const projectRoot = gitRoot ?? cwd;
4250
4251
  const configPath = join4(projectRoot, MCP_PROJECT_CONFIG_NAME);
4251
- return existsSync5(configPath) ? configPath : null;
4252
+ return existsSync4(configPath) ? configPath : null;
4252
4253
  }
4253
4254
  function loadProjectMcpConfig() {
4254
4255
  const cwd = process.cwd();
4255
4256
  const gitRoot = getGitRoot(cwd);
4256
4257
  const projectRoot = gitRoot ?? cwd;
4257
4258
  const configPath = join4(projectRoot, MCP_PROJECT_CONFIG_NAME);
4258
- if (!existsSync5(configPath)) return null;
4259
+ if (!existsSync4(configPath)) return null;
4259
4260
  try {
4260
- const raw = JSON.parse(readFileSync5(configPath, "utf-8"));
4261
+ const raw = JSON.parse(readFileSync4(configPath, "utf-8"));
4261
4262
  return raw.mcpServers ?? raw;
4262
4263
  } catch {
4263
4264
  return null;
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-E5RLXMSU.js";
6
+ } from "./chunk-SBSWH2EG.js";
7
7
  import "./chunk-K3CF65QH.js";
8
8
  import "./chunk-UUSRWSSX.js";
9
9
  import "./chunk-CKH4KQ4E.js";
10
10
  import "./chunk-BXP6YZ2P.js";
11
11
  import {
12
12
  runTool
13
- } from "./chunk-II6RZRTF.js";
13
+ } from "./chunk-T6EIBUKW.js";
14
14
  import {
15
15
  getDangerLevel,
16
16
  runLeanAgentLoop
@@ -18,10 +18,10 @@ import {
18
18
  import "./chunk-5ULLIOVC.js";
19
19
  import "./chunk-HOSJZMQS.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-AFT6VFMI.js";
21
+ import "./chunk-7VAE3I3D.js";
22
22
  import {
23
23
  SUBAGENT_ALLOWED_TOOLS
24
- } from "./chunk-3KTSJ2EL.js";
24
+ } from "./chunk-CGQARJMP.js";
25
25
  import "./chunk-5MYPIQ3Y.js";
26
26
  import "./chunk-KHYD3WXE.js";
27
27
  import "./chunk-KCEO2XJ4.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-L5PNAQ6O.js";
11
+ } from "./chunk-VBAW4ZPY.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-3KTSJ2EL.js";
13
+ import "./chunk-CGQARJMP.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
 
16
16
  // src/cli/usage.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.234",
3
+ "version": "0.4.236",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -12,9 +12,7 @@
12
12
  "registry": "https://registry.npmjs.org/"
13
13
  },
14
14
  "exports": {
15
- ".": "./dist/index.js",
16
- "./core": "./dist/core/types.js",
17
- "./providers": "./dist/providers/base.js"
15
+ ".": "./dist/index.js"
18
16
  },
19
17
  "scripts": {
20
18
  "build": "tsup",