jinzd-ai-cli 0.4.324 → 0.4.326
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/{batch-TXSH37GQ.js → batch-D3HG4I6J.js} +6 -4
- package/dist/{chunk-AYDP3HFZ.js → chunk-2IGHZDPR.js} +1 -1
- package/dist/{chunk-PIX4ZPFB.js → chunk-5CE64V7X.js} +129 -72
- package/dist/{chunk-MX3SLCEP.js → chunk-5EDSZ3JF.js} +4 -4
- package/dist/{chunk-JYDLKJEQ.js → chunk-7OY3WOJD.js} +1 -1
- package/dist/{chunk-YCGWWBHF.js → chunk-BGFFD3IL.js} +1 -1
- package/dist/{chunk-NFPJ6KUU.js → chunk-BRZZ3QAI.js} +23 -5
- package/dist/{chunk-IOPPS6ST.js → chunk-DHJFMW3F.js} +14 -11
- package/dist/{chunk-IVVPYBGG.js → chunk-ERHFJIEP.js} +1 -1
- package/dist/{chunk-2C7NMQBY.js → chunk-FBT5VPT4.js} +34 -2
- package/dist/{chunk-IAI2FAX4.js → chunk-LCI2GVAU.js} +1 -1
- package/dist/{chunk-IBKFJFLM.js → chunk-LZ5667Z2.js} +1 -1
- package/dist/{chunk-RFJV47EQ.js → chunk-MGFFZFOA.js} +1 -1
- package/dist/{chunk-4YKQD5RW.js → chunk-NZGSCXA4.js} +7 -5
- package/dist/{chunk-CSXGOHLG.js → chunk-OIYQX2HM.js} +1 -1
- package/dist/{chunk-TEJHNHNO.js → chunk-OW3PAC3K.js} +4 -4
- package/dist/{ci-7TNQQRFB.js → ci-B4P35VVJ.js} +5 -5
- package/dist/{ci-format-K56H66E3.js → ci-format-JD7DKDNT.js} +2 -2
- package/dist/{constants-ZC7ZATE4.js → constants-2BVJTZJT.js} +1 -1
- package/dist/{constants-7WO66DLZ.js → constants-XOD3IIW5.js} +1 -1
- package/dist/{doctor-cli-JSXZ45K3.js → doctor-cli-GPFJF7WP.js} +5 -5
- package/dist/electron-server.js +203 -93
- package/dist/{hub-IJSXOA4J.js → hub-GQ2XUS4M.js} +1 -1
- package/dist/index.js +21 -20
- package/dist/{persistent-memory-MTYZ3CSO.js → persistent-memory-RY2JLUL4.js} +2 -2
- package/dist/{persistent-memory-7UQU5XVH.js → persistent-memory-SAP3R57F.js} +2 -2
- package/dist/{pr-2MGEREWJ.js → pr-AMY7JRQQ.js} +5 -5
- package/dist/{run-tests-66SUUBDO.js → run-tests-3BB4LUZT.js} +2 -2
- package/dist/{run-tests-WOPRQ64C.js → run-tests-5HMWO676.js} +2 -2
- package/dist/{server-6J4542BD.js → server-2NHQYAZN.js} +5 -5
- package/dist/{server-Y63DU44H.js → server-GSIQOYEV.js} +17 -16
- package/dist/{task-orchestrator-G7TSF5Q3.js → task-orchestrator-VRPSFGNY.js} +5 -5
- package/dist/{usage-SODWISIA.js → usage-2RJRDXIT.js} +3 -3
- package/dist/wasm/web-tree-sitter.wasm +0 -0
- package/package.json +5 -5
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
CONFIG_FILE_NAME,
|
|
12
12
|
HISTORY_DIR_NAME,
|
|
13
13
|
PLUGINS_DIR_NAME
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LCI2GVAU.js";
|
|
15
15
|
|
|
16
16
|
// src/config/config-manager.ts
|
|
17
17
|
import { readFileSync, existsSync, mkdirSync } from "fs";
|
|
@@ -390,7 +390,18 @@ ${err}`
|
|
|
390
390
|
const DEEPSEEK_TARGET = "deepseek-flash";
|
|
391
391
|
const LEGACY_KIMI = /* @__PURE__ */ new Set(["kimi-k2-0711-preview", "kimi-k2-turbo-preview"]);
|
|
392
392
|
const KIMI_TARGET = "kimi-k2.6";
|
|
393
|
+
const LEGACY_CLAUDE = {
|
|
394
|
+
"claude-sonnet-4-5-20250929": "claude-sonnet-5-5",
|
|
395
|
+
"claude-sonnet-4-5": "claude-sonnet-5-5",
|
|
396
|
+
"claude-sonnet-4-20250514": "claude-sonnet-5-5",
|
|
397
|
+
"claude-3-7-sonnet-20250219": "claude-sonnet-5-5",
|
|
398
|
+
"claude-opus-4-20250514": "claude-opus-5-5",
|
|
399
|
+
"claude-opus-4-1-20250805": "claude-opus-5-5",
|
|
400
|
+
"claude-3-5-haiku-20241022": "claude-haiku-5-5",
|
|
401
|
+
"claude-3-haiku-20240307": "claude-haiku-5-5"
|
|
402
|
+
};
|
|
393
403
|
let changed = false;
|
|
404
|
+
let claudeTarget;
|
|
394
405
|
const dm = this.config.defaultModels;
|
|
395
406
|
if (dm) {
|
|
396
407
|
if (LEGACY_DEEPSEEK.has(dm.deepseek)) {
|
|
@@ -401,6 +412,17 @@ ${err}`
|
|
|
401
412
|
dm.kimi = KIMI_TARGET;
|
|
402
413
|
changed = true;
|
|
403
414
|
}
|
|
415
|
+
const orTo = dm.openrouter ? { "anthropic/claude-opus-4": "anthropic/claude-opus-5.5", "anthropic/claude-haiku-4": "anthropic/claude-haiku-5.5" }[dm.openrouter] : void 0;
|
|
416
|
+
if (orTo) {
|
|
417
|
+
dm.openrouter = orTo;
|
|
418
|
+
changed = true;
|
|
419
|
+
}
|
|
420
|
+
const claudeTo = dm.claude ? LEGACY_CLAUDE[dm.claude] : void 0;
|
|
421
|
+
if (claudeTo) {
|
|
422
|
+
dm.claude = claudeTo;
|
|
423
|
+
claudeTarget = claudeTo;
|
|
424
|
+
changed = true;
|
|
425
|
+
}
|
|
404
426
|
}
|
|
405
427
|
const mp = this.config.modelParams;
|
|
406
428
|
if (mp) {
|
|
@@ -422,10 +444,20 @@ ${err}`
|
|
|
422
444
|
changed = true;
|
|
423
445
|
}
|
|
424
446
|
}
|
|
447
|
+
for (const [legacy, target] of Object.entries(LEGACY_CLAUDE)) {
|
|
448
|
+
if (legacy in mp) {
|
|
449
|
+
if (!(target in mp)) {
|
|
450
|
+
mp[target] = mp[legacy];
|
|
451
|
+
}
|
|
452
|
+
delete mp[legacy];
|
|
453
|
+
claudeTarget ??= target;
|
|
454
|
+
changed = true;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
425
457
|
}
|
|
426
458
|
if (changed) {
|
|
427
459
|
process.stderr.write(
|
|
428
|
-
`[ai-cli] Migrated retired model ids in config.json (deepseek \u2192 ${DEEPSEEK_TARGET}, kimi \u2192 ${KIMI_TARGET})
|
|
460
|
+
`[ai-cli] Migrated retired model ids in config.json (deepseek \u2192 ${DEEPSEEK_TARGET}, kimi \u2192 ${KIMI_TARGET}` + (claudeTarget ? `, claude \u2192 ${claudeTarget}` : "") + `)
|
|
429
461
|
`
|
|
430
462
|
);
|
|
431
463
|
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
MEMORY_FILE_NAME,
|
|
13
13
|
MEMORY_MAX_CHARS,
|
|
14
14
|
MEMORY_STORE_FILE_NAME
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MGFFZFOA.js";
|
|
16
16
|
|
|
17
17
|
// src/memory/persistent-memory.ts
|
|
18
18
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
searchPersistentMemories,
|
|
12
12
|
touchMemoryReferences,
|
|
13
13
|
updateMemoryEntry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BGFFD3IL.js";
|
|
15
15
|
import {
|
|
16
16
|
indexProject
|
|
17
17
|
} from "./chunk-RWRZVQCB.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
runHook,
|
|
31
31
|
runLifecycleHooks,
|
|
32
32
|
runTool
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ERHFJIEP.js";
|
|
34
34
|
import {
|
|
35
35
|
buildTruncatedArgumentsError,
|
|
36
36
|
getDangerLevel,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
recoverGbkMojibake,
|
|
65
65
|
runTestsTool,
|
|
66
66
|
shellInvocation
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-2IGHZDPR.js";
|
|
68
68
|
import {
|
|
69
69
|
CONFIG_DIR_NAME,
|
|
70
70
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
SUBAGENT_ALLOWED_TOOLS,
|
|
74
74
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
75
75
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-LCI2GVAU.js";
|
|
77
77
|
import {
|
|
78
78
|
getCurrentSessionKey,
|
|
79
79
|
getExecutionConfigDir,
|
|
@@ -89,6 +89,7 @@ var SHELL = IS_WINDOWS2 ? "powershell.exe" : posixShell();
|
|
|
89
89
|
var pool = /* @__PURE__ */ new Map();
|
|
90
90
|
var IDLE_EVICT_MS = 5 * 6e4;
|
|
91
91
|
var evictionTimer = null;
|
|
92
|
+
var WIN_STDIN_TO_NUL = `try { if (-not ('AicliNative.StdIn' -as [type])) { Add-Type -Namespace AicliNative -Name StdIn -MemberDefinition '[DllImport("kernel32.dll")] public static extern bool SetStdHandle(int n, System.IntPtr h); [DllImport("kernel32.dll", CharSet=CharSet.Unicode)] public static extern System.IntPtr CreateFileW(string f, uint a, uint s, System.IntPtr sa, uint c, uint fl, System.IntPtr t);' }; $__aicli_nul = [AicliNative.StdIn]::CreateFileW('NUL', [uint32]2147483648, 3, [IntPtr]::Zero, 3, 0, [IntPtr]::Zero); if ($__aicli_nul -ne [IntPtr]-1) { [void][AicliNative.StdIn]::SetStdHandle(-10, $__aicli_nul) } } catch { }; $Error.Clear()`;
|
|
92
93
|
function spawnShell(cwd) {
|
|
93
94
|
const shellArgs = IS_WINDOWS2 ? ["-NoProfile", "-NonInteractive", "-Command", "-"] : ["-s"];
|
|
94
95
|
const proc = spawn(SHELL, shellArgs, {
|
|
@@ -100,6 +101,7 @@ function spawnShell(cwd) {
|
|
|
100
101
|
// died and grandchildren were orphaned (2026-10-07 audit A-01).
|
|
101
102
|
detached: !IS_WINDOWS2
|
|
102
103
|
});
|
|
104
|
+
if (IS_WINDOWS2) proc.stdin?.write(WIN_STDIN_TO_NUL + "\n");
|
|
103
105
|
proc.on("exit", () => {
|
|
104
106
|
for (const [key, entry] of pool) {
|
|
105
107
|
if (entry.proc === proc) {
|
|
@@ -139,7 +141,7 @@ __aicli_rc=$?; echo "${stderrMarker(id)}" >&2; echo "${markerEnd}:$__aicli_rc"`;
|
|
|
139
141
|
}
|
|
140
142
|
const b64 = Buffer.from(command, "utf-8").toString("base64");
|
|
141
143
|
const decoded = `[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String('${b64}'))`;
|
|
142
|
-
return `${WIN_UTF8_PREAMBLE} Write-Output "${markerStart}"; $global:LASTEXITCODE = 0;
|
|
144
|
+
return `${WIN_UTF8_PREAMBLE} Write-Output "${markerStart}"; $global:LASTEXITCODE = 0; $global:__aicli_ok = $null; try { $__aicli_src = ${decoded}; $null = [scriptblock]::Create($__aicli_src); . ([scriptblock]::Create($__aicli_src + "\`n" + '$global:__aicli_ok = $?')) } catch { [Console]::Error.WriteLine(($_ | Out-String).TrimEnd()); $global:__aicli_ok = $false }; $__ec = $LASTEXITCODE; if ($global:__aicli_ok -eq $false -and $__ec -eq 0 -and $Error.Count -gt 0 -and "$($Error[0].FullyQualifiedErrorId)" -like 'NativeCommandError*') { $global:__aicli_ok = $true }; $__code = if ($null -ne $__ec -and $__ec -ne 0) { $__ec } elseif ($global:__aicli_ok -eq $false) { 1 } else { 0 }; Write-Output "${markerEnd}:$__code"`;
|
|
143
145
|
}
|
|
144
146
|
async function execInPool(sessionKey, command, timeout, cwd, abortSignal) {
|
|
145
147
|
let entry = pool.get(sessionKey);
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
listHooks,
|
|
9
9
|
listInstalledPlugins,
|
|
10
10
|
resetStats
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ERHFJIEP.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5CE64V7X.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FBT5VPT4.js";
|
|
18
18
|
import {
|
|
19
19
|
getGitRoot
|
|
20
20
|
} from "./chunk-HOSJZMQS.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
MCP_PROJECT_CONFIG_NAME,
|
|
27
27
|
MEMORY_FILE_NAME,
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-LCI2GVAU.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-5EDSZ3JF.js";
|
|
7
|
+
import "./chunk-OIYQX2HM.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-5CE64V7X.js";
|
|
11
|
+
import "./chunk-FBT5VPT4.js";
|
|
12
12
|
import "./chunk-E2W2MI6H.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
14
|
import "./chunk-BMLQPSHP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-LCI2GVAU.js";
|
|
16
16
|
export {
|
|
17
17
|
CI_COMMENT_MARKER,
|
|
18
18
|
countSeverity,
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OW3PAC3K.js";
|
|
6
|
+
import "./chunk-ERHFJIEP.js";
|
|
7
7
|
import "./chunk-RS7SKYTS.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-5CE64V7X.js";
|
|
9
|
+
import "./chunk-FBT5VPT4.js";
|
|
10
10
|
import "./chunk-E2W2MI6H.js";
|
|
11
11
|
import "./chunk-TU3L3PW7.js";
|
|
12
12
|
import "./chunk-HOSJZMQS.js";
|
|
13
13
|
import "./chunk-BMLQPSHP.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-LCI2GVAU.js";
|
|
15
15
|
export {
|
|
16
16
|
formatDoctorReport,
|
|
17
17
|
runDoctorCli
|