jinzd-ai-cli 0.4.233 → 0.4.235

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 (37) hide show
  1. package/dist/{auth-FSTAKSYF.js → auth-PE3Z5OHS.js} +1 -1
  2. package/dist/{batch-WWNPYQ6G.js → batch-Y7MHXVR7.js} +2 -2
  3. package/dist/{chat-index-O56HDGFI.js → chat-index-7HXBWQFH.js} +2 -2
  4. package/dist/{chat-index-WSI7ULRQ.js → chat-index-WYXYD7YP.js} +1 -1
  5. package/dist/{chunk-4KM53GLG.js → chunk-2QQKS56X.js} +1 -1
  6. package/dist/{chunk-NVUCDUXE.js → chunk-5MYPIQ3Y.js} +11 -5
  7. package/dist/{chunk-NXYXFRPA.js → chunk-7D5EJBHO.js} +3 -3
  8. package/dist/{chunk-5PKNKJYP.js → chunk-BFTTW5LS.js} +1 -1
  9. package/dist/{chunk-FQSAK75P.js → chunk-CDOQNIVV.js} +3 -3
  10. package/dist/{chunk-7KS3RGZ7.js → chunk-DHNYGJYB.js} +2 -2
  11. package/dist/{chunk-HX67JAK6.js → chunk-FYJGVFXL.js} +87 -54
  12. package/dist/{chunk-ACTO5C6K.js → chunk-GDXKFWFL.js} +1 -1
  13. package/dist/{chunk-EZGZOK6E.js → chunk-GFDRC2JZ.js} +1 -1
  14. package/dist/{chunk-4OAV7QMB.js → chunk-HHYMSEWS.js} +1 -1
  15. package/dist/{chunk-ZWU7FWHO.js → chunk-JMP3LJC2.js} +38 -91
  16. package/dist/chunk-KCEO2XJ4.js +420 -0
  17. package/dist/{chunk-M4FW2NPU.js → chunk-Q5GVANMH.js} +1 -1
  18. package/dist/{chunk-JVKAL5Q3.js → chunk-RYQBBEMM.js} +33 -3
  19. package/dist/{chunk-LF3OUJHK.js → chunk-UO3XWZFE.js} +302 -4
  20. package/dist/{chunk-TJK7AU65.js → chunk-WXFQ6LYN.js} +1 -1
  21. package/dist/{ci-V5V3JSJC.js → ci-OAFNH3MA.js} +4 -4
  22. package/dist/{ci-format-XS7LKBO5.js → ci-format-4LSXJNND.js} +2 -2
  23. package/dist/{constants-UROQJXLY.js → constants-ERIAS7GV.js} +1 -1
  24. package/dist/{doctor-cli-BY3FIV2B.js → doctor-cli-VFSVWZU6.js} +4 -4
  25. package/dist/electron-server.js +235 -224
  26. package/dist/{hub-L2QCRI5M.js → hub-X4EUYRIN.js} +2 -2
  27. package/dist/index.js +23 -23
  28. package/dist/{persist-I3JI27OK.js → persist-AMH5SQ4W.js} +3 -3
  29. package/dist/{pr-IJRUPR5C.js → pr-2CZN5JLE.js} +4 -4
  30. package/dist/{run-tests-FLCVJ6TK.js → run-tests-DXRJDPFF.js} +2 -2
  31. package/dist/{run-tests-NNXBS4EL.js → run-tests-YSRET52H.js} +1 -1
  32. package/dist/{server-W2X3C6GJ.js → server-5ZAXMKRI.js} +21 -20
  33. package/dist/{server-E6LZB72O.js → server-FGJGXHZD.js} +6 -6
  34. package/dist/{task-orchestrator-W55VKYTC.js → task-orchestrator-QMERCD77.js} +6 -6
  35. package/dist/{usage-MZCDTJWB.js → usage-633DUDNT.js} +2 -2
  36. package/package.json +2 -4
  37. package/dist/chunk-B5TYJO7V.js +0 -123
@@ -139,7 +139,7 @@ ${content}`);
139
139
  const state = await runDiscussion(config, providers, options.topic);
140
140
  if (options.save !== false && state.messages.length > 0) {
141
141
  try {
142
- const { persistDiscussion } = await import("./persist-I3JI27OK.js");
142
+ const { persistDiscussion } = await import("./persist-AMH5SQ4W.js");
143
143
  const { path } = await persistDiscussion(state, configManager, defaultProvider, defaultModel);
144
144
  console.log(chalk.dim(`
145
145
  \u{1F4BE} Saved to history \u2014 open it in the Web UI and hit \u{1F3AC} to replay.
@@ -154,7 +154,7 @@ ${content}`);
154
154
  }
155
155
  }
156
156
  async function runTaskMode(config, providers, configManager, topic) {
157
- const { TaskOrchestrator } = await import("./task-orchestrator-W55VKYTC.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-QMERCD77.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  scanProject,
15
15
  sessionHasMeaningfulContent,
16
16
  setupProxy
17
- } from "./chunk-7KS3RGZ7.js";
17
+ } from "./chunk-DHNYGJYB.js";
18
18
  import {
19
19
  buildReviewPrompt,
20
20
  buildSecurityReviewPrompt
@@ -52,7 +52,7 @@ import {
52
52
  theme,
53
53
  undoStack,
54
54
  updateMemoryApproval
55
- } from "./chunk-HX67JAK6.js";
55
+ } from "./chunk-FYJGVFXL.js";
56
56
  import "./chunk-K3CF65QH.js";
57
57
  import "./chunk-UUSRWSSX.js";
58
58
  import "./chunk-CKH4KQ4E.js";
@@ -60,7 +60,7 @@ import "./chunk-BXP6YZ2P.js";
60
60
  import {
61
61
  SessionManager,
62
62
  getContentText
63
- } from "./chunk-ZWU7FWHO.js";
63
+ } from "./chunk-JMP3LJC2.js";
64
64
  import {
65
65
  CostTracker
66
66
  } from "./chunk-YVMACMXW.js";
@@ -74,7 +74,7 @@ import {
74
74
  formatDoctorReport,
75
75
  loadContextFiles,
76
76
  writeCrashLog
77
- } from "./chunk-NXYXFRPA.js";
77
+ } from "./chunk-7D5EJBHO.js";
78
78
  import {
79
79
  ProviderRegistry
80
80
  } from "./chunk-QYQI7ZWK.js";
@@ -94,7 +94,7 @@ import {
94
94
  trustHook,
95
95
  trustPlugin,
96
96
  untrustHook
97
- } from "./chunk-EZGZOK6E.js";
97
+ } from "./chunk-GFDRC2JZ.js";
98
98
  import {
99
99
  CONTENT_ONLY_STREAM_REMINDER,
100
100
  TEE_FINAL_USER_NUDGE,
@@ -116,7 +116,7 @@ import {
116
116
  } from "./chunk-O3XSFPYH.js";
117
117
  import {
118
118
  ConfigManager
119
- } from "./chunk-5PKNKJYP.js";
119
+ } from "./chunk-BFTTW5LS.js";
120
120
  import {
121
121
  AuthError,
122
122
  ProviderError,
@@ -130,7 +130,7 @@ import {
130
130
  import {
131
131
  fileCheckpoints
132
132
  } from "./chunk-4BKXL7SM.js";
133
- import "./chunk-M4FW2NPU.js";
133
+ import "./chunk-Q5GVANMH.js";
134
134
  import {
135
135
  AGENTIC_BEHAVIOR_GUIDELINE,
136
136
  AUTHOR,
@@ -149,18 +149,18 @@ import {
149
149
  SKILLS_DIR_NAME,
150
150
  VERSION,
151
151
  buildUserIdentityPrompt
152
- } from "./chunk-ACTO5C6K.js";
152
+ } from "./chunk-GDXKFWFL.js";
153
153
  import {
154
154
  buildChatIndex,
155
155
  clearChatIndex,
156
156
  getChatIndexStatus,
157
157
  searchChatMemory
158
- } from "./chunk-NVUCDUXE.js";
158
+ } from "./chunk-5MYPIQ3Y.js";
159
159
  import "./chunk-KHYD3WXE.js";
160
160
  import {
161
161
  DEFAULT_PATTERNS,
162
162
  scanString
163
- } from "./chunk-B5TYJO7V.js";
163
+ } from "./chunk-KCEO2XJ4.js";
164
164
  import {
165
165
  atomicWriteFileSync
166
166
  } from "./chunk-IW3Q7AE5.js";
@@ -1821,7 +1821,7 @@ No tools match "${filter}".
1821
1821
  const { join: join7 } = await import("path");
1822
1822
  const { existsSync: existsSync6 } = await import("fs");
1823
1823
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1824
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-UROQJXLY.js");
1824
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-ERIAS7GV.js");
1825
1825
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1826
1826
  const cwd = process.cwd();
1827
1827
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2800,7 +2800,7 @@ function createReviewCommands() {
2800
2800
  usage: "/test [command|filter]",
2801
2801
  async execute(args, ctx) {
2802
2802
  try {
2803
- const { executeTests } = await import("./run-tests-FLCVJ6TK.js");
2803
+ const { executeTests } = await import("./run-tests-DXRJDPFF.js");
2804
2804
  const argStr = args.join(" ").trim();
2805
2805
  let testArgs = {};
2806
2806
  if (argStr) {
@@ -5954,7 +5954,7 @@ Session '${this.resumeSessionId}' not found.
5954
5954
  })();
5955
5955
  void (async () => {
5956
5956
  try {
5957
- const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-O56HDGFI.js");
5957
+ const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-7HXBWQFH.js");
5958
5958
  const initial = getChatIndexStatus2();
5959
5959
  this.chatMemoryStatus = {
5960
5960
  exists: initial.exists,
@@ -7745,11 +7745,11 @@ program.command("web").description("Start Web UI server with browser-based chat
7745
7745
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7746
7746
  process.exit(1);
7747
7747
  }
7748
- const { startWebServer } = await import("./server-W2X3C6GJ.js");
7748
+ const { startWebServer } = await import("./server-5ZAXMKRI.js");
7749
7749
  await startWebServer({ port, host: options.host });
7750
7750
  });
7751
7751
  program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
7752
- const { AuthManager } = await import("./auth-FSTAKSYF.js");
7752
+ const { AuthManager } = await import("./auth-PE3Z5OHS.js");
7753
7753
  const config = new ConfigManager();
7754
7754
  const auth = new AuthManager(config.getConfigDir());
7755
7755
  if (!action || action === "list") {
@@ -7912,11 +7912,11 @@ program.command("sessions").description("List recent conversation sessions").opt
7912
7912
  console.log(footer + "\n");
7913
7913
  });
7914
7914
  program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
7915
- const { runUsageCli } = await import("./usage-MZCDTJWB.js");
7915
+ const { runUsageCli } = await import("./usage-633DUDNT.js");
7916
7916
  await runUsageCli(options);
7917
7917
  });
7918
7918
  program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
7919
- const { runDoctorCli } = await import("./doctor-cli-BY3FIV2B.js");
7919
+ const { runDoctorCli } = await import("./doctor-cli-VFSVWZU6.js");
7920
7920
  const argv = process.argv.slice(2);
7921
7921
  await runDoctorCli({
7922
7922
  json: !!options.json || argv.includes("--json"),
@@ -7925,7 +7925,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
7925
7925
  });
7926
7926
  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) => {
7927
7927
  try {
7928
- const batch = await import("./batch-WWNPYQ6G.js");
7928
+ const batch = await import("./batch-Y7MHXVR7.js");
7929
7929
  switch (action) {
7930
7930
  case "submit":
7931
7931
  if (!arg) {
@@ -7968,7 +7968,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7968
7968
  }
7969
7969
  });
7970
7970
  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) => {
7971
- const { startMcpServer } = await import("./server-E6LZB72O.js");
7971
+ const { startMcpServer } = await import("./server-FGJGXHZD.js");
7972
7972
  await startMcpServer({
7973
7973
  allowDestructive: !!options.allowDestructive,
7974
7974
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7981,7 +7981,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7981
7981
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
7982
7982
  process.exit(1);
7983
7983
  }
7984
- const { runPrCli } = await import("./pr-IJRUPR5C.js");
7984
+ const { runPrCli } = await import("./pr-2CZN5JLE.js");
7985
7985
  const result = await runPrCli({
7986
7986
  action,
7987
7987
  target,
@@ -8001,8 +8001,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
8001
8001
  process.exit(result.exitCode);
8002
8002
  });
8003
8003
  program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
8004
- const { runCi } = await import("./ci-V5V3JSJC.js");
8005
- const { formatCiResult } = await import("./ci-format-XS7LKBO5.js");
8004
+ const { runCi } = await import("./ci-OAFNH3MA.js");
8005
+ const { formatCiResult } = await import("./ci-format-4LSXJNND.js");
8006
8006
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
8007
8007
  if (formats > 1) {
8008
8008
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8160,7 +8160,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8160
8160
  config.get("customProviders"),
8161
8161
  config.getConfigDir()
8162
8162
  );
8163
- const { startHub } = await import("./hub-L2QCRI5M.js");
8163
+ const { startHub } = await import("./hub-X4EUYRIN.js");
8164
8164
  await startHub(
8165
8165
  {
8166
8166
  topic: topic ?? "",
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  discussionToMessages,
4
4
  persistDiscussion
5
- } from "./chunk-4KM53GLG.js";
6
- import "./chunk-ZWU7FWHO.js";
7
- import "./chunk-B5TYJO7V.js";
5
+ } from "./chunk-2QQKS56X.js";
6
+ import "./chunk-JMP3LJC2.js";
7
+ import "./chunk-KCEO2XJ4.js";
8
8
  import "./chunk-IW3Q7AE5.js";
9
9
  export {
10
10
  discussionToMessages,
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  countSeverity,
4
4
  runCi
5
- } from "./chunk-FQSAK75P.js";
6
- import "./chunk-TJK7AU65.js";
5
+ } from "./chunk-CDOQNIVV.js";
6
+ import "./chunk-WXFQ6LYN.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-5PKNKJYP.js";
18
+ } from "./chunk-BFTTW5LS.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-ACTO5C6K.js";
22
+ } from "./chunk-GDXKFWFL.js";
23
23
  import "./chunk-IW3Q7AE5.js";
24
24
 
25
25
  // src/cli/pr.ts
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  executeTests,
4
4
  runTestsTool
5
- } from "./chunk-M4FW2NPU.js";
6
- import "./chunk-ACTO5C6K.js";
5
+ } from "./chunk-Q5GVANMH.js";
6
+ import "./chunk-GDXKFWFL.js";
7
7
  export {
8
8
  executeTests,
9
9
  runTestsTool
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeTests,
3
3
  runTestsTool
4
- } from "./chunk-4OAV7QMB.js";
4
+ } from "./chunk-HHYMSEWS.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -7,11 +7,11 @@ import {
7
7
  import "./chunk-3ARPAVNV.js";
8
8
  import {
9
9
  persistDiscussion
10
- } from "./chunk-4KM53GLG.js";
10
+ } from "./chunk-2QQKS56X.js";
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-7KS3RGZ7.js";
26
+ } from "./chunk-DHNYGJYB.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-HX67JAK6.js";
70
+ } from "./chunk-FYJGVFXL.js";
71
71
  import "./chunk-K3CF65QH.js";
72
72
  import "./chunk-UUSRWSSX.js";
73
73
  import "./chunk-CKH4KQ4E.js";
@@ -75,7 +75,7 @@ import "./chunk-BXP6YZ2P.js";
75
75
  import {
76
76
  SessionManager,
77
77
  getContentText
78
- } from "./chunk-ZWU7FWHO.js";
78
+ } from "./chunk-JMP3LJC2.js";
79
79
  import {
80
80
  computeCost,
81
81
  formatCost
@@ -84,7 +84,7 @@ import {
84
84
  buildDoctorReport,
85
85
  formatDoctorReport,
86
86
  loadContextFiles
87
- } from "./chunk-NXYXFRPA.js";
87
+ } from "./chunk-7D5EJBHO.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-EZGZOK6E.js";
105
+ } from "./chunk-GFDRC2JZ.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-5PKNKJYP.js";
124
+ } from "./chunk-BFTTW5LS.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-M4FW2NPU.js";
132
+ import "./chunk-Q5GVANMH.js";
133
133
  import {
134
134
  AGENTIC_BEHAVIOR_GUIDELINE,
135
135
  AUTHOR,
@@ -146,12 +146,12 @@ import {
146
146
  SKILLS_DIR_NAME,
147
147
  VERSION,
148
148
  buildUserIdentityPrompt
149
- } from "./chunk-ACTO5C6K.js";
150
- import "./chunk-NVUCDUXE.js";
149
+ } from "./chunk-GDXKFWFL.js";
150
+ import "./chunk-5MYPIQ3Y.js";
151
151
  import "./chunk-KHYD3WXE.js";
152
152
  import {
153
153
  scanString
154
- } from "./chunk-B5TYJO7V.js";
154
+ } from "./chunk-KCEO2XJ4.js";
155
155
  import {
156
156
  atomicWriteFileSync
157
157
  } from "./chunk-IW3Q7AE5.js";
@@ -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);
@@ -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-FLCVJ6TK.js");
1597
+ const { executeTests } = await import("./run-tests-DXRJDPFF.js");
1597
1598
  const argStr = args.join(" ").trim();
1598
1599
  let testArgs = {};
1599
1600
  if (argStr) {
@@ -3456,7 +3457,7 @@ ${entry.content}`;
3456
3457
  return;
3457
3458
  }
3458
3459
  try {
3459
- const { searchChatMemory, loadChatIndex } = await import("./chat-index-O56HDGFI.js");
3460
+ const { searchChatMemory, loadChatIndex } = await import("./chat-index-7HXBWQFH.js");
3460
3461
  const loaded = loadChatIndex();
3461
3462
  if (!loaded || loaded.idx.chunks.length === 0) {
3462
3463
  this.send({ type: "memory_hits", query: q, hits: [], indexMissing: true });
@@ -3492,7 +3493,7 @@ ${entry.content}`;
3492
3493
  }
3493
3494
  async handleMemoryStatus() {
3494
3495
  try {
3495
- const { getChatIndexStatus } = await import("./chat-index-O56HDGFI.js");
3496
+ const { getChatIndexStatus } = await import("./chat-index-7HXBWQFH.js");
3496
3497
  const s = getChatIndexStatus();
3497
3498
  this.send({
3498
3499
  type: "memory_status",
@@ -3517,7 +3518,7 @@ ${entry.content}`;
3517
3518
  type: "info",
3518
3519
  message: full ? "\u{1F9E0} Rebuilding chat memory index (this may take a while on first run \u2014 ~117 MB embedder)." : "\u{1F9E0} Refreshing chat memory index (incremental)\u2026"
3519
3520
  });
3520
- const { buildChatIndex } = await import("./chat-index-O56HDGFI.js");
3521
+ const { buildChatIndex } = await import("./chat-index-7HXBWQFH.js");
3521
3522
  const stats = await buildChatIndex({
3522
3523
  full,
3523
3524
  onProgress: (p) => {
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-HX67JAK6.js";
4
+ } from "./chunk-FYJGVFXL.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-EZGZOK6E.js";
11
+ } from "./chunk-GFDRC2JZ.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  schemaToJsonSchema
@@ -16,13 +16,13 @@ import {
16
16
  import "./chunk-5ULLIOVC.js";
17
17
  import "./chunk-HOSJZMQS.js";
18
18
  import "./chunk-4BKXL7SM.js";
19
- import "./chunk-M4FW2NPU.js";
19
+ import "./chunk-Q5GVANMH.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-ACTO5C6K.js";
23
- import "./chunk-NVUCDUXE.js";
22
+ } from "./chunk-GDXKFWFL.js";
23
+ import "./chunk-5MYPIQ3Y.js";
24
24
  import "./chunk-KHYD3WXE.js";
25
- import "./chunk-B5TYJO7V.js";
25
+ import "./chunk-KCEO2XJ4.js";
26
26
  import "./chunk-IW3Q7AE5.js";
27
27
 
28
28
  // src/mcp/server.ts
@@ -3,14 +3,14 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-HX67JAK6.js";
6
+ } from "./chunk-FYJGVFXL.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-EZGZOK6E.js";
13
+ } from "./chunk-GFDRC2JZ.js";
14
14
  import {
15
15
  getDangerLevel,
16
16
  runLeanAgentLoop
@@ -18,13 +18,13 @@ import {
18
18
  import "./chunk-5ULLIOVC.js";
19
19
  import "./chunk-HOSJZMQS.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-M4FW2NPU.js";
21
+ import "./chunk-Q5GVANMH.js";
22
22
  import {
23
23
  SUBAGENT_ALLOWED_TOOLS
24
- } from "./chunk-ACTO5C6K.js";
25
- import "./chunk-NVUCDUXE.js";
24
+ } from "./chunk-GDXKFWFL.js";
25
+ import "./chunk-5MYPIQ3Y.js";
26
26
  import "./chunk-KHYD3WXE.js";
27
- import "./chunk-B5TYJO7V.js";
27
+ import "./chunk-KCEO2XJ4.js";
28
28
  import {
29
29
  atomicWriteFileSync
30
30
  } from "./chunk-IW3Q7AE5.js";
@@ -8,9 +8,9 @@ import {
8
8
  } from "./chunk-E44DTERW.js";
9
9
  import {
10
10
  ConfigManager
11
- } from "./chunk-5PKNKJYP.js";
11
+ } from "./chunk-BFTTW5LS.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-ACTO5C6K.js";
13
+ import "./chunk-GDXKFWFL.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.233",
3
+ "version": "0.4.235",
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",
@@ -1,123 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/security/redactor.ts
4
- var DEFAULT_PATTERNS = [
5
- // password: xxx / password = xxx / password="xxx"
6
- // Covers YAML / JSON / shell-ish / env-file forms.
7
- { kind: "password", regex: /\b(password|passwd|pwd)\s*[:=]\s*["']?([^\s"',;{}]{4,200})["']?/gi },
8
- // PGPASSWORD=xxx (explicit bash env-var form, separate rule because no quotes usually)
9
- { kind: "pgpassword-env", regex: /\b(PGPASSWORD)=([^\s"']{4,200})/g },
10
- // JDBC/PG/MySQL/Mongo connection strings with inline credentials
11
- // postgresql://user:pass@host/db → redact pass
12
- { kind: "db-uri-password", regex: /(\b(?:postgres(?:ql)?|mysql|mongodb(?:\+srv)?|redis|amqp|mssql):\/\/[^:\s]+:)([^@\s]+)(@)/gi },
13
- // Anthropic API keys
14
- { kind: "anthropic-key", regex: /(sk-ant-[a-zA-Z0-9_-]{90,})/g },
15
- // L6 (v0.4.108): Zhipu / GLM API keys — `<24+ hex/base64-ish>.<32+>`
16
- // Two segments separated by a dot, each safely identifiable by length
17
- // and char class. Conservative on the lower bound so we don't eat
18
- // version strings like `1.0.0` or filenames.
19
- { kind: "zhipu-key", regex: /\b([a-zA-Z0-9]{24,}\.[a-zA-Z0-9]{32,})\b/g },
20
- // OpenAI / generic sk- keys — requires length ≥32 to avoid eating short identifiers
21
- { kind: "openai-key", regex: /(sk-(?:proj-)?[a-zA-Z0-9_-]{32,})/g },
22
- // GitHub personal access tokens
23
- { kind: "github-pat", regex: /\b(ghp_[a-zA-Z0-9]{36})\b/g },
24
- { kind: "github-oauth", regex: /\b(gho_[a-zA-Z0-9]{36})\b/g },
25
- { kind: "github-install", regex: /\b(ghs_[a-zA-Z0-9]{36})\b/g },
26
- // Slack tokens
27
- { kind: "slack-bot", regex: /\b(xoxb-\d+-\d+-[a-zA-Z0-9]+)\b/g },
28
- { kind: "slack-user", regex: /\b(xoxp-\d+-\d+-\d+-[a-zA-Z0-9]+)\b/g },
29
- // AWS access key IDs (AKIA...) and secret access keys are context-dependent;
30
- // we only catch the ID because secret key alone is indistinguishable from random base64.
31
- { kind: "aws-access-key-id", regex: /\b(AKIA[0-9A-Z]{16})\b/g },
32
- // Google API keys
33
- { kind: "google-api-key", regex: /\b(AIza[0-9A-Za-z_-]{35})\b/g },
34
- // Generic "api_key": "..." / "apiKey": "..." / api-key=xxx
35
- { kind: "api-key", regex: /\b(api[_-]?key)\s*[:=]\s*["']?([a-zA-Z0-9_\-.]{16,200})["']?/gi },
36
- // Generic token: xxx (only when value looks token-shaped; avoids eating human prose)
37
- { kind: "token", regex: /\b(token|access[_-]?token|bearer[_-]?token)\s*[:=]\s*["']?([a-zA-Z0-9_\-.]{20,300})["']?/gi },
38
- // Bearer <token> in Authorization headers
39
- { kind: "bearer", regex: /\b(Authorization:\s*Bearer\s+)([a-zA-Z0-9_\-.=]{20,500})/g },
40
- // Private key PEM blocks — catch the header+footer together
41
- // P2-PERF-02: PEM bodies use strict Base64 + =\n — narrowed char class avoids backtracking
42
- { kind: "private-key", regex: /-----BEGIN [A-Z ]*PRIVATE KEY-----[ \t\n\r]*[A-Za-z0-9+/=\n\r-]*[ \t\n\r]*-----END [A-Z ]*PRIVATE KEY-----/g }
43
- ];
44
- var MAX_CUSTOM = 32;
45
- var MAX_PATTERN_LEN = 500;
46
- var SUSPICIOUS_REDOS = /\([^)]*[+*][^)]*\)\s*[+*{]/;
47
- var MAX_REDACT_INPUT = 512e3;
48
- function render(placeholder, kind) {
49
- return placeholder.replace("{kind}", kind);
50
- }
51
- function redactString(input, options) {
52
- if (!options.enabled || !input) return { redacted: input, hits: [] };
53
- if (input.length > MAX_REDACT_INPUT) return { redacted: input, hits: [] };
54
- const placeholder = options.placeholder ?? "[REDACTED:{kind}]";
55
- const customSrcs = (options.customRegexes ?? []).slice(0, MAX_CUSTOM);
56
- const patterns = [
57
- ...options.patterns ?? DEFAULT_PATTERNS,
58
- ...customSrcs.flatMap((src, i) => {
59
- if (typeof src !== "string" || src.length === 0 || src.length > MAX_PATTERN_LEN) return [];
60
- try {
61
- const flags = src.match(/^\/.*\/([gimsuy]*)$/)?.[1] ?? "";
62
- const body = src.replace(/^\/(.*)\/[gimsuy]*$/, "$1");
63
- if (SUSPICIOUS_REDOS.test(body)) return [];
64
- const regex = new RegExp(body, flags.includes("g") ? flags : flags + "g");
65
- return [{ kind: `custom-${i}`, regex }];
66
- } catch {
67
- return [];
68
- }
69
- })
70
- ];
71
- let redacted = input;
72
- const hits = [];
73
- for (const { kind, regex } of patterns) {
74
- const rx = new RegExp(regex.source, regex.flags);
75
- const captureCount = new RegExp(rx.source + "|").exec("").length - 1;
76
- redacted = redacted.replace(rx, (...args) => {
77
- const match = args[0];
78
- const g1 = captureCount >= 1 ? args[1] : void 0;
79
- const g2 = captureCount >= 2 ? args[2] : void 0;
80
- const offset = args[1 + captureCount];
81
- if (captureCount >= 2 && typeof g2 === "string") {
82
- hits.push({ kind, start: offset + (g1?.length ?? 0), length: g2.length, secret: g2 });
83
- return `${g1}${render(placeholder, kind)}`;
84
- }
85
- hits.push({ kind, start: offset, length: match.length, secret: g1 ?? match });
86
- return render(placeholder, kind);
87
- });
88
- }
89
- return { redacted, hits };
90
- }
91
- function redactJson(value, options) {
92
- if (!options.enabled) return { value, hits: [] };
93
- const allHits = [];
94
- function walk(v) {
95
- if (typeof v === "string") {
96
- const r = redactString(v, options);
97
- allHits.push(...r.hits);
98
- return r.redacted;
99
- }
100
- if (Array.isArray(v)) return v.map(walk);
101
- if (v && typeof v === "object") {
102
- const out = {};
103
- for (const [k, vv] of Object.entries(v)) {
104
- out[k] = walk(vv);
105
- }
106
- return out;
107
- }
108
- return v;
109
- }
110
- const redacted = walk(value);
111
- return { value: redacted, hits: allHits };
112
- }
113
- function scanString(input, options) {
114
- const { hits } = redactString(input, { ...options, enabled: true });
115
- return hits;
116
- }
117
-
118
- export {
119
- DEFAULT_PATTERNS,
120
- redactString,
121
- redactJson,
122
- scanString
123
- };