jinzd-ai-cli 0.4.259 → 0.4.260
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-74P2FQWX.js → batch-LBMJWMMO.js} +2 -2
- package/dist/{chunk-DLOOIAAD.js → chunk-26C6YZ3A.js} +1 -1
- package/dist/{chunk-3EWST6SE.js → chunk-2BGNEVS5.js} +4 -4
- package/dist/{chunk-FGONEVTP.js → chunk-3TE7ZWO5.js} +1 -1
- package/dist/{chunk-ZZ5WTHKY.js → chunk-63M2ELJS.js} +4 -4
- package/dist/{chunk-7DVIAK6J.js → chunk-AAWV4BP4.js} +2 -2
- package/dist/{chunk-KXAVUZKH.js → chunk-CLJKNKUN.js} +1 -1
- package/dist/{chunk-XPNKMDBH.js → chunk-FCPYMBTA.js} +6 -1
- package/dist/{chunk-BWJYDG3C.js → chunk-HBR33J6J.js} +1 -1
- package/dist/{chunk-G65I4DXP.js → chunk-K6WMQBUP.js} +1 -1
- package/dist/{chunk-4TDVLTX2.js → chunk-KRENSXPC.js} +1 -1
- package/dist/{chunk-4RPJQJBI.js → chunk-NEYNE6UE.js} +5 -5
- package/dist/{chunk-GDJII6TK.js → chunk-U2HN3EW6.js} +23 -5
- package/dist/{chunk-PSH5O44I.js → chunk-VJP2GLW5.js} +1 -1
- package/dist/{chunk-V5FB72RK.js → chunk-XTA3LSPQ.js} +1 -1
- package/dist/{chunk-3KYUE2MD.js → chunk-Y7UZSFGS.js} +1 -1
- package/dist/{ci-6BANR65W.js → ci-PSA7F4EI.js} +6 -6
- package/dist/{ci-format-2OVEQK6O.js → ci-format-WAHEZZMY.js} +2 -2
- package/dist/{constants-DKZEF3CE.js → constants-C55LGUR7.js} +1 -1
- package/dist/{doctor-cli-6MHA7Q7M.js → doctor-cli-YANDJBHC.js} +6 -6
- package/dist/electron-server.js +33 -11
- package/dist/{hub-L7RSDS4J.js → hub-CBOC3TT3.js} +1 -1
- package/dist/index.js +80 -47
- package/dist/{persistent-memory-I4JV3CME.js → persistent-memory-DUFOZTDV.js} +2 -2
- package/dist/{persistent-memory-WBR2DALU.js → persistent-memory-KEYVKD54.js} +2 -2
- package/dist/{pr-UNCWDVN3.js → pr-T6KCK5DT.js} +6 -6
- package/dist/{run-tests-XBODGDFO.js → run-tests-K43DLTA3.js} +2 -2
- package/dist/{run-tests-HFT5RUXF.js → run-tests-S2RLPMCR.js} +2 -2
- package/dist/{server-RNBKZ6TP.js → server-GTRCCOXN.js} +6 -6
- package/dist/{server-ILKG2672.js → server-SV3TV5BJ.js} +13 -13
- package/dist/{task-orchestrator-GXP5HNBZ.js → task-orchestrator-DW5AWW7J.js} +6 -6
- package/dist/{usage-KCPH75KI.js → usage-BP442V2Q.js} +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K6WMQBUP.js";
|
|
5
5
|
import "./chunk-TU3L3PW7.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-KRENSXPC.js";
|
|
7
7
|
import {
|
|
8
8
|
atomicWriteFileSync
|
|
9
9
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VJP2GLW5.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
} from "./chunk-HLWUDRBO.js";
|
|
11
11
|
import {
|
|
12
12
|
ProviderRegistry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U2HN3EW6.js";
|
|
14
14
|
import {
|
|
15
15
|
ConfigManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-K6WMQBUP.js";
|
|
17
17
|
import {
|
|
18
18
|
VERSION
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KRENSXPC.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/ci.ts
|
|
22
22
|
import { execFileSync } from "child_process";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ProviderRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-U2HN3EW6.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K6WMQBUP.js";
|
|
8
8
|
import {
|
|
9
9
|
getActivePluginAssets,
|
|
10
10
|
getPendingHookTrust,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
listHooks,
|
|
15
15
|
listInstalledPlugins,
|
|
16
16
|
resetStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Y7UZSFGS.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-KRENSXPC.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NEYNE6UE.js";
|
|
5
5
|
import {
|
|
6
6
|
APP_NAME,
|
|
7
7
|
CONFIG_DIR_NAME,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MCP_PROTOCOL_VERSION,
|
|
12
12
|
MCP_TOOL_PREFIX,
|
|
13
13
|
VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KRENSXPC.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFileSync
|
|
17
17
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -770,7 +770,7 @@ async function consumeToolCallStream(stream, hooks = {}) {
|
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
} catch (err) {
|
|
773
|
-
if (
|
|
773
|
+
if (isAbortError(err)) {
|
|
774
774
|
aborted = true;
|
|
775
775
|
} else {
|
|
776
776
|
throw err;
|
|
@@ -864,6 +864,10 @@ var BudgetWarner = class {
|
|
|
864
864
|
return null;
|
|
865
865
|
}
|
|
866
866
|
};
|
|
867
|
+
function isAbortError(err) {
|
|
868
|
+
if (!(err instanceof Error)) return false;
|
|
869
|
+
return err.name === "AbortError" || err.name === "APIUserAbortError" || err.message.includes("aborted");
|
|
870
|
+
}
|
|
867
871
|
var EMPTY_RESPONSE_NUDGE = "Your previous response was empty \u2014 no text and no tool calls. This usually means the context window is nearly full. Please either: (1) continue the task by calling the next tool you need, or (2) give a concise final text summary of what has been accomplished so far and what remains. Do NOT repeat earlier long outputs.";
|
|
868
872
|
var LENGTH_LIMIT_NUDGE = "Your previous attempt hit the model output token limit (finish_reason=length) before producing ANY answer text or tool call \u2014 the entire output budget was consumed by extended reasoning. Retrying the same way will fail identically. Do NOT reason at length again: start producing output immediately. If the deliverable is long, do NOT try to emit it in one response \u2014 write it to disk in several smaller write_file calls (part 1, part 2, ...), each well under the output limit, and keep any thinking short.";
|
|
869
873
|
function describeFinishReason(fr) {
|
|
@@ -1171,6 +1175,7 @@ export {
|
|
|
1171
1175
|
parseToolCallArguments,
|
|
1172
1176
|
buildTruncatedArgumentsError,
|
|
1173
1177
|
consumeToolCallStream,
|
|
1178
|
+
isAbortError,
|
|
1174
1179
|
accumulateUsage,
|
|
1175
1180
|
buildRoundBudgetHint,
|
|
1176
1181
|
runAgentLoop,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
searchPersistentMemories,
|
|
8
8
|
touchMemoryReferences,
|
|
9
9
|
updateMemoryEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3TE7ZWO5.js";
|
|
11
11
|
import {
|
|
12
12
|
indexProject
|
|
13
13
|
} from "./chunk-GLSR2NR3.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
runHook,
|
|
24
24
|
runLifecycleHooks,
|
|
25
25
|
runTool
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Y7UZSFGS.js";
|
|
27
27
|
import {
|
|
28
28
|
buildTruncatedArgumentsError,
|
|
29
29
|
getDangerLevel,
|
|
30
30
|
isFileWriteTool,
|
|
31
31
|
runLeanAgentLoop
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FCPYMBTA.js";
|
|
33
33
|
import {
|
|
34
34
|
EnvLoader,
|
|
35
35
|
NetworkError,
|
|
@@ -40,14 +40,14 @@ import {
|
|
|
40
40
|
} from "./chunk-4BKXL7SM.js";
|
|
41
41
|
import {
|
|
42
42
|
runTestsTool
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-HBR33J6J.js";
|
|
44
44
|
import {
|
|
45
45
|
CONFIG_DIR_NAME,
|
|
46
46
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
47
47
|
SUBAGENT_ALLOWED_TOOLS,
|
|
48
48
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
49
49
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-KRENSXPC.js";
|
|
51
51
|
import {
|
|
52
52
|
loadChatIndex,
|
|
53
53
|
searchChatMemory
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
detectsHallucinatedFileOp,
|
|
4
4
|
parseToolCallArguments,
|
|
5
5
|
schemaToJsonSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FCPYMBTA.js";
|
|
7
7
|
import {
|
|
8
8
|
AuthError,
|
|
9
9
|
ProviderError,
|
|
@@ -230,7 +230,8 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
230
230
|
max_tokens: request.maxTokens ?? 8192,
|
|
231
231
|
temperature,
|
|
232
232
|
thinking
|
|
233
|
-
|
|
233
|
+
// 非流式路径必须收 signal,否则 Ctrl+C 期间请求不可中断(同 openai-compatible 的同类遗漏)
|
|
234
|
+
}, { signal: request.signal });
|
|
234
235
|
const content = this.extractContent(response.content);
|
|
235
236
|
return {
|
|
236
237
|
content,
|
|
@@ -309,7 +310,8 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
309
310
|
max_tokens: request.maxTokens ?? 8192,
|
|
310
311
|
temperature,
|
|
311
312
|
thinking
|
|
312
|
-
|
|
313
|
+
// 轮次耗尽的总结轮对所有 provider 都走这条非流式路径——漏 signal 则 Ctrl+C 无效
|
|
314
|
+
}, { signal: request.signal });
|
|
313
315
|
const usage = this.extractUsage(response.usage);
|
|
314
316
|
const toolUseBlocks = response.content.filter(
|
|
315
317
|
(b) => b.type === "tool_use"
|
|
@@ -1077,6 +1079,17 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1077
1079
|
}
|
|
1078
1080
|
return msgs;
|
|
1079
1081
|
}
|
|
1082
|
+
/**
|
|
1083
|
+
* 非流式请求必须把 `request.signal` 交给 SDK —— 否则 Ctrl+C 完全无效。
|
|
1084
|
+
*
|
|
1085
|
+
* 实战(v0.4.260):东叔按建议把 `timeouts.deepseek` 提到 900000 后出卷,第 3 轮等了
|
|
1086
|
+
* 11 分钟,**按 Ctrl+C 退不出去**。DeepSeek/Kimi 的 `enableStreamingToolCalls=false`
|
|
1087
|
+
* 让整个 agentic 循环都走 `chatWithTools()` 这条阻塞路径,而这里此前只传了 `timeout`、
|
|
1088
|
+
* 没传 `signal`:REPL 的 AbortController 一路传到 `request.signal` 就断在这一跳,
|
|
1089
|
+
* 请求无法取消;`consumeToolCallStream()` 又只在**事件之间**检查 aborted,而回退路径
|
|
1090
|
+
* 要等这个 await 返回后才会吐第一个事件 —— 于是中断只能等满超时(被我调高到 15 分钟)。
|
|
1091
|
+
* 两个流式方法本来就传了 signal,唯独两个非流式方法漏了,属同一处遗漏的两半。
|
|
1092
|
+
*/
|
|
1080
1093
|
async chat(request) {
|
|
1081
1094
|
try {
|
|
1082
1095
|
const response = await this.client.chat.completions.create({
|
|
@@ -1087,7 +1100,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1087
1100
|
stream: false,
|
|
1088
1101
|
...request.thinking ? { thinking: { type: "enabled" } } : {}
|
|
1089
1102
|
}, {
|
|
1090
|
-
timeout: request.timeout ?? this.defaultTimeout
|
|
1103
|
+
timeout: request.timeout ?? this.defaultTimeout,
|
|
1104
|
+
signal: request.signal
|
|
1091
1105
|
});
|
|
1092
1106
|
const firstChoice = response.choices?.[0];
|
|
1093
1107
|
if (!firstChoice) {
|
|
@@ -1193,7 +1207,9 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1193
1207
|
stream: false,
|
|
1194
1208
|
...request.thinking ? { thinking: { type: "enabled" } } : {}
|
|
1195
1209
|
}, {
|
|
1196
|
-
timeout: request.timeout ?? this.defaultTimeout
|
|
1210
|
+
timeout: request.timeout ?? this.defaultTimeout,
|
|
1211
|
+
// 非流式路径同样必须收 signal,否则 Ctrl+C 期间整个请求不可中断(见 chat() 上方注释)
|
|
1212
|
+
signal: request.signal
|
|
1197
1213
|
});
|
|
1198
1214
|
const firstChoice = response.choices?.[0];
|
|
1199
1215
|
if (!firstChoice) {
|
|
@@ -1449,6 +1465,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
1449
1465
|
}
|
|
1450
1466
|
}
|
|
1451
1467
|
wrapError(err) {
|
|
1468
|
+
if (err instanceof OpenAI.APIUserAbortError) return err;
|
|
1469
|
+
if (err instanceof Error && err.name === "AbortError") return err;
|
|
1452
1470
|
if (err instanceof OpenAI.AuthenticationError) {
|
|
1453
1471
|
return new AuthError(this.info.id);
|
|
1454
1472
|
}
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-2BGNEVS5.js";
|
|
7
|
+
import "./chunk-VJP2GLW5.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-U2HN3EW6.js";
|
|
10
|
+
import "./chunk-K6WMQBUP.js";
|
|
11
|
+
import "./chunk-FCPYMBTA.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-KRENSXPC.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
export {
|
|
16
16
|
CI_COMMENT_MARKER,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-63M2ELJS.js";
|
|
6
|
+
import "./chunk-U2HN3EW6.js";
|
|
7
|
+
import "./chunk-K6WMQBUP.js";
|
|
8
|
+
import "./chunk-Y7UZSFGS.js";
|
|
9
|
+
import "./chunk-FCPYMBTA.js";
|
|
10
10
|
import "./chunk-TU3L3PW7.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-KRENSXPC.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
14
|
export {
|
|
15
15
|
formatDoctorReport,
|
package/dist/electron-server.js
CHANGED
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
touchMemoryReferences,
|
|
35
35
|
updateMemoryApproval,
|
|
36
36
|
updateMemoryEntry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-CLJKNKUN.js";
|
|
38
38
|
import {
|
|
39
39
|
redactJson,
|
|
40
40
|
scanString
|
|
41
41
|
} from "./chunk-YVTASHS5.js";
|
|
42
42
|
import {
|
|
43
43
|
runTestsTool
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-XTA3LSPQ.js";
|
|
45
45
|
import {
|
|
46
46
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
47
47
|
APP_NAME,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
SUBAGENT_MAX_ROUNDS_LIMIT,
|
|
74
74
|
VERSION,
|
|
75
75
|
buildUserIdentityPrompt
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-26C6YZ3A.js";
|
|
77
77
|
import {
|
|
78
78
|
hasSemanticIndex,
|
|
79
79
|
semanticSearch
|
|
@@ -987,7 +987,8 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
987
987
|
max_tokens: request.maxTokens ?? 8192,
|
|
988
988
|
temperature,
|
|
989
989
|
thinking
|
|
990
|
-
|
|
990
|
+
// 非流式路径必须收 signal,否则 Ctrl+C 期间请求不可中断(同 openai-compatible 的同类遗漏)
|
|
991
|
+
}, { signal: request.signal });
|
|
991
992
|
const content = this.extractContent(response.content);
|
|
992
993
|
return {
|
|
993
994
|
content,
|
|
@@ -1066,7 +1067,8 @@ var ClaudeProvider = class extends BaseProvider {
|
|
|
1066
1067
|
max_tokens: request.maxTokens ?? 8192,
|
|
1067
1068
|
temperature,
|
|
1068
1069
|
thinking
|
|
1069
|
-
|
|
1070
|
+
// 轮次耗尽的总结轮对所有 provider 都走这条非流式路径——漏 signal 则 Ctrl+C 无效
|
|
1071
|
+
}, { signal: request.signal });
|
|
1070
1072
|
const usage = this.extractUsage(response.usage);
|
|
1071
1073
|
const toolUseBlocks = response.content.filter(
|
|
1072
1074
|
(b) => b.type === "tool_use"
|
|
@@ -2393,7 +2395,7 @@ async function consumeToolCallStream(stream, hooks = {}) {
|
|
|
2393
2395
|
}
|
|
2394
2396
|
}
|
|
2395
2397
|
} catch (err) {
|
|
2396
|
-
if (
|
|
2398
|
+
if (isAbortError(err)) {
|
|
2397
2399
|
aborted = true;
|
|
2398
2400
|
} else {
|
|
2399
2401
|
throw err;
|
|
@@ -2487,6 +2489,10 @@ var BudgetWarner = class {
|
|
|
2487
2489
|
return null;
|
|
2488
2490
|
}
|
|
2489
2491
|
};
|
|
2492
|
+
function isAbortError(err) {
|
|
2493
|
+
if (!(err instanceof Error)) return false;
|
|
2494
|
+
return err.name === "AbortError" || err.name === "APIUserAbortError" || err.message.includes("aborted");
|
|
2495
|
+
}
|
|
2490
2496
|
var EMPTY_RESPONSE_NUDGE = "Your previous response was empty \u2014 no text and no tool calls. This usually means the context window is nearly full. Please either: (1) continue the task by calling the next tool you need, or (2) give a concise final text summary of what has been accomplished so far and what remains. Do NOT repeat earlier long outputs.";
|
|
2491
2497
|
var LENGTH_LIMIT_NUDGE = "Your previous attempt hit the model output token limit (finish_reason=length) before producing ANY answer text or tool call \u2014 the entire output budget was consumed by extended reasoning. Retrying the same way will fail identically. Do NOT reason at length again: start producing output immediately. If the deliverable is long, do NOT try to emit it in one response \u2014 write it to disk in several smaller write_file calls (part 1, part 2, ...), each well under the output limit, and keep any thinking short.";
|
|
2492
2498
|
function describeFinishReason(fr) {
|
|
@@ -2916,6 +2922,17 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
2916
2922
|
}
|
|
2917
2923
|
return msgs;
|
|
2918
2924
|
}
|
|
2925
|
+
/**
|
|
2926
|
+
* 非流式请求必须把 `request.signal` 交给 SDK —— 否则 Ctrl+C 完全无效。
|
|
2927
|
+
*
|
|
2928
|
+
* 实战(v0.4.260):东叔按建议把 `timeouts.deepseek` 提到 900000 后出卷,第 3 轮等了
|
|
2929
|
+
* 11 分钟,**按 Ctrl+C 退不出去**。DeepSeek/Kimi 的 `enableStreamingToolCalls=false`
|
|
2930
|
+
* 让整个 agentic 循环都走 `chatWithTools()` 这条阻塞路径,而这里此前只传了 `timeout`、
|
|
2931
|
+
* 没传 `signal`:REPL 的 AbortController 一路传到 `request.signal` 就断在这一跳,
|
|
2932
|
+
* 请求无法取消;`consumeToolCallStream()` 又只在**事件之间**检查 aborted,而回退路径
|
|
2933
|
+
* 要等这个 await 返回后才会吐第一个事件 —— 于是中断只能等满超时(被我调高到 15 分钟)。
|
|
2934
|
+
* 两个流式方法本来就传了 signal,唯独两个非流式方法漏了,属同一处遗漏的两半。
|
|
2935
|
+
*/
|
|
2919
2936
|
async chat(request) {
|
|
2920
2937
|
try {
|
|
2921
2938
|
const response = await this.client.chat.completions.create({
|
|
@@ -2926,7 +2943,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
2926
2943
|
stream: false,
|
|
2927
2944
|
...request.thinking ? { thinking: { type: "enabled" } } : {}
|
|
2928
2945
|
}, {
|
|
2929
|
-
timeout: request.timeout ?? this.defaultTimeout
|
|
2946
|
+
timeout: request.timeout ?? this.defaultTimeout,
|
|
2947
|
+
signal: request.signal
|
|
2930
2948
|
});
|
|
2931
2949
|
const firstChoice = response.choices?.[0];
|
|
2932
2950
|
if (!firstChoice) {
|
|
@@ -3032,7 +3050,9 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
3032
3050
|
stream: false,
|
|
3033
3051
|
...request.thinking ? { thinking: { type: "enabled" } } : {}
|
|
3034
3052
|
}, {
|
|
3035
|
-
timeout: request.timeout ?? this.defaultTimeout
|
|
3053
|
+
timeout: request.timeout ?? this.defaultTimeout,
|
|
3054
|
+
// 非流式路径同样必须收 signal,否则 Ctrl+C 期间整个请求不可中断(见 chat() 上方注释)
|
|
3055
|
+
signal: request.signal
|
|
3036
3056
|
});
|
|
3037
3057
|
const firstChoice = response.choices?.[0];
|
|
3038
3058
|
if (!firstChoice) {
|
|
@@ -3288,6 +3308,8 @@ var OpenAICompatibleProvider = class extends BaseProvider {
|
|
|
3288
3308
|
}
|
|
3289
3309
|
}
|
|
3290
3310
|
wrapError(err) {
|
|
3311
|
+
if (err instanceof OpenAI.APIUserAbortError) return err;
|
|
3312
|
+
if (err instanceof Error && err.name === "AbortError") return err;
|
|
3291
3313
|
if (err instanceof OpenAI.AuthenticationError) {
|
|
3292
3314
|
return new AuthError(this.info.id);
|
|
3293
3315
|
}
|
|
@@ -15313,7 +15335,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
15313
15335
|
Cost: ${formatCost(cost)}` : "";
|
|
15314
15336
|
let memoryLine = "";
|
|
15315
15337
|
try {
|
|
15316
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
15338
|
+
const { countPendingMemories } = await import("./persistent-memory-DUFOZTDV.js");
|
|
15317
15339
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
15318
15340
|
if (pending > 0) memoryLine = `
|
|
15319
15341
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -16122,7 +16144,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
16122
16144
|
async function handleTest(args, ctx) {
|
|
16123
16145
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
16124
16146
|
try {
|
|
16125
|
-
const { executeTests } = await import("./run-tests-
|
|
16147
|
+
const { executeTests } = await import("./run-tests-S2RLPMCR.js");
|
|
16126
16148
|
const argStr = args.join(" ").trim();
|
|
16127
16149
|
let testArgs = {};
|
|
16128
16150
|
if (argStr) {
|
|
@@ -16386,7 +16408,7 @@ async function handleMemory(args, ctx) {
|
|
|
16386
16408
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
16387
16409
|
} else if (sub === "export") {
|
|
16388
16410
|
if (args[1] === "md") {
|
|
16389
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
16411
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-DUFOZTDV.js");
|
|
16390
16412
|
ctx.send({
|
|
16391
16413
|
type: "export_data",
|
|
16392
16414
|
format: "md",
|
|
@@ -154,7 +154,7 @@ ${content}`);
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
157
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
157
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-DW5AWW7J.js");
|
|
158
158
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
159
159
|
let interrupted = false;
|
|
160
160
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
scanProject,
|
|
18
18
|
sessionHasMeaningfulContent,
|
|
19
19
|
setupProxy
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AAWV4BP4.js";
|
|
21
21
|
import {
|
|
22
22
|
computeCost,
|
|
23
23
|
formatCost,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
spawnAgentContext,
|
|
51
51
|
theme,
|
|
52
52
|
undoStack
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-NEYNE6UE.js";
|
|
54
54
|
import {
|
|
55
55
|
addMemoryEntry,
|
|
56
56
|
backupMemoryStore,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
touchMemoryReferences,
|
|
77
77
|
updateMemoryApproval,
|
|
78
78
|
updateMemoryEntry
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-3TE7ZWO5.js";
|
|
80
80
|
import "./chunk-GLSR2NR3.js";
|
|
81
81
|
import "./chunk-UUSRWSSX.js";
|
|
82
82
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -90,13 +90,13 @@ import {
|
|
|
90
90
|
formatDoctorReport,
|
|
91
91
|
loadContextFiles,
|
|
92
92
|
writeCrashLog
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-63M2ELJS.js";
|
|
94
94
|
import {
|
|
95
95
|
ProviderRegistry
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-U2HN3EW6.js";
|
|
97
97
|
import {
|
|
98
98
|
ConfigManager
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-K6WMQBUP.js";
|
|
100
100
|
import {
|
|
101
101
|
describePlugin,
|
|
102
102
|
getActivePluginAssets,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
trustHook,
|
|
114
114
|
trustPlugin,
|
|
115
115
|
untrustHook
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-Y7UZSFGS.js";
|
|
117
117
|
import {
|
|
118
118
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
119
119
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -127,12 +127,13 @@ import {
|
|
|
127
127
|
evaluateTeeContent,
|
|
128
128
|
extractWrittenFilePaths,
|
|
129
129
|
freshPriorContent,
|
|
130
|
+
isAbortError,
|
|
130
131
|
isCleanDocumentBody,
|
|
131
132
|
runAgentLoop,
|
|
132
133
|
stripOuterCodeFence,
|
|
133
134
|
stripToolCallReminder,
|
|
134
135
|
teeStreamErrorSummary
|
|
135
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-FCPYMBTA.js";
|
|
136
137
|
import {
|
|
137
138
|
AuthError,
|
|
138
139
|
ProviderError,
|
|
@@ -146,7 +147,7 @@ import {
|
|
|
146
147
|
import {
|
|
147
148
|
fileCheckpoints
|
|
148
149
|
} from "./chunk-4BKXL7SM.js";
|
|
149
|
-
import "./chunk-
|
|
150
|
+
import "./chunk-HBR33J6J.js";
|
|
150
151
|
import {
|
|
151
152
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
152
153
|
AUTHOR,
|
|
@@ -165,7 +166,7 @@ import {
|
|
|
165
166
|
SKILLS_DIR_NAME,
|
|
166
167
|
VERSION,
|
|
167
168
|
buildUserIdentityPrompt
|
|
168
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-KRENSXPC.js";
|
|
169
170
|
import {
|
|
170
171
|
buildChatIndex,
|
|
171
172
|
clearChatIndex,
|
|
@@ -1397,7 +1398,7 @@ No tools match "${filter}".
|
|
|
1397
1398
|
const { join: join6 } = await import("path");
|
|
1398
1399
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1399
1400
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1400
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1401
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-C55LGUR7.js");
|
|
1401
1402
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1402
1403
|
const cwd = process.cwd();
|
|
1403
1404
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2376,7 +2377,7 @@ function createReviewCommands() {
|
|
|
2376
2377
|
usage: "/test [command|filter]",
|
|
2377
2378
|
async execute(args, ctx) {
|
|
2378
2379
|
try {
|
|
2379
|
-
const { executeTests } = await import("./run-tests-
|
|
2380
|
+
const { executeTests } = await import("./run-tests-K43DLTA3.js");
|
|
2380
2381
|
const argStr = args.join(" ").trim();
|
|
2381
2382
|
let testArgs = {};
|
|
2382
2383
|
if (argStr) {
|
|
@@ -6877,6 +6878,28 @@ Session '${this.resumeSessionId}' not found.
|
|
|
6877
6878
|
* 流式生成开始前调用:创建 AbortController,监听 ESC 键(0x1b)和 Ctrl+C(0x03)原始字节。
|
|
6878
6879
|
* rl.pause() 会暂停 stdin,这里临时恢复以接收原始键盘字节。
|
|
6879
6880
|
*/
|
|
6881
|
+
/**
|
|
6882
|
+
* 把一次**非流式**(阻塞式)模型调用包成可中断的。
|
|
6883
|
+
*
|
|
6884
|
+
* v0.4.260:非流式分支此前既没装键盘监听器、也没把 signal 传下去——
|
|
6885
|
+
* DeepSeek/Kimi(`supportsStreamingTools=false`)的每一轮都走这条路,于是 Ctrl+C
|
|
6886
|
+
* 在整个请求期间毫无作用(实测把 timeout 提到 15 分钟后,等 11 分钟退不出去)。
|
|
6887
|
+
* 中断视为用户主动取消,不当错误上抛:置全局 interrupt 标记后交给 onAbort 收尾。
|
|
6888
|
+
*/
|
|
6889
|
+
async withInterruptibleCall(run, onAbort) {
|
|
6890
|
+
const ac = this.setupStreamInterrupt();
|
|
6891
|
+
try {
|
|
6892
|
+
return await run(ac.signal);
|
|
6893
|
+
} catch (err) {
|
|
6894
|
+
if (isAbortError(err) || ac.signal.aborted) {
|
|
6895
|
+
requestInterrupt();
|
|
6896
|
+
return onAbort();
|
|
6897
|
+
}
|
|
6898
|
+
throw err;
|
|
6899
|
+
} finally {
|
|
6900
|
+
this.teardownStreamInterrupt();
|
|
6901
|
+
}
|
|
6902
|
+
}
|
|
6880
6903
|
setupStreamInterrupt() {
|
|
6881
6904
|
const ac = new AbortController();
|
|
6882
6905
|
this.streamAbortController = ac;
|
|
@@ -7220,42 +7243,52 @@ ${mcpBudgetNote}` : "");
|
|
|
7220
7243
|
this.teardownStreamInterrupt();
|
|
7221
7244
|
}
|
|
7222
7245
|
}
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7246
|
+
return this.withInterruptibleCall(
|
|
7247
|
+
(signal) => withFallback(
|
|
7248
|
+
this.currentProvider,
|
|
7249
|
+
effectiveModel,
|
|
7250
|
+
this.providers,
|
|
7251
|
+
fallbackOpts,
|
|
7252
|
+
(p, m) => p.chatWithTools(
|
|
7253
|
+
{ ...chatRequest, model: m, signal },
|
|
7254
|
+
toolDefs
|
|
7255
|
+
)
|
|
7256
|
+
),
|
|
7257
|
+
// 中断:以 host-stop 正常收尾,不为一次主动取消喷 provider 报错
|
|
7258
|
+
() => ({ toolCalls: [], content: "", stopLoop: true })
|
|
7229
7259
|
);
|
|
7230
|
-
return result;
|
|
7231
7260
|
},
|
|
7232
7261
|
// ── 轮次耗尽总结:空工具列表强制纯文本 ──
|
|
7233
7262
|
callSummary: async (summaryExtra) => {
|
|
7234
7263
|
spinner.stop();
|
|
7235
7264
|
spinner.start("Generating summary...");
|
|
7236
7265
|
try {
|
|
7237
|
-
|
|
7238
|
-
{
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7266
|
+
return await this.withInterruptibleCall(
|
|
7267
|
+
async (signal) => {
|
|
7268
|
+
const r = await provider.chatWithTools(
|
|
7269
|
+
{
|
|
7270
|
+
messages: apiMessages,
|
|
7271
|
+
model: effectiveModel,
|
|
7272
|
+
systemPrompt,
|
|
7273
|
+
systemPromptVolatile,
|
|
7274
|
+
stream: false,
|
|
7275
|
+
temperature: modelParams.temperature,
|
|
7276
|
+
maxTokens: modelParams.maxTokens,
|
|
7277
|
+
timeout: modelParams.timeout,
|
|
7278
|
+
thinking: modelParams.thinking,
|
|
7279
|
+
thinkingBudget: modelParams.thinkingBudget,
|
|
7280
|
+
signal,
|
|
7281
|
+
_extraMessages: summaryExtra
|
|
7282
|
+
},
|
|
7283
|
+
[]
|
|
7284
|
+
// 不提供任何工具,强制 AI 返回纯文本
|
|
7285
|
+
);
|
|
7286
|
+
return "content" in r ? { content: r.content, usage: r.usage } : { usage: r.usage };
|
|
7250
7287
|
},
|
|
7251
|
-
|
|
7252
|
-
// 不提供任何工具,强制 AI 返回纯文本
|
|
7288
|
+
() => ({})
|
|
7253
7289
|
);
|
|
7290
|
+
} finally {
|
|
7254
7291
|
spinner.stop();
|
|
7255
|
-
return "content" in summaryResult ? { content: summaryResult.content, usage: summaryResult.usage } : { usage: summaryResult.usage };
|
|
7256
|
-
} catch (err) {
|
|
7257
|
-
spinner.stop();
|
|
7258
|
-
throw err;
|
|
7259
7292
|
}
|
|
7260
7293
|
},
|
|
7261
7294
|
executeTools: async (toolCalls, extraMessages) => {
|
|
@@ -8033,7 +8066,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
8033
8066
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
8034
8067
|
process.exit(1);
|
|
8035
8068
|
}
|
|
8036
|
-
const { startWebServer } = await import("./server-
|
|
8069
|
+
const { startWebServer } = await import("./server-SV3TV5BJ.js");
|
|
8037
8070
|
await startWebServer({ port, host: options.host });
|
|
8038
8071
|
});
|
|
8039
8072
|
program.command("user [action] [username]").description("Manage Web UI users (list | create <name> | delete <name> | reset-password <name> | logout-all <name> | migrate <name>)").action(async (action, username) => {
|
|
@@ -8200,11 +8233,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
8200
8233
|
console.log(footer + "\n");
|
|
8201
8234
|
});
|
|
8202
8235
|
program.command("usage").description("Show token + cost usage grouped by provider/model (cross-session)").option("--days <n>", "Only the last N days (inclusive of today)").option("--month <ym>", "Only a specific month, format YYYY-MM (e.g. 2026-06)").option("--json", "Output as JSON (for scripting)").action(async (options) => {
|
|
8203
|
-
const { runUsageCli } = await import("./usage-
|
|
8236
|
+
const { runUsageCli } = await import("./usage-BP442V2Q.js");
|
|
8204
8237
|
await runUsageCli(options);
|
|
8205
8238
|
});
|
|
8206
8239
|
program.command("doctor").description("Health check: API keys, config, MCP, recent crashes, tool usage, disk usage").option("--json", "Output as JSON (for scripting)").option("--reset-stats", "Reset accumulated tool usage statistics").action(async (options) => {
|
|
8207
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
8240
|
+
const { runDoctorCli } = await import("./doctor-cli-YANDJBHC.js");
|
|
8208
8241
|
const argv = process.argv.slice(2);
|
|
8209
8242
|
await runDoctorCli({
|
|
8210
8243
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -8213,7 +8246,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
8213
8246
|
});
|
|
8214
8247
|
program.command("batch <action> [arg] [arg2]").description("Anthropic Message Batches: submit | list | status <id> | results <id> [out] | cancel <id>").option("--dry-run", "Parse and validate input without submitting (submit only)").action(async (action, arg, arg2, options) => {
|
|
8215
8248
|
try {
|
|
8216
|
-
const batch = await import("./batch-
|
|
8249
|
+
const batch = await import("./batch-LBMJWMMO.js");
|
|
8217
8250
|
switch (action) {
|
|
8218
8251
|
case "submit":
|
|
8219
8252
|
if (!arg) {
|
|
@@ -8256,7 +8289,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
8256
8289
|
}
|
|
8257
8290
|
});
|
|
8258
8291
|
program.command("mcp-serve").description("Start an MCP server over STDIO, exposing aicli's built-in tools to Claude Desktop / Cursor / other MCP clients").option("--allow-destructive", "Allow bash / run_interactive / task_create (always destructive in MCP mode)").option("--allow-outside-cwd", "Allow tool path arguments to escape the sandbox root \u2014 disabled by default").option("--tools <list>", "Comma-separated whitelist of tools to expose (default: all eligible tools)").option("--cwd <path>", "Working directory AND sandbox root (default: current directory)").action(async (options) => {
|
|
8259
|
-
const { startMcpServer } = await import("./server-
|
|
8292
|
+
const { startMcpServer } = await import("./server-GTRCCOXN.js");
|
|
8260
8293
|
await startMcpServer({
|
|
8261
8294
|
allowDestructive: !!options.allowDestructive,
|
|
8262
8295
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -8269,7 +8302,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8269
8302
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
8270
8303
|
process.exit(1);
|
|
8271
8304
|
}
|
|
8272
|
-
const { runPrCli } = await import("./pr-
|
|
8305
|
+
const { runPrCli } = await import("./pr-T6KCK5DT.js");
|
|
8273
8306
|
const result = await runPrCli({
|
|
8274
8307
|
action,
|
|
8275
8308
|
target,
|
|
@@ -8289,8 +8322,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
8289
8322
|
process.exit(result.exitCode);
|
|
8290
8323
|
});
|
|
8291
8324
|
program.command("ci").description("Headless PR review (code + security) \u2014 reads git/gh diff, optionally posts to PR. Designed for GitHub Actions.").option("--pr <num>", "PR number or URL; diff fetched via gh pr diff <value>", (v) => /^#?\d+$/.test(v) ? parseInt(v.replace(/^#/, ""), 10) : v).option("--base <ref>", "Base ref for git diff <ref>...HEAD (ignored when --pr set)").option("--post", "Post review as a PR comment (requires gh CLI + GH_TOKEN, needs --pr)").option("--no-update", "Always create a new comment instead of updating the previous aicli review").option("--skip-code", "Skip the code review section").option("--skip-security", "Skip the security review section").option("--detailed", "Use the detailed code-review prompt").option("--max-diff <n>", "Max diff chars sent to the model (default 30000)", (v) => parseInt(v, 10)).option("--provider <id>", "Override provider (default: config.defaultProvider)").option("--model <id>", "Override model").option("--dry-run", "Print result to stdout instead of posting (overrides --post)").option("--json", "Output a structured JSON report").option("--markdown", "Output Markdown report (default)").option("--sarif", "Output SARIF 2.1.0 for code scanning artifacts").option("--fail-on-security-high", "Fail when the security review contains HIGH/CRITICAL findings (default)").option("--no-fail-on-security-high", "Do not fail on security HIGH/CRITICAL findings").option("--fail-on-test-failure", "Fail when the report mentions test failures (default)").option("--no-fail-on-test-failure", "Do not fail on test failure findings").option("--fail-on-lint-failure", "Fail when the report mentions lint/typecheck failures (default)").option("--no-fail-on-lint-failure", "Do not fail on lint/typecheck failure findings").action(async (options) => {
|
|
8292
|
-
const { runCi } = await import("./ci-
|
|
8293
|
-
const { formatCiResult } = await import("./ci-format-
|
|
8325
|
+
const { runCi } = await import("./ci-PSA7F4EI.js");
|
|
8326
|
+
const { formatCiResult } = await import("./ci-format-WAHEZZMY.js");
|
|
8294
8327
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
8295
8328
|
if (formats > 1) {
|
|
8296
8329
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8448,7 +8481,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8448
8481
|
config.get("customProviders"),
|
|
8449
8482
|
config.getConfigDir()
|
|
8450
8483
|
);
|
|
8451
|
-
const { startHub } = await import("./hub-
|
|
8484
|
+
const { startHub } = await import("./hub-CBOC3TT3.js");
|
|
8452
8485
|
await startHub(
|
|
8453
8486
|
{
|
|
8454
8487
|
topic: topic ?? "",
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CLJKNKUN.js";
|
|
31
31
|
import "./chunk-YVTASHS5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-26C6YZ3A.js";
|
|
33
33
|
import "./chunk-6BUTA5VW.js";
|
|
34
34
|
export {
|
|
35
35
|
addMemoryEntry,
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3TE7ZWO5.js";
|
|
32
32
|
import "./chunk-HOSJZMQS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-KRENSXPC.js";
|
|
34
34
|
import "./chunk-B5TYJO7V.js";
|
|
35
35
|
import "./chunk-IW3Q7AE5.js";
|
|
36
36
|
export {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-2BGNEVS5.js";
|
|
6
|
+
import "./chunk-VJP2GLW5.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
} from "./chunk-HLWUDRBO.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U2HN3EW6.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-K6WMQBUP.js";
|
|
18
|
+
import "./chunk-FCPYMBTA.js";
|
|
19
19
|
import "./chunk-TU3L3PW7.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KRENSXPC.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/pr.ts
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NEYNE6UE.js";
|
|
5
|
+
import "./chunk-3TE7ZWO5.js";
|
|
6
6
|
import "./chunk-GLSR2NR3.js";
|
|
7
7
|
import "./chunk-UUSRWSSX.js";
|
|
8
8
|
import "./chunk-CKH4KQ4E.js";
|
|
9
9
|
import "./chunk-BXP6YZ2P.js";
|
|
10
10
|
import {
|
|
11
11
|
runTool
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y7UZSFGS.js";
|
|
13
13
|
import {
|
|
14
14
|
getDangerLevel,
|
|
15
15
|
schemaToJsonSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FCPYMBTA.js";
|
|
17
17
|
import "./chunk-TU3L3PW7.js";
|
|
18
18
|
import "./chunk-HOSJZMQS.js";
|
|
19
19
|
import "./chunk-4BKXL7SM.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-HBR33J6J.js";
|
|
21
21
|
import {
|
|
22
22
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KRENSXPC.js";
|
|
24
24
|
import "./chunk-6RPGQ5CG.js";
|
|
25
25
|
import "./chunk-KHYD3WXE.js";
|
|
26
26
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
scanDirTree,
|
|
24
24
|
scanProject,
|
|
25
25
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-AAWV4BP4.js";
|
|
27
27
|
import {
|
|
28
28
|
computeCost,
|
|
29
29
|
formatCost,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
spawnAgentContext,
|
|
65
65
|
truncateOutput,
|
|
66
66
|
undoStack
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-NEYNE6UE.js";
|
|
68
68
|
import {
|
|
69
69
|
addMemoryEntry,
|
|
70
70
|
clearMemoryEntries,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
parseWritableScope,
|
|
79
79
|
updateMemoryApproval,
|
|
80
80
|
updateMemoryEntry
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-3TE7ZWO5.js";
|
|
82
82
|
import "./chunk-GLSR2NR3.js";
|
|
83
83
|
import "./chunk-UUSRWSSX.js";
|
|
84
84
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -91,13 +91,13 @@ import {
|
|
|
91
91
|
buildDoctorReport,
|
|
92
92
|
formatDoctorReport,
|
|
93
93
|
loadContextFiles
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-63M2ELJS.js";
|
|
95
95
|
import {
|
|
96
96
|
ProviderRegistry
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-U2HN3EW6.js";
|
|
98
98
|
import {
|
|
99
99
|
ConfigManager
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-K6WMQBUP.js";
|
|
101
101
|
import {
|
|
102
102
|
describePlugin,
|
|
103
103
|
getActivePluginAssets,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
runTool,
|
|
113
113
|
setPluginEnabled,
|
|
114
114
|
trustPlugin
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-Y7UZSFGS.js";
|
|
116
116
|
import {
|
|
117
117
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
118
118
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
stripOuterCodeFence,
|
|
130
130
|
stripToolCallReminder,
|
|
131
131
|
teeStreamErrorSummary
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-FCPYMBTA.js";
|
|
133
133
|
import "./chunk-TU3L3PW7.js";
|
|
134
134
|
import {
|
|
135
135
|
formatGitContextForPrompt,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
getGitRoot
|
|
138
138
|
} from "./chunk-HOSJZMQS.js";
|
|
139
139
|
import "./chunk-4BKXL7SM.js";
|
|
140
|
-
import "./chunk-
|
|
140
|
+
import "./chunk-HBR33J6J.js";
|
|
141
141
|
import {
|
|
142
142
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
143
143
|
AUTHOR,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
SKILLS_DIR_NAME,
|
|
154
154
|
VERSION,
|
|
155
155
|
buildUserIdentityPrompt
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-KRENSXPC.js";
|
|
157
157
|
import "./chunk-6RPGQ5CG.js";
|
|
158
158
|
import "./chunk-KHYD3WXE.js";
|
|
159
159
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -815,7 +815,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
815
815
|
Cost: ${formatCost(cost)}` : "";
|
|
816
816
|
let memoryLine = "";
|
|
817
817
|
try {
|
|
818
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
818
|
+
const { countPendingMemories } = await import("./persistent-memory-KEYVKD54.js");
|
|
819
819
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
820
820
|
if (pending > 0) memoryLine = `
|
|
821
821
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1624,7 +1624,7 @@ async function handleSecurityReview(args, ctx) {
|
|
|
1624
1624
|
async function handleTest(args, ctx) {
|
|
1625
1625
|
ctx.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
1626
1626
|
try {
|
|
1627
|
-
const { executeTests } = await import("./run-tests-
|
|
1627
|
+
const { executeTests } = await import("./run-tests-K43DLTA3.js");
|
|
1628
1628
|
const argStr = args.join(" ").trim();
|
|
1629
1629
|
let testArgs = {};
|
|
1630
1630
|
if (argStr) {
|
|
@@ -1888,7 +1888,7 @@ async function handleMemory(args, ctx) {
|
|
|
1888
1888
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
1889
1889
|
} else if (sub === "export") {
|
|
1890
1890
|
if (args[1] === "md") {
|
|
1891
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
1891
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-KEYVKD54.js");
|
|
1892
1892
|
ctx.send({
|
|
1893
1893
|
type: "export_data",
|
|
1894
1894
|
format: "md",
|
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-NEYNE6UE.js";
|
|
7
|
+
import "./chunk-3TE7ZWO5.js";
|
|
8
8
|
import "./chunk-GLSR2NR3.js";
|
|
9
9
|
import "./chunk-UUSRWSSX.js";
|
|
10
10
|
import "./chunk-CKH4KQ4E.js";
|
|
11
11
|
import "./chunk-BXP6YZ2P.js";
|
|
12
12
|
import {
|
|
13
13
|
runTool
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y7UZSFGS.js";
|
|
15
15
|
import {
|
|
16
16
|
getDangerLevel,
|
|
17
17
|
runLeanAgentLoop
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FCPYMBTA.js";
|
|
19
19
|
import "./chunk-TU3L3PW7.js";
|
|
20
20
|
import "./chunk-HOSJZMQS.js";
|
|
21
21
|
import "./chunk-4BKXL7SM.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-HBR33J6J.js";
|
|
23
23
|
import {
|
|
24
24
|
SUBAGENT_ALLOWED_TOOLS
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KRENSXPC.js";
|
|
26
26
|
import "./chunk-6RPGQ5CG.js";
|
|
27
27
|
import "./chunk-KHYD3WXE.js";
|
|
28
28
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-EZ6QLHOS.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-K6WMQBUP.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-KRENSXPC.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|