jinzd-ai-cli 0.4.232 → 0.4.234

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/{batch-D6XYKHHA.js → batch-T3FRX4B6.js} +2 -2
  2. package/dist/{chat-index-O56HDGFI.js → chat-index-7HXBWQFH.js} +2 -2
  3. package/dist/{chat-index-WSI7ULRQ.js → chat-index-WYXYD7YP.js} +1 -1
  4. package/dist/{chunk-4KM53GLG.js → chunk-2QQKS56X.js} +1 -1
  5. package/dist/{chunk-EPDW73H7.js → chunk-3KTSJ2EL.js} +1 -1
  6. package/dist/{chunk-KIQ2ICMV.js → chunk-5DTEEWYC.js} +4 -4
  7. package/dist/{chunk-NVUCDUXE.js → chunk-5MYPIQ3Y.js} +11 -5
  8. package/dist/{chunk-YDGKT6RI.js → chunk-5VPRZMZB.js} +2 -2
  9. package/dist/{chunk-RRMLRCPW.js → chunk-6MJMHHRK.js} +4 -4
  10. package/dist/{chunk-2FZACYUE.js → chunk-AFT6VFMI.js} +1 -1
  11. package/dist/{chunk-TJVM535A.js → chunk-E5RLXMSU.js} +6 -6
  12. package/dist/{chunk-XVR4YKRC.js → chunk-ETJ5X6V7.js} +1 -1
  13. package/dist/{chunk-6VSAKQTN.js → chunk-II6RZRTF.js} +1 -1
  14. package/dist/{chunk-ZWU7FWHO.js → chunk-JMP3LJC2.js} +38 -91
  15. package/dist/chunk-KCEO2XJ4.js +420 -0
  16. package/dist/{chunk-LKTYTDEJ.js → chunk-L5PNAQ6O.js} +1 -1
  17. package/dist/{chunk-ODYTXQ26.js → chunk-O3XSFPYH.js} +35 -3
  18. package/dist/{chunk-62R7CACG.js → chunk-QYQI7ZWK.js} +1 -1
  19. package/dist/{chunk-2HWL45PG.js → chunk-TAXIG7HH.js} +1 -1
  20. package/dist/{chunk-LF3OUJHK.js → chunk-UO3XWZFE.js} +302 -4
  21. package/dist/{ci-OR57Z7QF.js → ci-GJ53GPLA.js} +6 -6
  22. package/dist/{ci-format-DMMS2ZFK.js → ci-format-AXE4QCI6.js} +2 -2
  23. package/dist/{constants-7GZKINR5.js → constants-DC4EXFSB.js} +1 -1
  24. package/dist/{doctor-cli-ZD37GAZD.js → doctor-cli-HKREND6Q.js} +6 -6
  25. package/dist/electron-server.js +78 -99
  26. package/dist/{hub-VFYFUSM6.js → hub-LTTKRGZC.js} +2 -2
  27. package/dist/index.js +24 -24
  28. package/dist/{persist-I3JI27OK.js → persist-AMH5SQ4W.js} +3 -3
  29. package/dist/{pr-YF6TXJYE.js → pr-4VODJVRV.js} +6 -6
  30. package/dist/{run-tests-HEDDC6DJ.js → run-tests-G5BNTMWQ.js} +2 -2
  31. package/dist/{run-tests-BNZZDCTU.js → run-tests-QR2PYR2P.js} +1 -1
  32. package/dist/{server-HCDI2EID.js → server-64WZVZZN.js} +17 -17
  33. package/dist/{server-C52P6IDO.js → server-EO6VQHKL.js} +7 -7
  34. package/dist/{task-orchestrator-QIEHYRGK.js → task-orchestrator-4INCZMLT.js} +7 -7
  35. package/dist/{usage-4AAMJBBM.js → usage-T3HFMNNV.js} +2 -2
  36. package/package.json +1 -1
  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-QIEHYRGK.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-4INCZMLT.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-YDGKT6RI.js";
17
+ } from "./chunk-5VPRZMZB.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-TJVM535A.js";
55
+ } from "./chunk-E5RLXMSU.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,10 +74,10 @@ import {
74
74
  formatDoctorReport,
75
75
  loadContextFiles,
76
76
  writeCrashLog
77
- } from "./chunk-KIQ2ICMV.js";
77
+ } from "./chunk-5DTEEWYC.js";
78
78
  import {
79
79
  ProviderRegistry
80
- } from "./chunk-62R7CACG.js";
80
+ } from "./chunk-QYQI7ZWK.js";
81
81
  import {
82
82
  describePlugin,
83
83
  getActivePluginAssets,
@@ -94,7 +94,7 @@ import {
94
94
  trustHook,
95
95
  trustPlugin,
96
96
  untrustHook
97
- } from "./chunk-6VSAKQTN.js";
97
+ } from "./chunk-II6RZRTF.js";
98
98
  import {
99
99
  CONTENT_ONLY_STREAM_REMINDER,
100
100
  TEE_FINAL_USER_NUDGE,
@@ -113,10 +113,10 @@ import {
113
113
  stripOuterCodeFence,
114
114
  stripToolCallReminder,
115
115
  teeStreamErrorSummary
116
- } from "./chunk-ODYTXQ26.js";
116
+ } from "./chunk-O3XSFPYH.js";
117
117
  import {
118
118
  ConfigManager
119
- } from "./chunk-LKTYTDEJ.js";
119
+ } from "./chunk-L5PNAQ6O.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-2FZACYUE.js";
133
+ import "./chunk-AFT6VFMI.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-EPDW73H7.js";
152
+ } from "./chunk-3KTSJ2EL.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-7GZKINR5.js");
1824
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-DC4EXFSB.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-HEDDC6DJ.js");
2803
+ const { executeTests } = await import("./run-tests-G5BNTMWQ.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,7 +7745,7 @@ 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-HCDI2EID.js");
7748
+ const { startWebServer } = await import("./server-64WZVZZN.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) => {
@@ -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-4AAMJBBM.js");
7915
+ const { runUsageCli } = await import("./usage-T3HFMNNV.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-ZD37GAZD.js");
7919
+ const { runDoctorCli } = await import("./doctor-cli-HKREND6Q.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-D6XYKHHA.js");
7928
+ const batch = await import("./batch-T3FRX4B6.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-C52P6IDO.js");
7971
+ const { startMcpServer } = await import("./server-EO6VQHKL.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-YF6TXJYE.js");
7984
+ const { runPrCli } = await import("./pr-4VODJVRV.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-OR57Z7QF.js");
8005
- const { formatCiResult } = await import("./ci-format-DMMS2ZFK.js");
8004
+ const { runCi } = await import("./ci-GJ53GPLA.js");
8005
+ const { formatCiResult } = await import("./ci-format-AXE4QCI6.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-VFYFUSM6.js");
8163
+ const { startHub } = await import("./hub-LTTKRGZC.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-RRMLRCPW.js";
6
- import "./chunk-2HWL45PG.js";
5
+ } from "./chunk-6MJMHHRK.js";
6
+ import "./chunk-TAXIG7HH.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -11,15 +11,15 @@ import {
11
11
  } from "./chunk-HLWUDRBO.js";
12
12
  import {
13
13
  ProviderRegistry
14
- } from "./chunk-62R7CACG.js";
15
- import "./chunk-ODYTXQ26.js";
14
+ } from "./chunk-QYQI7ZWK.js";
15
+ import "./chunk-O3XSFPYH.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-LKTYTDEJ.js";
18
+ } from "./chunk-L5PNAQ6O.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-EPDW73H7.js";
22
+ } from "./chunk-3KTSJ2EL.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-2FZACYUE.js";
6
- import "./chunk-EPDW73H7.js";
5
+ } from "./chunk-AFT6VFMI.js";
6
+ import "./chunk-3KTSJ2EL.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-XVR4YKRC.js";
4
+ } from "./chunk-ETJ5X6V7.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -7,7 +7,7 @@ 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
@@ -23,7 +23,7 @@ import {
23
23
  scanDirTree,
24
24
  scanProject,
25
25
  setupProxy
26
- } from "./chunk-YDGKT6RI.js";
26
+ } from "./chunk-5VPRZMZB.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-TJVM535A.js";
70
+ } from "./chunk-E5RLXMSU.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,10 +84,10 @@ import {
84
84
  buildDoctorReport,
85
85
  formatDoctorReport,
86
86
  loadContextFiles
87
- } from "./chunk-KIQ2ICMV.js";
87
+ } from "./chunk-5DTEEWYC.js";
88
88
  import {
89
89
  ProviderRegistry
90
- } from "./chunk-62R7CACG.js";
90
+ } from "./chunk-QYQI7ZWK.js";
91
91
  import {
92
92
  describePlugin,
93
93
  getActivePluginAssets,
@@ -102,7 +102,7 @@ import {
102
102
  runTool,
103
103
  setPluginEnabled,
104
104
  trustPlugin
105
- } from "./chunk-6VSAKQTN.js";
105
+ } from "./chunk-II6RZRTF.js";
106
106
  import {
107
107
  CONTENT_ONLY_STREAM_REMINDER,
108
108
  TEE_FINAL_USER_NUDGE,
@@ -118,10 +118,10 @@ import {
118
118
  stripOuterCodeFence,
119
119
  stripToolCallReminder,
120
120
  teeStreamErrorSummary
121
- } from "./chunk-ODYTXQ26.js";
121
+ } from "./chunk-O3XSFPYH.js";
122
122
  import {
123
123
  ConfigManager
124
- } from "./chunk-LKTYTDEJ.js";
124
+ } from "./chunk-L5PNAQ6O.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-2FZACYUE.js";
132
+ import "./chunk-AFT6VFMI.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-EPDW73H7.js";
150
- import "./chunk-NVUCDUXE.js";
149
+ } from "./chunk-3KTSJ2EL.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";
@@ -1593,7 +1593,7 @@ async function handleSecurityReview(args, ctx) {
1593
1593
  async function handleTest(args, ctx) {
1594
1594
  ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
1595
1595
  try {
1596
- const { executeTests } = await import("./run-tests-HEDDC6DJ.js");
1596
+ const { executeTests } = await import("./run-tests-G5BNTMWQ.js");
1597
1597
  const argStr = args.join(" ").trim();
1598
1598
  let testArgs = {};
1599
1599
  if (argStr) {
@@ -3456,7 +3456,7 @@ ${entry.content}`;
3456
3456
  return;
3457
3457
  }
3458
3458
  try {
3459
- const { searchChatMemory, loadChatIndex } = await import("./chat-index-O56HDGFI.js");
3459
+ const { searchChatMemory, loadChatIndex } = await import("./chat-index-7HXBWQFH.js");
3460
3460
  const loaded = loadChatIndex();
3461
3461
  if (!loaded || loaded.idx.chunks.length === 0) {
3462
3462
  this.send({ type: "memory_hits", query: q, hits: [], indexMissing: true });
@@ -3492,7 +3492,7 @@ ${entry.content}`;
3492
3492
  }
3493
3493
  async handleMemoryStatus() {
3494
3494
  try {
3495
- const { getChatIndexStatus } = await import("./chat-index-O56HDGFI.js");
3495
+ const { getChatIndexStatus } = await import("./chat-index-7HXBWQFH.js");
3496
3496
  const s = getChatIndexStatus();
3497
3497
  this.send({
3498
3498
  type: "memory_status",
@@ -3517,7 +3517,7 @@ ${entry.content}`;
3517
3517
  type: "info",
3518
3518
  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
3519
  });
3520
- const { buildChatIndex } = await import("./chat-index-O56HDGFI.js");
3520
+ const { buildChatIndex } = await import("./chat-index-7HXBWQFH.js");
3521
3521
  const stats = await buildChatIndex({
3522
3522
  full,
3523
3523
  onProgress: (p) => {
@@ -1,28 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-TJVM535A.js";
4
+ } from "./chunk-E5RLXMSU.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-6VSAKQTN.js";
11
+ } from "./chunk-II6RZRTF.js";
12
12
  import {
13
13
  getDangerLevel,
14
14
  schemaToJsonSchema
15
- } from "./chunk-ODYTXQ26.js";
15
+ } from "./chunk-O3XSFPYH.js";
16
16
  import "./chunk-5ULLIOVC.js";
17
17
  import "./chunk-HOSJZMQS.js";
18
18
  import "./chunk-4BKXL7SM.js";
19
- import "./chunk-2FZACYUE.js";
19
+ import "./chunk-AFT6VFMI.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-EPDW73H7.js";
23
- import "./chunk-NVUCDUXE.js";
22
+ } from "./chunk-3KTSJ2EL.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,28 +3,28 @@ import {
3
3
  ToolRegistry,
4
4
  googleSearchContext,
5
5
  truncateOutput
6
- } from "./chunk-TJVM535A.js";
6
+ } from "./chunk-E5RLXMSU.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-6VSAKQTN.js";
13
+ } from "./chunk-II6RZRTF.js";
14
14
  import {
15
15
  getDangerLevel,
16
16
  runLeanAgentLoop
17
- } from "./chunk-ODYTXQ26.js";
17
+ } from "./chunk-O3XSFPYH.js";
18
18
  import "./chunk-5ULLIOVC.js";
19
19
  import "./chunk-HOSJZMQS.js";
20
20
  import "./chunk-4BKXL7SM.js";
21
- import "./chunk-2FZACYUE.js";
21
+ import "./chunk-AFT6VFMI.js";
22
22
  import {
23
23
  SUBAGENT_ALLOWED_TOOLS
24
- } from "./chunk-EPDW73H7.js";
25
- import "./chunk-NVUCDUXE.js";
24
+ } from "./chunk-3KTSJ2EL.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-LKTYTDEJ.js";
11
+ } from "./chunk-L5PNAQ6O.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-EPDW73H7.js";
13
+ import "./chunk-3KTSJ2EL.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.232",
3
+ "version": "0.4.234",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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
- };