jinzd-ai-cli 0.4.220 → 0.4.222

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 (39) hide show
  1. package/dist/{batch-QBSKTLTO.js → batch-QOOO7HRW.js} +4 -3
  2. package/dist/{chunk-IZW5LMI6.js → chunk-5EE4GRGG.js} +21 -21
  3. package/dist/{chunk-MC34ISJU.js → chunk-5GTWZ4QF.js} +30 -6
  4. package/dist/{chunk-CAUHLHDR.js → chunk-AV5OPK7Q.js} +1 -1
  5. package/dist/{chunk-VHX7KZDY.js → chunk-FBK7NSIK.js} +13 -13
  6. package/dist/{chunk-QZYNRCPX.js → chunk-NNWWMGYK.js} +1 -1
  7. package/dist/{chunk-A4GUGWEY.js → chunk-QT5FA2ZY.js} +1 -1
  8. package/dist/{chunk-Y25MSSUP.js → chunk-S6L5R6SS.js} +1 -1
  9. package/dist/{chunk-ALQN7VUJ.js → chunk-SISFAT6W.js} +8 -8
  10. package/dist/{chunk-P4PTXCHY.js → chunk-TNW22OUY.js} +3 -3
  11. package/dist/{chunk-5WBNXYDJ.js → chunk-UWUTLIOH.js} +1 -1
  12. package/dist/{chunk-P3LKFA54.js → chunk-VBRCWH55.js} +8 -7
  13. package/dist/{chunk-P4DYAGUI.js → chunk-VWTUYDZG.js} +1 -1
  14. package/dist/{ci-5SNXGM3M.js → ci-IB7NWHZN.js} +4 -4
  15. package/dist/{ci-format-57QQTHQE.js → ci-format-YLGZN3D4.js} +2 -2
  16. package/dist/{constants-ML5KFEOH.js → constants-BOMLZEXC.js} +1 -1
  17. package/dist/{doctor-cli-ZRH3XZ3R.js → doctor-cli-2ND4LONW.js} +4 -4
  18. package/dist/electron-server.js +3102 -3056
  19. package/dist/{hub-IPLMJ6TJ.js → hub-6WADFJNC.js} +2 -2
  20. package/dist/index.js +2385 -2032
  21. package/dist/{persist-L54DPLI7.js → persist-GTBEKVFL.js} +2 -2
  22. package/dist/{pr-GJYDAPK4.js → pr-F7WXUH27.js} +4 -4
  23. package/dist/{run-tests-KLQAI5CX.js → run-tests-5NEMM6EF.js} +2 -2
  24. package/dist/{run-tests-GK5AIAV2.js → run-tests-NIY24YDP.js} +1 -1
  25. package/dist/{semantic-PK7AUOJT.js → semantic-HLAE2O4F.js} +2 -2
  26. package/dist/{server-5FZDALHH.js → server-ACFX2J66.js} +11 -11
  27. package/dist/{server-RU36PRSH.js → server-QGZYDDZW.js} +2424 -2402
  28. package/dist/{task-orchestrator-JMHPVNUO.js → task-orchestrator-4GOBFXPN.js} +11 -11
  29. package/dist/{usage-IRMRCCKN.js → usage-JXT2YVA6.js} +2 -2
  30. package/dist/web/client/actions.js +27 -1
  31. package/dist/web/client/app.js +3275 -3342
  32. package/dist/web/client/dom.js +34 -0
  33. package/dist/web/client/index.html +29 -22
  34. package/dist/web/client/state.js +103 -0
  35. package/dist/web/client/sw.js +1 -1
  36. package/dist/web/client/templates.js +191 -188
  37. package/dist/web/client/util.js +45 -0
  38. package/package.json +1 -1
  39. package/dist/{chunk-T2NL5ZIA.js → chunk-UUSRWSSX.js} +3 -3
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigManager
4
- } from "./chunk-5WBNXYDJ.js";
4
+ } from "./chunk-UWUTLIOH.js";
5
5
  import "./chunk-5ULLIOVC.js";
6
- import "./chunk-QZYNRCPX.js";
6
+ import "./chunk-NNWWMGYK.js";
7
7
  import {
8
8
  atomicWriteFileSync
9
9
  } from "./chunk-IW3Q7AE5.js";
@@ -189,7 +189,8 @@ async function cmdResults(batchId, outPath) {
189
189
  let ok = 0, err = 0;
190
190
  for await (const result of stream) {
191
191
  lines.push(JSON.stringify(result));
192
- const type = result.result?.type;
192
+ const resultObj = result;
193
+ const type = resultObj.result?.type;
193
194
  if (type === "succeeded") ok++;
194
195
  else err++;
195
196
  }
@@ -5,27 +5,16 @@ import {
5
5
  import {
6
6
  hasSemanticIndex,
7
7
  semanticSearch
8
- } from "./chunk-T2NL5ZIA.js";
8
+ } from "./chunk-UUSRWSSX.js";
9
9
  import {
10
- runTestsTool
11
- } from "./chunk-Y25MSSUP.js";
12
- import {
13
- fileCheckpoints
14
- } from "./chunk-4BKXL7SM.js";
15
- import {
16
- loadChatIndex,
17
- searchChatMemory
18
- } from "./chunk-TB4W4Y4T.js";
19
- import {
20
- DEFAULT_PATTERNS,
21
- redactString
22
- } from "./chunk-SLSWPBK3.js";
10
+ loadIndex
11
+ } from "./chunk-CKH4KQ4E.js";
23
12
  import {
24
13
  getActivePluginAssets,
25
14
  runHook,
26
15
  runLifecycleHooks,
27
16
  runTool
28
- } from "./chunk-ALQN7VUJ.js";
17
+ } from "./chunk-SISFAT6W.js";
29
18
  import {
30
19
  getDangerLevel,
31
20
  isFileWriteTool,
@@ -36,6 +25,15 @@ import {
36
25
  NetworkError,
37
26
  ToolError
38
27
  } from "./chunk-5ULLIOVC.js";
28
+ import {
29
+ getGitRoot
30
+ } from "./chunk-HOSJZMQS.js";
31
+ import {
32
+ fileCheckpoints
33
+ } from "./chunk-4BKXL7SM.js";
34
+ import {
35
+ runTestsTool
36
+ } from "./chunk-S6L5R6SS.js";
39
37
  import {
40
38
  CONFIG_DIR_NAME,
41
39
  DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
@@ -45,13 +43,15 @@ import {
45
43
  SUBAGENT_ALLOWED_TOOLS,
46
44
  SUBAGENT_DEFAULT_MAX_ROUNDS,
47
45
  SUBAGENT_MAX_ROUNDS_LIMIT
48
- } from "./chunk-QZYNRCPX.js";
46
+ } from "./chunk-NNWWMGYK.js";
49
47
  import {
50
- getGitRoot
51
- } from "./chunk-HOSJZMQS.js";
48
+ loadChatIndex,
49
+ searchChatMemory
50
+ } from "./chunk-TB4W4Y4T.js";
52
51
  import {
53
- loadIndex
54
- } from "./chunk-CKH4KQ4E.js";
52
+ DEFAULT_PATTERNS,
53
+ redactString
54
+ } from "./chunk-SLSWPBK3.js";
55
55
  import {
56
56
  atomicWriteFileSync
57
57
  } from "./chunk-IW3Q7AE5.js";
@@ -6736,11 +6736,11 @@ export {
6736
6736
  initTheme,
6737
6737
  theme,
6738
6738
  undoStack,
6739
- renderDiff,
6740
6739
  recordRecentlyDeniedAutoAction,
6741
6740
  getRecentlyDeniedAutoActions,
6742
6741
  clearRecentlyDeniedAutoActions,
6743
6742
  defaultActionClassifier,
6743
+ renderDiff,
6744
6744
  memoryStorePath,
6745
6745
  memoryMarkdownPath,
6746
6746
  isMemoryExpired,
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-IW3Q7AE5.js";
8
8
 
9
9
  // src/session/session-manager.ts
10
- import { readFileSync, existsSync, mkdirSync, readdirSync, unlinkSync, openSync, readSync, closeSync } from "fs";
10
+ import { readFileSync, existsSync, mkdirSync, readdirSync, unlinkSync, openSync, readSync, closeSync, statSync } from "fs";
11
11
  import { join } from "path";
12
12
  import { v4 as uuidv4 } from "uuid";
13
13
 
@@ -610,14 +610,22 @@ var SessionManager = class {
610
610
  this._current = session;
611
611
  return session;
612
612
  }
613
- listSessions() {
613
+ listSessions(opts) {
614
614
  if (!existsSync(this.historyDir)) return [];
615
615
  const files = readdirSync(this.historyDir).filter((f) => f.endsWith(".json"));
616
616
  const metas = [];
617
617
  for (const file of files) {
618
618
  try {
619
- const meta = this.readSessionMeta(join(this.historyDir, file));
620
- if (meta) metas.push(meta);
619
+ const filePath = join(this.historyDir, file);
620
+ const meta = this.readSessionMeta(filePath);
621
+ if (!meta) continue;
622
+ if (opts?.includeFileSize) {
623
+ try {
624
+ meta.fileSize = statSync(filePath).size;
625
+ } catch {
626
+ }
627
+ }
628
+ metas.push(meta);
621
629
  } catch (err) {
622
630
  process.stderr.write(
623
631
  `[Warning] Skipping corrupted session file "${file}": ${err instanceof Error ? err.message : String(err)}
@@ -662,6 +670,18 @@ var SessionManager = class {
662
670
  } catch {
663
671
  }
664
672
  }
673
+ let branchCount;
674
+ let activeBranch;
675
+ try {
676
+ const brMatch = header.match(/"branches"\s*:\s*\[/);
677
+ if (brMatch) {
678
+ const brIds = header.match(/"id"\s*:\s*"[^"]*"/g);
679
+ const parentMatches = header.match(/"parentBranchId"/g);
680
+ branchCount = parentMatches ? parentMatches.length + 1 : 1;
681
+ }
682
+ activeBranch = extractJsonField(header, "activeBranchId");
683
+ } catch {
684
+ }
665
685
  return {
666
686
  id,
667
687
  provider,
@@ -669,7 +689,9 @@ var SessionManager = class {
669
689
  messageCount,
670
690
  created: safeDate(created),
671
691
  updated: safeDate(updated),
672
- title: title || void 0
692
+ title: title || void 0,
693
+ branchCount,
694
+ activeBranch
673
695
  };
674
696
  }
675
697
  const data = JSON.parse(readFileSync(filePath, "utf-8"));
@@ -680,7 +702,9 @@ var SessionManager = class {
680
702
  messageCount: data.messages?.length ?? 0,
681
703
  created: safeDate(data.created),
682
704
  updated: safeDate(data.updated),
683
- title: data.title
705
+ title: data.title,
706
+ branchCount: data.branches?.length ?? 1,
707
+ activeBranch: data.activeBranchId
684
708
  };
685
709
  }
686
710
  deleteSession(id) {
@@ -6,7 +6,7 @@ import { platform } from "os";
6
6
  import chalk from "chalk";
7
7
 
8
8
  // src/core/constants.ts
9
- var VERSION = "0.4.220";
9
+ var VERSION = "0.4.222";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  truncateForPersist
4
- } from "./chunk-IZW5LMI6.js";
4
+ } from "./chunk-5EE4GRGG.js";
5
5
  import {
6
6
  APP_NAME,
7
7
  CONFIG_DIR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  MCP_PROTOCOL_VERSION,
12
12
  MCP_TOOL_PREFIX,
13
13
  VERSION
14
- } from "./chunk-QZYNRCPX.js";
14
+ } from "./chunk-NNWWMGYK.js";
15
15
  import {
16
16
  atomicWriteFileSync
17
17
  } from "./chunk-IW3Q7AE5.js";
@@ -889,17 +889,6 @@ Output the Markdown content directly, do not wrap the entire file in a code bloc
889
889
  return parts.join("\n");
890
890
  }
891
891
 
892
- // src/core/git-diff.ts
893
- import { execFileSync } from "child_process";
894
- function readGitDiff(options = {}) {
895
- const args = ["diff"];
896
- if (options.staged) args.push("--staged");
897
- return execFileSync("git", args, {
898
- encoding: "utf-8",
899
- timeout: options.timeoutMs ?? 1e4
900
- }).trim();
901
- }
902
-
903
892
  // src/session/tool-history.ts
904
893
  var SESSION_SIZE_LIMIT = 2 * 1024 * 1024;
905
894
  function persistToolRound(session, toolCalls, toolResults, opts) {
@@ -1077,6 +1066,17 @@ function clearDevState() {
1077
1066
  }
1078
1067
  }
1079
1068
 
1069
+ // src/core/git-diff.ts
1070
+ import { execFileSync } from "child_process";
1071
+ function readGitDiff(options = {}) {
1072
+ const args = ["diff"];
1073
+ if (options.staged) args.push("--staged");
1074
+ return execFileSync("git", args, {
1075
+ encoding: "utf-8",
1076
+ timeout: options.timeoutMs ?? 1e4
1077
+ }).trim();
1078
+ }
1079
+
1080
1080
  export {
1081
1081
  scanDirTree,
1082
1082
  scanProject,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.220";
4
+ var VERSION = "0.4.222";
5
5
  var APP_NAME = "ai-cli";
6
6
  var CONFIG_DIR_NAME = ".aicli";
7
7
  var CONFIG_FILE_NAME = "config.json";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SessionManager
4
- } from "./chunk-MC34ISJU.js";
4
+ } from "./chunk-5GTWZ4QF.js";
5
5
 
6
6
  // src/hub/persist.ts
7
7
  import { join } from "path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-QZYNRCPX.js";
4
+ } from "./chunk-NNWWMGYK.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  CONFIG_DIR_NAME,
4
4
  PLUGINS_DIR_NAME
5
- } from "./chunk-QZYNRCPX.js";
5
+ } from "./chunk-NNWWMGYK.js";
6
6
  import {
7
7
  atomicWriteFileSync
8
8
  } from "./chunk-IW3Q7AE5.js";
@@ -586,12 +586,6 @@ export {
586
586
  getTopUsedTools,
587
587
  resetStats,
588
588
  installFlushOnExit,
589
- listHooks,
590
- trustHook,
591
- untrustHook,
592
- getPendingHookTrust,
593
- runLifecycleHooks,
594
- runHook,
595
589
  pluginRoot,
596
590
  installPlugin,
597
591
  setPluginEnabled,
@@ -600,5 +594,11 @@ export {
600
594
  listInstalledPlugins,
601
595
  mergePluginHooks,
602
596
  getActivePluginAssets,
603
- describePlugin
597
+ describePlugin,
598
+ listHooks,
599
+ trustHook,
600
+ untrustHook,
601
+ getPendingHookTrust,
602
+ runLifecycleHooks,
603
+ runHook
604
604
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-P4DYAGUI.js";
5
+ } from "./chunk-VWTUYDZG.js";
6
6
  import {
7
7
  buildReviewPrompt,
8
8
  buildSecurityReviewPrompt,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-PUBCJF7E.js";
14
14
  import {
15
15
  ConfigManager
16
- } from "./chunk-5WBNXYDJ.js";
16
+ } from "./chunk-UWUTLIOH.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-QZYNRCPX.js";
19
+ } from "./chunk-NNWWMGYK.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-QZYNRCPX.js";
11
+ } from "./chunk-NNWWMGYK.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -11,10 +11,13 @@ import {
11
11
  listHooks,
12
12
  listInstalledPlugins,
13
13
  resetStats
14
- } from "./chunk-ALQN7VUJ.js";
14
+ } from "./chunk-SISFAT6W.js";
15
15
  import {
16
16
  ConfigManager
17
- } from "./chunk-5WBNXYDJ.js";
17
+ } from "./chunk-UWUTLIOH.js";
18
+ import {
19
+ getGitRoot
20
+ } from "./chunk-HOSJZMQS.js";
18
21
  import {
19
22
  CONFIG_DIR_NAME,
20
23
  CONTEXT_FILE_CANDIDATES,
@@ -23,10 +26,7 @@ import {
23
26
  MCP_PROJECT_CONFIG_NAME,
24
27
  MEMORY_FILE_NAME,
25
28
  VERSION
26
- } from "./chunk-QZYNRCPX.js";
27
- import {
28
- getGitRoot
29
- } from "./chunk-HOSJZMQS.js";
29
+ } from "./chunk-NNWWMGYK.js";
30
30
 
31
31
  // src/diagnostics/doctor-report.ts
32
32
  import { existsSync as existsSync3, statSync as statSync2 } from "fs";
@@ -485,7 +485,8 @@ async function checkNpmLatest() {
485
485
  if (!latest) return { latest: null, status: "skipped", reason: "no version in response" };
486
486
  return { latest, status: compareVersion(latest, VERSION) > 0 ? "outdated" : "up-to-date" };
487
487
  } catch (err) {
488
- const reason = err?.name === "AbortError" ? "timeout (3s)" : err?.message ?? "network error";
488
+ const e = err;
489
+ const reason = e?.name === "AbortError" ? "timeout (3s)" : e?.message ?? "network error";
489
490
  return { latest: null, status: "skipped", reason };
490
491
  } finally {
491
492
  clearTimeout(timer);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-QZYNRCPX.js";
4
+ } from "./chunk-NNWWMGYK.js";
5
5
 
6
6
  // src/cli/ci-format.ts
7
7
  var DEFAULT_CI_THRESHOLDS = {
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-P4PTXCHY.js";
7
- import "./chunk-P4DYAGUI.js";
6
+ } from "./chunk-TNW22OUY.js";
7
+ import "./chunk-VWTUYDZG.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-PUBCJF7E.js";
10
10
  import "./chunk-XPBEJB27.js";
11
- import "./chunk-5WBNXYDJ.js";
11
+ import "./chunk-UWUTLIOH.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-QZYNRCPX.js";
13
+ import "./chunk-NNWWMGYK.js";
14
14
  import "./chunk-IW3Q7AE5.js";
15
15
  export {
16
16
  CI_COMMENT_MARKER,
@@ -6,8 +6,8 @@ import {
6
6
  formatCiResult,
7
7
  formatCiSarif,
8
8
  normalizeCiThresholds
9
- } from "./chunk-P4DYAGUI.js";
10
- import "./chunk-QZYNRCPX.js";
9
+ } from "./chunk-VWTUYDZG.js";
10
+ import "./chunk-NNWWMGYK.js";
11
11
  export {
12
12
  DEFAULT_CI_THRESHOLDS,
13
13
  detectCiGateSignals,
@@ -38,7 +38,7 @@ import {
38
38
  TEST_TIMEOUT,
39
39
  VERSION,
40
40
  buildUserIdentityPrompt
41
- } from "./chunk-QZYNRCPX.js";
41
+ } from "./chunk-NNWWMGYK.js";
42
42
  export {
43
43
  AGENTIC_BEHAVIOR_GUIDELINE,
44
44
  APP_NAME,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  formatDoctorReport,
4
4
  runDoctorCli
5
- } from "./chunk-P3LKFA54.js";
5
+ } from "./chunk-VBRCWH55.js";
6
6
  import "./chunk-PUBCJF7E.js";
7
- import "./chunk-ALQN7VUJ.js";
7
+ import "./chunk-SISFAT6W.js";
8
8
  import "./chunk-XPBEJB27.js";
9
- import "./chunk-5WBNXYDJ.js";
9
+ import "./chunk-UWUTLIOH.js";
10
10
  import "./chunk-5ULLIOVC.js";
11
- import "./chunk-QZYNRCPX.js";
12
11
  import "./chunk-HOSJZMQS.js";
12
+ import "./chunk-NNWWMGYK.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,