jinzd-ai-cli 0.4.222 → 0.4.224

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 (40) hide show
  1. package/dist/{batch-QOOO7HRW.js → batch-EQER63CQ.js} +2 -2
  2. package/dist/{chat-index-FDSGKWQV.js → chat-index-O56HDGFI.js} +2 -2
  3. package/dist/{chat-index-PS274XM7.js → chat-index-WSI7ULRQ.js} +1 -1
  4. package/dist/{chunk-OJL3PY36.js → chunk-2X2DOHA6.js} +3 -2
  5. package/dist/{chunk-VWTUYDZG.js → chunk-34RV4ZKA.js} +1 -1
  6. package/dist/{chunk-UWUTLIOH.js → chunk-35OPVVEK.js} +1 -1
  7. package/dist/{chunk-NZ4X6GUC.js → chunk-3ARPAVNV.js} +2 -2
  8. package/dist/{chunk-FBK7NSIK.js → chunk-4CZZJQXJ.js} +2 -2
  9. package/dist/{chunk-5EE4GRGG.js → chunk-4RQPCOEE.js} +281 -41
  10. package/dist/{chunk-VBRCWH55.js → chunk-6FEZAWH5.js} +3 -3
  11. package/dist/{chunk-SISFAT6W.js → chunk-A2AVDSXJ.js} +1 -1
  12. package/dist/{chunk-SLSWPBK3.js → chunk-B5TYJO7V.js} +4 -1
  13. package/dist/{chunk-QT5FA2ZY.js → chunk-DEHVRQWW.js} +5 -5
  14. package/dist/{chunk-AV5OPK7Q.js → chunk-HLXQXV23.js} +1 -1
  15. package/dist/{chunk-TNW22OUY.js → chunk-JDMFVRFG.js} +3 -3
  16. package/dist/{chunk-S6L5R6SS.js → chunk-JU7OI4BN.js} +1 -1
  17. package/dist/{chunk-VHY6NVMQ.js → chunk-LF3OUJHK.js} +4 -1
  18. package/dist/{chunk-TB4W4Y4T.js → chunk-NVUCDUXE.js} +1 -1
  19. package/dist/{chunk-NNWWMGYK.js → chunk-QJUAQKH2.js} +1 -1
  20. package/dist/{chunk-5GTWZ4QF.js → chunk-QYQCCIBT.js} +1 -1
  21. package/dist/{chunk-Q3ZUDA6S.js → chunk-VT6NRDD2.js} +1 -1
  22. package/dist/{ci-IB7NWHZN.js → ci-UAQFOAMS.js} +4 -4
  23. package/dist/{ci-format-YLGZN3D4.js → ci-format-MNUHYUTO.js} +2 -2
  24. package/dist/{constants-BOMLZEXC.js → constants-PGDTYD2R.js} +1 -1
  25. package/dist/{doctor-cli-2ND4LONW.js → doctor-cli-F6A3GOVY.js} +4 -4
  26. package/dist/electron-server.js +2017 -1786
  27. package/dist/{hub-6WADFJNC.js → hub-EDTZKS7E.js} +6 -6
  28. package/dist/{hub-server-LJ2JSKZ2.js → hub-server-XX36DX7O.js} +2 -2
  29. package/dist/index.js +26 -22
  30. package/dist/{persist-GTBEKVFL.js → persist-XUXIPYUU.js} +3 -3
  31. package/dist/{pr-F7WXUH27.js → pr-YC7DMVC5.js} +4 -4
  32. package/dist/{run-tests-5NEMM6EF.js → run-tests-AUEKHJCC.js} +2 -2
  33. package/dist/{run-tests-NIY24YDP.js → run-tests-S36TE2W2.js} +1 -1
  34. package/dist/{server-ACFX2J66.js → server-347YIBHS.js} +6 -6
  35. package/dist/{server-QGZYDDZW.js → server-LQFHSFN4.js} +1278 -1271
  36. package/dist/{task-orchestrator-4GOBFXPN.js → task-orchestrator-FIR5MCND.js} +17 -9
  37. package/dist/{usage-JXT2YVA6.js → usage-3MXPFFBU.js} +2 -2
  38. package/dist/web/client/app.js +3 -2
  39. package/dist/web/client/util.js +42 -0
  40. package/package.json +1 -1
@@ -3,14 +3,14 @@ import {
3
3
  assignRoleColors,
4
4
  renderHubBanner,
5
5
  renderHubEvent
6
- } from "./chunk-OJL3PY36.js";
6
+ } from "./chunk-2X2DOHA6.js";
7
7
  import {
8
8
  DiscussionOrchestrator,
9
9
  getPreset,
10
10
  listPresets,
11
11
  resolveRoleProviders
12
- } from "./chunk-Q3ZUDA6S.js";
13
- import "./chunk-NZ4X6GUC.js";
12
+ } from "./chunk-VT6NRDD2.js";
13
+ import "./chunk-3ARPAVNV.js";
14
14
 
15
15
  // src/hub/index.ts
16
16
  import { readFileSync, existsSync } from "fs";
@@ -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-GTBEKVFL.js");
142
+ const { persistDiscussion } = await import("./persist-XUXIPYUU.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-4GOBFXPN.js");
157
+ const { TaskOrchestrator } = await import("./task-orchestrator-FIR5MCND.js");
158
158
  const orchestrator = new TaskOrchestrator(config, providers, configManager);
159
159
  let interrupted = false;
160
160
  const onSigint = () => {
@@ -190,7 +190,7 @@ async function runTaskMode(config, providers, configManager, topic) {
190
190
  }
191
191
  }
192
192
  async function runDistributedDiscussion(config, providers, topic, port) {
193
- const { HubServer } = await import("./hub-server-LJ2JSKZ2.js");
193
+ const { HubServer } = await import("./hub-server-XX36DX7O.js");
194
194
  const hub = new HubServer(config, providers, port);
195
195
  let interrupted = false;
196
196
  const onSigint = () => {
@@ -10,10 +10,10 @@ import {
10
10
  renderRoundHeader,
11
11
  renderSummary,
12
12
  renderUserInterrupt
13
- } from "./chunk-OJL3PY36.js";
13
+ } from "./chunk-2X2DOHA6.js";
14
14
  import {
15
15
  HubAgent
16
- } from "./chunk-NZ4X6GUC.js";
16
+ } from "./chunk-3ARPAVNV.js";
17
17
 
18
18
  // src/hub/hub-server.ts
19
19
  import { WebSocketServer } from "ws";
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  scanProject,
15
15
  sessionHasMeaningfulContent,
16
16
  setupProxy
17
- } from "./chunk-FBK7NSIK.js";
17
+ } from "./chunk-4CZZJQXJ.js";
18
18
  import {
19
19
  buildReviewPrompt,
20
20
  buildSecurityReviewPrompt
@@ -24,6 +24,7 @@ import {
24
24
  ToolRegistry,
25
25
  addMemoryEntry,
26
26
  askUserContext,
27
+ cleanupAllSessions,
27
28
  cleanupRejectedTeeFile,
28
29
  clearRecentlyDeniedAutoActions,
29
30
  deleteMemoryEntry,
@@ -51,7 +52,7 @@ import {
51
52
  theme,
52
53
  undoStack,
53
54
  updateMemoryApproval
54
- } from "./chunk-5EE4GRGG.js";
55
+ } from "./chunk-4RQPCOEE.js";
55
56
  import "./chunk-K3CF65QH.js";
56
57
  import "./chunk-UUSRWSSX.js";
57
58
  import "./chunk-CKH4KQ4E.js";
@@ -59,7 +60,7 @@ import "./chunk-BXP6YZ2P.js";
59
60
  import {
60
61
  SessionManager,
61
62
  getContentText
62
- } from "./chunk-5GTWZ4QF.js";
63
+ } from "./chunk-QYQCCIBT.js";
63
64
  import {
64
65
  CostTracker
65
66
  } from "./chunk-CITDVXXM.js";
@@ -73,7 +74,7 @@ import {
73
74
  formatDoctorReport,
74
75
  loadContextFiles,
75
76
  writeCrashLog
76
- } from "./chunk-VBRCWH55.js";
77
+ } from "./chunk-6FEZAWH5.js";
77
78
  import {
78
79
  ProviderRegistry
79
80
  } from "./chunk-PUBCJF7E.js";
@@ -93,7 +94,7 @@ import {
93
94
  trustHook,
94
95
  trustPlugin,
95
96
  untrustHook
96
- } from "./chunk-SISFAT6W.js";
97
+ } from "./chunk-A2AVDSXJ.js";
97
98
  import {
98
99
  CONTENT_ONLY_STREAM_REMINDER,
99
100
  TEE_FINAL_USER_NUDGE,
@@ -115,7 +116,7 @@ import {
115
116
  } from "./chunk-XPBEJB27.js";
116
117
  import {
117
118
  ConfigManager
118
- } from "./chunk-UWUTLIOH.js";
119
+ } from "./chunk-35OPVVEK.js";
119
120
  import {
120
121
  AuthError,
121
122
  ProviderError,
@@ -129,7 +130,7 @@ import {
129
130
  import {
130
131
  fileCheckpoints
131
132
  } from "./chunk-4BKXL7SM.js";
132
- import "./chunk-S6L5R6SS.js";
133
+ import "./chunk-JU7OI4BN.js";
133
134
  import {
134
135
  AGENTIC_BEHAVIOR_GUIDELINE,
135
136
  AUTHOR,
@@ -148,18 +149,18 @@ import {
148
149
  SKILLS_DIR_NAME,
149
150
  VERSION,
150
151
  buildUserIdentityPrompt
151
- } from "./chunk-NNWWMGYK.js";
152
+ } from "./chunk-QJUAQKH2.js";
152
153
  import {
153
154
  buildChatIndex,
154
155
  clearChatIndex,
155
156
  getChatIndexStatus,
156
157
  searchChatMemory
157
- } from "./chunk-TB4W4Y4T.js";
158
+ } from "./chunk-NVUCDUXE.js";
158
159
  import "./chunk-KHYD3WXE.js";
159
160
  import {
160
161
  DEFAULT_PATTERNS,
161
162
  scanString
162
- } from "./chunk-SLSWPBK3.js";
163
+ } from "./chunk-B5TYJO7V.js";
163
164
  import {
164
165
  atomicWriteFileSync
165
166
  } from "./chunk-IW3Q7AE5.js";
@@ -1822,7 +1823,7 @@ No tools match "${filter}".
1822
1823
  const { join: join7 } = await import("path");
1823
1824
  const { existsSync: existsSync6 } = await import("fs");
1824
1825
  const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
1825
- const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-BOMLZEXC.js");
1826
+ const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-PGDTYD2R.js");
1826
1827
  const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
1827
1828
  const cwd = process.cwd();
1828
1829
  const projectRoot = getGitRoot2(cwd) ?? cwd;
@@ -2801,7 +2802,7 @@ function createReviewCommands() {
2801
2802
  usage: "/test [command|filter]",
2802
2803
  async execute(args, ctx) {
2803
2804
  try {
2804
- const { executeTests } = await import("./run-tests-5NEMM6EF.js");
2805
+ const { executeTests } = await import("./run-tests-AUEKHJCC.js");
2805
2806
  const argStr = args.join(" ").trim();
2806
2807
  let testArgs = {};
2807
2808
  if (argStr) {
@@ -5857,7 +5858,7 @@ Session '${this.resumeSessionId}' not found.
5857
5858
  })();
5858
5859
  void (async () => {
5859
5860
  try {
5860
- const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-FDSGKWQV.js");
5861
+ const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-O56HDGFI.js");
5861
5862
  const initial = getChatIndexStatus2();
5862
5863
  this.chatMemoryStatus = {
5863
5864
  exists: initial.exists,
@@ -7577,6 +7578,9 @@ var EventBus = class extends EventEmitter {
7577
7578
 
7578
7579
  // src/index.ts
7579
7580
  installFlushOnExit();
7581
+ process.on("exit", () => {
7582
+ cleanupAllSessions();
7583
+ });
7580
7584
  process.on("uncaughtException", (err) => {
7581
7585
  const path = writeCrashLog(err, { kind: "uncaughtException" });
7582
7586
  process.stderr.write(`
@@ -7645,7 +7649,7 @@ program.command("web").description("Start Web UI server with browser-based chat
7645
7649
  console.error("Error: Invalid port number. Must be between 1 and 65535.");
7646
7650
  process.exit(1);
7647
7651
  }
7648
- const { startWebServer } = await import("./server-QGZYDDZW.js");
7652
+ const { startWebServer } = await import("./server-LQFHSFN4.js");
7649
7653
  await startWebServer({ port, host: options.host });
7650
7654
  });
7651
7655
  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) => {
@@ -7812,11 +7816,11 @@ program.command("sessions").description("List recent conversation sessions").opt
7812
7816
  console.log(footer + "\n");
7813
7817
  });
7814
7818
  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) => {
7815
- const { runUsageCli } = await import("./usage-JXT2YVA6.js");
7819
+ const { runUsageCli } = await import("./usage-3MXPFFBU.js");
7816
7820
  await runUsageCli(options);
7817
7821
  });
7818
7822
  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) => {
7819
- const { runDoctorCli } = await import("./doctor-cli-2ND4LONW.js");
7823
+ const { runDoctorCli } = await import("./doctor-cli-F6A3GOVY.js");
7820
7824
  const argv = process.argv.slice(2);
7821
7825
  await runDoctorCli({
7822
7826
  json: !!options.json || argv.includes("--json"),
@@ -7825,7 +7829,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
7825
7829
  });
7826
7830
  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) => {
7827
7831
  try {
7828
- const batch = await import("./batch-QOOO7HRW.js");
7832
+ const batch = await import("./batch-EQER63CQ.js");
7829
7833
  switch (action) {
7830
7834
  case "submit":
7831
7835
  if (!arg) {
@@ -7868,7 +7872,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
7868
7872
  }
7869
7873
  });
7870
7874
  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) => {
7871
- const { startMcpServer } = await import("./server-ACFX2J66.js");
7875
+ const { startMcpServer } = await import("./server-347YIBHS.js");
7872
7876
  await startMcpServer({
7873
7877
  allowDestructive: !!options.allowDestructive,
7874
7878
  allowOutsideCwd: !!options.allowOutsideCwd,
@@ -7881,7 +7885,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7881
7885
  console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
7882
7886
  process.exit(1);
7883
7887
  }
7884
- const { runPrCli } = await import("./pr-F7WXUH27.js");
7888
+ const { runPrCli } = await import("./pr-YC7DMVC5.js");
7885
7889
  const result = await runPrCli({
7886
7890
  action,
7887
7891
  target,
@@ -7901,8 +7905,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
7901
7905
  process.exit(result.exitCode);
7902
7906
  });
7903
7907
  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) => {
7904
- const { runCi } = await import("./ci-IB7NWHZN.js");
7905
- const { formatCiResult } = await import("./ci-format-YLGZN3D4.js");
7908
+ const { runCi } = await import("./ci-UAQFOAMS.js");
7909
+ const { formatCiResult } = await import("./ci-format-MNUHYUTO.js");
7906
7910
  const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
7907
7911
  if (formats > 1) {
7908
7912
  console.error("Choose only one output format: --json, --markdown, or --sarif.");
@@ -8060,7 +8064,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
8060
8064
  config.get("customProviders"),
8061
8065
  config.getConfigDir()
8062
8066
  );
8063
- const { startHub } = await import("./hub-6WADFJNC.js");
8067
+ const { startHub } = await import("./hub-EDTZKS7E.js");
8064
8068
  await startHub(
8065
8069
  {
8066
8070
  topic: topic ?? "",
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  discussionToMessages,
4
4
  persistDiscussion
5
- } from "./chunk-QT5FA2ZY.js";
6
- import "./chunk-5GTWZ4QF.js";
7
- import "./chunk-SLSWPBK3.js";
5
+ } from "./chunk-DEHVRQWW.js";
6
+ import "./chunk-QYQCCIBT.js";
7
+ import "./chunk-B5TYJO7V.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-TNW22OUY.js";
6
- import "./chunk-VWTUYDZG.js";
5
+ } from "./chunk-JDMFVRFG.js";
6
+ import "./chunk-34RV4ZKA.js";
7
7
  import {
8
8
  buildReviewPrompt,
9
9
  buildSecurityReviewPrompt,
@@ -15,11 +15,11 @@ import {
15
15
  import "./chunk-XPBEJB27.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-UWUTLIOH.js";
18
+ } from "./chunk-35OPVVEK.js";
19
19
  import "./chunk-5ULLIOVC.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-NNWWMGYK.js";
22
+ } from "./chunk-QJUAQKH2.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-S6L5R6SS.js";
6
- import "./chunk-NNWWMGYK.js";
5
+ } from "./chunk-JU7OI4BN.js";
6
+ import "./chunk-QJUAQKH2.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-AV5OPK7Q.js";
4
+ } from "./chunk-HLXQXV23.js";
5
5
  export {
6
6
  executeTests,
7
7
  runTestsTool
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ToolRegistry
4
- } from "./chunk-5EE4GRGG.js";
4
+ } from "./chunk-4RQPCOEE.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-SISFAT6W.js";
11
+ } from "./chunk-A2AVDSXJ.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-S6L5R6SS.js";
19
+ import "./chunk-JU7OI4BN.js";
20
20
  import {
21
21
  VERSION
22
- } from "./chunk-NNWWMGYK.js";
23
- import "./chunk-TB4W4Y4T.js";
22
+ } from "./chunk-QJUAQKH2.js";
23
+ import "./chunk-NVUCDUXE.js";
24
24
  import "./chunk-KHYD3WXE.js";
25
- import "./chunk-SLSWPBK3.js";
25
+ import "./chunk-B5TYJO7V.js";
26
26
  import "./chunk-IW3Q7AE5.js";
27
27
 
28
28
  // src/mcp/server.ts