jinzd-ai-cli 0.4.235 → 0.4.236
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.
- package/README.md +5 -5
- package/dist/{batch-Y7MHXVR7.js → batch-HZI7QAE7.js} +2 -2
- package/dist/{chunk-Q5GVANMH.js → chunk-7VAE3I3D.js} +1 -1
- package/dist/{chunk-GDXKFWFL.js → chunk-CGQARJMP.js} +1 -1
- package/dist/{chunk-HHYMSEWS.js → chunk-MFWAL5S2.js} +1 -1
- package/dist/{chunk-CDOQNIVV.js → chunk-O4QYY6SF.js} +3 -3
- package/dist/{chunk-7D5EJBHO.js → chunk-QDP3NUPX.js} +3 -3
- package/dist/{chunk-FYJGVFXL.js → chunk-SBSWH2EG.js} +7 -7
- package/dist/{chunk-WXFQ6LYN.js → chunk-SCFGLRB3.js} +1 -1
- package/dist/{chunk-GFDRC2JZ.js → chunk-T6EIBUKW.js} +115 -18
- package/dist/{chunk-DHNYGJYB.js → chunk-TT7YURG3.js} +3 -3
- package/dist/{chunk-BFTTW5LS.js → chunk-VBAW4ZPY.js} +1 -1
- package/dist/{ci-OAFNH3MA.js → ci-FYLCHRN3.js} +4 -4
- package/dist/{ci-format-4LSXJNND.js → ci-format-TH2ZTFKU.js} +2 -2
- package/dist/{constants-ERIAS7GV.js → constants-BF6YNKRW.js} +1 -1
- package/dist/{doctor-cli-VFSVWZU6.js → doctor-cli-B6GE4BYJ.js} +4 -4
- package/dist/electron-server.js +164 -67
- package/dist/{hub-X4EUYRIN.js → hub-QBQCKEPE.js} +1 -1
- package/dist/index.js +2438 -2436
- package/dist/{pr-2CZN5JLE.js → pr-KV2WK7SU.js} +4 -4
- package/dist/{run-tests-YSRET52H.js → run-tests-DI6WEYHX.js} +1 -1
- package/dist/{run-tests-DXRJDPFF.js → run-tests-MEHC73SQ.js} +2 -2
- package/dist/{server-FGJGXHZD.js → server-ETIGAZX5.js} +4 -4
- package/dist/{server-5ZAXMKRI.js → server-KZAP5JN3.js} +28 -28
- package/dist/{task-orchestrator-QMERCD77.js → task-orchestrator-WS724BUX.js} +4 -4
- package/dist/{usage-633DUDNT.js → usage-DHZR5PG7.js} +2 -2
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-O4QYY6SF.js";
|
|
6
|
+
import "./chunk-SCFGLRB3.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
import "./chunk-O3XSFPYH.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigManager
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VBAW4ZPY.js";
|
|
19
19
|
import "./chunk-5ULLIOVC.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CGQARJMP.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/pr.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SBSWH2EG.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-
|
|
11
|
+
} from "./chunk-T6EIBUKW.js";
|
|
12
12
|
import {
|
|
13
13
|
getDangerLevel,
|
|
14
14
|
schemaToJsonSchema
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import "./chunk-5ULLIOVC.js";
|
|
17
17
|
import "./chunk-HOSJZMQS.js";
|
|
18
18
|
import "./chunk-4BKXL7SM.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-7VAE3I3D.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CGQARJMP.js";
|
|
23
23
|
import "./chunk-5MYPIQ3Y.js";
|
|
24
24
|
import "./chunk-KHYD3WXE.js";
|
|
25
25
|
import "./chunk-KCEO2XJ4.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
scanDirTree,
|
|
24
24
|
scanProject,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TT7YURG3.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-
|
|
70
|
+
} from "./chunk-SBSWH2EG.js";
|
|
71
71
|
import "./chunk-K3CF65QH.js";
|
|
72
72
|
import "./chunk-UUSRWSSX.js";
|
|
73
73
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
buildDoctorReport,
|
|
85
85
|
formatDoctorReport,
|
|
86
86
|
loadContextFiles
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-QDP3NUPX.js";
|
|
88
88
|
import {
|
|
89
89
|
ProviderRegistry
|
|
90
90
|
} from "./chunk-QYQI7ZWK.js";
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
runTool,
|
|
103
103
|
setPluginEnabled,
|
|
104
104
|
trustPlugin
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-T6EIBUKW.js";
|
|
106
106
|
import {
|
|
107
107
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
108
108
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
} from "./chunk-O3XSFPYH.js";
|
|
122
122
|
import {
|
|
123
123
|
ConfigManager
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-VBAW4ZPY.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-
|
|
132
|
+
import "./chunk-7VAE3I3D.js";
|
|
133
133
|
import {
|
|
134
134
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
135
135
|
AUTHOR,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
SKILLS_DIR_NAME,
|
|
147
147
|
VERSION,
|
|
148
148
|
buildUserIdentityPrompt
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-CGQARJMP.js";
|
|
150
150
|
import "./chunk-5MYPIQ3Y.js";
|
|
151
151
|
import "./chunk-KHYD3WXE.js";
|
|
152
152
|
import {
|
|
@@ -160,8 +160,8 @@ import {
|
|
|
160
160
|
import express from "express";
|
|
161
161
|
import { createServer } from "http";
|
|
162
162
|
import { WebSocketServer } from "ws";
|
|
163
|
-
import { join as join4, dirname as
|
|
164
|
-
import { existsSync as
|
|
163
|
+
import { join as join4, dirname as dirname3, resolve as resolve4, relative, sep } from "path";
|
|
164
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4, readdirSync as readdirSync3, statSync as statSync3, realpathSync } from "fs";
|
|
165
165
|
import { networkInterfaces } from "os";
|
|
166
166
|
|
|
167
167
|
// src/web/tool-executor-web.ts
|
|
@@ -669,8 +669,8 @@ function loadMemoryContent(configDir) {
|
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
// src/web/session-handler.ts
|
|
672
|
-
import { mkdirSync as
|
|
673
|
-
import { join as join3, dirname as
|
|
672
|
+
import { mkdirSync as mkdirSync2, createWriteStream as createWriteStream2 } from "fs";
|
|
673
|
+
import { join as join3, dirname as dirname2 } from "path";
|
|
674
674
|
|
|
675
675
|
// src/web/commands/provider-commands.ts
|
|
676
676
|
async function handleProvider(args, ctx) {
|
|
@@ -1594,7 +1594,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
1594
1594
|
async function handleTest(args, ctx) {
|
|
1595
1595
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1596
1596
|
try {
|
|
1597
|
-
const { executeTests } = await import("./run-tests-
|
|
1597
|
+
const { executeTests } = await import("./run-tests-MEHC73SQ.js");
|
|
1598
1598
|
const argStr = args.join(" ").trim();
|
|
1599
1599
|
let testArgs = {};
|
|
1600
1600
|
if (argStr) {
|
|
@@ -2922,7 +2922,7 @@ Try: /compact to reduce context, /clear to reset, or switch to a larger-context
|
|
|
2922
2922
|
this.send({ type: "response_done", content, usage });
|
|
2923
2923
|
if (pendingTeeSave && isCleanDocumentBody(content)) {
|
|
2924
2924
|
try {
|
|
2925
|
-
|
|
2925
|
+
mkdirSync2(dirname2(pendingTeeSave), { recursive: true });
|
|
2926
2926
|
const bodyToSave = stripOuterCodeFence(content);
|
|
2927
2927
|
atomicWriteFileSync(pendingTeeSave, bodyToSave);
|
|
2928
2928
|
undoStack.push(pendingTeeSave, `save_last_response (deferred): ${pendingTeeSave}`);
|
|
@@ -3098,8 +3098,8 @@ ${summaryContent}`,
|
|
|
3098
3098
|
let isError = false;
|
|
3099
3099
|
let summary;
|
|
3100
3100
|
try {
|
|
3101
|
-
|
|
3102
|
-
fileStream =
|
|
3101
|
+
mkdirSync2(dirname2(saveToFile), { recursive: true });
|
|
3102
|
+
fileStream = createWriteStream2(saveToFile);
|
|
3103
3103
|
const teeSystemPrompt = stripToolCallReminder(systemPrompt ?? "") + CONTENT_ONLY_STREAM_REMINDER;
|
|
3104
3104
|
const teeExtraMessages = extraMessages.length > 0 ? [...extraMessages, { role: "user", content: TEE_FINAL_USER_NUDGE }] : [{ role: "user", content: TEE_FINAL_USER_NUDGE }];
|
|
3105
3105
|
const chatRequest = {
|
|
@@ -3667,7 +3667,7 @@ function getModuleDir() {
|
|
|
3667
3667
|
if (typeof import.meta?.url === "string") {
|
|
3668
3668
|
const url = new URL(import.meta.url);
|
|
3669
3669
|
const filePath = url.pathname.replace(/^\/([A-Z]:)/i, "$1");
|
|
3670
|
-
return
|
|
3670
|
+
return dirname3(filePath);
|
|
3671
3671
|
}
|
|
3672
3672
|
} catch {
|
|
3673
3673
|
}
|
|
@@ -3740,7 +3740,7 @@ async function startWebServer(options = {}) {
|
|
|
3740
3740
|
}
|
|
3741
3741
|
let skillManager = null;
|
|
3742
3742
|
const skillsDir = join4(config.getConfigDir(), SKILLS_DIR_NAME);
|
|
3743
|
-
if (
|
|
3743
|
+
if (existsSync4(skillsDir)) {
|
|
3744
3744
|
skillManager = new SkillManager(skillsDir, config.get("ui").skillSizeWarn);
|
|
3745
3745
|
skillManager.loadSkills(pluginAssets.skillDirs);
|
|
3746
3746
|
const count = skillManager.listSkills().length;
|
|
@@ -3812,13 +3812,13 @@ async function startWebServer(options = {}) {
|
|
|
3812
3812
|
};
|
|
3813
3813
|
const moduleDir = getModuleDir();
|
|
3814
3814
|
let clientDir = join4(moduleDir, "web", "client");
|
|
3815
|
-
if (!
|
|
3815
|
+
if (!existsSync4(clientDir)) {
|
|
3816
3816
|
clientDir = join4(moduleDir, "client");
|
|
3817
3817
|
}
|
|
3818
|
-
if (!
|
|
3818
|
+
if (!existsSync4(clientDir)) {
|
|
3819
3819
|
clientDir = join4(moduleDir, "..", "..", "src", "web", "client");
|
|
3820
3820
|
}
|
|
3821
|
-
if (!
|
|
3821
|
+
if (!existsSync4(clientDir)) {
|
|
3822
3822
|
clientDir = join4(process.cwd(), "src", "web", "client");
|
|
3823
3823
|
}
|
|
3824
3824
|
console.log(` Static files: ${clientDir}`);
|
|
@@ -3903,7 +3903,7 @@ async function startWebServer(options = {}) {
|
|
|
3903
3903
|
}
|
|
3904
3904
|
try {
|
|
3905
3905
|
const SKIP = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "dist-cjs", "release", "__pycache__", ".next", ".nuxt", "coverage", ".cache"]);
|
|
3906
|
-
const entries =
|
|
3906
|
+
const entries = readdirSync3(targetDir, { withFileTypes: true });
|
|
3907
3907
|
const files = entries.filter((e) => !SKIP.has(e.name) && !e.name.startsWith(".")).slice(0, 50).map((e) => ({
|
|
3908
3908
|
name: e.name,
|
|
3909
3909
|
path: relative(cwd, join4(targetDir, e.name)).replace(/\\/g, "/"),
|
|
@@ -3947,7 +3947,7 @@ async function startWebServer(options = {}) {
|
|
|
3947
3947
|
const authUser = req._authUser;
|
|
3948
3948
|
const histDir = authUser ? getUserShared(authUser).config.getHistoryDir() : config.getHistoryDir();
|
|
3949
3949
|
const filePath = join4(histDir, `${id}.json`);
|
|
3950
|
-
if (!
|
|
3950
|
+
if (!existsSync4(filePath)) {
|
|
3951
3951
|
res.status(404).json({ error: "Session not found" });
|
|
3952
3952
|
return;
|
|
3953
3953
|
}
|
|
@@ -3962,7 +3962,7 @@ async function startWebServer(options = {}) {
|
|
|
3962
3962
|
res.status(404).json({ error: "Session not found" });
|
|
3963
3963
|
return;
|
|
3964
3964
|
}
|
|
3965
|
-
const data = JSON.parse(
|
|
3965
|
+
const data = JSON.parse(readFileSync4(filePath, "utf-8"));
|
|
3966
3966
|
res.json({ session: data });
|
|
3967
3967
|
} catch (err) {
|
|
3968
3968
|
res.status(500).json({ error: err instanceof Error ? err.message : String(err) });
|
|
@@ -3988,12 +3988,12 @@ async function startWebServer(options = {}) {
|
|
|
3988
3988
|
return;
|
|
3989
3989
|
}
|
|
3990
3990
|
try {
|
|
3991
|
-
const stat =
|
|
3991
|
+
const stat = statSync3(fullPath);
|
|
3992
3992
|
if (stat.size > 512 * 1024) {
|
|
3993
3993
|
res.json({ error: `File too large (${(stat.size / 1024).toFixed(0)} KB, max 512 KB)` });
|
|
3994
3994
|
return;
|
|
3995
3995
|
}
|
|
3996
|
-
const content =
|
|
3996
|
+
const content = readFileSync4(fullPath, "utf-8");
|
|
3997
3997
|
res.json({ content, size: stat.size });
|
|
3998
3998
|
} catch {
|
|
3999
3999
|
res.json({ error: "Cannot read file" });
|
|
@@ -4249,16 +4249,16 @@ function resolveProjectMcpPath() {
|
|
|
4249
4249
|
const gitRoot = getGitRoot(cwd);
|
|
4250
4250
|
const projectRoot = gitRoot ?? cwd;
|
|
4251
4251
|
const configPath = join4(projectRoot, MCP_PROJECT_CONFIG_NAME);
|
|
4252
|
-
return
|
|
4252
|
+
return existsSync4(configPath) ? configPath : null;
|
|
4253
4253
|
}
|
|
4254
4254
|
function loadProjectMcpConfig() {
|
|
4255
4255
|
const cwd = process.cwd();
|
|
4256
4256
|
const gitRoot = getGitRoot(cwd);
|
|
4257
4257
|
const projectRoot = gitRoot ?? cwd;
|
|
4258
4258
|
const configPath = join4(projectRoot, MCP_PROJECT_CONFIG_NAME);
|
|
4259
|
-
if (!
|
|
4259
|
+
if (!existsSync4(configPath)) return null;
|
|
4260
4260
|
try {
|
|
4261
|
-
const raw = JSON.parse(
|
|
4261
|
+
const raw = JSON.parse(readFileSync4(configPath, "utf-8"));
|
|
4262
4262
|
return raw.mcpServers ?? raw;
|
|
4263
4263
|
} catch {
|
|
4264
4264
|
return null;
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SBSWH2EG.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-
|
|
13
|
+
} from "./chunk-T6EIBUKW.js";
|
|
14
14
|
import {
|
|
15
15
|
getDangerLevel,
|
|
16
16
|
runLeanAgentLoop
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
import "./chunk-5ULLIOVC.js";
|
|
19
19
|
import "./chunk-HOSJZMQS.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-7VAE3I3D.js";
|
|
22
22
|
import {
|
|
23
23
|
SUBAGENT_ALLOWED_TOOLS
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CGQARJMP.js";
|
|
25
25
|
import "./chunk-5MYPIQ3Y.js";
|
|
26
26
|
import "./chunk-KHYD3WXE.js";
|
|
27
27
|
import "./chunk-KCEO2XJ4.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-E44DTERW.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VBAW4ZPY.js";
|
|
12
12
|
import "./chunk-5ULLIOVC.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CGQARJMP.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|