jinzd-ai-cli 0.4.187 → 0.4.189
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-UTP6NYVX.js → batch-FPPAYC6L.js} +2 -2
- package/dist/{chat-index-2I7ZHRE5.js → chat-index-JXTYDRCY.js} +1 -1
- package/dist/{chat-index-BE4TPLFH.js → chat-index-WDMVP7BN.js} +1 -1
- package/dist/{chunk-MVK25WZW.js → chunk-3SZ7SREY.js} +1 -1
- package/dist/{chunk-MM3F43H6.js → chunk-4UZE4ADL.js} +54 -23
- package/dist/{chunk-4SZ6X47A.js → chunk-5FV2V3TB.js} +1 -1
- package/dist/{chunk-T5VKNPLD.js → chunk-KIGVJVX4.js} +52 -23
- package/dist/{chunk-43T4MY5B.js → chunk-MH3AFJGV.js} +1 -1
- package/dist/{chunk-UAJKGLRV.js → chunk-NBZ443LN.js} +1 -1
- package/dist/{chunk-SOWBY545.js → chunk-RFXZQBU4.js} +1 -1
- package/dist/{chunk-Q6BSUIDV.js → chunk-SH73ZVHY.js} +6 -4
- package/dist/{chunk-ZTBUTA24.js → chunk-TEJ4HYLM.js} +2 -2
- package/dist/{chunk-L5L5B7HD.js → chunk-UTO2YO3K.js} +1 -1
- package/dist/{ci-2WFKSG2J.js → ci-CGNVIV6U.js} +13 -6
- package/dist/{constants-XEL5347E.js → constants-EJF3DOM5.js} +1 -1
- package/dist/{doctor-cli-MYJFAWKV.js → doctor-cli-WFH6DYVL.js} +4 -4
- package/dist/electron-server.js +12 -10
- package/dist/{hub-CHE7JDIH.js → hub-LCB3RGVQ.js} +1 -1
- package/dist/index.js +18 -18
- package/dist/{run-tests-Z7IGVS2W.js → run-tests-R7QATG6O.js} +2 -2
- package/dist/{run-tests-NWRKAVFS.js → run-tests-XANJLGXT.js} +1 -1
- package/dist/{server-25WVH5YX.js → server-HYLAZODW.js} +5 -5
- package/dist/{server-2B5JDVJS.js → server-ULMPX3CS.js} +15 -15
- package/dist/{task-orchestrator-DC7NGBQA.js → task-orchestrator-UKU2O6IE.js} +5 -5
- package/dist/{usage-ZVKFH7BM.js → usage-4R36JZFP.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-NBZ443LN.js";
|
|
5
5
|
import "./chunk-TZQHYZKT.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-RFXZQBU4.js";
|
|
7
7
|
import "./chunk-PDX44BCA.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/batch.ts
|
|
@@ -9,10 +9,47 @@ import {
|
|
|
9
9
|
} from "./chunk-SLSWPBK3.js";
|
|
10
10
|
|
|
11
11
|
// src/memory/chat-index.ts
|
|
12
|
-
import
|
|
12
|
+
import fs2 from "fs";
|
|
13
13
|
import path from "path";
|
|
14
14
|
import os from "os";
|
|
15
15
|
import crypto from "crypto";
|
|
16
|
+
|
|
17
|
+
// src/core/atomic-write.ts
|
|
18
|
+
import fs from "fs";
|
|
19
|
+
var RETRYABLE_CODES = /* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"]);
|
|
20
|
+
var MAX_RENAME_RETRIES = 10;
|
|
21
|
+
function sleepSync(ms) {
|
|
22
|
+
const sab = new Int32Array(new SharedArrayBuffer(4));
|
|
23
|
+
Atomics.wait(sab, 0, 0, ms);
|
|
24
|
+
}
|
|
25
|
+
function atomicWriteFileSync(target, data) {
|
|
26
|
+
const tmp = `${target}.tmp`;
|
|
27
|
+
fs.writeFileSync(tmp, data);
|
|
28
|
+
for (let attempt = 0; ; attempt++) {
|
|
29
|
+
try {
|
|
30
|
+
fs.renameSync(tmp, target);
|
|
31
|
+
return;
|
|
32
|
+
} catch (err) {
|
|
33
|
+
const code = err.code;
|
|
34
|
+
if (attempt < MAX_RENAME_RETRIES && code && RETRYABLE_CODES.has(code)) {
|
|
35
|
+
sleepSync(5 * (attempt + 1));
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
fs.writeFileSync(target, data);
|
|
40
|
+
try {
|
|
41
|
+
fs.unlinkSync(tmp);
|
|
42
|
+
} catch {
|
|
43
|
+
}
|
|
44
|
+
return;
|
|
45
|
+
} catch {
|
|
46
|
+
throw err;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/memory/chat-index.ts
|
|
16
53
|
var MEMORY_DIR_NAME = "memory-index";
|
|
17
54
|
var CHUNKS_FILE = "chunks.json";
|
|
18
55
|
var VECTORS_FILE = "vectors.vec";
|
|
@@ -99,7 +136,7 @@ function writeVectorsFile(chunks, vectors) {
|
|
|
99
136
|
);
|
|
100
137
|
}
|
|
101
138
|
const dir = memoryIndexDir();
|
|
102
|
-
|
|
139
|
+
fs2.mkdirSync(dir, { recursive: true });
|
|
103
140
|
const totalBytes = VEC_HEADER_BYTES + vectors.byteLength;
|
|
104
141
|
const buf = Buffer.alloc(totalBytes);
|
|
105
142
|
buf.writeUInt32LE(VEC_MAGIC, 0);
|
|
@@ -107,17 +144,14 @@ function writeVectorsFile(chunks, vectors) {
|
|
|
107
144
|
buf.writeUInt32LE(chunks.length, 8);
|
|
108
145
|
buf.writeUInt32LE(EMBEDDING_DIM, 12);
|
|
109
146
|
Buffer.from(vectors.buffer, vectors.byteOffset, vectors.byteLength).copy(buf, VEC_HEADER_BYTES);
|
|
110
|
-
|
|
111
|
-
const tmp = `${target}.tmp`;
|
|
112
|
-
fs.writeFileSync(tmp, buf);
|
|
113
|
-
fs.renameSync(tmp, target);
|
|
147
|
+
atomicWriteFileSync(vectorsPath(), buf);
|
|
114
148
|
}
|
|
115
149
|
function readVectorsFile(expectedCount) {
|
|
116
150
|
const p = vectorsPath();
|
|
117
|
-
if (!
|
|
151
|
+
if (!fs2.existsSync(p)) return null;
|
|
118
152
|
let buf;
|
|
119
153
|
try {
|
|
120
|
-
buf =
|
|
154
|
+
buf = fs2.readFileSync(p);
|
|
121
155
|
} catch {
|
|
122
156
|
return null;
|
|
123
157
|
}
|
|
@@ -136,17 +170,14 @@ function readVectorsFile(expectedCount) {
|
|
|
136
170
|
}
|
|
137
171
|
function writeIndexFile(idx) {
|
|
138
172
|
const dir = memoryIndexDir();
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const tmp = `${target}.tmp`;
|
|
142
|
-
fs.writeFileSync(tmp, JSON.stringify(idx, null, 2), "utf-8");
|
|
143
|
-
fs.renameSync(tmp, target);
|
|
173
|
+
fs2.mkdirSync(dir, { recursive: true });
|
|
174
|
+
atomicWriteFileSync(chunksPath(), JSON.stringify(idx, null, 2));
|
|
144
175
|
}
|
|
145
176
|
function readIndexFile() {
|
|
146
177
|
const p = chunksPath();
|
|
147
|
-
if (!
|
|
178
|
+
if (!fs2.existsSync(p)) return null;
|
|
148
179
|
try {
|
|
149
|
-
const raw =
|
|
180
|
+
const raw = fs2.readFileSync(p, "utf-8");
|
|
150
181
|
const data = JSON.parse(raw);
|
|
151
182
|
if (data.version !== 1) return null;
|
|
152
183
|
return data;
|
|
@@ -163,24 +194,24 @@ function loadChatIndex() {
|
|
|
163
194
|
}
|
|
164
195
|
function clearChatIndex() {
|
|
165
196
|
try {
|
|
166
|
-
if (
|
|
197
|
+
if (fs2.existsSync(chunksPath())) fs2.unlinkSync(chunksPath());
|
|
167
198
|
} catch {
|
|
168
199
|
}
|
|
169
200
|
try {
|
|
170
|
-
if (
|
|
201
|
+
if (fs2.existsSync(vectorsPath())) fs2.unlinkSync(vectorsPath());
|
|
171
202
|
} catch {
|
|
172
203
|
}
|
|
173
204
|
}
|
|
174
205
|
function listSessionFiles() {
|
|
175
206
|
const dir = historyDir();
|
|
176
|
-
if (!
|
|
207
|
+
if (!fs2.existsSync(dir)) return [];
|
|
177
208
|
const out = [];
|
|
178
|
-
for (const name of
|
|
209
|
+
for (const name of fs2.readdirSync(dir)) {
|
|
179
210
|
if (!name.endsWith(".json")) continue;
|
|
180
211
|
const id = name.replace(/\.json$/, "");
|
|
181
212
|
const p = path.join(dir, name);
|
|
182
213
|
try {
|
|
183
|
-
const st =
|
|
214
|
+
const st = fs2.statSync(p);
|
|
184
215
|
out.push({ id, path: p, mtime: st.mtimeMs });
|
|
185
216
|
} catch {
|
|
186
217
|
}
|
|
@@ -189,7 +220,7 @@ function listSessionFiles() {
|
|
|
189
220
|
}
|
|
190
221
|
function readSession(p) {
|
|
191
222
|
try {
|
|
192
|
-
const data = JSON.parse(
|
|
223
|
+
const data = JSON.parse(fs2.readFileSync(p, "utf-8"));
|
|
193
224
|
if (!data.id || !Array.isArray(data.messages)) return null;
|
|
194
225
|
return data;
|
|
195
226
|
} catch {
|
|
@@ -332,8 +363,8 @@ function getChatIndexStatus() {
|
|
|
332
363
|
chunksFileSizeBytes: 0
|
|
333
364
|
};
|
|
334
365
|
try {
|
|
335
|
-
if (
|
|
336
|
-
if (
|
|
366
|
+
if (fs2.existsSync(vectorsPath())) status.vecFileSizeBytes = fs2.statSync(vectorsPath()).size;
|
|
367
|
+
if (fs2.existsSync(chunksPath())) status.chunksFileSizeBytes = fs2.statSync(chunksPath()).size;
|
|
337
368
|
} catch {
|
|
338
369
|
}
|
|
339
370
|
const idx = readIndexFile();
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-JV5N65KN.js";
|
|
6
6
|
|
|
7
7
|
// src/memory/chat-index.ts
|
|
8
|
-
import
|
|
8
|
+
import fs2 from "fs";
|
|
9
9
|
import path from "path";
|
|
10
10
|
import os from "os";
|
|
11
11
|
import crypto from "crypto";
|
|
@@ -118,6 +118,41 @@ function redactJson(value, options) {
|
|
|
118
118
|
return { value: redacted, hits: allHits };
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
// src/core/atomic-write.ts
|
|
122
|
+
import fs from "fs";
|
|
123
|
+
var RETRYABLE_CODES = /* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"]);
|
|
124
|
+
var MAX_RENAME_RETRIES = 10;
|
|
125
|
+
function sleepSync(ms) {
|
|
126
|
+
const sab = new Int32Array(new SharedArrayBuffer(4));
|
|
127
|
+
Atomics.wait(sab, 0, 0, ms);
|
|
128
|
+
}
|
|
129
|
+
function atomicWriteFileSync(target, data) {
|
|
130
|
+
const tmp = `${target}.tmp`;
|
|
131
|
+
fs.writeFileSync(tmp, data);
|
|
132
|
+
for (let attempt = 0; ; attempt++) {
|
|
133
|
+
try {
|
|
134
|
+
fs.renameSync(tmp, target);
|
|
135
|
+
return;
|
|
136
|
+
} catch (err) {
|
|
137
|
+
const code = err.code;
|
|
138
|
+
if (attempt < MAX_RENAME_RETRIES && code && RETRYABLE_CODES.has(code)) {
|
|
139
|
+
sleepSync(5 * (attempt + 1));
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
fs.writeFileSync(target, data);
|
|
144
|
+
try {
|
|
145
|
+
fs.unlinkSync(tmp);
|
|
146
|
+
} catch {
|
|
147
|
+
}
|
|
148
|
+
return;
|
|
149
|
+
} catch {
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
121
156
|
// src/memory/chat-index.ts
|
|
122
157
|
var MEMORY_DIR_NAME = "memory-index";
|
|
123
158
|
var CHUNKS_FILE = "chunks.json";
|
|
@@ -205,7 +240,7 @@ function writeVectorsFile(chunks, vectors) {
|
|
|
205
240
|
);
|
|
206
241
|
}
|
|
207
242
|
const dir = memoryIndexDir();
|
|
208
|
-
|
|
243
|
+
fs2.mkdirSync(dir, { recursive: true });
|
|
209
244
|
const totalBytes = VEC_HEADER_BYTES + vectors.byteLength;
|
|
210
245
|
const buf = Buffer.alloc(totalBytes);
|
|
211
246
|
buf.writeUInt32LE(VEC_MAGIC, 0);
|
|
@@ -213,17 +248,14 @@ function writeVectorsFile(chunks, vectors) {
|
|
|
213
248
|
buf.writeUInt32LE(chunks.length, 8);
|
|
214
249
|
buf.writeUInt32LE(EMBEDDING_DIM, 12);
|
|
215
250
|
Buffer.from(vectors.buffer, vectors.byteOffset, vectors.byteLength).copy(buf, VEC_HEADER_BYTES);
|
|
216
|
-
|
|
217
|
-
const tmp = `${target}.tmp`;
|
|
218
|
-
fs.writeFileSync(tmp, buf);
|
|
219
|
-
fs.renameSync(tmp, target);
|
|
251
|
+
atomicWriteFileSync(vectorsPath(), buf);
|
|
220
252
|
}
|
|
221
253
|
function readVectorsFile(expectedCount) {
|
|
222
254
|
const p = vectorsPath();
|
|
223
|
-
if (!
|
|
255
|
+
if (!fs2.existsSync(p)) return null;
|
|
224
256
|
let buf;
|
|
225
257
|
try {
|
|
226
|
-
buf =
|
|
258
|
+
buf = fs2.readFileSync(p);
|
|
227
259
|
} catch {
|
|
228
260
|
return null;
|
|
229
261
|
}
|
|
@@ -242,17 +274,14 @@ function readVectorsFile(expectedCount) {
|
|
|
242
274
|
}
|
|
243
275
|
function writeIndexFile(idx) {
|
|
244
276
|
const dir = memoryIndexDir();
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
const tmp = `${target}.tmp`;
|
|
248
|
-
fs.writeFileSync(tmp, JSON.stringify(idx, null, 2), "utf-8");
|
|
249
|
-
fs.renameSync(tmp, target);
|
|
277
|
+
fs2.mkdirSync(dir, { recursive: true });
|
|
278
|
+
atomicWriteFileSync(chunksPath(), JSON.stringify(idx, null, 2));
|
|
250
279
|
}
|
|
251
280
|
function readIndexFile() {
|
|
252
281
|
const p = chunksPath();
|
|
253
|
-
if (!
|
|
282
|
+
if (!fs2.existsSync(p)) return null;
|
|
254
283
|
try {
|
|
255
|
-
const raw =
|
|
284
|
+
const raw = fs2.readFileSync(p, "utf-8");
|
|
256
285
|
const data = JSON.parse(raw);
|
|
257
286
|
if (data.version !== 1) return null;
|
|
258
287
|
return data;
|
|
@@ -269,24 +298,24 @@ function loadChatIndex() {
|
|
|
269
298
|
}
|
|
270
299
|
function clearChatIndex() {
|
|
271
300
|
try {
|
|
272
|
-
if (
|
|
301
|
+
if (fs2.existsSync(chunksPath())) fs2.unlinkSync(chunksPath());
|
|
273
302
|
} catch {
|
|
274
303
|
}
|
|
275
304
|
try {
|
|
276
|
-
if (
|
|
305
|
+
if (fs2.existsSync(vectorsPath())) fs2.unlinkSync(vectorsPath());
|
|
277
306
|
} catch {
|
|
278
307
|
}
|
|
279
308
|
}
|
|
280
309
|
function listSessionFiles() {
|
|
281
310
|
const dir = historyDir();
|
|
282
|
-
if (!
|
|
311
|
+
if (!fs2.existsSync(dir)) return [];
|
|
283
312
|
const out = [];
|
|
284
|
-
for (const name of
|
|
313
|
+
for (const name of fs2.readdirSync(dir)) {
|
|
285
314
|
if (!name.endsWith(".json")) continue;
|
|
286
315
|
const id = name.replace(/\.json$/, "");
|
|
287
316
|
const p = path.join(dir, name);
|
|
288
317
|
try {
|
|
289
|
-
const st =
|
|
318
|
+
const st = fs2.statSync(p);
|
|
290
319
|
out.push({ id, path: p, mtime: st.mtimeMs });
|
|
291
320
|
} catch {
|
|
292
321
|
}
|
|
@@ -295,7 +324,7 @@ function listSessionFiles() {
|
|
|
295
324
|
}
|
|
296
325
|
function readSession(p) {
|
|
297
326
|
try {
|
|
298
|
-
const data = JSON.parse(
|
|
327
|
+
const data = JSON.parse(fs2.readFileSync(p, "utf-8"));
|
|
299
328
|
if (!data.id || !Array.isArray(data.messages)) return null;
|
|
300
329
|
return data;
|
|
301
330
|
} catch {
|
|
@@ -438,8 +467,8 @@ function getChatIndexStatus() {
|
|
|
438
467
|
chunksFileSizeBytes: 0
|
|
439
468
|
};
|
|
440
469
|
try {
|
|
441
|
-
if (
|
|
442
|
-
if (
|
|
470
|
+
if (fs2.existsSync(vectorsPath())) status.vecFileSizeBytes = fs2.statSync(vectorsPath()).size;
|
|
471
|
+
if (fs2.existsSync(chunksPath())) status.chunksFileSizeBytes = fs2.statSync(chunksPath()).size;
|
|
443
472
|
} catch {
|
|
444
473
|
}
|
|
445
474
|
const idx = readIndexFile();
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-HDSKW7Q3.js";
|
|
6
6
|
import {
|
|
7
7
|
runTestsTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5FV2V3TB.js";
|
|
9
9
|
import {
|
|
10
10
|
runTool
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3SZ7SREY.js";
|
|
12
12
|
import {
|
|
13
13
|
getDangerLevel,
|
|
14
14
|
isFileWriteTool
|
|
@@ -25,14 +25,14 @@ import {
|
|
|
25
25
|
SUBAGENT_ALLOWED_TOOLS,
|
|
26
26
|
SUBAGENT_DEFAULT_MAX_ROUNDS,
|
|
27
27
|
SUBAGENT_MAX_ROUNDS_LIMIT
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-RFXZQBU4.js";
|
|
29
29
|
import {
|
|
30
30
|
fileCheckpoints
|
|
31
31
|
} from "./chunk-4BKXL7SM.js";
|
|
32
32
|
import {
|
|
33
33
|
loadChatIndex,
|
|
34
34
|
searchChatMemory
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-4UZE4ADL.js";
|
|
36
36
|
import {
|
|
37
37
|
indexProject
|
|
38
38
|
} from "./chunk-VNNYHW6N.js";
|
|
@@ -3455,6 +3455,8 @@ var webFetchTool = {
|
|
|
3455
3455
|
redirect: "manual",
|
|
3456
3456
|
// 手动控制重定向
|
|
3457
3457
|
dispatcher
|
|
3458
|
+
// dual undici-types:`dispatcher` 字段在 undici 与 @types/node 内置的
|
|
3459
|
+
// undici-types 两份 RequestInit 间判不兼容,localized 转换。
|
|
3458
3460
|
});
|
|
3459
3461
|
if (r.status >= 300 && r.status < 400) {
|
|
3460
3462
|
if (hop >= MAX_REDIRECTS) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
truncateForPersist
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SH73ZVHY.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-RFXZQBU4.js";
|
|
15
15
|
|
|
16
16
|
// src/mcp/client.ts
|
|
17
17
|
import { spawn } from "child_process";
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
import "./chunk-HIU2SH4V.js";
|
|
11
11
|
import {
|
|
12
12
|
ConfigManager
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NBZ443LN.js";
|
|
14
14
|
import "./chunk-TZQHYZKT.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RFXZQBU4.js";
|
|
18
18
|
import "./chunk-PDX44BCA.js";
|
|
19
19
|
|
|
20
20
|
// src/cli/ci.ts
|
|
@@ -76,7 +76,7 @@ function countSeverity(md) {
|
|
|
76
76
|
async function runOnePrompt(registry, providerId, modelId, prompt) {
|
|
77
77
|
const provider = registry.get(providerId);
|
|
78
78
|
const resp = await provider.chat({
|
|
79
|
-
messages: [{ role: "user", content: prompt }],
|
|
79
|
+
messages: [{ role: "user", content: prompt, timestamp: /* @__PURE__ */ new Date() }],
|
|
80
80
|
model: modelId,
|
|
81
81
|
stream: false,
|
|
82
82
|
temperature: 0.3,
|
|
@@ -150,9 +150,16 @@ async function runCi(opts) {
|
|
|
150
150
|
const { diff: trimmedDiff, truncated } = truncateDiff(diff, maxDiff);
|
|
151
151
|
const gitCtx = buildGitContextStr(opts);
|
|
152
152
|
const config = new ConfigManager();
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
const registry = new ProviderRegistry();
|
|
154
|
+
await registry.initialize(
|
|
155
|
+
(id) => config.getApiKey(id),
|
|
156
|
+
(id) => ({
|
|
157
|
+
baseUrl: config.get("customBaseUrls")[id],
|
|
158
|
+
timeout: config.get("timeouts")[id],
|
|
159
|
+
proxy: config.get("proxy")
|
|
160
|
+
}),
|
|
161
|
+
config.get("customProviders")
|
|
162
|
+
);
|
|
156
163
|
const providerId = opts.provider ?? config.getDefaultProvider();
|
|
157
164
|
if (!registry.has(providerId)) {
|
|
158
165
|
return {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
getConfigDirUsage,
|
|
4
4
|
listRecentCrashes
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MH3AFJGV.js";
|
|
6
6
|
import {
|
|
7
7
|
ProviderRegistry
|
|
8
8
|
} from "./chunk-IQ7JE43O.js";
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
getTopFailingTools,
|
|
12
12
|
getTopUsedTools,
|
|
13
13
|
resetStats
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3SZ7SREY.js";
|
|
15
15
|
import "./chunk-HIU2SH4V.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigManager
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NBZ443LN.js";
|
|
19
19
|
import "./chunk-TZQHYZKT.js";
|
|
20
20
|
import {
|
|
21
21
|
DEV_STATE_FILE_NAME,
|
|
22
22
|
MEMORY_FILE_NAME,
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RFXZQBU4.js";
|
|
25
25
|
import "./chunk-PDX44BCA.js";
|
|
26
26
|
|
|
27
27
|
// src/diagnostics/doctor-cli.ts
|
package/dist/electron-server.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
VERSION,
|
|
37
37
|
buildUserIdentityPrompt,
|
|
38
38
|
runTestsTool
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UTO2YO3K.js";
|
|
40
40
|
import {
|
|
41
41
|
hasSemanticIndex,
|
|
42
42
|
semanticSearch
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
loadChatIndex,
|
|
50
50
|
redactJson,
|
|
51
51
|
searchChatMemory
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-KIGVJVX4.js";
|
|
53
53
|
import "./chunk-JV5N65KN.js";
|
|
54
54
|
import "./chunk-3RG5ZIWI.js";
|
|
55
55
|
|
|
@@ -7985,6 +7985,8 @@ var webFetchTool = {
|
|
|
7985
7985
|
redirect: "manual",
|
|
7986
7986
|
// 手动控制重定向
|
|
7987
7987
|
dispatcher
|
|
7988
|
+
// dual undici-types:`dispatcher` 字段在 undici 与 @types/node 内置的
|
|
7989
|
+
// undici-types 两份 RequestInit 间判不兼容,localized 转换。
|
|
7988
7990
|
});
|
|
7989
7991
|
if (r.status >= 300 && r.status < 400) {
|
|
7990
7992
|
if (hop >= MAX_REDIRECTS) {
|
|
@@ -12984,9 +12986,9 @@ This fresh stream has NO tools. Produce ONLY the document body: start with a mar
|
|
|
12984
12986
|
this.send({
|
|
12985
12987
|
type: "tool_call_result",
|
|
12986
12988
|
callId: call.id,
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12989
|
+
toolName: call.name,
|
|
12990
|
+
content: summary,
|
|
12991
|
+
isError: true
|
|
12990
12992
|
});
|
|
12991
12993
|
return { content: "", summary, isError: true };
|
|
12992
12994
|
}
|
|
@@ -14076,7 +14078,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
14076
14078
|
case "test": {
|
|
14077
14079
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
14078
14080
|
try {
|
|
14079
|
-
const { executeTests } = await import("./run-tests-
|
|
14081
|
+
const { executeTests } = await import("./run-tests-XANJLGXT.js");
|
|
14080
14082
|
const argStr = args.join(" ").trim();
|
|
14081
14083
|
let testArgs = {};
|
|
14082
14084
|
if (argStr) {
|
|
@@ -14600,7 +14602,7 @@ Add .md files to create commands.` });
|
|
|
14600
14602
|
return;
|
|
14601
14603
|
}
|
|
14602
14604
|
try {
|
|
14603
|
-
const { searchChatMemory: searchChatMemory2, loadChatIndex: loadChatIndex2 } = await import("./chat-index-
|
|
14605
|
+
const { searchChatMemory: searchChatMemory2, loadChatIndex: loadChatIndex2 } = await import("./chat-index-WDMVP7BN.js");
|
|
14604
14606
|
const loaded = loadChatIndex2();
|
|
14605
14607
|
if (!loaded || loaded.idx.chunks.length === 0) {
|
|
14606
14608
|
this.send({ type: "memory_hits", query: q, hits: [], indexMissing: true });
|
|
@@ -14636,7 +14638,7 @@ Add .md files to create commands.` });
|
|
|
14636
14638
|
}
|
|
14637
14639
|
async handleMemoryStatus() {
|
|
14638
14640
|
try {
|
|
14639
|
-
const { getChatIndexStatus } = await import("./chat-index-
|
|
14641
|
+
const { getChatIndexStatus } = await import("./chat-index-WDMVP7BN.js");
|
|
14640
14642
|
const s = getChatIndexStatus();
|
|
14641
14643
|
this.send({
|
|
14642
14644
|
type: "memory_status",
|
|
@@ -14661,7 +14663,7 @@ Add .md files to create commands.` });
|
|
|
14661
14663
|
type: "info",
|
|
14662
14664
|
message: full ? "\u{1F9E0} Rebuilding chat memory index (this may take a while on first run \u2014 ~117 MB embedder)." : "\u{1F9E0} Refreshing chat memory index (incremental)\u2026"
|
|
14663
14665
|
});
|
|
14664
|
-
const { buildChatIndex } = await import("./chat-index-
|
|
14666
|
+
const { buildChatIndex } = await import("./chat-index-WDMVP7BN.js");
|
|
14665
14667
|
const stats = await buildChatIndex({
|
|
14666
14668
|
full,
|
|
14667
14669
|
onProgress: (p) => {
|
|
@@ -15618,7 +15620,7 @@ async function startWebServer(options = {}) {
|
|
|
15618
15620
|
}
|
|
15619
15621
|
});
|
|
15620
15622
|
app.get("/api/sessions/:id/replay", requireAuth, (req, res) => {
|
|
15621
|
-
const id = req.params.id;
|
|
15623
|
+
const id = String(req.params.id);
|
|
15622
15624
|
if (!/^[a-f0-9-]{36}$/i.test(id)) {
|
|
15623
15625
|
res.status(400).json({ error: "Invalid session id" });
|
|
15624
15626
|
return;
|
|
@@ -155,7 +155,7 @@ ${content}`);
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
async function runTaskMode(config, providers, configManager, topic) {
|
|
158
|
-
const { TaskOrchestrator } = await import("./task-orchestrator-
|
|
158
|
+
const { TaskOrchestrator } = await import("./task-orchestrator-UKU2O6IE.js");
|
|
159
159
|
const orchestrator = new TaskOrchestrator(config, providers, configManager);
|
|
160
160
|
let interrupted = false;
|
|
161
161
|
const onSigint = () => {
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
saveDevState,
|
|
16
16
|
sessionHasMeaningfulContent,
|
|
17
17
|
setupProxy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TEJ4HYLM.js";
|
|
19
19
|
import {
|
|
20
20
|
ToolExecutor,
|
|
21
21
|
ToolRegistry,
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
spawnAgentContext,
|
|
35
35
|
theme,
|
|
36
36
|
undoStack
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-SH73ZVHY.js";
|
|
38
38
|
import "./chunk-HDSKW7Q3.js";
|
|
39
39
|
import "./chunk-ZWVIDFGY.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-5FV2V3TB.js";
|
|
41
41
|
import {
|
|
42
42
|
SessionManager,
|
|
43
43
|
getContentText
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getConfigDirUsage,
|
|
55
55
|
listRecentCrashes,
|
|
56
56
|
writeCrashLog
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-MH3AFJGV.js";
|
|
58
58
|
import {
|
|
59
59
|
CONTENT_ONLY_STREAM_REMINDER,
|
|
60
60
|
ProviderRegistry,
|
|
@@ -78,11 +78,11 @@ import {
|
|
|
78
78
|
getTopFailingTools,
|
|
79
79
|
getTopUsedTools,
|
|
80
80
|
installFlushOnExit
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-3SZ7SREY.js";
|
|
82
82
|
import "./chunk-HIU2SH4V.js";
|
|
83
83
|
import {
|
|
84
84
|
ConfigManager
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-NBZ443LN.js";
|
|
86
86
|
import {
|
|
87
87
|
AuthError,
|
|
88
88
|
ProviderError,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
SKILLS_DIR_NAME,
|
|
110
110
|
VERSION,
|
|
111
111
|
buildUserIdentityPrompt
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-RFXZQBU4.js";
|
|
113
113
|
import {
|
|
114
114
|
formatGitContextForPrompt,
|
|
115
115
|
getGitContext,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
clearChatIndex,
|
|
124
124
|
getChatIndexStatus,
|
|
125
125
|
searchChatMemory
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-4UZE4ADL.js";
|
|
127
127
|
import "./chunk-KHYD3WXE.js";
|
|
128
128
|
import {
|
|
129
129
|
DEFAULT_PATTERNS,
|
|
@@ -1824,7 +1824,7 @@ No tools match "${filter}".
|
|
|
1824
1824
|
const { join: join5 } = await import("path");
|
|
1825
1825
|
const { existsSync: existsSync5 } = await import("fs");
|
|
1826
1826
|
const { getGitRoot: getGitRoot2 } = await import("./git-context-7KIP4X2V.js");
|
|
1827
|
-
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-
|
|
1827
|
+
const { MCP_PROJECT_CONFIG_NAME: MCP_PROJECT_CONFIG_NAME2 } = await import("./constants-EJF3DOM5.js");
|
|
1828
1828
|
const { approveProject, hashMcpFile } = await import("./project-trust-IFM7FXEV.js");
|
|
1829
1829
|
const cwd = process.cwd();
|
|
1830
1830
|
const projectRoot = getGitRoot2(cwd) ?? cwd;
|
|
@@ -2885,7 +2885,7 @@ ${hint}` : "")
|
|
|
2885
2885
|
usage: "/test [command|filter]",
|
|
2886
2886
|
async execute(args, ctx) {
|
|
2887
2887
|
try {
|
|
2888
|
-
const { executeTests } = await import("./run-tests-
|
|
2888
|
+
const { executeTests } = await import("./run-tests-R7QATG6O.js");
|
|
2889
2889
|
const argStr = args.join(" ").trim();
|
|
2890
2890
|
let testArgs = {};
|
|
2891
2891
|
if (argStr) {
|
|
@@ -5480,7 +5480,7 @@ Session '${this.resumeSessionId}' not found.
|
|
|
5480
5480
|
})();
|
|
5481
5481
|
void (async () => {
|
|
5482
5482
|
try {
|
|
5483
|
-
const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-
|
|
5483
|
+
const { getChatIndexStatus: getChatIndexStatus2, buildChatIndex: buildChatIndex2 } = await import("./chat-index-JXTYDRCY.js");
|
|
5484
5484
|
const initial = getChatIndexStatus2();
|
|
5485
5485
|
this.chatMemoryStatus = {
|
|
5486
5486
|
exists: initial.exists,
|
|
@@ -7256,7 +7256,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
7256
7256
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
7257
7257
|
process.exit(1);
|
|
7258
7258
|
}
|
|
7259
|
-
const { startWebServer } = await import("./server-
|
|
7259
|
+
const { startWebServer } = await import("./server-ULMPX3CS.js");
|
|
7260
7260
|
await startWebServer({ port, host: options.host });
|
|
7261
7261
|
});
|
|
7262
7262
|
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) => {
|
|
@@ -7423,16 +7423,16 @@ program.command("sessions").description("List recent conversation sessions").opt
|
|
|
7423
7423
|
console.log(footer + "\n");
|
|
7424
7424
|
});
|
|
7425
7425
|
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) => {
|
|
7426
|
-
const { runUsageCli } = await import("./usage-
|
|
7426
|
+
const { runUsageCli } = await import("./usage-4R36JZFP.js");
|
|
7427
7427
|
await runUsageCli(options);
|
|
7428
7428
|
});
|
|
7429
7429
|
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) => {
|
|
7430
|
-
const { runDoctorCli } = await import("./doctor-cli-
|
|
7430
|
+
const { runDoctorCli } = await import("./doctor-cli-WFH6DYVL.js");
|
|
7431
7431
|
await runDoctorCli({ json: !!options.json, resetStats: !!options.resetStats });
|
|
7432
7432
|
});
|
|
7433
7433
|
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) => {
|
|
7434
7434
|
try {
|
|
7435
|
-
const batch = await import("./batch-
|
|
7435
|
+
const batch = await import("./batch-FPPAYC6L.js");
|
|
7436
7436
|
switch (action) {
|
|
7437
7437
|
case "submit":
|
|
7438
7438
|
if (!arg) {
|
|
@@ -7475,7 +7475,7 @@ program.command("batch <action> [arg] [arg2]").description("Anthropic Message Ba
|
|
|
7475
7475
|
}
|
|
7476
7476
|
});
|
|
7477
7477
|
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) => {
|
|
7478
|
-
const { startMcpServer } = await import("./server-
|
|
7478
|
+
const { startMcpServer } = await import("./server-HYLAZODW.js");
|
|
7479
7479
|
await startMcpServer({
|
|
7480
7480
|
allowDestructive: !!options.allowDestructive,
|
|
7481
7481
|
allowOutsideCwd: !!options.allowOutsideCwd,
|
|
@@ -7484,7 +7484,7 @@ program.command("mcp-serve").description("Start an MCP server over STDIO, exposi
|
|
|
7484
7484
|
});
|
|
7485
7485
|
});
|
|
7486
7486
|
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; diff fetched via `gh pr diff <num>`", (v) => parseInt(v, 10)).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)").action(async (options) => {
|
|
7487
|
-
const { runCi } = await import("./ci-
|
|
7487
|
+
const { runCi } = await import("./ci-CGNVIV6U.js");
|
|
7488
7488
|
const result = await runCi({
|
|
7489
7489
|
pr: options.pr,
|
|
7490
7490
|
base: options.base,
|
|
@@ -7630,7 +7630,7 @@ program.command("hub [topic]").description("Start multi-agent hub (discuss / bra
|
|
|
7630
7630
|
}),
|
|
7631
7631
|
config.get("customProviders")
|
|
7632
7632
|
);
|
|
7633
|
-
const { startHub } = await import("./hub-
|
|
7633
|
+
const { startHub } = await import("./hub-LCB3RGVQ.js");
|
|
7634
7634
|
await startHub(
|
|
7635
7635
|
{
|
|
7636
7636
|
topic: topic ?? "",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ToolRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SH73ZVHY.js";
|
|
5
5
|
import "./chunk-HDSKW7Q3.js";
|
|
6
6
|
import "./chunk-ZWVIDFGY.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-5FV2V3TB.js";
|
|
8
8
|
import {
|
|
9
9
|
runTool
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3SZ7SREY.js";
|
|
11
11
|
import {
|
|
12
12
|
getDangerLevel,
|
|
13
13
|
schemaToJsonSchema
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
import "./chunk-TZQHYZKT.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RFXZQBU4.js";
|
|
19
19
|
import "./chunk-4BKXL7SM.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-4UZE4ADL.js";
|
|
21
21
|
import "./chunk-KHYD3WXE.js";
|
|
22
22
|
import "./chunk-SLSWPBK3.js";
|
|
23
23
|
import "./chunk-VNNYHW6N.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
loadDevState,
|
|
20
20
|
persistToolRound,
|
|
21
21
|
setupProxy
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TEJ4HYLM.js";
|
|
23
23
|
import {
|
|
24
24
|
ToolExecutor,
|
|
25
25
|
ToolRegistry,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
spawnAgentContext,
|
|
38
38
|
truncateOutput,
|
|
39
39
|
undoStack
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SH73ZVHY.js";
|
|
41
41
|
import "./chunk-HDSKW7Q3.js";
|
|
42
42
|
import "./chunk-ZWVIDFGY.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-5FV2V3TB.js";
|
|
44
44
|
import {
|
|
45
45
|
SessionManager,
|
|
46
46
|
getContentText
|
|
@@ -65,13 +65,13 @@ import {
|
|
|
65
65
|
} from "./chunk-IQ7JE43O.js";
|
|
66
66
|
import {
|
|
67
67
|
runTool
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-3SZ7SREY.js";
|
|
69
69
|
import {
|
|
70
70
|
getDangerLevel
|
|
71
71
|
} from "./chunk-HIU2SH4V.js";
|
|
72
72
|
import {
|
|
73
73
|
ConfigManager
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-NBZ443LN.js";
|
|
75
75
|
import "./chunk-TZQHYZKT.js";
|
|
76
76
|
import {
|
|
77
77
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
@@ -91,14 +91,14 @@ import {
|
|
|
91
91
|
SKILLS_DIR_NAME,
|
|
92
92
|
VERSION,
|
|
93
93
|
buildUserIdentityPrompt
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-RFXZQBU4.js";
|
|
95
95
|
import {
|
|
96
96
|
formatGitContextForPrompt,
|
|
97
97
|
getGitContext,
|
|
98
98
|
getGitRoot
|
|
99
99
|
} from "./chunk-HOSJZMQS.js";
|
|
100
100
|
import "./chunk-4BKXL7SM.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-4UZE4ADL.js";
|
|
102
102
|
import "./chunk-KHYD3WXE.js";
|
|
103
103
|
import "./chunk-SLSWPBK3.js";
|
|
104
104
|
import "./chunk-VNNYHW6N.js";
|
|
@@ -1345,9 +1345,9 @@ This fresh stream has NO tools. Produce ONLY the document body: start with a mar
|
|
|
1345
1345
|
this.send({
|
|
1346
1346
|
type: "tool_call_result",
|
|
1347
1347
|
callId: call.id,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1348
|
+
toolName: call.name,
|
|
1349
|
+
content: summary,
|
|
1350
|
+
isError: true
|
|
1351
1351
|
});
|
|
1352
1352
|
return { content: "", summary, isError: true };
|
|
1353
1353
|
}
|
|
@@ -2437,7 +2437,7 @@ ${undoResults.map((r) => ` \u2022 ${r}`).join("\n")}` });
|
|
|
2437
2437
|
case "test": {
|
|
2438
2438
|
this.send({ type: "info", message: "\u{1F9EA} Running tests..." });
|
|
2439
2439
|
try {
|
|
2440
|
-
const { executeTests } = await import("./run-tests-
|
|
2440
|
+
const { executeTests } = await import("./run-tests-R7QATG6O.js");
|
|
2441
2441
|
const argStr = args.join(" ").trim();
|
|
2442
2442
|
let testArgs = {};
|
|
2443
2443
|
if (argStr) {
|
|
@@ -2961,7 +2961,7 @@ Add .md files to create commands.` });
|
|
|
2961
2961
|
return;
|
|
2962
2962
|
}
|
|
2963
2963
|
try {
|
|
2964
|
-
const { searchChatMemory, loadChatIndex } = await import("./chat-index-
|
|
2964
|
+
const { searchChatMemory, loadChatIndex } = await import("./chat-index-JXTYDRCY.js");
|
|
2965
2965
|
const loaded = loadChatIndex();
|
|
2966
2966
|
if (!loaded || loaded.idx.chunks.length === 0) {
|
|
2967
2967
|
this.send({ type: "memory_hits", query: q, hits: [], indexMissing: true });
|
|
@@ -2997,7 +2997,7 @@ Add .md files to create commands.` });
|
|
|
2997
2997
|
}
|
|
2998
2998
|
async handleMemoryStatus() {
|
|
2999
2999
|
try {
|
|
3000
|
-
const { getChatIndexStatus } = await import("./chat-index-
|
|
3000
|
+
const { getChatIndexStatus } = await import("./chat-index-JXTYDRCY.js");
|
|
3001
3001
|
const s = getChatIndexStatus();
|
|
3002
3002
|
this.send({
|
|
3003
3003
|
type: "memory_status",
|
|
@@ -3022,7 +3022,7 @@ Add .md files to create commands.` });
|
|
|
3022
3022
|
type: "info",
|
|
3023
3023
|
message: full ? "\u{1F9E0} Rebuilding chat memory index (this may take a while on first run \u2014 ~117 MB embedder)." : "\u{1F9E0} Refreshing chat memory index (incremental)\u2026"
|
|
3024
3024
|
});
|
|
3025
|
-
const { buildChatIndex } = await import("./chat-index-
|
|
3025
|
+
const { buildChatIndex } = await import("./chat-index-JXTYDRCY.js");
|
|
3026
3026
|
const stats = await buildChatIndex({
|
|
3027
3027
|
full,
|
|
3028
3028
|
onProgress: (p) => {
|
|
@@ -3681,7 +3681,7 @@ async function startWebServer(options = {}) {
|
|
|
3681
3681
|
}
|
|
3682
3682
|
});
|
|
3683
3683
|
app.get("/api/sessions/:id/replay", requireAuth, (req, res) => {
|
|
3684
|
-
const id = req.params.id;
|
|
3684
|
+
const id = String(req.params.id);
|
|
3685
3685
|
if (!/^[a-f0-9-]{36}$/i.test(id)) {
|
|
3686
3686
|
res.status(400).json({ error: "Invalid session id" });
|
|
3687
3687
|
return;
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
ToolRegistry,
|
|
4
4
|
googleSearchContext,
|
|
5
5
|
truncateOutput
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SH73ZVHY.js";
|
|
7
7
|
import "./chunk-HDSKW7Q3.js";
|
|
8
8
|
import "./chunk-ZWVIDFGY.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-5FV2V3TB.js";
|
|
10
10
|
import {
|
|
11
11
|
runTool
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3SZ7SREY.js";
|
|
13
13
|
import {
|
|
14
14
|
getDangerLevel
|
|
15
15
|
} from "./chunk-HIU2SH4V.js";
|
|
16
16
|
import "./chunk-TZQHYZKT.js";
|
|
17
17
|
import {
|
|
18
18
|
SUBAGENT_ALLOWED_TOOLS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RFXZQBU4.js";
|
|
20
20
|
import "./chunk-4BKXL7SM.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-4UZE4ADL.js";
|
|
22
22
|
import "./chunk-KHYD3WXE.js";
|
|
23
23
|
import "./chunk-SLSWPBK3.js";
|
|
24
24
|
import "./chunk-VNNYHW6N.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-V37XOYOE.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigManager
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NBZ443LN.js";
|
|
12
12
|
import "./chunk-TZQHYZKT.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-RFXZQBU4.js";
|
|
14
14
|
import "./chunk-PDX44BCA.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/usage.ts
|