jinzd-ai-cli 0.4.265 → 0.4.266
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-C7SHXRQ2.js → batch-FQU6HK3Z.js} +2 -2
- package/dist/{chunk-LZBD2VGJ.js → chunk-3O4VLKD4.js} +1 -1
- package/dist/{chunk-X6NWK2YK.js → chunk-CEJUB4YV.js} +1 -1
- package/dist/{chunk-M2RKBTVZ.js → chunk-FA3HGXXM.js} +1 -1
- package/dist/{chunk-E3JRGJCJ.js → chunk-FIDEG2PG.js} +3 -3
- package/dist/{chunk-YXYOLPDB.js → chunk-GWOZET2E.js} +1 -1
- package/dist/{chunk-Y7KJPNQI.js → chunk-LGJ7EX2F.js} +1 -1
- package/dist/{chunk-NJLPA6S4.js → chunk-LHY7ST6X.js} +1 -1
- package/dist/{chunk-YDTYBUAB.js → chunk-N2E6GFLZ.js} +1 -1
- package/dist/{chunk-2MR7EP24.js → chunk-QW76RX6G.js} +1 -1
- package/dist/{chunk-IFTUBTDA.js → chunk-TJNBSR3I.js} +1 -1
- package/dist/{chunk-CVI3LSGR.js → chunk-UCHND2K6.js} +65 -2
- package/dist/{chunk-NOS3QV7G.js → chunk-XEVURCAM.js} +3 -3
- package/dist/{chunk-TJBG4F2R.js → chunk-Y2X24VYB.js} +4 -4
- package/dist/{ci-TDXLI3OM.js → ci-GZH3QMME.js} +4 -4
- package/dist/{ci-format-AFX2LP4Y.js → ci-format-VKP2MGYJ.js} +2 -2
- package/dist/{constants-66TQEDGO.js → constants-ICAF6I3J.js} +1 -1
- package/dist/{doctor-cli-GMCOGCDR.js → doctor-cli-CO6BJWRW.js} +4 -4
- package/dist/electron-server.js +82 -26
- package/dist/{hub-2YXETHPY.js → hub-4APIRQ73.js} +1 -1
- package/dist/index.js +36 -70
- package/dist/{persistent-memory-2DKCETB7.js → persistent-memory-YD3SHSUH.js} +2 -2
- package/dist/{persistent-memory-WTZO5CQ7.js → persistent-memory-YPO25MOP.js} +2 -2
- package/dist/{pr-Y2LDG3R7.js → pr-CDOPCAPK.js} +4 -4
- package/dist/{run-tests-FIUGDIDL.js → run-tests-4XRHKHN5.js} +2 -2
- package/dist/{run-tests-PWTNSUVP.js → run-tests-QNNP2HCD.js} +2 -2
- package/dist/{server-OZ4RFDFH.js → server-53GM3CRH.js} +26 -31
- package/dist/{server-ZCG5QD6P.js → server-B4A7LHZ5.js} +5 -5
- package/dist/{task-orchestrator-Q2L6JEUX.js → task-orchestrator-WNV6PT6Z.js} +5 -5
- package/dist/{usage-SDL5Z4CS.js → usage-E3FEYSBU.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-CEJUB4YV.js";
|
|
5
5
|
import "./chunk-TU3L3PW7.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-LGJ7EX2F.js";
|
|
7
7
|
import {
|
|
8
8
|
atomicWriteFileSync
|
|
9
9
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-AUEX6RNY.js";
|
|
5
5
|
import {
|
|
6
6
|
ConfigManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CEJUB4YV.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-QW76RX6G.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-LGJ7EX2F.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-Y2X24VYB.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-LGJ7EX2F.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteFileSync
|
|
17
17
|
} from "./chunk-IW3Q7AE5.js";
|
|
@@ -1065,6 +1065,68 @@ function clearDevState() {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
|
+
// src/core/think-command.ts
|
|
1069
|
+
var EFFORTS = /* @__PURE__ */ new Set(["low", "high", "max"]);
|
|
1070
|
+
function resolveEffective(state) {
|
|
1071
|
+
if (state.runtimeThinking !== null) return { effective: state.runtimeThinking, origin: "runtime override" };
|
|
1072
|
+
if (state.configuredThinking !== void 0) return { effective: state.configuredThinking, origin: "config" };
|
|
1073
|
+
return { effective: false, origin: "default" };
|
|
1074
|
+
}
|
|
1075
|
+
function effortLine(state, effort) {
|
|
1076
|
+
if (!state.supportsEffort) return `Reasoning effort: n/a for ${state.provider}`;
|
|
1077
|
+
const resolved = effort ?? state.runtimeEffort ?? state.configuredEffort;
|
|
1078
|
+
return `Reasoning effort: ${resolved ?? "high (provider default)"}`;
|
|
1079
|
+
}
|
|
1080
|
+
function applyThinkCommand(sub, state) {
|
|
1081
|
+
const key = (sub ?? "toggle").toLowerCase();
|
|
1082
|
+
const current = resolveEffective(state);
|
|
1083
|
+
const stay = (summary, details = []) => ({
|
|
1084
|
+
runtimeThinking: state.runtimeThinking,
|
|
1085
|
+
runtimeEffort: state.runtimeEffort,
|
|
1086
|
+
effective: current.effective,
|
|
1087
|
+
origin: current.origin,
|
|
1088
|
+
summary,
|
|
1089
|
+
details,
|
|
1090
|
+
changed: false
|
|
1091
|
+
});
|
|
1092
|
+
const enable = (effort) => ({
|
|
1093
|
+
runtimeThinking: true,
|
|
1094
|
+
runtimeEffort: effort ?? state.runtimeEffort,
|
|
1095
|
+
effective: true,
|
|
1096
|
+
origin: "runtime override",
|
|
1097
|
+
summary: effort && state.supportsEffort ? `Extended Thinking: ON (effort: ${effort})` : "Extended Thinking: ON",
|
|
1098
|
+
details: effort && !state.supportsEffort ? [`Note: ${state.provider} has no reasoning-effort levels \u2014 the level is ignored.`] : [],
|
|
1099
|
+
changed: true
|
|
1100
|
+
});
|
|
1101
|
+
const disable = () => ({
|
|
1102
|
+
runtimeThinking: false,
|
|
1103
|
+
// 刻意保留档位:重新开启时不该丢掉用户选过的档
|
|
1104
|
+
runtimeEffort: state.runtimeEffort,
|
|
1105
|
+
effective: false,
|
|
1106
|
+
origin: "runtime override",
|
|
1107
|
+
summary: "Extended Thinking: OFF",
|
|
1108
|
+
details: [],
|
|
1109
|
+
changed: true
|
|
1110
|
+
});
|
|
1111
|
+
if (key === "status") {
|
|
1112
|
+
const details = current.effective ? [effortLine(state, null)] : [
|
|
1113
|
+
"Enable with /think on | low | high | max, or set",
|
|
1114
|
+
"modelParams.<model>.thinking in ~/.aicli/config.json"
|
|
1115
|
+
];
|
|
1116
|
+
return stay(
|
|
1117
|
+
`Extended Thinking: ${current.effective ? "ON" : "OFF"} (${current.origin})`,
|
|
1118
|
+
details
|
|
1119
|
+
);
|
|
1120
|
+
}
|
|
1121
|
+
if (key === "on") return enable(null);
|
|
1122
|
+
if (key === "off") return disable();
|
|
1123
|
+
if (EFFORTS.has(key)) return enable(key);
|
|
1124
|
+
if (key === "toggle") {
|
|
1125
|
+
return current.effective ? disable() : enable(null);
|
|
1126
|
+
}
|
|
1127
|
+
return stay(`Unknown /think option "${sub}" \u2014 expected on | off | low | high | max | status`);
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1068
1130
|
// src/core/git-diff.ts
|
|
1069
1131
|
import { execFileSync } from "child_process";
|
|
1070
1132
|
function readGitDiff(options = {}) {
|
|
@@ -1077,6 +1139,7 @@ function readGitDiff(options = {}) {
|
|
|
1077
1139
|
}
|
|
1078
1140
|
|
|
1079
1141
|
export {
|
|
1142
|
+
applyThinkCommand,
|
|
1080
1143
|
readGitDiff,
|
|
1081
1144
|
scanDirTree,
|
|
1082
1145
|
scanProject,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TJNBSR3I.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-AUEX6RNY.js";
|
|
17
17
|
import {
|
|
18
18
|
ConfigManager
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CEJUB4YV.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/ci.ts
|
|
25
25
|
import { execFileSync } from "child_process";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
searchPersistentMemories,
|
|
8
8
|
touchMemoryReferences,
|
|
9
9
|
updateMemoryEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3O4VLKD4.js";
|
|
11
11
|
import {
|
|
12
12
|
indexProject
|
|
13
13
|
} from "./chunk-GLSR2NR3.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
runHook,
|
|
27
27
|
runLifecycleHooks,
|
|
28
28
|
runTool
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QW76RX6G.js";
|
|
30
30
|
import {
|
|
31
31
|
buildTruncatedArgumentsError,
|
|
32
32
|
getDangerLevel,
|
|
@@ -43,14 +43,14 @@ import {
|
|
|
43
43
|
} from "./chunk-4BKXL7SM.js";
|
|
44
44
|
import {
|
|
45
45
|
runTestsTool
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-N2E6GFLZ.js";
|
|
47
47
|
import {
|
|
48
48
|
CONFIG_DIR_NAME,
|
|
49
49
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
50
50
|
SUBAGENT_ALLOWED_TOOLS,
|
|
51
51
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
52
52
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
54
54
|
import {
|
|
55
55
|
loadChatIndex,
|
|
56
56
|
searchChatMemory
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
CI_COMMENT_MARKER,
|
|
4
4
|
countSeverity,
|
|
5
5
|
runCi
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-XEVURCAM.js";
|
|
7
|
+
import "./chunk-TJNBSR3I.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
10
|
import "./chunk-AUEX6RNY.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-CEJUB4YV.js";
|
|
12
12
|
import "./chunk-3OBY7WSS.js";
|
|
13
13
|
import "./chunk-TU3L3PW7.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-LGJ7EX2F.js";
|
|
15
15
|
import "./chunk-IW3Q7AE5.js";
|
|
16
16
|
export {
|
|
17
17
|
CI_COMMENT_MARKER,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FIDEG2PG.js";
|
|
6
6
|
import "./chunk-AUEX6RNY.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-CEJUB4YV.js";
|
|
8
|
+
import "./chunk-QW76RX6G.js";
|
|
9
9
|
import "./chunk-3OBY7WSS.js";
|
|
10
10
|
import "./chunk-TU3L3PW7.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-LGJ7EX2F.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-GWOZET2E.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-LHY7ST6X.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-FA3HGXXM.js";
|
|
77
77
|
import {
|
|
78
78
|
hasSemanticIndex,
|
|
79
79
|
semanticSearch
|
|
@@ -14881,6 +14881,68 @@ async function persistDiscussion(state2, config, defaultProvider, defaultModel)
|
|
|
14881
14881
|
return { id: session.id, path: join20(config.getHistoryDir(), `${session.id}.json`) };
|
|
14882
14882
|
}
|
|
14883
14883
|
|
|
14884
|
+
// src/core/think-command.ts
|
|
14885
|
+
var EFFORTS = /* @__PURE__ */ new Set(["low", "high", "max"]);
|
|
14886
|
+
function resolveEffective(state2) {
|
|
14887
|
+
if (state2.runtimeThinking !== null) return { effective: state2.runtimeThinking, origin: "runtime override" };
|
|
14888
|
+
if (state2.configuredThinking !== void 0) return { effective: state2.configuredThinking, origin: "config" };
|
|
14889
|
+
return { effective: false, origin: "default" };
|
|
14890
|
+
}
|
|
14891
|
+
function effortLine(state2, effort) {
|
|
14892
|
+
if (!state2.supportsEffort) return `Reasoning effort: n/a for ${state2.provider}`;
|
|
14893
|
+
const resolved = effort ?? state2.runtimeEffort ?? state2.configuredEffort;
|
|
14894
|
+
return `Reasoning effort: ${resolved ?? "high (provider default)"}`;
|
|
14895
|
+
}
|
|
14896
|
+
function applyThinkCommand(sub, state2) {
|
|
14897
|
+
const key = (sub ?? "toggle").toLowerCase();
|
|
14898
|
+
const current = resolveEffective(state2);
|
|
14899
|
+
const stay = (summary, details = []) => ({
|
|
14900
|
+
runtimeThinking: state2.runtimeThinking,
|
|
14901
|
+
runtimeEffort: state2.runtimeEffort,
|
|
14902
|
+
effective: current.effective,
|
|
14903
|
+
origin: current.origin,
|
|
14904
|
+
summary,
|
|
14905
|
+
details,
|
|
14906
|
+
changed: false
|
|
14907
|
+
});
|
|
14908
|
+
const enable = (effort) => ({
|
|
14909
|
+
runtimeThinking: true,
|
|
14910
|
+
runtimeEffort: effort ?? state2.runtimeEffort,
|
|
14911
|
+
effective: true,
|
|
14912
|
+
origin: "runtime override",
|
|
14913
|
+
summary: effort && state2.supportsEffort ? `Extended Thinking: ON (effort: ${effort})` : "Extended Thinking: ON",
|
|
14914
|
+
details: effort && !state2.supportsEffort ? [`Note: ${state2.provider} has no reasoning-effort levels \u2014 the level is ignored.`] : [],
|
|
14915
|
+
changed: true
|
|
14916
|
+
});
|
|
14917
|
+
const disable = () => ({
|
|
14918
|
+
runtimeThinking: false,
|
|
14919
|
+
// 刻意保留档位:重新开启时不该丢掉用户选过的档
|
|
14920
|
+
runtimeEffort: state2.runtimeEffort,
|
|
14921
|
+
effective: false,
|
|
14922
|
+
origin: "runtime override",
|
|
14923
|
+
summary: "Extended Thinking: OFF",
|
|
14924
|
+
details: [],
|
|
14925
|
+
changed: true
|
|
14926
|
+
});
|
|
14927
|
+
if (key === "status") {
|
|
14928
|
+
const details = current.effective ? [effortLine(state2, null)] : [
|
|
14929
|
+
"Enable with /think on | low | high | max, or set",
|
|
14930
|
+
"modelParams.<model>.thinking in ~/.aicli/config.json"
|
|
14931
|
+
];
|
|
14932
|
+
return stay(
|
|
14933
|
+
`Extended Thinking: ${current.effective ? "ON" : "OFF"} (${current.origin})`,
|
|
14934
|
+
details
|
|
14935
|
+
);
|
|
14936
|
+
}
|
|
14937
|
+
if (key === "on") return enable(null);
|
|
14938
|
+
if (key === "off") return disable();
|
|
14939
|
+
if (EFFORTS.has(key)) return enable(key);
|
|
14940
|
+
if (key === "toggle") {
|
|
14941
|
+
return current.effective ? disable() : enable(null);
|
|
14942
|
+
}
|
|
14943
|
+
return stay(`Unknown /think option "${sub}" \u2014 expected on | off | low | high | max | status`);
|
|
14944
|
+
}
|
|
14945
|
+
|
|
14884
14946
|
// src/web/commands/provider-commands.ts
|
|
14885
14947
|
async function handleProvider(args, ctx) {
|
|
14886
14948
|
const id = args[0];
|
|
@@ -14943,30 +15005,24 @@ async function handleModel(args, ctx) {
|
|
|
14943
15005
|
ctx.sendStatus();
|
|
14944
15006
|
}
|
|
14945
15007
|
async function handleThink(args, ctx) {
|
|
14946
|
-
const
|
|
14947
|
-
|
|
14948
|
-
|
|
14949
|
-
|
|
14950
|
-
|
|
14951
|
-
|
|
14952
|
-
|
|
14953
|
-
ctx.
|
|
14954
|
-
|
|
14955
|
-
|
|
14956
|
-
|
|
14957
|
-
|
|
15008
|
+
const modelParams = ctx.config.get("modelParams")[ctx.currentModel];
|
|
15009
|
+
const outcome = applyThinkCommand(args[0], {
|
|
15010
|
+
runtimeThinking: ctx.runtimeThinking,
|
|
15011
|
+
runtimeEffort: ctx.runtimeThinkingEffort,
|
|
15012
|
+
configuredThinking: modelParams?.thinking,
|
|
15013
|
+
configuredEffort: modelParams?.thinkingEffort,
|
|
15014
|
+
supportsEffort: ctx.providers.get(ctx.currentProvider)?.supportsReasoningEffort ?? false,
|
|
15015
|
+
provider: ctx.currentProvider
|
|
15016
|
+
});
|
|
15017
|
+
if (outcome.changed) {
|
|
15018
|
+
ctx.runtimeThinking = outcome.runtimeThinking;
|
|
15019
|
+
ctx.runtimeThinkingEffort = outcome.runtimeEffort;
|
|
14958
15020
|
}
|
|
14959
|
-
if (sub === "on") ctx.runtimeThinking = true;
|
|
14960
|
-
else if (sub === "off") ctx.runtimeThinking = false;
|
|
14961
|
-
else if (sub === "low" || sub === "high" || sub === "max") {
|
|
14962
|
-
ctx.runtimeThinking = true;
|
|
14963
|
-
ctx.runtimeThinkingEffort = sub;
|
|
14964
|
-
} else ctx.runtimeThinking = ctx.runtimeThinking !== true;
|
|
14965
15021
|
ctx.send({
|
|
14966
15022
|
type: "info",
|
|
14967
|
-
message:
|
|
15023
|
+
message: [outcome.summary, ...outcome.details].join(" \u2014 ")
|
|
14968
15024
|
});
|
|
14969
|
-
ctx.sendStatus();
|
|
15025
|
+
if (outcome.changed) ctx.sendStatus();
|
|
14970
15026
|
}
|
|
14971
15027
|
async function handlePlan(args, ctx) {
|
|
14972
15028
|
const sub = args[0];
|
|
@@ -15478,7 +15534,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
15478
15534
|
Cost: ${formatCost(cost)}` : "";
|
|
15479
15535
|
let memoryLine = "";
|
|
15480
15536
|
try {
|
|
15481
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
15537
|
+
const { countPendingMemories } = await import("./persistent-memory-YPO25MOP.js");
|
|
15482
15538
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
15483
15539
|
if (pending > 0) memoryLine = `
|
|
15484
15540
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -16293,7 +16349,7 @@ async function handleTest(args, ctx) {
|
|
|
16293
16349
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
16294
16350
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
16295
16351
|
}
|
|
16296
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
16352
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-4XRHKHN5.js")).executeTests;
|
|
16297
16353
|
const report = await runTests(testArgs);
|
|
16298
16354
|
ctx.send({ type: "info", message: report });
|
|
16299
16355
|
} catch (err) {
|
|
@@ -16551,7 +16607,7 @@ async function handleMemory(args, ctx) {
|
|
|
16551
16607
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
16552
16608
|
} else if (sub === "export") {
|
|
16553
16609
|
if (args[1] === "md") {
|
|
16554
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
16610
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-YPO25MOP.js");
|
|
16555
16611
|
ctx.send({
|
|
16556
16612
|
type: "export_data",
|
|
16557
16613
|
format: "md",
|
|
@@ -158,7 +158,7 @@ ${content}`);
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
161
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
161
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-WNV6PT6Z.js");
|
|
162
162
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
163
163
|
let interrupted = false;
|
|
164
164
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
McpManager,
|
|
4
4
|
SNAPSHOT_PROMPT,
|
|
5
5
|
SkillManager,
|
|
6
|
+
applyThinkCommand,
|
|
6
7
|
autoTrimSessionIfNeeded,
|
|
7
8
|
buildInitPrompt,
|
|
8
9
|
clearDevState,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
scanProject,
|
|
15
16
|
sessionHasMeaningfulContent,
|
|
16
17
|
setupProxy
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UCHND2K6.js";
|
|
18
19
|
import {
|
|
19
20
|
CostTracker
|
|
20
21
|
} from "./chunk-V4D7YD24.js";
|
|
@@ -54,7 +55,7 @@ import {
|
|
|
54
55
|
setMaxOutputCap,
|
|
55
56
|
spawnAgentContext,
|
|
56
57
|
undoStack
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-Y2X24VYB.js";
|
|
58
59
|
import {
|
|
59
60
|
addMemoryEntry,
|
|
60
61
|
backupMemoryStore,
|
|
@@ -80,7 +81,7 @@ import {
|
|
|
80
81
|
touchMemoryReferences,
|
|
81
82
|
updateMemoryApproval,
|
|
82
83
|
updateMemoryEntry
|
|
83
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-3O4VLKD4.js";
|
|
84
85
|
import "./chunk-GLSR2NR3.js";
|
|
85
86
|
import "./chunk-UUSRWSSX.js";
|
|
86
87
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -98,14 +99,14 @@ import {
|
|
|
98
99
|
formatDoctorReport,
|
|
99
100
|
loadContextFiles,
|
|
100
101
|
writeCrashLog
|
|
101
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-FIDEG2PG.js";
|
|
102
103
|
import {
|
|
103
104
|
ProviderRegistry,
|
|
104
105
|
listBuiltInProviderMetadata
|
|
105
106
|
} from "./chunk-AUEX6RNY.js";
|
|
106
107
|
import {
|
|
107
108
|
ConfigManager
|
|
108
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-CEJUB4YV.js";
|
|
109
110
|
import {
|
|
110
111
|
describePlugin,
|
|
111
112
|
getActivePluginAssets,
|
|
@@ -122,7 +123,7 @@ import {
|
|
|
122
123
|
trustHook,
|
|
123
124
|
trustPlugin,
|
|
124
125
|
untrustHook
|
|
125
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-QW76RX6G.js";
|
|
126
127
|
import {
|
|
127
128
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
128
129
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -156,7 +157,7 @@ import {
|
|
|
156
157
|
import {
|
|
157
158
|
fileCheckpoints
|
|
158
159
|
} from "./chunk-4BKXL7SM.js";
|
|
159
|
-
import "./chunk-
|
|
160
|
+
import "./chunk-N2E6GFLZ.js";
|
|
160
161
|
import {
|
|
161
162
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
162
163
|
AUTHOR,
|
|
@@ -175,7 +176,7 @@ import {
|
|
|
175
176
|
SKILLS_DIR_NAME,
|
|
176
177
|
VERSION,
|
|
177
178
|
buildUserIdentityPrompt
|
|
178
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
179
180
|
import {
|
|
180
181
|
buildChatIndex,
|
|
181
182
|
clearChatIndex,
|
|
@@ -1152,59 +1153,24 @@ function createProviderCommands() {
|
|
|
1152
1153
|
description: "Toggle Extended Thinking mode (deep reasoning for supported models)",
|
|
1153
1154
|
usage: "/think [on|off|low|high|max|status]",
|
|
1154
1155
|
execute(args, ctx) {
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
ctx.
|
|
1158
|
-
ctx.
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
ctx.
|
|
1167
|
-
|
|
1168
|
-
console.log();
|
|
1169
|
-
return;
|
|
1170
|
-
}
|
|
1171
|
-
if (sub === "low" || sub === "high" || sub === "max") {
|
|
1172
|
-
ctx.setThinkingMode(true);
|
|
1173
|
-
ctx.setThinkingEffort(sub);
|
|
1174
|
-
ctx.renderer.printSuccess(`Extended Thinking enabled (effort: ${sub}).`);
|
|
1175
|
-
console.log();
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
if (sub === "status") {
|
|
1179
|
-
const mode = ctx.getThinkingMode();
|
|
1180
|
-
const effective = mode ?? ctx.getConfiguredThinking() ?? false;
|
|
1181
|
-
const origin = mode !== null ? "runtime override" : ctx.getConfiguredThinking() !== void 0 ? "from config" : "default";
|
|
1182
|
-
const label = effective ? theme.accent(`ON (${origin})`) : theme.dim(`OFF (${origin})`);
|
|
1183
|
-
console.log(` Extended Thinking: ${label}`);
|
|
1184
|
-
if (effective) {
|
|
1185
|
-
const supportsEffort = ctx.getProviderSupportsReasoningEffort();
|
|
1186
|
-
if (supportsEffort) {
|
|
1187
|
-
const effort = ctx.getThinkingEffort() ?? ctx.getConfiguredThinkingEffort();
|
|
1188
|
-
console.log(` Reasoning effort: ${effort ?? "high (provider default)"}`);
|
|
1189
|
-
} else {
|
|
1190
|
-
console.log(theme.dim(` Reasoning effort: n/a for ${ctx.getCurrentProvider()}`));
|
|
1191
|
-
}
|
|
1192
|
-
} else {
|
|
1193
|
-
console.log(theme.dim(" Enable with /think on | low | high | max, or set"));
|
|
1194
|
-
console.log(theme.dim(" modelParams.<model>.thinking in ~/.aicli/config.json"));
|
|
1195
|
-
}
|
|
1196
|
-
console.log();
|
|
1197
|
-
return;
|
|
1198
|
-
}
|
|
1199
|
-
const current = ctx.getThinkingMode();
|
|
1200
|
-
if (current === true) {
|
|
1201
|
-
ctx.setThinkingMode(false);
|
|
1202
|
-
ctx.renderer.printSuccess("Extended Thinking disabled.");
|
|
1156
|
+
const outcome = applyThinkCommand(args[0], {
|
|
1157
|
+
runtimeThinking: ctx.getThinkingMode(),
|
|
1158
|
+
runtimeEffort: ctx.getThinkingEffort(),
|
|
1159
|
+
configuredThinking: ctx.getConfiguredThinking(),
|
|
1160
|
+
configuredEffort: ctx.getConfiguredThinkingEffort(),
|
|
1161
|
+
supportsEffort: ctx.getProviderSupportsReasoningEffort(),
|
|
1162
|
+
provider: ctx.getCurrentProvider()
|
|
1163
|
+
});
|
|
1164
|
+
if (outcome.changed) {
|
|
1165
|
+
ctx.setThinkingMode(outcome.runtimeThinking);
|
|
1166
|
+
ctx.setThinkingEffort(outcome.runtimeEffort);
|
|
1167
|
+
ctx.renderer.printSuccess(outcome.effective ? `${outcome.summary} \u{1F4AD}` : outcome.summary);
|
|
1168
|
+
} else if (outcome.summary.startsWith("Unknown")) {
|
|
1169
|
+
console.log(theme.warning(` ${outcome.summary}`));
|
|
1203
1170
|
} else {
|
|
1204
|
-
|
|
1205
|
-
ctx.renderer.printSuccess("Extended Thinking enabled \u{1F4AD}");
|
|
1206
|
-
console.log(theme.dim(" Use /think off to disable."));
|
|
1171
|
+
console.log(` ${outcome.effective ? theme.accent(outcome.summary) : theme.dim(outcome.summary)}`);
|
|
1207
1172
|
}
|
|
1173
|
+
for (const line of outcome.details) console.log(theme.dim(` ${line}`));
|
|
1208
1174
|
console.log();
|
|
1209
1175
|
}
|
|
1210
1176
|
},
|
|
@@ -1431,7 +1397,7 @@ No tools match "${filter}".
|
|
|
1431
1397
|
const { join: join6 } = await import("path");
|
|
1432
1398
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1433
1399
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1434
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1400
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-ICAF6I3J.js");
|
|
1435
1401
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1436
1402
|
const cwd = process.cwd();
|
|
1437
1403
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2419,7 +2385,7 @@ function createReviewCommands() {
|
|
|
2419
2385
|
usage: "/test [command|filter]",
|
|
2420
2386
|
async execute(args, ctx) {
|
|
2421
2387
|
try {
|
|
2422
|
-
const { executeTests } = await import("./run-tests-
|
|
2388
|
+
const { executeTests } = await import("./run-tests-QNNP2HCD.js");
|
|
2423
2389
|
const argStr = args.join(" ").trim();
|
|
2424
2390
|
let testArgs = {};
|
|
2425
2391
|
if (argStr) {
|
|
@@ -7730,7 +7696,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7730
7696
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7731
7697
|
process.exit(1);
|
|
7732
7698
|
}
|
|
7733
|
-
const { startWebServer } = await import("./server-
|
|
7699
|
+
const { startWebServer } = await import("./server-53GM3CRH.js");
|
|
7734
7700
|
await startWebServer({ port, host: options.host });
|
|
7735
7701
|
});
|
|
7736
7702
|
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) => {
|
|
@@ -7897,11 +7863,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7897
7863
|
console.log(footer + "\n");
|
|
7898
7864
|
});
|
|
7899
7865
|
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) => {
|
|
7900
|
-
const { runUsageCli } = await import("./usage-
|
|
7866
|
+
const { runUsageCli } = await import("./usage-E3FEYSBU.js");
|
|
7901
7867
|
await runUsageCli(options);
|
|
7902
7868
|
});
|
|
7903
7869
|
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) => {
|
|
7904
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7870
|
+
const { runDoctorCli } = await import("./doctor-cli-CO6BJWRW.js");
|
|
7905
7871
|
const argv = process.argv.slice(2);
|
|
7906
7872
|
await runDoctorCli({
|
|
7907
7873
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -7910,7 +7876,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
7910
7876
|
});
|
|
7911
7877
|
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) => {
|
|
7912
7878
|
try {
|
|
7913
|
-
const batch = await import("./batch-
|
|
7879
|
+
const batch = await import("./batch-FQU6HK3Z.js");
|
|
7914
7880
|
switch (action) {
|
|
7915
7881
|
case "submit":
|
|
7916
7882
|
if (!arg) {
|
|
@@ -7953,7 +7919,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7953
7919
|
}
|
|
7954
7920
|
});
|
|
7955
7921
|
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) => {
|
|
7956
|
-
const { startMcpServer } = await import("./server-
|
|
7922
|
+
const { startMcpServer } = await import("./server-B4A7LHZ5.js");
|
|
7957
7923
|
await startMcpServer({
|
|
7958
7924
|
allowDestructive: !!options.allowDestructive,
|
|
7959
7925
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7966,7 +7932,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7966
7932
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
7967
7933
|
process.exit(1);
|
|
7968
7934
|
}
|
|
7969
|
-
const { runPrCli } = await import("./pr-
|
|
7935
|
+
const { runPrCli } = await import("./pr-CDOPCAPK.js");
|
|
7970
7936
|
const result = await runPrCli({
|
|
7971
7937
|
action,
|
|
7972
7938
|
target,
|
|
@@ -7986,8 +7952,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7986
7952
|
process.exit(result.exitCode);
|
|
7987
7953
|
});
|
|
7988
7954
|
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) => {
|
|
7989
|
-
const { runCi } = await import("./ci-
|
|
7990
|
-
const { formatCiResult } = await import("./ci-format-
|
|
7955
|
+
const { runCi } = await import("./ci-GZH3QMME.js");
|
|
7956
|
+
const { formatCiResult } = await import("./ci-format-VKP2MGYJ.js");
|
|
7991
7957
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
7992
7958
|
if (formats > 1) {
|
|
7993
7959
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -8145,7 +8111,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
8145
8111
|
config.get("customProviders"),
|
|
8146
8112
|
config.getConfigDir()
|
|
8147
8113
|
);
|
|
8148
|
-
const { startHub } = await import("./hub-
|
|
8114
|
+
const { startHub } = await import("./hub-4APIRQ73.js");
|
|
8149
8115
|
await startHub(
|
|
8150
8116
|
{
|
|
8151
8117
|
topic: topic ?? "",
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3O4VLKD4.js";
|
|
32
32
|
import "./chunk-HOSJZMQS.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-LGJ7EX2F.js";
|
|
34
34
|
import "./chunk-B5TYJO7V.js";
|
|
35
35
|
import "./chunk-IW3Q7AE5.js";
|
|
36
36
|
export {
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GWOZET2E.js";
|
|
31
31
|
import "./chunk-YVTASHS5.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-FA3HGXXM.js";
|
|
33
33
|
import "./chunk-6BUTA5VW.js";
|
|
34
34
|
export {
|
|
35
35
|
addMemoryEntry,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
countSeverity,
|
|
4
4
|
runCi
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XEVURCAM.js";
|
|
6
|
+
import "./chunk-TJNBSR3I.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
} from "./chunk-AUEX6RNY.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CEJUB4YV.js";
|
|
21
21
|
import "./chunk-3OBY7WSS.js";
|
|
22
22
|
import "./chunk-TU3L3PW7.js";
|
|
23
23
|
import {
|
|
24
24
|
VERSION
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
26
26
|
import "./chunk-IW3Q7AE5.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/pr.ts
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
McpManager,
|
|
17
17
|
SkillManager,
|
|
18
|
+
applyThinkCommand,
|
|
18
19
|
autoTrimSessionIfNeeded,
|
|
19
20
|
buildInitPrompt,
|
|
20
21
|
loadDevState,
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
scanDirTree,
|
|
24
25
|
scanProject,
|
|
25
26
|
setupProxy
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UCHND2K6.js";
|
|
27
28
|
import {
|
|
28
29
|
computeCost,
|
|
29
30
|
formatCost,
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
spawnAgentContext,
|
|
68
69
|
truncateOutput,
|
|
69
70
|
undoStack
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-Y2X24VYB.js";
|
|
71
72
|
import {
|
|
72
73
|
addMemoryEntry,
|
|
73
74
|
clearMemoryEntries,
|
|
@@ -81,7 +82,7 @@ import {
|
|
|
81
82
|
parseWritableScope,
|
|
82
83
|
updateMemoryApproval,
|
|
83
84
|
updateMemoryEntry
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-3O4VLKD4.js";
|
|
85
86
|
import "./chunk-GLSR2NR3.js";
|
|
86
87
|
import "./chunk-UUSRWSSX.js";
|
|
87
88
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -95,13 +96,13 @@ import {
|
|
|
95
96
|
buildDoctorReport,
|
|
96
97
|
formatDoctorReport,
|
|
97
98
|
loadContextFiles
|
|
98
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-FIDEG2PG.js";
|
|
99
100
|
import {
|
|
100
101
|
ProviderRegistry
|
|
101
102
|
} from "./chunk-AUEX6RNY.js";
|
|
102
103
|
import {
|
|
103
104
|
ConfigManager
|
|
104
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-CEJUB4YV.js";
|
|
105
106
|
import {
|
|
106
107
|
describePlugin,
|
|
107
108
|
getActivePluginAssets,
|
|
@@ -116,7 +117,7 @@ import {
|
|
|
116
117
|
runTool,
|
|
117
118
|
setPluginEnabled,
|
|
118
119
|
trustPlugin
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-QW76RX6G.js";
|
|
120
121
|
import {
|
|
121
122
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
122
123
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -141,7 +142,7 @@ import {
|
|
|
141
142
|
getGitRoot
|
|
142
143
|
} from "./chunk-HOSJZMQS.js";
|
|
143
144
|
import "./chunk-4BKXL7SM.js";
|
|
144
|
-
import "./chunk-
|
|
145
|
+
import "./chunk-N2E6GFLZ.js";
|
|
145
146
|
import {
|
|
146
147
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
147
148
|
AUTHOR,
|
|
@@ -157,7 +158,7 @@ import {
|
|
|
157
158
|
SKILLS_DIR_NAME,
|
|
158
159
|
VERSION,
|
|
159
160
|
buildUserIdentityPrompt
|
|
160
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
161
162
|
import "./chunk-6RPGQ5CG.js";
|
|
162
163
|
import "./chunk-KHYD3WXE.js";
|
|
163
164
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -756,30 +757,24 @@ async function handleModel(args, ctx) {
|
|
|
756
757
|
ctx.sendStatus();
|
|
757
758
|
}
|
|
758
759
|
async function handleThink(args, ctx) {
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
ctx.
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
760
|
+
const modelParams = ctx.config.get("modelParams")[ctx.currentModel];
|
|
761
|
+
const outcome = applyThinkCommand(args[0], {
|
|
762
|
+
runtimeThinking: ctx.runtimeThinking,
|
|
763
|
+
runtimeEffort: ctx.runtimeThinkingEffort,
|
|
764
|
+
configuredThinking: modelParams?.thinking,
|
|
765
|
+
configuredEffort: modelParams?.thinkingEffort,
|
|
766
|
+
supportsEffort: ctx.providers.get(ctx.currentProvider)?.supportsReasoningEffort ?? false,
|
|
767
|
+
provider: ctx.currentProvider
|
|
768
|
+
});
|
|
769
|
+
if (outcome.changed) {
|
|
770
|
+
ctx.runtimeThinking = outcome.runtimeThinking;
|
|
771
|
+
ctx.runtimeThinkingEffort = outcome.runtimeEffort;
|
|
771
772
|
}
|
|
772
|
-
if (sub === "on") ctx.runtimeThinking = true;
|
|
773
|
-
else if (sub === "off") ctx.runtimeThinking = false;
|
|
774
|
-
else if (sub === "low" || sub === "high" || sub === "max") {
|
|
775
|
-
ctx.runtimeThinking = true;
|
|
776
|
-
ctx.runtimeThinkingEffort = sub;
|
|
777
|
-
} else ctx.runtimeThinking = ctx.runtimeThinking !== true;
|
|
778
773
|
ctx.send({
|
|
779
774
|
type: "info",
|
|
780
|
-
message:
|
|
775
|
+
message: [outcome.summary, ...outcome.details].join(" \u2014 ")
|
|
781
776
|
});
|
|
782
|
-
ctx.sendStatus();
|
|
777
|
+
if (outcome.changed) ctx.sendStatus();
|
|
783
778
|
}
|
|
784
779
|
async function handlePlan(args, ctx) {
|
|
785
780
|
const sub = args[0];
|
|
@@ -837,7 +832,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
837
832
|
Cost: ${formatCost(cost)}` : "";
|
|
838
833
|
let memoryLine = "";
|
|
839
834
|
try {
|
|
840
|
-
const { countPendingMemories } = await import("./persistent-memory-
|
|
835
|
+
const { countPendingMemories } = await import("./persistent-memory-YD3SHSUH.js");
|
|
841
836
|
const pending = countPendingMemories(ctx.config.getConfigDir());
|
|
842
837
|
if (pending > 0) memoryLine = `
|
|
843
838
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1652,7 +1647,7 @@ async function handleTest(args, ctx) {
|
|
|
1652
1647
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1653
1648
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1654
1649
|
}
|
|
1655
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
1650
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-QNNP2HCD.js")).executeTests;
|
|
1656
1651
|
const report = await runTests(testArgs);
|
|
1657
1652
|
ctx.send({ type: "info", message: report });
|
|
1658
1653
|
} catch (err) {
|
|
@@ -1910,7 +1905,7 @@ async function handleMemory(args, ctx) {
|
|
|
1910
1905
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
1911
1906
|
} else if (sub === "export") {
|
|
1912
1907
|
if (args[1] === "md") {
|
|
1913
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
1908
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-YD3SHSUH.js");
|
|
1914
1909
|
ctx.send({
|
|
1915
1910
|
type: "export_data",
|
|
1916
1911
|
format: "md",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-Y2X24VYB.js";
|
|
5
|
+
import "./chunk-3O4VLKD4.js";
|
|
6
6
|
import "./chunk-GLSR2NR3.js";
|
|
7
7
|
import "./chunk-UUSRWSSX.js";
|
|
8
8
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -10,7 +10,7 @@ import "./chunk-BXP6YZ2P.js";
|
|
|
10
10
|
import "./chunk-5C76XDDF.js";
|
|
11
11
|
import {
|
|
12
12
|
runTool
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QW76RX6G.js";
|
|
14
14
|
import {
|
|
15
15
|
getDangerLevel,
|
|
16
16
|
schemaToJsonSchema
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
import "./chunk-TU3L3PW7.js";
|
|
19
19
|
import "./chunk-HOSJZMQS.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-N2E6GFLZ.js";
|
|
22
22
|
import {
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
25
25
|
import "./chunk-6RPGQ5CG.js";
|
|
26
26
|
import "./chunk-KHYD3WXE.js";
|
|
27
27
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-Y2X24VYB.js";
|
|
7
|
+
import "./chunk-3O4VLKD4.js";
|
|
8
8
|
import "./chunk-GLSR2NR3.js";
|
|
9
9
|
import "./chunk-UUSRWSSX.js";
|
|
10
10
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -12,7 +12,7 @@ import "./chunk-BXP6YZ2P.js";
|
|
|
12
12
|
import "./chunk-5C76XDDF.js";
|
|
13
13
|
import {
|
|
14
14
|
runTool
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QW76RX6G.js";
|
|
16
16
|
import {
|
|
17
17
|
getDangerLevel,
|
|
18
18
|
runLeanAgentLoop
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import "./chunk-TU3L3PW7.js";
|
|
21
21
|
import "./chunk-HOSJZMQS.js";
|
|
22
22
|
import "./chunk-4BKXL7SM.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-N2E6GFLZ.js";
|
|
24
24
|
import {
|
|
25
25
|
SUBAGENT_ALLOWED_TOOLS
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LGJ7EX2F.js";
|
|
27
27
|
import "./chunk-6RPGQ5CG.js";
|
|
28
28
|
import "./chunk-KHYD3WXE.js";
|
|
29
29
|
import "./chunk-NYNSYLFY.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-YRD6M5XI.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CEJUB4YV.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-LGJ7EX2F.js";
|
|
14
14
|
import "./chunk-IW3Q7AE5.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|