jinzd-ai-cli 0.4.280 → 0.4.281
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-F27NOTWC.js → batch-237ZXBQD.js} +2 -2
- package/dist/{chunk-UBPRUSAF.js → chunk-2FCKZ3OS.js} +1 -1
- package/dist/{chunk-EOP775JU.js → chunk-4XJVSMZ6.js} +1 -1
- package/dist/{chunk-PN42JO74.js → chunk-5GYOQ7EF.js} +1 -1
- package/dist/{chunk-CGDYO52A.js → chunk-6NO5FZW6.js} +1 -0
- package/dist/{chunk-B3FHA6IN.js → chunk-BVGSR3BA.js} +3 -3
- package/dist/{chunk-CP5LAA52.js → chunk-FHRIDE2T.js} +4 -4
- package/dist/{chunk-V7EZ4SDC.js → chunk-H2VE4TTN.js} +1 -1
- package/dist/{chunk-PUC277TH.js → chunk-IXEKDAIX.js} +1 -1
- package/dist/{chunk-VQCFEA4Z.js → chunk-J3RWNQOF.js} +1 -1
- package/dist/{chunk-IIO2SMEJ.js → chunk-J5TXHFDO.js} +8 -4
- package/dist/{chunk-LPZNOYRJ.js → chunk-JT2A2M4F.js} +1 -1
- package/dist/{chunk-UMWDNNPS.js → chunk-L7C34TFI.js} +1 -1
- package/dist/{chunk-TAIZZY3N.js → chunk-UTJQXG4P.js} +3 -3
- package/dist/{chunk-MX75TNE5.js → chunk-VB54ILH7.js} +1 -1
- package/dist/{chunk-NHJ4GHL4.js → chunk-WUIOUJA2.js} +1 -1
- package/dist/{ci-HJ4OVHCM.js → ci-LXRTYJ6F.js} +4 -4
- package/dist/{ci-format-NKJRZ3QI.js → ci-format-II3OT2VU.js} +2 -2
- package/dist/{constants-6LCZOBJC.js → constants-X53QCUTP.js} +1 -1
- package/dist/{doctor-cli-7JGPC5G4.js → doctor-cli-6JCJEQR4.js} +4 -4
- package/dist/electron-server.js +17 -9
- package/dist/{hub-NX7HYN7V.js → hub-RXAFF7QI.js} +2 -2
- package/dist/index.js +29 -24
- package/dist/{persist-PQM4BRI4.js → persist-TBQILDSE.js} +2 -2
- package/dist/{persistent-memory-MHHX7F25.js → persistent-memory-7CKJLS25.js} +2 -2
- package/dist/{persistent-memory-E6WECUTW.js → persistent-memory-WAKFKH2I.js} +2 -2
- package/dist/{pr-GLUFBQLI.js → pr-DZTRHAMG.js} +4 -4
- package/dist/{run-tests-LWAFPVS3.js → run-tests-4ESYEROQ.js} +2 -2
- package/dist/{run-tests-YPJDOEJA.js → run-tests-XGCNUT5S.js} +2 -2
- package/dist/{server-CXXYIPMU.js → server-6RYXFG3H.js} +21 -16
- package/dist/{server-P6DI27CY.js → server-EFA7UP4I.js} +5 -5
- package/dist/{task-orchestrator-FW4LBPTS.js → task-orchestrator-H3AEIHR3.js} +5 -5
- package/dist/{usage-CJUHQDT2.js → usage-W7TZWHY7.js} +2 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ConfigManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4XJVSMZ6.js";
|
|
5
5
|
import "./chunk-TU3L3PW7.js";
|
|
6
6
|
import {
|
|
7
7
|
atomicWriteFileSync
|
|
8
8
|
} from "./chunk-IW3Q7AE5.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-2FCKZ3OS.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/batch.ts
|
|
12
12
|
import Anthropic from "@anthropic-ai/sdk";
|
|
@@ -599,6 +599,7 @@ var SessionManager = class {
|
|
|
599
599
|
/** P1-PERF-03: `force` 跳过脏检查(用于进程退出、fork 等必须落盘场景) */
|
|
600
600
|
async save(force = false) {
|
|
601
601
|
if (!this._current) return;
|
|
602
|
+
if (this._current.messages.length === 0) return;
|
|
602
603
|
if (!force && !this._current.dirty) return;
|
|
603
604
|
mkdirSync(this.historyDir, { recursive: true });
|
|
604
605
|
const filePath = join(this.historyDir, `${this._current.id}.json`);
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
listHooks,
|
|
9
9
|
listInstalledPlugins,
|
|
10
10
|
resetStats
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L7C34TFI.js";
|
|
12
12
|
import {
|
|
13
13
|
ProviderRegistry
|
|
14
14
|
} from "./chunk-UGY5SVNX.js";
|
|
15
15
|
import {
|
|
16
16
|
ConfigManager
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4XJVSMZ6.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-2FCKZ3OS.js";
|
|
30
30
|
|
|
31
31
|
// src/diagnostics/doctor-report.ts
|
|
32
32
|
import { existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
searchPersistentMemories,
|
|
12
12
|
touchMemoryReferences,
|
|
13
13
|
updateMemoryEntry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H2VE4TTN.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-L7C34TFI.js";
|
|
34
34
|
import {
|
|
35
35
|
buildTruncatedArgumentsError,
|
|
36
36
|
getDangerLevel,
|
|
@@ -50,14 +50,14 @@ import {
|
|
|
50
50
|
} from "./chunk-4BKXL7SM.js";
|
|
51
51
|
import {
|
|
52
52
|
runTestsTool
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-J3RWNQOF.js";
|
|
54
54
|
import {
|
|
55
55
|
CONFIG_DIR_NAME,
|
|
56
56
|
DEFAULT_MAX_TOOL_OUTPUT_CHARS_CAP,
|
|
57
57
|
SUBAGENT_ALLOWED_TOOLS,
|
|
58
58
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
59
59
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
61
61
|
|
|
62
62
|
// src/tools/shell-pool.ts
|
|
63
63
|
import { spawn as spawn2 } 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-2FCKZ3OS.js";
|
|
17
17
|
|
|
18
18
|
// src/memory/persistent-memory.ts
|
|
19
19
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
estimateTokens,
|
|
7
7
|
truncateForPersist
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FHRIDE2T.js";
|
|
9
9
|
import {
|
|
10
10
|
isMemoryExpired,
|
|
11
11
|
isMemoryStale
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-H2VE4TTN.js";
|
|
13
13
|
import {
|
|
14
14
|
getContentText
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6NO5FZW6.js";
|
|
16
16
|
import {
|
|
17
17
|
isCleanDocumentBody,
|
|
18
18
|
stripOuterCodeFence
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
MCP_PROTOCOL_VERSION,
|
|
31
31
|
MCP_TOOL_PREFIX,
|
|
32
32
|
VERSION
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
34
34
|
|
|
35
35
|
// src/mcp/client.ts
|
|
36
36
|
import { spawn } from "child_process";
|
|
@@ -1886,6 +1886,9 @@ function selectStaleSessions(sessions, staleDays, now = Date.now()) {
|
|
|
1886
1886
|
const cutoff = now - staleDays * 24 * 60 * 60 * 1e3;
|
|
1887
1887
|
return sessions.filter((s) => s.updated.getTime() < cutoff);
|
|
1888
1888
|
}
|
|
1889
|
+
function clearedSessionMessage(priorSessionId, priorMessageCount = 0) {
|
|
1890
|
+
return priorSessionId && priorMessageCount > 0 ? `Started a new session. Previous conversation saved as ${priorSessionId.slice(0, 8)} (${priorMessageCount} messages) \u2014 reload it with /session load ${priorSessionId.slice(0, 8)}.` : "Started a new session.";
|
|
1891
|
+
}
|
|
1889
1892
|
|
|
1890
1893
|
// src/core/profile-command.ts
|
|
1891
1894
|
var PROFILE_FIELDS = ["name", "nickname", "role", "bio", "interests", "locale", "extra"];
|
|
@@ -2066,6 +2069,7 @@ export {
|
|
|
2066
2069
|
parseBatchDeleteArgs,
|
|
2067
2070
|
parseCleanArgs,
|
|
2068
2071
|
selectStaleSessions,
|
|
2072
|
+
clearedSessionMessage,
|
|
2069
2073
|
applyProfileCommand,
|
|
2070
2074
|
readGitDiff,
|
|
2071
2075
|
scanDirTree,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
evaluateCiGate,
|
|
4
4
|
normalizeCiThresholds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JT2A2M4F.js";
|
|
6
6
|
import {
|
|
7
7
|
buildReviewPrompt,
|
|
8
8
|
buildSecurityReviewPrompt,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-UGY5SVNX.js";
|
|
17
17
|
import {
|
|
18
18
|
ConfigManager
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4XJVSMZ6.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
23
23
|
|
|
24
24
|
// src/cli/ci.ts
|
|
25
25
|
import { execFileSync } from "child_process";
|
|
@@ -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-UTJQXG4P.js";
|
|
7
|
+
import "./chunk-JT2A2M4F.js";
|
|
8
8
|
import "./chunk-HLWUDRBO.js";
|
|
9
9
|
import "./chunk-6YZEZFX5.js";
|
|
10
10
|
import "./chunk-UGY5SVNX.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-4XJVSMZ6.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-2FCKZ3OS.js";
|
|
16
16
|
export {
|
|
17
17
|
CI_COMMENT_MARKER,
|
|
18
18
|
countSeverity,
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
formatDoctorReport,
|
|
4
4
|
runDoctorCli
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BVGSR3BA.js";
|
|
6
|
+
import "./chunk-L7C34TFI.js";
|
|
7
7
|
import "./chunk-UGY5SVNX.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4XJVSMZ6.js";
|
|
9
9
|
import "./chunk-TEXT4DAT.js";
|
|
10
10
|
import "./chunk-TU3L3PW7.js";
|
|
11
11
|
import "./chunk-HOSJZMQS.js";
|
|
12
12
|
import "./chunk-IW3Q7AE5.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-2FCKZ3OS.js";
|
|
14
14
|
export {
|
|
15
15
|
formatDoctorReport,
|
|
16
16
|
runDoctorCli
|
package/dist/electron-server.js
CHANGED
|
@@ -40,14 +40,14 @@ import {
|
|
|
40
40
|
touchMemoryReferences,
|
|
41
41
|
updateMemoryApproval,
|
|
42
42
|
updateMemoryEntry
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IXEKDAIX.js";
|
|
44
44
|
import {
|
|
45
45
|
redactJson,
|
|
46
46
|
scanString
|
|
47
47
|
} from "./chunk-FSC6KEWU.js";
|
|
48
48
|
import {
|
|
49
49
|
runTestsTool
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WUIOUJA2.js";
|
|
51
51
|
import {
|
|
52
52
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
53
53
|
APP_NAME,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
SUBAGENT_MAX_ROUNDS_LIMIT,
|
|
81
81
|
VERSION,
|
|
82
82
|
buildUserIdentityPrompt
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-5GYOQ7EF.js";
|
|
84
84
|
import {
|
|
85
85
|
hasSemanticIndex,
|
|
86
86
|
semanticSearch
|
|
@@ -5228,6 +5228,7 @@ var SessionManager = class {
|
|
|
5228
5228
|
/** P1-PERF-03: `force` 跳过脏检查(用于进程退出、fork 等必须落盘场景) */
|
|
5229
5229
|
async save(force = false) {
|
|
5230
5230
|
if (!this._current) return;
|
|
5231
|
+
if (this._current.messages.length === 0) return;
|
|
5231
5232
|
if (!force && !this._current.dirty) return;
|
|
5232
5233
|
mkdirSync3(this.historyDir, { recursive: true });
|
|
5233
5234
|
const filePath = join4(this.historyDir, `${this._current.id}.json`);
|
|
@@ -16727,13 +16728,20 @@ function selectStaleSessions(sessions, staleDays, now = Date.now()) {
|
|
|
16727
16728
|
const cutoff = now - staleDays * 24 * 60 * 60 * 1e3;
|
|
16728
16729
|
return sessions.filter((s) => s.updated.getTime() < cutoff);
|
|
16729
16730
|
}
|
|
16731
|
+
function clearedSessionMessage(priorSessionId, priorMessageCount = 0) {
|
|
16732
|
+
return priorSessionId && priorMessageCount > 0 ? `Started a new session. Previous conversation saved as ${priorSessionId.slice(0, 8)} (${priorMessageCount} messages) \u2014 reload it with /session load ${priorSessionId.slice(0, 8)}.` : "Started a new session.";
|
|
16733
|
+
}
|
|
16730
16734
|
|
|
16731
16735
|
// src/web/commands/session-commands.ts
|
|
16732
16736
|
async function handleClear(_args, ctx) {
|
|
16737
|
+
const prior = ctx.sessions.current;
|
|
16738
|
+
const priorId = prior?.id ?? null;
|
|
16739
|
+
const priorCount = prior?.messages.length ?? 0;
|
|
16733
16740
|
ctx.saveIfNeeded();
|
|
16734
|
-
ctx.sessions.createSession(ctx.currentProvider, ctx.currentModel);
|
|
16741
|
+
const created = ctx.sessions.createSession(ctx.currentProvider, ctx.currentModel);
|
|
16742
|
+
ctx.unsavedSessions.set(created.id, created);
|
|
16735
16743
|
ctx.resetWebSessionUsage();
|
|
16736
|
-
ctx.send({ type: "info", message:
|
|
16744
|
+
ctx.send({ type: "info", message: clearedSessionMessage(priorId, priorCount) });
|
|
16737
16745
|
ctx.sendStatus();
|
|
16738
16746
|
ctx.sendSessionList();
|
|
16739
16747
|
}
|
|
@@ -16751,7 +16759,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
16751
16759
|
Cost: ${formatCost(cost)}` : "";
|
|
16752
16760
|
let memoryLine = "";
|
|
16753
16761
|
try {
|
|
16754
|
-
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-
|
|
16762
|
+
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-WAKFKH2I.js");
|
|
16755
16763
|
const pending = countPendingMemories2(ctx.config.getConfigDir());
|
|
16756
16764
|
if (pending > 0) memoryLine = `
|
|
16757
16765
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -17658,7 +17666,7 @@ async function handleTest(args, ctx) {
|
|
|
17658
17666
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
17659
17667
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
17660
17668
|
}
|
|
17661
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
17669
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-4ESYEROQ.js")).executeTests;
|
|
17662
17670
|
const report = await runTests(testArgs);
|
|
17663
17671
|
ctx.send({ type: "info", message: report });
|
|
17664
17672
|
} catch (err) {
|
|
@@ -17994,7 +18002,7 @@ async function handleMemory(args, ctx) {
|
|
|
17994
18002
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
17995
18003
|
} else if (sub === "export") {
|
|
17996
18004
|
if (args[1] === "md") {
|
|
17997
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
18005
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-WAKFKH2I.js");
|
|
17998
18006
|
ctx.send({
|
|
17999
18007
|
type: "export_data",
|
|
18000
18008
|
format: "md",
|
|
@@ -18433,7 +18441,7 @@ async function handleHelp(_args, ctx) {
|
|
|
18433
18441
|
" /about \u2014 Version & author info",
|
|
18434
18442
|
" /provider <id> \u2014 Switch AI provider",
|
|
18435
18443
|
" /model <id> \u2014 Switch model",
|
|
18436
|
-
" /clear \u2014
|
|
18444
|
+
" /clear \u2014 Start a new session (previous conversation is kept)",
|
|
18437
18445
|
" /compact [hint] \u2014 Compress conversation history",
|
|
18438
18446
|
" /think [on|off] \u2014 Toggle extended thinking mode",
|
|
18439
18447
|
" /plan [execute|exit|status] \u2014 Read-only planning mode (bare /plan enters it)",
|
|
@@ -143,7 +143,7 @@ ${content}`);
|
|
|
143
143
|
const state = await runDiscussion(config, providers, options.topic);
|
|
144
144
|
if (options.save !== false && state.messages.length > 0) {
|
|
145
145
|
try {
|
|
146
|
-
const { persistDiscussion } = await import("./persist-
|
|
146
|
+
const { persistDiscussion } = await import("./persist-TBQILDSE.js");
|
|
147
147
|
const { path } = await persistDiscussion(state, configManager, defaultProvider, defaultModel);
|
|
148
148
|
console.log(chalk.dim(`
|
|
149
149
|
\u{1F4BE} Saved to history \u2014 open it in the Web UI and hit \u{1F3AC} to replay.
|
|
@@ -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-H3AEIHR3.js");
|
|
162
162
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
163
163
|
let interrupted = false;
|
|
164
164
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
checkpointRestoredMessage,
|
|
18
18
|
checkpointSavedMessage,
|
|
19
19
|
clearDevState,
|
|
20
|
+
clearedSessionMessage,
|
|
20
21
|
costSourceNote,
|
|
21
22
|
decideDeferredSave,
|
|
22
23
|
decideModel,
|
|
@@ -53,7 +54,7 @@ import {
|
|
|
53
54
|
setupProxy,
|
|
54
55
|
snapshotFile,
|
|
55
56
|
stripRoutingTags
|
|
56
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-J5TXHFDO.js";
|
|
57
58
|
import {
|
|
58
59
|
CostTracker,
|
|
59
60
|
computeCost,
|
|
@@ -83,7 +84,7 @@ import {
|
|
|
83
84
|
setMaxOutputCap,
|
|
84
85
|
spawnAgentContext,
|
|
85
86
|
undoStack
|
|
86
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-FHRIDE2T.js";
|
|
87
88
|
import {
|
|
88
89
|
buildReviewPrompt,
|
|
89
90
|
buildSecurityReviewPrompt
|
|
@@ -124,7 +125,7 @@ import {
|
|
|
124
125
|
touchMemoryReferences,
|
|
125
126
|
updateMemoryApproval,
|
|
126
127
|
updateMemoryEntry
|
|
127
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-H2VE4TTN.js";
|
|
128
129
|
import "./chunk-4DEMGCK4.js";
|
|
129
130
|
import "./chunk-UUSRWSSX.js";
|
|
130
131
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -137,7 +138,7 @@ import {
|
|
|
137
138
|
import {
|
|
138
139
|
SessionManager,
|
|
139
140
|
getContentText
|
|
140
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-6NO5FZW6.js";
|
|
141
142
|
import "./chunk-NYNSYLFY.js";
|
|
142
143
|
import {
|
|
143
144
|
DEFAULT_PATTERNS,
|
|
@@ -148,7 +149,7 @@ import {
|
|
|
148
149
|
formatDoctorReport,
|
|
149
150
|
loadContextFiles,
|
|
150
151
|
writeCrashLog
|
|
151
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-BVGSR3BA.js";
|
|
152
153
|
import {
|
|
153
154
|
describePlugin,
|
|
154
155
|
getActivePluginAssets,
|
|
@@ -165,14 +166,14 @@ import {
|
|
|
165
166
|
trustHook,
|
|
166
167
|
trustPlugin,
|
|
167
168
|
untrustHook
|
|
168
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-L7C34TFI.js";
|
|
169
170
|
import {
|
|
170
171
|
ProviderRegistry,
|
|
171
172
|
listBuiltInProviderMetadata
|
|
172
173
|
} from "./chunk-UGY5SVNX.js";
|
|
173
174
|
import {
|
|
174
175
|
ConfigManager
|
|
175
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-4XJVSMZ6.js";
|
|
176
177
|
import {
|
|
177
178
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
178
179
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -210,7 +211,7 @@ import {
|
|
|
210
211
|
import {
|
|
211
212
|
fileCheckpoints
|
|
212
213
|
} from "./chunk-4BKXL7SM.js";
|
|
213
|
-
import "./chunk-
|
|
214
|
+
import "./chunk-J3RWNQOF.js";
|
|
214
215
|
import {
|
|
215
216
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
216
217
|
AUTHOR,
|
|
@@ -228,7 +229,7 @@ import {
|
|
|
228
229
|
SKILLS_DIR_NAME,
|
|
229
230
|
VERSION,
|
|
230
231
|
buildUserIdentityPrompt
|
|
231
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
232
233
|
|
|
233
234
|
// src/index.ts
|
|
234
235
|
import { program } from "commander";
|
|
@@ -1346,7 +1347,7 @@ No tools match "${filter}".
|
|
|
1346
1347
|
const { join: join6 } = await import("path");
|
|
1347
1348
|
const { existsSync: existsSync6 } = await import("fs");
|
|
1348
1349
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-EXOEHQSF.js");
|
|
1349
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1350
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-X53QCUTP.js");
|
|
1350
1351
|
const { approveProject, hashMcpFile } = await import("./project-trust-NKYHL3VZ.js");
|
|
1351
1352
|
const cwd = process.cwd();
|
|
1352
1353
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2266,7 +2267,7 @@ function createReviewCommands() {
|
|
|
2266
2267
|
usage: "/test [command|filter]",
|
|
2267
2268
|
async execute(args, ctx) {
|
|
2268
2269
|
try {
|
|
2269
|
-
const { executeTests } = await import("./run-tests-
|
|
2270
|
+
const { executeTests } = await import("./run-tests-XGCNUT5S.js");
|
|
2270
2271
|
const argStr = args.join(" ").trim();
|
|
2271
2272
|
let testArgs = {};
|
|
2272
2273
|
if (argStr) {
|
|
@@ -3018,13 +3019,17 @@ function createSessionCommands() {
|
|
|
3018
3019
|
return [
|
|
3019
3020
|
{
|
|
3020
3021
|
name: "clear",
|
|
3021
|
-
description: "
|
|
3022
|
+
description: "Start a new session (previous conversation is kept)",
|
|
3022
3023
|
usage: "/clear",
|
|
3023
|
-
execute(_args, ctx) {
|
|
3024
|
-
ctx.sessions.current
|
|
3024
|
+
async execute(_args, ctx) {
|
|
3025
|
+
const prior = ctx.sessions.current;
|
|
3026
|
+
const priorId = prior?.id ?? null;
|
|
3027
|
+
const priorCount = prior?.messages.length ?? 0;
|
|
3028
|
+
if (priorCount > 0) await ctx.sessions.save();
|
|
3029
|
+
ctx.sessions.createSession(ctx.getCurrentProvider(), ctx.getCurrentModel());
|
|
3025
3030
|
ctx.resetSessionTokenUsage();
|
|
3026
3031
|
ctx.clearDevState();
|
|
3027
|
-
ctx.renderer.printInfo(
|
|
3032
|
+
ctx.renderer.printInfo(clearedSessionMessage(priorId, priorCount));
|
|
3028
3033
|
}
|
|
3029
3034
|
},
|
|
3030
3035
|
{
|
|
@@ -7269,7 +7274,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7269
7274
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7270
7275
|
process.exit(1);
|
|
7271
7276
|
}
|
|
7272
|
-
const { startWebServer } = await import("./server-
|
|
7277
|
+
const { startWebServer } = await import("./server-6RYXFG3H.js");
|
|
7273
7278
|
await startWebServer({ port, host: options.host });
|
|
7274
7279
|
});
|
|
7275
7280
|
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) => {
|
|
@@ -7436,11 +7441,11 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7436
7441
|
console.log(footer + "\n");
|
|
7437
7442
|
});
|
|
7438
7443
|
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) => {
|
|
7439
|
-
const { runUsageCli } = await import("./usage-
|
|
7444
|
+
const { runUsageCli } = await import("./usage-W7TZWHY7.js");
|
|
7440
7445
|
await runUsageCli(options);
|
|
7441
7446
|
});
|
|
7442
7447
|
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) => {
|
|
7443
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7448
|
+
const { runDoctorCli } = await import("./doctor-cli-6JCJEQR4.js");
|
|
7444
7449
|
const argv = process.argv.slice(2);
|
|
7445
7450
|
await runDoctorCli({
|
|
7446
7451
|
json: !!options.json || argv.includes("--json"),
|
|
@@ -7449,7 +7454,7 @@ program.command("doctor").description("Health check: API keys, config, MCP, rece
|
|
|
7449
7454
|
});
|
|
7450
7455
|
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) => {
|
|
7451
7456
|
try {
|
|
7452
|
-
const batch = await import("./batch-
|
|
7457
|
+
const batch = await import("./batch-237ZXBQD.js");
|
|
7453
7458
|
switch (action) {
|
|
7454
7459
|
case "submit":
|
|
7455
7460
|
if (!arg) {
|
|
@@ -7492,7 +7497,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7492
7497
|
}
|
|
7493
7498
|
});
|
|
7494
7499
|
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) => {
|
|
7495
|
-
const { startMcpServer } = await import("./server-
|
|
7500
|
+
const { startMcpServer } = await import("./server-EFA7UP4I.js");
|
|
7496
7501
|
await startMcpServer({
|
|
7497
7502
|
allowDestructive: !!options.allowDestructive,
|
|
7498
7503
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7505,7 +7510,7 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7505
7510
|
console.error(`Unknown pr action: ${action}. Use review | security-review | summarize.`);
|
|
7506
7511
|
process.exit(1);
|
|
7507
7512
|
}
|
|
7508
|
-
const { runPrCli } = await import("./pr-
|
|
7513
|
+
const { runPrCli } = await import("./pr-DZTRHAMG.js");
|
|
7509
7514
|
const result = await runPrCli({
|
|
7510
7515
|
action,
|
|
7511
7516
|
target,
|
|
@@ -7525,8 +7530,8 @@ program.command("pr <action> [target]").description("PR review helpers: review |
|
|
|
7525
7530
|
process.exit(result.exitCode);
|
|
7526
7531
|
});
|
|
7527
7532
|
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) => {
|
|
7528
|
-
const { runCi } = await import("./ci-
|
|
7529
|
-
const { formatCiResult } = await import("./ci-format-
|
|
7533
|
+
const { runCi } = await import("./ci-LXRTYJ6F.js");
|
|
7534
|
+
const { formatCiResult } = await import("./ci-format-II3OT2VU.js");
|
|
7530
7535
|
const formats = [options.json, options.markdown, options.sarif].filter(Boolean).length;
|
|
7531
7536
|
if (formats > 1) {
|
|
7532
7537
|
console.error("Choose only one output format: --json, --markdown, or --sarif.");
|
|
@@ -7684,7 +7689,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7684
7689
|
config.get("customProviders"),
|
|
7685
7690
|
config.getConfigDir()
|
|
7686
7691
|
);
|
|
7687
|
-
const { startHub } = await import("./hub-
|
|
7692
|
+
const { startHub } = await import("./hub-RXAFF7QI.js");
|
|
7688
7693
|
await startHub(
|
|
7689
7694
|
{
|
|
7690
7695
|
topic: topic ?? "",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
discussionToMessages,
|
|
4
4
|
persistDiscussion
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VB54ILH7.js";
|
|
6
|
+
import "./chunk-6NO5FZW6.js";
|
|
7
7
|
import "./chunk-NYNSYLFY.js";
|
|
8
8
|
import "./chunk-3FEZSLGI.js";
|
|
9
9
|
import "./chunk-IW3Q7AE5.js";
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
touchMemoryReferences,
|
|
29
29
|
updateMemoryApproval,
|
|
30
30
|
updateMemoryEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-H2VE4TTN.js";
|
|
32
32
|
import "./chunk-3FEZSLGI.js";
|
|
33
33
|
import "./chunk-HOSJZMQS.js";
|
|
34
34
|
import "./chunk-IW3Q7AE5.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-2FCKZ3OS.js";
|
|
36
36
|
export {
|
|
37
37
|
addMemoryEntry,
|
|
38
38
|
backupMemoryStore,
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
touchMemoryReferences,
|
|
28
28
|
updateMemoryApproval,
|
|
29
29
|
updateMemoryEntry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-IXEKDAIX.js";
|
|
31
31
|
import "./chunk-FSC6KEWU.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-5GYOQ7EF.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-UTJQXG4P.js";
|
|
6
|
+
import "./chunk-JT2A2M4F.js";
|
|
7
7
|
import {
|
|
8
8
|
buildReviewPrompt,
|
|
9
9
|
buildSecurityReviewPrompt,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
} from "./chunk-UGY5SVNX.js";
|
|
18
18
|
import {
|
|
19
19
|
ConfigManager
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4XJVSMZ6.js";
|
|
21
21
|
import "./chunk-TEXT4DAT.js";
|
|
22
22
|
import "./chunk-TU3L3PW7.js";
|
|
23
23
|
import "./chunk-IW3Q7AE5.js";
|
|
24
24
|
import {
|
|
25
25
|
VERSION
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/pr.ts
|
|
29
29
|
import { execFileSync } from "child_process";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-RYQBBEMM.js";
|
|
12
12
|
import {
|
|
13
13
|
persistDiscussion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VB54ILH7.js";
|
|
15
15
|
import {
|
|
16
16
|
AUTO_COMPACT_INSTRUCTION,
|
|
17
17
|
McpManager,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
checkpointNotFoundMessage,
|
|
29
29
|
checkpointRestoredMessage,
|
|
30
30
|
checkpointSavedMessage,
|
|
31
|
+
clearedSessionMessage,
|
|
31
32
|
costSourceNote,
|
|
32
33
|
decideDeferredSave,
|
|
33
34
|
decideModel,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
setupProxy,
|
|
63
64
|
snapshotFile,
|
|
64
65
|
stripRoutingTags
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-J5TXHFDO.js";
|
|
66
67
|
import {
|
|
67
68
|
CNY_PER_USD,
|
|
68
69
|
CostTracker,
|
|
@@ -104,7 +105,7 @@ import {
|
|
|
104
105
|
spawnAgentContext,
|
|
105
106
|
truncateOutput,
|
|
106
107
|
undoStack
|
|
107
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-FHRIDE2T.js";
|
|
108
109
|
import {
|
|
109
110
|
buildReviewPrompt,
|
|
110
111
|
buildSecurityReviewPrompt
|
|
@@ -131,7 +132,7 @@ import {
|
|
|
131
132
|
restoreMemoryEntries,
|
|
132
133
|
updateMemoryApproval,
|
|
133
134
|
updateMemoryEntry
|
|
134
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-H2VE4TTN.js";
|
|
135
136
|
import "./chunk-4DEMGCK4.js";
|
|
136
137
|
import "./chunk-UUSRWSSX.js";
|
|
137
138
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -141,7 +142,7 @@ import "./chunk-5C76XDDF.js";
|
|
|
141
142
|
import {
|
|
142
143
|
SessionManager,
|
|
143
144
|
getContentText
|
|
144
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-6NO5FZW6.js";
|
|
145
146
|
import "./chunk-NYNSYLFY.js";
|
|
146
147
|
import {
|
|
147
148
|
scanString
|
|
@@ -150,7 +151,7 @@ import {
|
|
|
150
151
|
buildDoctorReport,
|
|
151
152
|
formatDoctorReport,
|
|
152
153
|
loadContextFiles
|
|
153
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-BVGSR3BA.js";
|
|
154
155
|
import {
|
|
155
156
|
describePlugin,
|
|
156
157
|
getActivePluginAssets,
|
|
@@ -165,13 +166,13 @@ import {
|
|
|
165
166
|
runTool,
|
|
166
167
|
setPluginEnabled,
|
|
167
168
|
trustPlugin
|
|
168
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-L7C34TFI.js";
|
|
169
170
|
import {
|
|
170
171
|
ProviderRegistry
|
|
171
172
|
} from "./chunk-UGY5SVNX.js";
|
|
172
173
|
import {
|
|
173
174
|
ConfigManager
|
|
174
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-4XJVSMZ6.js";
|
|
175
176
|
import {
|
|
176
177
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
177
178
|
TEE_FINAL_USER_NUDGE,
|
|
@@ -201,7 +202,7 @@ import {
|
|
|
201
202
|
maskConfigSecrets
|
|
202
203
|
} from "./chunk-XNFIYS7G.js";
|
|
203
204
|
import "./chunk-4BKXL7SM.js";
|
|
204
|
-
import "./chunk-
|
|
205
|
+
import "./chunk-J3RWNQOF.js";
|
|
205
206
|
import {
|
|
206
207
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
207
208
|
AUTHOR,
|
|
@@ -217,7 +218,7 @@ import {
|
|
|
217
218
|
SKILLS_DIR_NAME,
|
|
218
219
|
VERSION,
|
|
219
220
|
buildUserIdentityPrompt
|
|
220
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
221
222
|
|
|
222
223
|
// src/web/server.ts
|
|
223
224
|
import express from "express";
|
|
@@ -950,10 +951,14 @@ function lastAssistantText(messages) {
|
|
|
950
951
|
|
|
951
952
|
// src/web/commands/session-commands.ts
|
|
952
953
|
async function handleClear(_args, ctx) {
|
|
954
|
+
const prior = ctx.sessions.current;
|
|
955
|
+
const priorId = prior?.id ?? null;
|
|
956
|
+
const priorCount = prior?.messages.length ?? 0;
|
|
953
957
|
ctx.saveIfNeeded();
|
|
954
|
-
ctx.sessions.createSession(ctx.currentProvider, ctx.currentModel);
|
|
958
|
+
const created = ctx.sessions.createSession(ctx.currentProvider, ctx.currentModel);
|
|
959
|
+
ctx.unsavedSessions.set(created.id, created);
|
|
955
960
|
ctx.resetWebSessionUsage();
|
|
956
|
-
ctx.send({ type: "info", message:
|
|
961
|
+
ctx.send({ type: "info", message: clearedSessionMessage(priorId, priorCount) });
|
|
957
962
|
ctx.sendStatus();
|
|
958
963
|
ctx.sendSessionList();
|
|
959
964
|
}
|
|
@@ -971,7 +976,7 @@ Cache: write=${cacheCreate} read=${cacheRead}` : "";
|
|
|
971
976
|
Cost: ${formatCost(cost)}` : "";
|
|
972
977
|
let memoryLine = "";
|
|
973
978
|
try {
|
|
974
|
-
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-
|
|
979
|
+
const { countPendingMemories: countPendingMemories2 } = await import("./persistent-memory-7CKJLS25.js");
|
|
975
980
|
const pending = countPendingMemories2(ctx.config.getConfigDir());
|
|
976
981
|
if (pending > 0) memoryLine = `
|
|
977
982
|
Memory: \u26A0 ${pending} pending approval \u2014 see the Memory panel or /memory`;
|
|
@@ -1878,7 +1883,7 @@ async function handleTest(args, ctx) {
|
|
|
1878
1883
|
const isCommand = argStr.includes(" ") || /^(mvn|gradle|npm|pytest|cargo|go)\b/.test(argStr);
|
|
1879
1884
|
testArgs = isCommand ? { command: argStr } : { filter: argStr };
|
|
1880
1885
|
}
|
|
1881
|
-
const runTests = ctx.runTests ?? (await import("./run-tests-
|
|
1886
|
+
const runTests = ctx.runTests ?? (await import("./run-tests-XGCNUT5S.js")).executeTests;
|
|
1882
1887
|
const report = await runTests(testArgs);
|
|
1883
1888
|
ctx.send({ type: "info", message: report });
|
|
1884
1889
|
} catch (err) {
|
|
@@ -2214,7 +2219,7 @@ async function handleMemory(args, ctx) {
|
|
|
2214
2219
|
ctx.handleMemoryManage(sub, args[1], sub === "expire" ? args[2] : void 0);
|
|
2215
2220
|
} else if (sub === "export") {
|
|
2216
2221
|
if (args[1] === "md") {
|
|
2217
|
-
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-
|
|
2222
|
+
const { exportMemoryEntries: exportMemoryEntries2 } = await import("./persistent-memory-7CKJLS25.js");
|
|
2218
2223
|
ctx.send({
|
|
2219
2224
|
type: "export_data",
|
|
2220
2225
|
format: "md",
|
|
@@ -2465,7 +2470,7 @@ async function handleHelp(_args, ctx) {
|
|
|
2465
2470
|
" /about \u2014 Version & author info",
|
|
2466
2471
|
" /provider <id> \u2014 Switch AI provider",
|
|
2467
2472
|
" /model <id> \u2014 Switch model",
|
|
2468
|
-
" /clear \u2014
|
|
2473
|
+
" /clear \u2014 Start a new session (previous conversation is kept)",
|
|
2469
2474
|
" /compact [hint] \u2014 Compress conversation history",
|
|
2470
2475
|
" /think [on|off] \u2014 Toggle extended thinking mode",
|
|
2471
2476
|
" /plan [execute|exit|status] \u2014 Read-only planning mode (bare /plan enters it)",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FHRIDE2T.js";
|
|
5
5
|
import "./chunk-GHWZVPUV.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-H2VE4TTN.js";
|
|
7
7
|
import "./chunk-4DEMGCK4.js";
|
|
8
8
|
import "./chunk-UUSRWSSX.js";
|
|
9
9
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -14,7 +14,7 @@ import "./chunk-NYNSYLFY.js";
|
|
|
14
14
|
import "./chunk-3FEZSLGI.js";
|
|
15
15
|
import {
|
|
16
16
|
runTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L7C34TFI.js";
|
|
18
18
|
import {
|
|
19
19
|
getDangerLevel,
|
|
20
20
|
schemaToJsonSchema
|
|
@@ -23,10 +23,10 @@ import "./chunk-TU3L3PW7.js";
|
|
|
23
23
|
import "./chunk-HOSJZMQS.js";
|
|
24
24
|
import "./chunk-IW3Q7AE5.js";
|
|
25
25
|
import "./chunk-4BKXL7SM.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-J3RWNQOF.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
30
30
|
|
|
31
31
|
// src/mcp/server.ts
|
|
32
32
|
import { createInterface } from "readline";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
isToolCapableProvider,
|
|
6
6
|
truncateOutput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FHRIDE2T.js";
|
|
8
8
|
import "./chunk-GHWZVPUV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-H2VE4TTN.js";
|
|
10
10
|
import "./chunk-4DEMGCK4.js";
|
|
11
11
|
import "./chunk-UUSRWSSX.js";
|
|
12
12
|
import "./chunk-CKH4KQ4E.js";
|
|
@@ -17,7 +17,7 @@ import "./chunk-NYNSYLFY.js";
|
|
|
17
17
|
import "./chunk-3FEZSLGI.js";
|
|
18
18
|
import {
|
|
19
19
|
runTool
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-L7C34TFI.js";
|
|
21
21
|
import {
|
|
22
22
|
getDangerLevel,
|
|
23
23
|
runLeanAgentLoop
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
atomicWriteFileSync
|
|
29
29
|
} from "./chunk-IW3Q7AE5.js";
|
|
30
30
|
import "./chunk-4BKXL7SM.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-J3RWNQOF.js";
|
|
32
32
|
import {
|
|
33
33
|
SUBAGENT_ALLOWED_TOOLS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2FCKZ3OS.js";
|
|
35
35
|
|
|
36
36
|
// src/hub/task-orchestrator.ts
|
|
37
37
|
import { createInterface } from "readline";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-DPTEC6AQ.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4XJVSMZ6.js";
|
|
12
12
|
import "./chunk-TU3L3PW7.js";
|
|
13
13
|
import "./chunk-IW3Q7AE5.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2FCKZ3OS.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|
|
17
17
|
function classifyRowCost(row) {
|