jinzd-ai-cli 0.4.309 → 0.4.311
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/dist/{batch-H4WWSZQ3.js → batch-ZGRYELZQ.js} +2 -2
- package/dist/{chunk-2E5W2E64.js → chunk-2PDBRPNS.js} +1 -1
- package/dist/{chunk-IW6Q66WS.js → chunk-2XI6LXBY.js} +4 -4
- package/dist/{chunk-EHMMBIZT.js → chunk-3L3PKTSK.js} +111 -2
- package/dist/{chunk-EAVX3RLD.js → chunk-7B2KVTGQ.js} +1 -1
- package/dist/{chunk-4BXTGXZ6.js → chunk-EHACKFNT.js} +1 -1
- package/dist/{chunk-K4F7QEGW.js → chunk-EWWHG3CR.js} +1 -1
- package/dist/{chunk-3GEO2LPO.js → chunk-IVHG47FR.js} +1 -1
- package/dist/{chunk-RBCKX2FZ.js → chunk-IXR2P7WK.js} +1 -1
- package/dist/{chunk-T42GXE7Y.js → chunk-K2VL22AX.js} +7 -7
- package/dist/{chunk-O7MMYJAD.js → chunk-L4VU5F7P.js} +19 -7
- package/dist/{chunk-RLERORUI.js → chunk-PWN7QNDK.js} +1 -1
- package/dist/{chunk-HXINWG37.js → chunk-ROUVNUZZ.js} +1 -1
- package/dist/{chunk-SCG2VBPB.js → chunk-UZIXHKF7.js} +4 -4
- package/dist/{chunk-3CNPJLVI.js → chunk-ZX4L2ZYI.js} +1 -1
- package/dist/{ci-H6GPHG4T.js → ci-FJR4SB57.js} +5 -5
- package/dist/{ci-format-U47GSGYU.js → ci-format-PZNBZT55.js} +2 -2
- package/dist/{constants-GYJTB6KI.js → constants-OV7XBTZI.js} +1 -1
- package/dist/{constants-SNJR6546.js → constants-RBP6YR3H.js} +1 -1
- package/dist/{doctor-cli-J6LAQ5LU.js → doctor-cli-GE4TWAXT.js} +5 -5
- package/dist/electron-server.js +136 -15
- package/dist/{hub-G5FMMTVZ.js → hub-TAGD646P.js} +1 -1
- package/dist/index.js +44 -24
- package/dist/{persistent-memory-EXJBXL33.js → persistent-memory-4JGH2RSD.js} +2 -2
- package/dist/{persistent-memory-LEE454DW.js → persistent-memory-Z5HYYVXL.js} +2 -2
- package/dist/{pr-6PUHVJ6K.js → pr-WQMSMNBR.js} +5 -5
- package/dist/{run-tests-33ZVQE3Q.js → run-tests-JZDYMCHO.js} +2 -2
- package/dist/{run-tests-2C7MWZBN.js → run-tests-NJMCA7A5.js} +2 -2
- package/dist/{server-AJH5TBVO.js → server-KOFF5RTB.js} +14 -14
- package/dist/{server-CYAB56O3.js → server-ORHXQROL.js} +5 -5
- package/dist/{task-orchestrator-HNRV3YUD.js → task-orchestrator-JS6JGL3N.js} +5 -5
- package/dist/{usage-ZN5DU6Z7.js → usage-TVBY2BCQ.js} +2 -2
- package/package.json +2 -2
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-RS7SKYTS.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IXR2P7WK.js";
|
|
8
8
|
import "./chunk-TU3L3PW7.js";
|
|
9
9
|
import {
|
|
10
10
|
atomicWriteFileSync
|
|
11
11
|
} from "./chunk-BMLQPSHP.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZX4L2ZYI.js";
|
|
13
13
|
|
|
14
14
|
// src/cli/batch.ts
|
|
15
15
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -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-7B2KVTGQ.js";
|
|
16
16
|
|
|
17
17
|
// src/memory/persistent-memory.ts
|
|
18
18
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EWWHG3CR.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
} from "./chunk-6YZEZFX5.js";
|
|
14
14
|
import {
|
|
15
15
|
ProviderRegistry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3L3PKTSK.js";
|
|
17
17
|
import {
|
|
18
18
|
ConfigManager
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IXR2P7WK.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZX4L2ZYI.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/ci.ts
|
|
25
25
|
import { execFileSync } from "child_process";
|
|
@@ -2082,6 +2082,44 @@ var OPENROUTER_CONFIG = {
|
|
|
2082
2082
|
var OpenRouterProvider = createStaticProviderClass(OPENROUTER_CONFIG);
|
|
2083
2083
|
|
|
2084
2084
|
// src/providers/ollama.ts
|
|
2085
|
+
function resolveOllamaContextWindow(input) {
|
|
2086
|
+
if (isPositiveInt(input.runningContext)) {
|
|
2087
|
+
return { contextWindow: input.runningContext, source: "running" };
|
|
2088
|
+
}
|
|
2089
|
+
const numCtx = parseNumCtx(input.show?.parameters);
|
|
2090
|
+
if (numCtx !== void 0) return { contextWindow: numCtx, source: "modelfile" };
|
|
2091
|
+
const modelMax = readModelMaxContext(input.show?.model_info);
|
|
2092
|
+
if (modelMax !== void 0) return { contextWindow: modelMax, source: "model-max" };
|
|
2093
|
+
return { contextWindow: input.fallback, source: "estimate" };
|
|
2094
|
+
}
|
|
2095
|
+
function isPositiveInt(n) {
|
|
2096
|
+
return typeof n === "number" && Number.isInteger(n) && n > 0;
|
|
2097
|
+
}
|
|
2098
|
+
function parseNumCtx(parameters) {
|
|
2099
|
+
if (!parameters) return void 0;
|
|
2100
|
+
let found;
|
|
2101
|
+
for (const line of parameters.split("\n")) {
|
|
2102
|
+
const m = /^\s*num_ctx\s+(\d+)\s*$/.exec(line);
|
|
2103
|
+
if (m) found = Number(m[1]);
|
|
2104
|
+
}
|
|
2105
|
+
return isPositiveInt(found) ? found : void 0;
|
|
2106
|
+
}
|
|
2107
|
+
function readModelMaxContext(modelInfo) {
|
|
2108
|
+
if (!modelInfo) return void 0;
|
|
2109
|
+
const arch = modelInfo["general.architecture"];
|
|
2110
|
+
if (typeof arch === "string") {
|
|
2111
|
+
const v = modelInfo[`${arch}.context_length`];
|
|
2112
|
+
if (isPositiveInt(v)) return v;
|
|
2113
|
+
}
|
|
2114
|
+
for (const [k, v] of Object.entries(modelInfo)) {
|
|
2115
|
+
if (k.endsWith(".context_length") && isPositiveInt(v)) return v;
|
|
2116
|
+
}
|
|
2117
|
+
return void 0;
|
|
2118
|
+
}
|
|
2119
|
+
function ollamaNativeBaseUrl(openAiBaseUrl) {
|
|
2120
|
+
return openAiBaseUrl.replace(/\/+$/, "").replace(/\/v1$/, "");
|
|
2121
|
+
}
|
|
2122
|
+
var NATIVE_API_TIMEOUT_MS = 3e3;
|
|
2085
2123
|
var OllamaProvider = class extends OpenAICompatibleProvider {
|
|
2086
2124
|
// 用 127.0.0.1 而非 localhost:Node.js 18+ 在 Windows 上优先解析 localhost 为 IPv6 (::1),
|
|
2087
2125
|
// 但 Ollama 默认只监听 IPv4,导致连接失败。
|
|
@@ -2090,6 +2128,8 @@ var OllamaProvider = class extends OpenAICompatibleProvider {
|
|
|
2090
2128
|
// 本地推理可能较慢,默认 2 分钟
|
|
2091
2129
|
/** 动态模型列表 */
|
|
2092
2130
|
dynamicModels = [];
|
|
2131
|
+
/** 原生 API 根地址(`/api/show`、`/api/ps`),initialize 时由 baseUrl 推出 */
|
|
2132
|
+
nativeBaseUrl = ollamaNativeBaseUrl(this.defaultBaseUrl);
|
|
2093
2133
|
info = {
|
|
2094
2134
|
id: "ollama",
|
|
2095
2135
|
displayName: "Ollama (Local)",
|
|
@@ -2101,6 +2141,7 @@ var OllamaProvider = class extends OpenAICompatibleProvider {
|
|
|
2101
2141
|
};
|
|
2102
2142
|
async initialize(apiKey, options) {
|
|
2103
2143
|
const baseUrl = options?.baseUrl ?? this.defaultBaseUrl;
|
|
2144
|
+
this.nativeBaseUrl = ollamaNativeBaseUrl(baseUrl);
|
|
2104
2145
|
await super.initialize(apiKey || "ollama", { ...options, baseUrl });
|
|
2105
2146
|
await this.tryConnect(true);
|
|
2106
2147
|
}
|
|
@@ -2118,10 +2159,11 @@ var OllamaProvider = class extends OpenAICompatibleProvider {
|
|
|
2118
2159
|
if (modelIds.length === 0) {
|
|
2119
2160
|
return false;
|
|
2120
2161
|
}
|
|
2162
|
+
const contextWindows = await this.detectContextWindows(modelIds);
|
|
2121
2163
|
this.dynamicModels = modelIds.map((id) => ({
|
|
2122
2164
|
id,
|
|
2123
2165
|
displayName: id,
|
|
2124
|
-
contextWindow: this.estimateContextWindow(id),
|
|
2166
|
+
contextWindow: contextWindows.get(id) ?? this.estimateContextWindow(id),
|
|
2125
2167
|
supportsStreaming: true,
|
|
2126
2168
|
supportsThinking: false
|
|
2127
2169
|
}));
|
|
@@ -2142,7 +2184,74 @@ var OllamaProvider = class extends OpenAICompatibleProvider {
|
|
|
2142
2184
|
return false;
|
|
2143
2185
|
}
|
|
2144
2186
|
}
|
|
2145
|
-
/**
|
|
2187
|
+
/**
|
|
2188
|
+
* 经原生 API 查每个模型的 contextWindow(规则见 resolveOllamaContextWindow)。
|
|
2189
|
+
* 任何一步失败都只影响该模型、退回按名字猜,绝不让模型列表整体失败——
|
|
2190
|
+
* 模型列表拿到了就说明服务是通的,上下文探测只是锦上添花。
|
|
2191
|
+
*/
|
|
2192
|
+
async detectContextWindows(modelIds) {
|
|
2193
|
+
const result = /* @__PURE__ */ new Map();
|
|
2194
|
+
const [running, digests] = await Promise.all([this.fetchRunningContexts(), this.fetchDigests()]);
|
|
2195
|
+
await Promise.all(modelIds.map(async (id) => {
|
|
2196
|
+
const show = await this.fetchNative("/api/show", { model: id });
|
|
2197
|
+
if (running.size === 0 && !show) return;
|
|
2198
|
+
const digest = digests.get(id);
|
|
2199
|
+
const { contextWindow } = resolveOllamaContextWindow({
|
|
2200
|
+
runningContext: digest && running.get(digest) || running.get(id),
|
|
2201
|
+
show,
|
|
2202
|
+
fallback: this.estimateContextWindow(id)
|
|
2203
|
+
});
|
|
2204
|
+
result.set(id, contextWindow);
|
|
2205
|
+
}));
|
|
2206
|
+
return result;
|
|
2207
|
+
}
|
|
2208
|
+
/** `/api/ps`:已加载模型的名字与 digest → 实际上下文窗口。未加载的模型不在其中。 */
|
|
2209
|
+
async fetchRunningContexts() {
|
|
2210
|
+
const running = /* @__PURE__ */ new Map();
|
|
2211
|
+
const ps = await this.fetchNative("/api/ps");
|
|
2212
|
+
for (const m of ps?.models ?? []) {
|
|
2213
|
+
if (!isPositiveInt(m.context_length)) continue;
|
|
2214
|
+
for (const key of [m.digest, m.name, m.model]) {
|
|
2215
|
+
if (key) running.set(key, m.context_length);
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
return running;
|
|
2219
|
+
}
|
|
2220
|
+
/** `/api/tags`:模型名 → digest,用于把别名对到 /api/ps 里以原名加载的同一模型 */
|
|
2221
|
+
async fetchDigests() {
|
|
2222
|
+
const digests = /* @__PURE__ */ new Map();
|
|
2223
|
+
const tags = await this.fetchNative("/api/tags");
|
|
2224
|
+
for (const m of tags?.models ?? []) {
|
|
2225
|
+
if (!m.digest) continue;
|
|
2226
|
+
for (const name of [m.name, m.model]) {
|
|
2227
|
+
if (name) digests.set(name, m.digest);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
return digests;
|
|
2231
|
+
}
|
|
2232
|
+
/**
|
|
2233
|
+
* 调 Ollama 原生 API,失败一律返回 undefined。
|
|
2234
|
+
* 本地地址必须显式走直连 Agent:setupProxy() 装的全局 ProxyAgent 不认 localhost 例外,
|
|
2235
|
+
* 裸 fetch 会把 127.0.0.1:11434 发给代理(同 isLoopbackBaseUrl 那次的坑)。
|
|
2236
|
+
*/
|
|
2237
|
+
async fetchNative(path, body) {
|
|
2238
|
+
try {
|
|
2239
|
+
const { Agent, fetch: undiciFetch } = await import("undici");
|
|
2240
|
+
const url = `${this.nativeBaseUrl}${path}`;
|
|
2241
|
+
const init = {
|
|
2242
|
+
method: body ? "POST" : "GET",
|
|
2243
|
+
headers: body ? { "content-type": "application/json" } : void 0,
|
|
2244
|
+
body: body ? JSON.stringify(body) : void 0,
|
|
2245
|
+
signal: AbortSignal.timeout(NATIVE_API_TIMEOUT_MS)
|
|
2246
|
+
};
|
|
2247
|
+
const res = isLoopbackBaseUrl(url) ? await undiciFetch(url, { ...init, dispatcher: new Agent() }) : await undiciFetch(url, init);
|
|
2248
|
+
if (!res.ok) return void 0;
|
|
2249
|
+
return await res.json();
|
|
2250
|
+
} catch {
|
|
2251
|
+
return void 0;
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
/** 根据模型名估算上下文窗口(原生 API 不可用时的兜底) */
|
|
2146
2255
|
estimateContextWindow(modelName) {
|
|
2147
2256
|
const name = modelName.toLowerCase();
|
|
2148
2257
|
if (name.includes("llama3") || name.includes("llama-3")) return 131072;
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
setPreferredAgentName,
|
|
17
17
|
truncateForPersist,
|
|
18
18
|
undoStack
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-L4VU5F7P.js";
|
|
20
20
|
import {
|
|
21
21
|
buildReviewPrompt,
|
|
22
22
|
buildSecurityReviewPrompt
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
touchMemoryReferences,
|
|
52
52
|
updateMemoryApproval,
|
|
53
53
|
updateMemoryEntry
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-ROUVNUZZ.js";
|
|
55
55
|
import {
|
|
56
56
|
theme
|
|
57
57
|
} from "./chunk-5C76XDDF.js";
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
import {
|
|
66
66
|
buildDoctorReport,
|
|
67
67
|
formatDoctorReport
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-UZIXHKF7.js";
|
|
69
69
|
import {
|
|
70
70
|
describePlugin,
|
|
71
71
|
getActivePluginAssets,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
trustHook,
|
|
81
81
|
trustPlugin,
|
|
82
82
|
untrustHook
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-EHACKFNT.js";
|
|
84
84
|
import {
|
|
85
85
|
isCleanDocumentBody,
|
|
86
86
|
stripOuterCodeFence
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
MCP_TOOL_PREFIX,
|
|
110
110
|
REPO_URL,
|
|
111
111
|
VERSION
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-ZX4L2ZYI.js";
|
|
113
113
|
|
|
114
114
|
// src/skills/manager.ts
|
|
115
115
|
import { existsSync, readdirSync, mkdirSync, statSync } from "fs";
|
|
@@ -2426,7 +2426,7 @@ No tools match "${filter}".
|
|
|
2426
2426
|
const { join: join6 } = await import("path");
|
|
2427
2427
|
const { existsSync: existsSync6 } = await import("fs");
|
|
2428
2428
|
const { getGitRoot } = await import("./git-context-EXOEHQSF.js");
|
|
2429
|
-
const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-
|
|
2429
|
+
const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-RBP6YR3H.js");
|
|
2430
2430
|
const { approveProject, hashMcpFile } = await import("./project-trust-KGG2BWKC.js");
|
|
2431
2431
|
const cwd = process.cwd();
|
|
2432
2432
|
const projectRoot = getGitRoot(cwd) ?? cwd;
|
|
@@ -3534,7 +3534,7 @@ function createReviewCommands() {
|
|
|
3534
3534
|
usage: "/test [command|filter]",
|
|
3535
3535
|
async execute(args, ctx) {
|
|
3536
3536
|
try {
|
|
3537
|
-
const { executeTests } = await import("./run-tests-
|
|
3537
|
+
const { executeTests } = await import("./run-tests-JZDYMCHO.js");
|
|
3538
3538
|
const argStr = args.join(" ").trim();
|
|
3539
3539
|
let testArgs = {};
|
|
3540
3540
|
if (argStr) {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
searchPersistentMemories,
|
|
12
12
|
touchMemoryReferences,
|
|
13
13
|
updateMemoryEntry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ROUVNUZZ.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-EHACKFNT.js";
|
|
34
34
|
import {
|
|
35
35
|
buildTruncatedArgumentsError,
|
|
36
36
|
getDangerLevel,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
recoverGbkMojibake,
|
|
64
64
|
runTestsTool,
|
|
65
65
|
shellInvocation
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-IVHG47FR.js";
|
|
67
67
|
import {
|
|
68
68
|
CONFIG_DIR_NAME,
|
|
69
69
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
SUBAGENT_ALLOWED_TOOLS,
|
|
73
73
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
74
74
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-ZX4L2ZYI.js";
|
|
76
76
|
import {
|
|
77
77
|
getCurrentSessionKey,
|
|
78
78
|
getExecutionConfigDir,
|
|
@@ -1448,9 +1448,10 @@ ${err.message}`;
|
|
|
1448
1448
|
}
|
|
1449
1449
|
if (BINARY_EXTENSIONS.has(ext)) {
|
|
1450
1450
|
if (IMAGE_EXTENSIONS.has(ext)) {
|
|
1451
|
+
const ref = /\s/.test(filePath) ? `@"${filePath}"` : `@${filePath}`;
|
|
1451
1452
|
return `[Image file: ${filePath} (${ext})]
|
|
1452
1453
|
read_file cannot return image content \u2014 tool results are text-only, so no tool can put an image into your context.
|
|
1453
|
-
To have an image looked at, ask the USER to reference it from their input line with
|
|
1454
|
+
To have an image looked at, ask the USER to reference it from their input line with ${ref} (quote the path exactly like that when it contains spaces; they can use a glob for a batch, e.g. @dir/*.png, up to ${MAX_GLOB_MATCHES} at a time). A vision-capable model must be active, or the reference is rejected.
|
|
1454
1455
|
Do NOT claim you inspected this image \u2014 you have not seen it.`;
|
|
1455
1456
|
}
|
|
1456
1457
|
return `[Binary file: ${filePath} (${ext})]
|
|
@@ -2892,6 +2893,16 @@ function norm(p) {
|
|
|
2892
2893
|
}
|
|
2893
2894
|
return process.platform === "win32" ? abs.toLowerCase() : abs;
|
|
2894
2895
|
}
|
|
2896
|
+
function systemPathCandidates(p) {
|
|
2897
|
+
const out = /* @__PURE__ */ new Set([norm(p), resolve5(p)]);
|
|
2898
|
+
if (process.platform === "darwin") {
|
|
2899
|
+
for (const c of [...out]) {
|
|
2900
|
+
const m = /^\/private(\/(?:etc|var|tmp)(?:\/|$).*)$/.exec(c);
|
|
2901
|
+
if (m) out.add(m[1]);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
return [...out];
|
|
2905
|
+
}
|
|
2895
2906
|
function homeRel(p) {
|
|
2896
2907
|
const abs = norm(p);
|
|
2897
2908
|
const h = norm(home);
|
|
@@ -2955,10 +2966,11 @@ function classifyWritePath(path3) {
|
|
|
2955
2966
|
if (abs.includes(`${sep2}.git${sep2}config`) || abs.includes(`${sep2}.git${sep2}config`.toLowerCase())) {
|
|
2956
2967
|
return { sensitive: true, reason: ".git/config \u2014 repository identity" };
|
|
2957
2968
|
}
|
|
2969
|
+
const sysCandidates = process.platform === "win32" ? [abs] : systemPathCandidates(path3);
|
|
2958
2970
|
if (process.platform !== "win32") {
|
|
2959
2971
|
const sysPrefixes = ["/etc/", "/usr/bin/", "/usr/sbin/", "/bin/", "/sbin/", "/boot/"];
|
|
2960
2972
|
for (const pre of sysPrefixes) {
|
|
2961
|
-
if (
|
|
2973
|
+
if (sysCandidates.some((c) => c.startsWith(pre))) return { sensitive: true, reason: `system path (${pre})` };
|
|
2962
2974
|
}
|
|
2963
2975
|
} else {
|
|
2964
2976
|
const winSys = ["c:\\windows\\system32\\", "c:\\windows\\syswow64\\", "c:\\program files\\", "c:\\program files (x86)\\"];
|
|
@@ -2966,7 +2978,7 @@ function classifyWritePath(path3) {
|
|
|
2966
2978
|
if (abs.startsWith(pre)) return { sensitive: true, reason: `system path (${pre})` };
|
|
2967
2979
|
}
|
|
2968
2980
|
}
|
|
2969
|
-
if (abs.includes(`${sep2}cron.d${sep2}`) ||
|
|
2981
|
+
if (abs.includes(`${sep2}cron.d${sep2}`) || sysCandidates.some((c) => c.startsWith("/etc/cron") || c.startsWith("/var/spool/cron/"))) {
|
|
2970
2982
|
return { sensitive: true, reason: "cron scheduling" };
|
|
2971
2983
|
}
|
|
2972
2984
|
if (rel && (rel.startsWith("Library/LaunchAgents/") || rel.startsWith("Library/LaunchDaemons/"))) {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
MEMORY_FILE_NAME,
|
|
14
14
|
MEMORY_MAX_CHARS,
|
|
15
15
|
MEMORY_STORE_FILE_NAME
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZX4L2ZYI.js";
|
|
17
17
|
|
|
18
18
|
// src/memory/persistent-memory.ts
|
|
19
19
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
listHooks,
|
|
9
9
|
listInstalledPlugins,
|
|
10
10
|
resetStats
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EHACKFNT.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3L3PKTSK.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IXR2P7WK.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-ZX4L2ZYI.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-2XI6LXBY.js";
|
|
7
|
+
import "./chunk-EWWHG3CR.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-3L3PKTSK.js";
|
|
11
|
+
import "./chunk-IXR2P7WK.js";
|
|
12
12
|
import "./chunk-RMEJR3AW.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
14
|
import "./chunk-BMLQPSHP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-ZX4L2ZYI.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-UZIXHKF7.js";
|
|
6
|
+
import "./chunk-EHACKFNT.js";
|
|
7
7
|
import "./chunk-RS7SKYTS.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3L3PKTSK.js";
|
|
9
|
+
import "./chunk-IXR2P7WK.js";
|
|
10
10
|
import "./chunk-RMEJR3AW.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-ZX4L2ZYI.js";
|
|
15
15
|
export {
|
|
16
16
|
formatDoctorReport,
|
|
17
17
|
runDoctorCli
|