jinzd-ai-cli 0.4.211 → 0.4.212

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 (27) hide show
  1. package/README.md +23 -0
  2. package/README.zh-CN.md +23 -0
  3. package/dist/{batch-DE4RXKZD.js → batch-WIKFEOAZ.js} +2 -2
  4. package/dist/{chat-index-UBCWHBLR.js → chat-index-R2E27VXN.js} +1 -1
  5. package/dist/{chunk-E5XCM4A6.js → chunk-GBBVCZ4W.js} +1 -1
  6. package/dist/{chunk-C3OU2OPF.js → chunk-HW2ALWQJ.js} +2 -2
  7. package/dist/{chunk-6NS6643Y.js → chunk-HX6N6QEY.js} +1 -1
  8. package/dist/{chunk-JBWA73GK.js → chunk-IFZX26K7.js} +1 -1
  9. package/dist/{chunk-ZY2N2N6T.js → chunk-KE4B3NOQ.js} +1 -1
  10. package/dist/{chunk-BE6ERF7M.js → chunk-LU6FBJQ5.js} +1 -1
  11. package/dist/{chunk-ZOPYREL5.js → chunk-N5LB3PPL.js} +258 -52
  12. package/dist/{chunk-UOROWTGG.js → chunk-NYCBOVNF.js} +26 -3
  13. package/dist/{chunk-W7UKO3PS.js → chunk-OQGVGPEK.js} +5 -0
  14. package/dist/{ci-XMUEX526.js → ci-X3LNUFZV.js} +2 -2
  15. package/dist/{constants-AWTIQIWG.js → constants-KDWG4KR4.js} +1 -1
  16. package/dist/{doctor-cli-SSI6ETFT.js → doctor-cli-TJTWIW7U.js} +4 -4
  17. package/dist/electron-server.js +468 -174
  18. package/dist/{hub-INUJND2G.js → hub-JWSV4MKC.js} +1 -1
  19. package/dist/index.js +142 -17
  20. package/dist/{run-tests-PACN4UYX.js → run-tests-D7YBY4XB.js} +1 -1
  21. package/dist/{run-tests-3MHWUF43.js → run-tests-H4Q2PRX6.js} +2 -2
  22. package/dist/{server-7USZJJAH.js → server-OFKGDRYI.js} +4 -4
  23. package/dist/{server-BTSKOPQI.js → server-VNCN7AY5.js} +99 -10
  24. package/dist/{task-orchestrator-OV4O25MX.js → task-orchestrator-AL2E642M.js} +4 -4
  25. package/dist/{usage-T2P6FTE7.js → usage-LB6REWPO.js} +2 -2
  26. package/dist/web/client/app.js +1 -1
  27. package/package.json +1 -1
@@ -8,7 +8,7 @@ import {
8
8
  CONFIG_FILE_NAME,
9
9
  HISTORY_DIR_NAME,
10
10
  PLUGINS_DIR_NAME
11
- } from "./chunk-E5XCM4A6.js";
11
+ } from "./chunk-GBBVCZ4W.js";
12
12
  import {
13
13
  atomicWriteFileSync
14
14
  } from "./chunk-IW3Q7AE5.js";
@@ -157,10 +157,33 @@ var ConfigSchema = z.object({
157
157
  env: z.record(z.string()).optional(),
158
158
  timeout: z.number().default(3e4)
159
159
  })).default({}),
160
- // 工具执行钩子(shell 命令,模板变量:{tool} {dangerLevel} {args} {status})
160
+ // Hooks 生命周期(v0.4.212+):兼容旧 pre/post 字符串,同时支持 events.<EventName> 结构化 JSON hook。
161
161
  hooks: z.object({
162
+ enabled: z.boolean().default(true),
162
163
  preToolExecution: z.string().optional(),
163
- postToolExecution: z.string().optional()
164
+ postToolExecution: z.string().optional(),
165
+ events: z.record(z.union([
166
+ z.string(),
167
+ z.object({
168
+ command: z.string(),
169
+ source: z.enum(["user", "project", "managed"]).default("user"),
170
+ description: z.string().optional(),
171
+ required: z.boolean().default(false),
172
+ timeoutMs: z.number().int().min(100).max(3e4).default(5e3),
173
+ disabled: z.boolean().default(false)
174
+ }),
175
+ z.array(z.union([
176
+ z.string(),
177
+ z.object({
178
+ command: z.string(),
179
+ source: z.enum(["user", "project", "managed"]).default("user"),
180
+ description: z.string().optional(),
181
+ required: z.boolean().default(false),
182
+ timeoutMs: z.number().int().min(100).max(3e4).default(5e3),
183
+ disabled: z.boolean().default(false)
184
+ })
185
+ ]))
186
+ ])).default({})
164
187
  }).optional(),
165
188
  // 网络访问治理(v0.4.211+):默认关闭以保持兼容;开启后统一治理 web/search/MCP/shell 网络出口。
166
189
  networkPolicy: z.object({
@@ -120,6 +120,10 @@ function redactJson(value, options) {
120
120
  const redacted = walk(value);
121
121
  return { value: redacted, hits: allHits };
122
122
  }
123
+ function scanString(input, options) {
124
+ const { hits } = redactString(input, { ...options, enabled: true });
125
+ return hits;
126
+ }
123
127
 
124
128
  // src/memory/chat-index.ts
125
129
  var MEMORY_DIR_NAME = "memory-index";
@@ -451,6 +455,7 @@ function getChatIndexStatus() {
451
455
 
452
456
  export {
453
457
  redactJson,
458
+ scanString,
454
459
  chunkSession,
455
460
  loadChatIndex,
456
461
  clearChatIndex,
@@ -10,11 +10,11 @@ import {
10
10
  import "./chunk-XPBEJB27.js";
11
11
  import {
12
12
  ConfigManager
13
- } from "./chunk-UOROWTGG.js";
13
+ } from "./chunk-NYCBOVNF.js";
14
14
  import "./chunk-TZQHYZKT.js";
15
15
  import {
16
16
  VERSION
17
- } from "./chunk-E5XCM4A6.js";
17
+ } from "./chunk-GBBVCZ4W.js";
18
18
  import "./chunk-IW3Q7AE5.js";
19
19
 
20
20
  // src/cli/ci.ts
@@ -37,7 +37,7 @@ import {
37
37
  TEST_TIMEOUT,
38
38
  VERSION,
39
39
  buildUserIdentityPrompt
40
- } from "./chunk-E5XCM4A6.js";
40
+ } from "./chunk-GBBVCZ4W.js";
41
41
  export {
42
42
  AGENTIC_BEHAVIOR_GUIDELINE,
43
43
  APP_NAME,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getConfigDirUsage,
4
4
  listRecentCrashes
5
- } from "./chunk-BE6ERF7M.js";
5
+ } from "./chunk-LU6FBJQ5.js";
6
6
  import {
7
7
  ProviderRegistry
8
8
  } from "./chunk-QMXC327F.js";
@@ -11,17 +11,17 @@ import {
11
11
  getTopFailingTools,
12
12
  getTopUsedTools,
13
13
  resetStats
14
- } from "./chunk-JBWA73GK.js";
14
+ } from "./chunk-IFZX26K7.js";
15
15
  import "./chunk-XPBEJB27.js";
16
16
  import {
17
17
  ConfigManager
18
- } from "./chunk-UOROWTGG.js";
18
+ } from "./chunk-NYCBOVNF.js";
19
19
  import "./chunk-TZQHYZKT.js";
20
20
  import {
21
21
  DEV_STATE_FILE_NAME,
22
22
  MEMORY_FILE_NAME,
23
23
  VERSION
24
- } from "./chunk-E5XCM4A6.js";
24
+ } from "./chunk-GBBVCZ4W.js";
25
25
  import "./chunk-IW3Q7AE5.js";
26
26
 
27
27
  // src/diagnostics/doctor-cli.ts