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
@@ -38,16 +38,19 @@ var DEFAULT_PATTERNS = [
38
38
  // Bearer <token> in Authorization headers
39
39
  { kind: "bearer", regex: /\b(Authorization:\s*Bearer\s+)([a-zA-Z0-9_\-.=]{20,500})/g },
40
40
  // Private key PEM blocks — catch the header+footer together
41
- { kind: "private-key", regex: /-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g }
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 }
42
43
  ];
43
44
  var MAX_CUSTOM = 32;
44
45
  var MAX_PATTERN_LEN = 500;
45
46
  var SUSPICIOUS_REDOS = /\([^)]*[+*][^)]*\)\s*[+*{]/;
47
+ var MAX_REDACT_INPUT = 512e3;
46
48
  function render(placeholder, kind) {
47
49
  return placeholder.replace("{kind}", kind);
48
50
  }
49
51
  function redactString(input, options) {
50
52
  if (!options.enabled || !input) return { redacted: input, hits: [] };
53
+ if (input.length > MAX_REDACT_INPUT) return { redacted: input, hits: [] };
51
54
  const placeholder = options.placeholder ?? "[REDACTED:{kind}]";
52
55
  const customSrcs = (options.customRegexes ?? []).slice(0, MAX_CUSTOM);
53
56
  const patterns = [
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SessionManager
4
- } from "./chunk-5GTWZ4QF.js";
4
+ } from "./chunk-QYQCCIBT.js";
5
5
 
6
6
  // src/hub/persist.ts
7
7
  import { join } from "path";
8
8
  function discussionToMessages(state) {
9
9
  const out = [];
10
10
  const t0 = state.messages[0]?.timestamp ?? /* @__PURE__ */ new Date();
11
- out.push({ role: "user", content: `\u{1F3DB} Topic: ${state.topic}`, timestamp: t0 });
11
+ out.push({ role: "user", content: `\u{1F3DB} Topic: ${state.topic}`, timestamp: new Date(t0) });
12
12
  for (const m of state.messages) {
13
13
  if (m.speaker === "system") {
14
- out.push({ role: "system", content: m.content, timestamp: m.timestamp });
14
+ out.push({ role: "system", content: m.content, timestamp: new Date(m.timestamp) });
15
15
  continue;
16
16
  }
17
17
  if (m.speaker === "human") {
18
- out.push({ role: "user", content: `\u{1F9ED} ${m.speakerName}: ${m.content}`, timestamp: m.timestamp });
18
+ out.push({ role: "user", content: `\u{1F9ED} ${m.speakerName}: ${m.content}`, timestamp: new Date(m.timestamp) });
19
19
  continue;
20
20
  }
21
21
  if (m.passed || !m.content.trim()) continue;
@@ -25,7 +25,7 @@ function discussionToMessages(state) {
25
25
  content: `**${m.speakerName}** (${m.speaker})${tag}
26
26
 
27
27
  ${m.content}`,
28
- timestamp: m.timestamp
28
+ timestamp: new Date(m.timestamp)
29
29
  });
30
30
  }
31
31
  if (state.summary && state.summary.trim()) {
@@ -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.222";
9
+ var VERSION = "0.4.224";
10
10
  var APP_NAME = "ai-cli";
11
11
  var CONFIG_DIR_NAME = ".aicli";
12
12
  var CONFIG_FILE_NAME = "config.json";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  evaluateCiGate,
4
4
  normalizeCiThresholds
5
- } from "./chunk-VWTUYDZG.js";
5
+ } from "./chunk-34RV4ZKA.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-UWUTLIOH.js";
16
+ } from "./chunk-35OPVVEK.js";
17
17
  import {
18
18
  VERSION
19
- } from "./chunk-NNWWMGYK.js";
19
+ } from "./chunk-QJUAQKH2.js";
20
20
 
21
21
  // src/cli/ci.ts
22
22
  import { execFileSync } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  TEST_TIMEOUT
4
- } from "./chunk-NNWWMGYK.js";
4
+ } from "./chunk-QJUAQKH2.js";
5
5
 
6
6
  // src/tools/builtin/run-tests.ts
7
7
  import { execSync, spawnSync } from "child_process";
@@ -51,16 +51,19 @@ var DEFAULT_PATTERNS = [
51
51
  // Bearer <token> in Authorization headers
52
52
  { kind: "bearer", regex: /\b(Authorization:\s*Bearer\s+)([a-zA-Z0-9_\-.=]{20,500})/g },
53
53
  // Private key PEM blocks — catch the header+footer together
54
- { kind: "private-key", regex: /-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g }
54
+ // P2-PERF-02: PEM bodies use strict Base64 + =\n narrowed char class avoids backtracking
55
+ { 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 }
55
56
  ];
56
57
  var MAX_CUSTOM = 32;
57
58
  var MAX_PATTERN_LEN = 500;
58
59
  var SUSPICIOUS_REDOS = /\([^)]*[+*][^)]*\)\s*[+*{]/;
60
+ var MAX_REDACT_INPUT = 512e3;
59
61
  function render(placeholder, kind) {
60
62
  return placeholder.replace("{kind}", kind);
61
63
  }
62
64
  function redactString(input, options) {
63
65
  if (!options.enabled || !input) return { redacted: input, hits: [] };
66
+ if (input.length > MAX_REDACT_INPUT) return { redacted: input, hits: [] };
64
67
  const placeholder = options.placeholder ?? "[REDACTED:{kind}]";
65
68
  const customSrcs = (options.customRegexes ?? []).slice(0, MAX_CUSTOM);
66
69
  const patterns = [
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-KHYD3WXE.js";
7
7
  import {
8
8
  redactString
9
- } from "./chunk-SLSWPBK3.js";
9
+ } from "./chunk-B5TYJO7V.js";
10
10
  import {
11
11
  atomicWriteFileSync
12
12
  } from "./chunk-IW3Q7AE5.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/core/constants.ts
4
- var VERSION = "0.4.222";
4
+ var VERSION = "0.4.224";
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
  redactJson
4
- } from "./chunk-SLSWPBK3.js";
4
+ } from "./chunk-B5TYJO7V.js";
5
5
  import {
6
6
  atomicWriteFileSync
7
7
  } from "./chunk-IW3Q7AE5.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  HubAgent,
4
4
  isConverged
5
- } from "./chunk-NZ4X6GUC.js";
5
+ } from "./chunk-3ARPAVNV.js";
6
6
 
7
7
  // src/hub/discuss.ts
8
8
  var DiscussionOrchestrator = class {
@@ -3,14 +3,14 @@ import {
3
3
  CI_COMMENT_MARKER,
4
4
  countSeverity,
5
5
  runCi
6
- } from "./chunk-TNW22OUY.js";
7
- import "./chunk-VWTUYDZG.js";
6
+ } from "./chunk-JDMFVRFG.js";
7
+ import "./chunk-34RV4ZKA.js";
8
8
  import "./chunk-HLWUDRBO.js";
9
9
  import "./chunk-PUBCJF7E.js";
10
10
  import "./chunk-XPBEJB27.js";
11
- import "./chunk-UWUTLIOH.js";
11
+ import "./chunk-35OPVVEK.js";
12
12
  import "./chunk-5ULLIOVC.js";
13
- import "./chunk-NNWWMGYK.js";
13
+ import "./chunk-QJUAQKH2.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-VWTUYDZG.js";
10
- import "./chunk-NNWWMGYK.js";
9
+ } from "./chunk-34RV4ZKA.js";
10
+ import "./chunk-QJUAQKH2.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-NNWWMGYK.js";
41
+ } from "./chunk-QJUAQKH2.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-VBRCWH55.js";
5
+ } from "./chunk-6FEZAWH5.js";
6
6
  import "./chunk-PUBCJF7E.js";
7
- import "./chunk-SISFAT6W.js";
7
+ import "./chunk-A2AVDSXJ.js";
8
8
  import "./chunk-XPBEJB27.js";
9
- import "./chunk-UWUTLIOH.js";
9
+ import "./chunk-35OPVVEK.js";
10
10
  import "./chunk-5ULLIOVC.js";
11
11
  import "./chunk-HOSJZMQS.js";
12
- import "./chunk-NNWWMGYK.js";
12
+ import "./chunk-QJUAQKH2.js";
13
13
  import "./chunk-IW3Q7AE5.js";
14
14
  export {
15
15
  formatDoctorReport,