jinzd-ai-cli 0.4.287 → 0.4.289
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-6OH7D5YU.js → batch-GVD4CZZQ.js} +2 -2
- package/dist/{chunk-UDFK5Q52.js → chunk-25VQORAZ.js} +1 -1
- package/dist/{chunk-5F7BGV72.js → chunk-2SQCGJ6H.js} +1 -1
- package/dist/{chunk-AXSWLNCU.js → chunk-AA6PZRJO.js} +104 -127
- package/dist/{chunk-L7RAEUUN.js → chunk-BDN6ZCPQ.js} +1 -1
- package/dist/{chunk-HNUT4STJ.js → chunk-BW4H53KI.js} +7 -7
- package/dist/{chunk-L625B2XV.js → chunk-GXB5EOFI.js} +1 -1
- package/dist/{chunk-3BHJKMPQ.js → chunk-I73JWHNT.js} +1 -1
- package/dist/{chunk-RZVGR3KD.js → chunk-NP446QJS.js} +3 -3
- package/dist/{chunk-CYUAHF6X.js → chunk-NWM7CTQQ.js} +1 -1
- package/dist/{chunk-HEUB5PV6.js → chunk-QL2QACHI.js} +1 -1
- package/dist/{chunk-3Y5BCGD2.js → chunk-TKG6BI6G.js} +1 -1
- package/dist/{chunk-ERDFOXYK.js → chunk-TOH67ARY.js} +1 -1
- package/dist/{chunk-EU6NMK7G.js → chunk-VIDUFFHT.js} +3 -3
- package/dist/{ci-WXCMI4ND.js → ci-U7X5OWOA.js} +4 -4
- package/dist/{ci-format-JXD2BQM6.js → ci-format-PDP5K5LR.js} +2 -2
- package/dist/{constants-2B7CN2ER.js → constants-GBIMYBKD.js} +1 -1
- package/dist/{constants-SRRV3K5Y.js → constants-MYTDRODA.js} +1 -1
- package/dist/{doctor-cli-LQYTDJ74.js → doctor-cli-64WRAKH3.js} +4 -4
- package/dist/electron-server.js +143 -238
- package/dist/{hub-Y62P5MIA.js → hub-FSITPTD5.js} +1 -1
- package/dist/index.js +18 -17
- package/dist/{persistent-memory-46JSUEYV.js → persistent-memory-7GPL7NSO.js} +2 -2
- package/dist/{persistent-memory-3N2XQKJK.js → persistent-memory-7PPH6QES.js} +2 -2
- package/dist/{pr-L7Y3XHGL.js → pr-T7VURNFJ.js} +4 -4
- package/dist/{run-tests-WC644BHH.js → run-tests-CSAB2M4A.js} +2 -2
- package/dist/{run-tests-3ZOMRFIX.js → run-tests-PPTDYVS7.js} +2 -2
- package/dist/{server-XWURZCAF.js → server-6B2JFKRN.js} +53 -117
- package/dist/{server-L4QHJT2I.js → server-O54U4OOB.js} +5 -5
- package/dist/{task-orchestrator-6TVKJYKC.js → task-orchestrator-HA4JE4TF.js} +5 -5
- package/dist/{usage-L2PSI2KH.js → usage-HX6MPQT2.js} +2 -2
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-RS7SKYTS.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2SQCGJ6H.js";
|
|
8
8
|
import "./chunk-TU3L3PW7.js";
|
|
9
9
|
import {
|
|
10
10
|
atomicWriteFileSync
|
|
11
11
|
} from "./chunk-IW3Q7AE5.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-25VQORAZ.js";
|
|
13
13
|
|
|
14
14
|
// src/cli/batch.ts
|
|
15
15
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
searchPersistentMemories,
|
|
12
12
|
touchMemoryReferences,
|
|
13
13
|
updateMemoryEntry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TOH67ARY.js";
|
|
15
15
|
import {
|
|
16
16
|
indexProject
|
|
17
17
|
} from "./chunk-4DEMGCK4.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
runHook,
|
|
31
31
|
runLifecycleHooks,
|
|
32
32
|
runTool
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QL2QACHI.js";
|
|
34
34
|
import {
|
|
35
35
|
buildTruncatedArgumentsError,
|
|
36
36
|
getDangerLevel,
|
|
@@ -50,14 +50,15 @@ import {
|
|
|
50
50
|
} from "./chunk-4BKXL7SM.js";
|
|
51
51
|
import {
|
|
52
52
|
runTestsTool
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-BDN6ZCPQ.js";
|
|
54
54
|
import {
|
|
55
55
|
CONFIG_DIR_NAME,
|
|
56
56
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
57
|
+
PLAN_MODE_READONLY_TOOLS,
|
|
57
58
|
SUBAGENT_ALLOWED_TOOLS,
|
|
58
59
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
59
60
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-25VQORAZ.js";
|
|
61
62
|
|
|
62
63
|
// src/tools/shell-pool.ts
|
|
63
64
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -1628,6 +1629,67 @@ function simpleDiff(oldLines, newLines) {
|
|
|
1628
1629
|
return result;
|
|
1629
1630
|
}
|
|
1630
1631
|
|
|
1632
|
+
// src/core/tool-gate.ts
|
|
1633
|
+
var gateMessages = {
|
|
1634
|
+
hookDenied: (toolName, reason) => `[Hook denied] ${reason ?? `PreToolUse blocked ${toolName}`}. Do not retry without asking.`,
|
|
1635
|
+
networkDenied: (toolName, reason) => `[Permission denied] Tool ${toolName} is blocked by networkPolicy${reason ? ` (${reason})` : ""}. Do not retry.`,
|
|
1636
|
+
profileDenied: (toolName, profileName, reason) => `[Permission denied] Tool ${toolName} is blocked by permission profile "${profileName}"${reason ? ` (${reason})` : ""}. Do not retry.`,
|
|
1637
|
+
planModeDenied: (toolName) => `[Plan Mode] ${toolName} is disabled in read-only Plan Mode. Do not retry it. Use read_file / list_dir / grep_files / glob_files to investigate, and write_todos to present your plan. If the user wants this executed, tell them to type /plan execute first.`,
|
|
1638
|
+
autoDenied: (reason) => `[Auto denied] ${reason}. Do not retry without asking.`,
|
|
1639
|
+
permissionCancelled: (toolName) => `[User cancelled] The user declined permission for ${toolName}. Do not retry without asking.`,
|
|
1640
|
+
operationCancelled: (toolName, level) => `[User cancelled] The user declined the ${level === "destructive" ? "destructive " : ""}${toolName} operation. Do not retry without asking.`
|
|
1641
|
+
};
|
|
1642
|
+
function needsPermissionRequestHook(input) {
|
|
1643
|
+
return input.networkPermission?.action === "confirm" || input.permission.action === "confirm";
|
|
1644
|
+
}
|
|
1645
|
+
function decideToolGate(call, input) {
|
|
1646
|
+
const { dangerLevel, permission, networkPermission } = input;
|
|
1647
|
+
if (input.hookDeny) {
|
|
1648
|
+
return { kind: "denied", source: "hook", message: gateMessages.hookDenied(call.name, input.hookDeny.reason) };
|
|
1649
|
+
}
|
|
1650
|
+
if (input.planMode && !PLAN_MODE_READONLY_TOOLS.has(call.name)) {
|
|
1651
|
+
return { kind: "denied", source: "plan-mode", message: gateMessages.planModeDenied(call.name) };
|
|
1652
|
+
}
|
|
1653
|
+
if (networkPermission?.action === "deny") {
|
|
1654
|
+
return { kind: "denied", source: "network", message: gateMessages.networkDenied(call.name, networkPermission.reason) };
|
|
1655
|
+
}
|
|
1656
|
+
if (permission.action === "deny") {
|
|
1657
|
+
return {
|
|
1658
|
+
kind: "denied",
|
|
1659
|
+
source: "profile",
|
|
1660
|
+
message: gateMessages.profileDenied(call.name, permission.profileName ?? "default", permission.reason)
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1663
|
+
if (permission.action === "auto-approve" && networkPermission?.action !== "confirm") {
|
|
1664
|
+
return { kind: "allow", source: "profile" };
|
|
1665
|
+
}
|
|
1666
|
+
const requiresHardConfirmation = permission.action === "confirm" && permission.hardBoundary === true;
|
|
1667
|
+
if ((networkPermission?.action === "confirm" || requiresHardConfirmation) && dangerLevel === "safe") {
|
|
1668
|
+
return { kind: "confirm", level: "write", source: "permission" };
|
|
1669
|
+
}
|
|
1670
|
+
if (input.sessionAutoMode && networkPermission?.action !== "confirm") {
|
|
1671
|
+
const classification = input.classify();
|
|
1672
|
+
if (classification.decision === "deny") {
|
|
1673
|
+
return {
|
|
1674
|
+
kind: "denied",
|
|
1675
|
+
source: "auto-mode",
|
|
1676
|
+
message: gateMessages.autoDenied(classification.reason),
|
|
1677
|
+
classification
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
if (classification.decision === "auto-approve" && !requiresHardConfirmation) {
|
|
1681
|
+
return { kind: "allow", source: "auto-mode" };
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
if (input.sessionAutoApprove && dangerLevel === "write" && !requiresHardConfirmation) {
|
|
1685
|
+
return { kind: "allow", source: "yolo" };
|
|
1686
|
+
}
|
|
1687
|
+
if (dangerLevel === "write" || dangerLevel === "destructive") {
|
|
1688
|
+
return { kind: "confirm", level: dangerLevel, source: "danger" };
|
|
1689
|
+
}
|
|
1690
|
+
return { kind: "allow", source: "safe" };
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1631
1693
|
// src/tools/permissions.ts
|
|
1632
1694
|
import { existsSync as existsSync4, realpathSync } from "fs";
|
|
1633
1695
|
import { basename as basename2, dirname as dirname2, isAbsolute, resolve as resolve3 } from "path";
|
|
@@ -2202,6 +2264,14 @@ var ToolExecutor = class {
|
|
|
2202
2264
|
sessionAutoApprove = false;
|
|
2203
2265
|
/** Session-level Auto Mode: rule-based low-risk auto approval. */
|
|
2204
2266
|
sessionAutoMode = false;
|
|
2267
|
+
/**
|
|
2268
|
+
* Plan Mode(只读规划模式)。由宿主在每轮开始前同步。
|
|
2269
|
+
*
|
|
2270
|
+
* 必须在**执行层**也知道它:Plan Mode 此前只过滤"给模型看的工具清单",模型一旦吐出
|
|
2271
|
+
* 白名单外的调用,executor 一无所知照常执行,而 `alwaysYolo` 下 write 级还会被直接
|
|
2272
|
+
* 放行——只读保护形同虚设(审计 P2-01)。
|
|
2273
|
+
*/
|
|
2274
|
+
planMode = false;
|
|
2205
2275
|
/**
|
|
2206
2276
|
* Logical session key used to scope per-session state in stateful tools
|
|
2207
2277
|
* (currently only `bash`'s persistent cwd). Web mode sets this per-tab so
|
|
@@ -2290,13 +2360,6 @@ var ToolExecutor = class {
|
|
|
2290
2360
|
{ configDir: this.hookConfigDir, onSummary: (msg) => console.log(theme.dim(` [hook] ${msg}`)) }
|
|
2291
2361
|
);
|
|
2292
2362
|
const preDeny = preToolDecisions.find((d) => d.action === "deny");
|
|
2293
|
-
if (preDeny) {
|
|
2294
|
-
return {
|
|
2295
|
-
callId: call.id,
|
|
2296
|
-
content: `[Hook denied] ${preDeny.reason ?? `PreToolUse blocked ${call.name}`}. Do not retry without asking.`,
|
|
2297
|
-
isError: true
|
|
2298
|
-
};
|
|
2299
|
-
}
|
|
2300
2363
|
for (const d of preToolDecisions) {
|
|
2301
2364
|
const warnings = [d.warning, ...d.warnings ?? []].filter(Boolean);
|
|
2302
2365
|
for (const w of warnings) console.log(theme.warning(` \u26A0 Hook warning: ${w}`));
|
|
@@ -2316,7 +2379,20 @@ var ToolExecutor = class {
|
|
|
2316
2379
|
}
|
|
2317
2380
|
);
|
|
2318
2381
|
const networkPermission = checkNetworkPolicy(call.name, call.arguments, this.networkPolicy);
|
|
2319
|
-
|
|
2382
|
+
const gate = decideToolGate(call, {
|
|
2383
|
+
dangerLevel,
|
|
2384
|
+
permission,
|
|
2385
|
+
networkPermission,
|
|
2386
|
+
hookDeny: preDeny ? { reason: preDeny.reason } : void 0,
|
|
2387
|
+
planMode: this.planMode,
|
|
2388
|
+
sessionAutoMode: this.sessionAutoMode,
|
|
2389
|
+
sessionAutoApprove: this.sessionAutoApprove,
|
|
2390
|
+
classify: () => defaultActionClassifier.classify(call, dangerLevel, {
|
|
2391
|
+
workspaceRoot: this.workspaceRoot,
|
|
2392
|
+
tempDirs: [tmpdir()]
|
|
2393
|
+
})
|
|
2394
|
+
});
|
|
2395
|
+
if (needsPermissionRequestHook({ permission, networkPermission })) {
|
|
2320
2396
|
runLifecycleHooks(
|
|
2321
2397
|
this.hookConfig,
|
|
2322
2398
|
"PermissionRequest",
|
|
@@ -2324,131 +2400,29 @@ var ToolExecutor = class {
|
|
|
2324
2400
|
{ configDir: this.hookConfigDir, onSummary: (msg) => console.log(theme.dim(" [hook] " + msg)) }
|
|
2325
2401
|
);
|
|
2326
2402
|
}
|
|
2327
|
-
if (
|
|
2328
|
-
|
|
2329
|
-
return {
|
|
2330
|
-
callId: call.id,
|
|
2331
|
-
content: `[Permission denied] Tool ${call.name} is blocked by networkPolicy${reason}. Do not retry.`,
|
|
2332
|
-
isError: true
|
|
2333
|
-
};
|
|
2334
|
-
}
|
|
2335
|
-
if (permission.action === "deny") {
|
|
2336
|
-
const reason = permission.reason ? ` (${permission.reason})` : "";
|
|
2337
|
-
return {
|
|
2338
|
-
callId: call.id,
|
|
2339
|
-
content: `[Permission denied] Tool ${call.name} is blocked by permission profile "${permission.profileName}"${reason}. Do not retry.`,
|
|
2340
|
-
isError: true
|
|
2341
|
-
};
|
|
2342
|
-
}
|
|
2343
|
-
if (permission.action === "auto-approve" && networkPermission?.action !== "confirm") {
|
|
2344
|
-
if (!toolCallAlreadyPrinted) this.printToolCall(call);
|
|
2345
|
-
try {
|
|
2346
|
-
const rawContent = await runTool(tool, call.arguments, call.name);
|
|
2347
|
-
const content = truncateOutput(rawContent, call.name);
|
|
2348
|
-
const wasTruncated = content !== rawContent;
|
|
2349
|
-
this.printToolResult(call.name, rawContent, false, wasTruncated);
|
|
2350
|
-
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "ok" });
|
|
2351
|
-
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2352
|
-
return { callId: call.id, content, isError: false };
|
|
2353
|
-
} catch (err) {
|
|
2354
|
-
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2355
|
-
this.printToolResult(call.name, message, true, false);
|
|
2356
|
-
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2357
|
-
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
2358
|
-
return { callId: call.id, content: message, isError: true };
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
const requiresHardConfirmation = permission.action === "confirm" && permission.hardBoundary === true;
|
|
2362
|
-
if ((networkPermission?.action === "confirm" || requiresHardConfirmation) && dangerLevel === "safe") {
|
|
2363
|
-
this.printToolCall(call);
|
|
2364
|
-
toolCallAlreadyPrinted = true;
|
|
2365
|
-
const confirmed = await this.confirm(call, "write");
|
|
2366
|
-
if (!confirmed) {
|
|
2367
|
-
return {
|
|
2368
|
-
callId: call.id,
|
|
2369
|
-
content: `[User cancelled] The user declined permission for ${call.name}. Do not retry without asking.`,
|
|
2370
|
-
isError: true
|
|
2371
|
-
};
|
|
2372
|
-
}
|
|
2403
|
+
if (gate.kind === "denied") {
|
|
2404
|
+
if (gate.source === "auto-mode") recordRecentlyDeniedAutoAction(call, gate.classification);
|
|
2405
|
+
return { callId: call.id, content: gate.message, isError: true };
|
|
2373
2406
|
}
|
|
2374
|
-
if (
|
|
2375
|
-
|
|
2376
|
-
workspaceRoot: this.workspaceRoot,
|
|
2377
|
-
tempDirs: [tmpdir()]
|
|
2378
|
-
});
|
|
2379
|
-
if (classification.decision === "deny") {
|
|
2380
|
-
recordRecentlyDeniedAutoAction(call, classification);
|
|
2381
|
-
return {
|
|
2382
|
-
callId: call.id,
|
|
2383
|
-
content: `[Auto denied] ${classification.reason}. Do not retry without asking.`,
|
|
2384
|
-
isError: true
|
|
2385
|
-
};
|
|
2386
|
-
}
|
|
2387
|
-
if (classification.decision === "auto-approve" && !requiresHardConfirmation) {
|
|
2407
|
+
if (gate.kind === "confirm") {
|
|
2408
|
+
if (gate.source === "danger" && gate.level === "write") {
|
|
2388
2409
|
this.printToolCall(call);
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
const wasTruncated = content !== rawContent;
|
|
2395
|
-
this.printToolResult(call.name, rawContent, false, wasTruncated);
|
|
2396
|
-
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "ok" });
|
|
2397
|
-
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2398
|
-
return { callId: call.id, content, isError: false };
|
|
2399
|
-
} catch (err) {
|
|
2400
|
-
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2401
|
-
this.printToolResult(call.name, message, true, false);
|
|
2402
|
-
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2403
|
-
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
2404
|
-
return { callId: call.id, content: message, isError: true };
|
|
2405
|
-
}
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
if (this.sessionAutoApprove && dangerLevel === "write" && !requiresHardConfirmation) {
|
|
2409
|
-
this.printToolCall(call);
|
|
2410
|
-
if (dangerLevel === "write") this.printDiffPreview(call);
|
|
2411
|
-
console.log(theme.warning(" \u26A1 Auto-approved (session /yolo mode)"));
|
|
2412
|
-
try {
|
|
2413
|
-
const rawContent = await runTool(tool, call.arguments, call.name);
|
|
2414
|
-
const content = truncateOutput(rawContent, call.name);
|
|
2415
|
-
const wasTruncated = content !== rawContent;
|
|
2416
|
-
this.printToolResult(call.name, rawContent, false, wasTruncated);
|
|
2417
|
-
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "ok" });
|
|
2418
|
-
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "ok" }, { configDir: this.hookConfigDir });
|
|
2419
|
-
return { callId: call.id, content, isError: false };
|
|
2420
|
-
} catch (err) {
|
|
2421
|
-
const message = err instanceof Error ? err.message : err && typeof err === "object" && "message" in err ? String(err.message) : String(err);
|
|
2422
|
-
this.printToolResult(call.name, message, true, false);
|
|
2423
|
-
runHook(this.hookConfig?.postToolExecution, { tool: call.name, status: "error" });
|
|
2424
|
-
runLifecycleHooks(this.hookConfig, "PostToolUse", { tool: call.name, status: "error", error: message }, { configDir: this.hookConfigDir });
|
|
2425
|
-
return { callId: call.id, content: message, isError: true };
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
if (dangerLevel === "write") {
|
|
2429
|
-
this.printToolCall(call);
|
|
2430
|
-
this.printDiffPreview(call);
|
|
2431
|
-
const confirmed = await this.confirm(call, dangerLevel);
|
|
2432
|
-
if (!confirmed) {
|
|
2433
|
-
return {
|
|
2434
|
-
callId: call.id,
|
|
2435
|
-
content: `[User cancelled] The user declined the ${call.name} operation. Do not retry without asking.`,
|
|
2436
|
-
isError: true
|
|
2437
|
-
};
|
|
2410
|
+
this.printDiffPreview(call);
|
|
2411
|
+
toolCallAlreadyPrinted = true;
|
|
2412
|
+
} else if (gate.source === "permission") {
|
|
2413
|
+
this.printToolCall(call);
|
|
2414
|
+
toolCallAlreadyPrinted = true;
|
|
2438
2415
|
}
|
|
2439
|
-
|
|
2440
|
-
const confirmed = await this.confirm(call, dangerLevel);
|
|
2416
|
+
const confirmed = await this.confirm(call, gate.level);
|
|
2441
2417
|
if (!confirmed) {
|
|
2442
2418
|
return {
|
|
2443
2419
|
callId: call.id,
|
|
2444
|
-
content:
|
|
2420
|
+
content: gate.source === "permission" ? gateMessages.permissionCancelled(call.name) : gateMessages.operationCancelled(call.name, gate.level),
|
|
2445
2421
|
isError: true
|
|
2446
2422
|
};
|
|
2447
2423
|
}
|
|
2448
|
-
this.printToolCall(call);
|
|
2449
|
-
} else {
|
|
2450
|
-
this.printToolCall(call);
|
|
2451
2424
|
}
|
|
2425
|
+
if (!toolCallAlreadyPrinted) this.printToolCall(call);
|
|
2452
2426
|
try {
|
|
2453
2427
|
const rawContent = await runTool(tool, call.arguments, call.name);
|
|
2454
2428
|
const content = truncateOutput(rawContent, call.name);
|
|
@@ -6997,6 +6971,9 @@ export {
|
|
|
6997
6971
|
groupCallsByPhase,
|
|
6998
6972
|
runSafePhases,
|
|
6999
6973
|
resolveWriteFileArgs,
|
|
6974
|
+
gateMessages,
|
|
6975
|
+
needsPermissionRequestHook,
|
|
6976
|
+
decideToolGate,
|
|
7000
6977
|
checkPermissionWithProfile,
|
|
7001
6978
|
formatPermissionProfileWarning,
|
|
7002
6979
|
checkNetworkPolicy,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
setPreferredAgentName,
|
|
17
17
|
truncateForPersist,
|
|
18
18
|
undoStack
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AA6PZRJO.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-TOH67ARY.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-VIDUFFHT.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-QL2QACHI.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-25VQORAZ.js";
|
|
113
113
|
|
|
114
114
|
// src/mcp/client.ts
|
|
115
115
|
import { spawn } from "child_process";
|
|
@@ -2393,7 +2393,7 @@ No tools match "${filter}".
|
|
|
2393
2393
|
const { join: join6 } = await import("path");
|
|
2394
2394
|
const { existsSync: existsSync6 } = await import("fs");
|
|
2395
2395
|
const { getGitRoot } = await import("./git-context-EXOEHQSF.js");
|
|
2396
|
-
const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-
|
|
2396
|
+
const { MCP_PROJECT_CONFIG_NAME } = await import("./constants-GBIMYBKD.js");
|
|
2397
2397
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
2398
2398
|
const cwd = process.cwd();
|
|
2399
2399
|
const projectRoot = getGitRoot(cwd) ?? cwd;
|
|
@@ -3497,7 +3497,7 @@ function createReviewCommands() {
|
|
|
3497
3497
|
usage: "/test [command|filter]",
|
|
3498
3498
|
async execute(args, ctx) {
|
|
3499
3499
|
try {
|
|
3500
|
-
const { executeTests } = await import("./run-tests-
|
|
3500
|
+
const { executeTests } = await import("./run-tests-CSAB2M4A.js");
|
|
3501
3501
|
const argStr = args.join(" ").trim();
|
|
3502
3502
|
let testArgs = {};
|
|
3503
3503
|
if (argStr) {
|
|
@@ -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-NWM7CTQQ.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-TKG6BI6G.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-ALSSNFNK.js";
|
|
17
17
|
import {
|
|
18
18
|
ConfigManager
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2SQCGJ6H.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-25VQORAZ.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/ci.ts
|
|
25
25
|
import { execFileSync } from "child_process";
|
|
@@ -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-25VQORAZ.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-QL2QACHI.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
14
|
} from "./chunk-ALSSNFNK.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2SQCGJ6H.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-25VQORAZ.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-NP446QJS.js";
|
|
7
|
+
import "./chunk-TKG6BI6G.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
10
|
import "./chunk-ALSSNFNK.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-2SQCGJ6H.js";
|
|
12
12
|
import "./chunk-TEXT4DAT.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-25VQORAZ.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-VIDUFFHT.js";
|
|
6
|
+
import "./chunk-QL2QACHI.js";
|
|
7
7
|
import "./chunk-RS7SKYTS.js";
|
|
8
8
|
import "./chunk-ALSSNFNK.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2SQCGJ6H.js";
|
|
10
10
|
import "./chunk-TEXT4DAT.js";
|
|
11
11
|
import "./chunk-TU3L3PW7.js";
|
|
12
12
|
import "./chunk-HOSJZMQS.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-25VQORAZ.js";
|
|
15
15
|
export {
|
|
16
16
|
formatDoctorReport,
|
|
17
17
|
runDoctorCli
|