openfox 1.6.85 → 1.6.87
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/{auto-compaction-LI6J3L5Y.js → auto-compaction-ANOQDDMV.js} +8 -8
- package/dist/{chat-handler-2J457X35.js → chat-handler-7H7KENGR.js} +11 -11
- package/dist/{chunk-HEQ3V5SW.js → chunk-5GVCNVKV.js} +5 -1
- package/dist/{chunk-2XCN5AUU.js → chunk-6JSQNOQG.js} +214 -36
- package/dist/{chunk-67LWZEDE.js → chunk-ENH5AUOX.js} +2 -2
- package/dist/{chunk-4VT74LCD.js → chunk-ERFRUQQR.js} +1 -1
- package/dist/{chunk-MNRVSEGN.js → chunk-FTT3HMDU.js} +3 -3
- package/dist/{chunk-EBPKXVOF.js → chunk-GQTY7TSD.js} +2 -2
- package/dist/{chunk-GN7RB4Y4.js → chunk-PAAUYFYS.js} +8 -4
- package/dist/{chunk-FBQWGH6N.js → chunk-PLWQJCN4.js} +6 -6
- package/dist/{chunk-PI7L2SEU.js → chunk-RCECKE5L.js} +2 -2
- package/dist/{chunk-7FVEX6UG.js → chunk-VXC7VVTI.js} +3 -3
- package/dist/{chunk-X4VMSNLI.js → chunk-ZHBL5G5X.js} +10 -3
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{events-BKR4RUU3.js → events-ZHG3VBZC.js} +3 -3
- package/dist/{orchestrator-Y2YGSF4I.js → orchestrator-4NPBVVEI.js} +9 -9
- package/dist/package.json +1 -1
- package/dist/{processor-KULEUD7B.js → processor-JKBK7BAN.js} +7 -7
- package/dist/{project-creator-Q5P4XA6O.js → project-creator-25F7KUPX.js} +3 -3
- package/dist/{projects-3EZINCLA.js → projects-55F45PH3.js} +5 -3
- package/dist/{protocol-C9hfluLv.d.ts → protocol--8PKNwb_.d.ts} +16 -2
- package/dist/{protocol-NEBXAMJ3.js → protocol-QDSVJTRN.js} +5 -3
- package/dist/{serve-K5T5YSDU.js → serve-54UN2X54.js} +10 -10
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +9 -9
- package/dist/{settings-E3KEHN2M.js → settings-VTVOBDYG.js} +3 -3
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/{tools-OPJZOAZX.js → tools-XZBUMSMC.js} +8 -8
- package/dist/web/assets/{index-sEj9u40w.css → index-CF48Zu7j.css} +1 -1
- package/dist/web/assets/{index-C0VIA4P8.js → index-DGidgYuL.js} +53 -53
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-PLWQJCN4.js";
|
|
6
|
+
import "./chunk-RCECKE5L.js";
|
|
7
|
+
import "./chunk-ZHBL5G5X.js";
|
|
8
8
|
import "./chunk-DL6ZILAF.js";
|
|
9
9
|
import "./chunk-PBGOZMVY.js";
|
|
10
10
|
import "./chunk-VRGRAQDG.js";
|
|
11
11
|
import "./chunk-YNIAFX24.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ENH5AUOX.js";
|
|
13
|
+
import "./chunk-5GVCNVKV.js";
|
|
14
14
|
import "./chunk-XVWVAWSG.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-PAAUYFYS.js";
|
|
16
16
|
import "./chunk-BJYPTN5S.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-ERFRUQQR.js";
|
|
18
18
|
import "./chunk-CQGTEGKL.js";
|
|
19
19
|
import "./chunk-B5AP3RSV.js";
|
|
20
20
|
import "./chunk-WSRF5L3S.js";
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
performManualContextCompaction,
|
|
25
25
|
resolveCompactionStatsIdentity
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=auto-compaction-
|
|
27
|
+
//# sourceMappingURL=auto-compaction-ANOQDDMV.js.map
|
|
@@ -5,29 +5,29 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VXC7VVTI.js";
|
|
9
9
|
import {
|
|
10
10
|
runChatTurn
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-FTT3HMDU.js";
|
|
12
|
+
import "./chunk-PLWQJCN4.js";
|
|
13
|
+
import "./chunk-RCECKE5L.js";
|
|
14
|
+
import "./chunk-ZHBL5G5X.js";
|
|
15
15
|
import "./chunk-DL6ZILAF.js";
|
|
16
16
|
import "./chunk-PBGOZMVY.js";
|
|
17
17
|
import "./chunk-VRGRAQDG.js";
|
|
18
18
|
import "./chunk-YNIAFX24.js";
|
|
19
19
|
import {
|
|
20
20
|
getEventStore
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-ENH5AUOX.js";
|
|
22
|
+
import "./chunk-5GVCNVKV.js";
|
|
23
23
|
import "./chunk-XVWVAWSG.js";
|
|
24
24
|
import {
|
|
25
25
|
createChatMessageMessage,
|
|
26
26
|
createPhaseChangedMessage,
|
|
27
27
|
createSessionRunningMessage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-PAAUYFYS.js";
|
|
29
29
|
import "./chunk-BJYPTN5S.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-ERFRUQQR.js";
|
|
31
31
|
import "./chunk-CQGTEGKL.js";
|
|
32
32
|
import "./chunk-B5AP3RSV.js";
|
|
33
33
|
import "./chunk-WSRF5L3S.js";
|
|
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
61
61
|
sessionManager.setRunning(sessionId, true);
|
|
62
62
|
broadcastForSession(sessionId, createSessionRunningMessage(true));
|
|
63
63
|
try {
|
|
64
|
-
const { maybeAutoCompactContext } = await import("./auto-compaction-
|
|
64
|
+
const { maybeAutoCompactContext } = await import("./auto-compaction-ANOQDDMV.js");
|
|
65
65
|
await maybeAutoCompactContext({
|
|
66
66
|
sessionManager,
|
|
67
67
|
sessionId,
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
startChatSession,
|
|
176
176
|
stopSessionExecution
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chat-handler-
|
|
178
|
+
//# sourceMappingURL=chat-handler-7H7KENGR.js.map
|
|
@@ -110,6 +110,10 @@ function runMigrations(db2) {
|
|
|
110
110
|
logger.info("Migrating projects table: adding danger_level column");
|
|
111
111
|
db2.exec(`ALTER TABLE projects ADD COLUMN danger_level TEXT`);
|
|
112
112
|
}
|
|
113
|
+
if (!projectColumnNames.includes("is_starred")) {
|
|
114
|
+
logger.info("Migrating projects table: adding is_starred column");
|
|
115
|
+
db2.exec(`ALTER TABLE projects ADD COLUMN is_starred INTEGER NOT NULL DEFAULT 0`);
|
|
116
|
+
}
|
|
113
117
|
db2.exec(`
|
|
114
118
|
CREATE TABLE IF NOT EXISTS events (
|
|
115
119
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -168,4 +172,4 @@ export {
|
|
|
168
172
|
initDatabase,
|
|
169
173
|
getDatabase
|
|
170
174
|
};
|
|
171
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-5GVCNVKV.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createVerifierNudgeConfig,
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FTT3HMDU.js";
|
|
6
6
|
import {
|
|
7
7
|
TurnMetrics,
|
|
8
8
|
agentExists,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
setSkillEnabled,
|
|
38
38
|
skillExists,
|
|
39
39
|
spawnShellProcess
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PLWQJCN4.js";
|
|
41
41
|
import {
|
|
42
42
|
getProject
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ZHBL5G5X.js";
|
|
44
44
|
import {
|
|
45
45
|
getPathSeparator,
|
|
46
46
|
getPlatformShell,
|
|
@@ -87,10 +87,10 @@ import {
|
|
|
87
87
|
updateSessionProvider,
|
|
88
88
|
updateSessionRunning,
|
|
89
89
|
updateSessionSummary
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-ENH5AUOX.js";
|
|
91
91
|
import {
|
|
92
92
|
initDatabase
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-5GVCNVKV.js";
|
|
94
94
|
import {
|
|
95
95
|
buildMessagesFromStoredEvents,
|
|
96
96
|
foldPendingConfirmations
|
|
@@ -100,6 +100,7 @@ import {
|
|
|
100
100
|
createChatMessageMessage,
|
|
101
101
|
createContextStateMessage,
|
|
102
102
|
createErrorMessage,
|
|
103
|
+
createGitStatusMessage,
|
|
103
104
|
createQueueStateMessage,
|
|
104
105
|
createSessionRunningMessage,
|
|
105
106
|
createSessionStateMessage,
|
|
@@ -108,7 +109,7 @@ import {
|
|
|
108
109
|
parseClientMessage,
|
|
109
110
|
serializeServerMessage,
|
|
110
111
|
storedEventToServerMessage
|
|
111
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-PAAUYFYS.js";
|
|
112
113
|
import {
|
|
113
114
|
EventEmitter,
|
|
114
115
|
provideAnswer
|
|
@@ -118,7 +119,7 @@ import {
|
|
|
118
119
|
} from "./chunk-RGRBWDZP.js";
|
|
119
120
|
import {
|
|
120
121
|
createServerMessage
|
|
121
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-ERFRUQQR.js";
|
|
122
123
|
import {
|
|
123
124
|
getGlobalConfigDir
|
|
124
125
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -1276,6 +1277,7 @@ function createMockLLMClient() {
|
|
|
1276
1277
|
|
|
1277
1278
|
// src/server/ws/server.ts
|
|
1278
1279
|
import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
|
|
1280
|
+
import { spawn as spawn2 } from "child_process";
|
|
1279
1281
|
|
|
1280
1282
|
// src/server/ws/terminal.ts
|
|
1281
1283
|
import WebSocket from "ws";
|
|
@@ -2276,6 +2278,152 @@ async function isValidToken(token) {
|
|
|
2276
2278
|
}
|
|
2277
2279
|
|
|
2278
2280
|
// src/server/ws/server.ts
|
|
2281
|
+
function moduleGitBranch(cwd) {
|
|
2282
|
+
return new Promise((resolve2) => {
|
|
2283
|
+
const proc = spawn2("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
|
|
2284
|
+
cwd,
|
|
2285
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
2286
|
+
});
|
|
2287
|
+
let stdout = "";
|
|
2288
|
+
proc.stdout.on("data", (data) => {
|
|
2289
|
+
stdout += data.toString();
|
|
2290
|
+
});
|
|
2291
|
+
proc.on("close", (code) => {
|
|
2292
|
+
if (code === 0 && stdout.trim()) {
|
|
2293
|
+
resolve2(stdout.trim());
|
|
2294
|
+
} else {
|
|
2295
|
+
resolve2(null);
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
proc.on("error", () => resolve2(null));
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
function moduleGitDiff(cwd) {
|
|
2302
|
+
return new Promise((resolve2) => {
|
|
2303
|
+
const proc = spawn2("git", ["diff", "--stat", "--numstat", "--format=", "HEAD"], {
|
|
2304
|
+
cwd,
|
|
2305
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
2306
|
+
});
|
|
2307
|
+
const statusProc = spawn2("git", ["status", "--porcelain", "-uall"], {
|
|
2308
|
+
cwd,
|
|
2309
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
2310
|
+
});
|
|
2311
|
+
let diffStdout = "";
|
|
2312
|
+
let statusStdout = "";
|
|
2313
|
+
proc.stdout.on("data", (data) => {
|
|
2314
|
+
diffStdout += data.toString();
|
|
2315
|
+
});
|
|
2316
|
+
statusProc.stdout.on("data", (data) => {
|
|
2317
|
+
statusStdout += data.toString();
|
|
2318
|
+
});
|
|
2319
|
+
let procExited = false;
|
|
2320
|
+
let statusExited = false;
|
|
2321
|
+
let diffCode = null;
|
|
2322
|
+
let statusCode = null;
|
|
2323
|
+
const processResults = () => {
|
|
2324
|
+
if (diffCode !== 0 || statusCode !== 0) {
|
|
2325
|
+
resolve2({ hash: "", files: [] });
|
|
2326
|
+
return;
|
|
2327
|
+
}
|
|
2328
|
+
const hashProc = spawn2("git", ["rev-parse", "HEAD"], { cwd, stdio: ["ignore", "pipe", "ignore"] });
|
|
2329
|
+
let hash = "";
|
|
2330
|
+
hashProc.stdout.on("data", (data) => {
|
|
2331
|
+
hash += data.toString();
|
|
2332
|
+
});
|
|
2333
|
+
hashProc.on("close", (hCode) => {
|
|
2334
|
+
if (hCode !== 0) hash = "";
|
|
2335
|
+
});
|
|
2336
|
+
hashProc.on("error", () => {
|
|
2337
|
+
hash = "";
|
|
2338
|
+
});
|
|
2339
|
+
const files = [];
|
|
2340
|
+
for (const line of diffStdout.split("\n")) {
|
|
2341
|
+
if (!line) continue;
|
|
2342
|
+
const parts = line.split(" ");
|
|
2343
|
+
if (parts.length < 3) continue;
|
|
2344
|
+
const statusChar = parts[1]?.[0];
|
|
2345
|
+
const status = statusChar === "A" ? "added" : statusChar === "d" ? "deleted" : "modified";
|
|
2346
|
+
files.push({
|
|
2347
|
+
path: parts[2] ?? parts[1] ?? parts[0] ?? "",
|
|
2348
|
+
status,
|
|
2349
|
+
additions: parseInt(parts[0] ?? "") || 0,
|
|
2350
|
+
deletions: parseInt(parts[1] ?? "") || 0
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
for (const line of statusStdout.split("\n")) {
|
|
2354
|
+
if (!line) continue;
|
|
2355
|
+
if (!line.startsWith("?? ")) continue;
|
|
2356
|
+
const path = line.slice(3);
|
|
2357
|
+
if (!path) continue;
|
|
2358
|
+
files.push({
|
|
2359
|
+
path,
|
|
2360
|
+
status: "added",
|
|
2361
|
+
additions: 0,
|
|
2362
|
+
deletions: 0
|
|
2363
|
+
});
|
|
2364
|
+
}
|
|
2365
|
+
resolve2({ hash: hash.trim(), files });
|
|
2366
|
+
};
|
|
2367
|
+
proc.on("close", (code) => {
|
|
2368
|
+
procExited = true;
|
|
2369
|
+
diffCode = code;
|
|
2370
|
+
if (statusExited) processResults();
|
|
2371
|
+
});
|
|
2372
|
+
statusProc.on("close", (code) => {
|
|
2373
|
+
statusExited = true;
|
|
2374
|
+
statusCode = code;
|
|
2375
|
+
if (procExited) processResults();
|
|
2376
|
+
});
|
|
2377
|
+
proc.on("error", () => resolve2({ hash: "", files: [] }));
|
|
2378
|
+
statusProc.on("error", () => {
|
|
2379
|
+
if (!procExited) {
|
|
2380
|
+
resolve2({ hash: "", files: [] });
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2383
|
+
});
|
|
2384
|
+
}
|
|
2385
|
+
var moduleWorkdirLastHash = /* @__PURE__ */ new Map();
|
|
2386
|
+
var moduleWorkdirInterval = /* @__PURE__ */ new Map();
|
|
2387
|
+
var gitPollInterval = 1e4;
|
|
2388
|
+
var moduleClients = null;
|
|
2389
|
+
var moduleEnqueueSend = null;
|
|
2390
|
+
function moduleGitPoll(workdir) {
|
|
2391
|
+
;
|
|
2392
|
+
(async () => {
|
|
2393
|
+
try {
|
|
2394
|
+
const branch = await moduleGitBranch(workdir);
|
|
2395
|
+
const { hash, files } = await moduleGitDiff(workdir);
|
|
2396
|
+
const lastHash = moduleWorkdirLastHash.get(workdir);
|
|
2397
|
+
if (hash !== lastHash) {
|
|
2398
|
+
moduleWorkdirLastHash.set(workdir, hash);
|
|
2399
|
+
const msg = createGitStatusMessage(branch, files);
|
|
2400
|
+
const activeClients = moduleClients;
|
|
2401
|
+
const sendFn = moduleEnqueueSend;
|
|
2402
|
+
if (!activeClients || !sendFn) return;
|
|
2403
|
+
for (const [ws, client] of activeClients) {
|
|
2404
|
+
if (client.activeWorkdir === workdir && ws.readyState === WebSocket2.OPEN) {
|
|
2405
|
+
const seq = client.lastSentSeq + 1;
|
|
2406
|
+
sendFn(client, serializeServerMessage({ ...msg, sessionId: client.activeSessionId ?? "" }), seq);
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
} catch {
|
|
2411
|
+
}
|
|
2412
|
+
})();
|
|
2413
|
+
}
|
|
2414
|
+
function moduleStartGitPolling(workdir) {
|
|
2415
|
+
if (moduleWorkdirInterval.has(workdir)) return;
|
|
2416
|
+
const interval = setInterval(() => moduleGitPoll(workdir), gitPollInterval);
|
|
2417
|
+
moduleWorkdirInterval.set(workdir, interval);
|
|
2418
|
+
}
|
|
2419
|
+
function moduleStopGitPolling(workdir) {
|
|
2420
|
+
const interval = moduleWorkdirInterval.get(workdir);
|
|
2421
|
+
if (interval !== void 0) {
|
|
2422
|
+
clearInterval(interval);
|
|
2423
|
+
moduleWorkdirInterval.delete(workdir);
|
|
2424
|
+
moduleWorkdirLastHash.delete(workdir);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2279
2427
|
function resolveStatsIdentity(llmClient, getActiveProvider) {
|
|
2280
2428
|
const provider = getActiveProvider?.();
|
|
2281
2429
|
const model = llmClient.getModel();
|
|
@@ -2335,6 +2483,7 @@ var MAX_SEND_QUEUE_SIZE = 1e3;
|
|
|
2335
2483
|
function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvider, sessionManager, providerManager) {
|
|
2336
2484
|
const wss = new WebSocketServer({ server: httpServer });
|
|
2337
2485
|
const clients = /* @__PURE__ */ new Map();
|
|
2486
|
+
moduleClients = clients;
|
|
2338
2487
|
const sessionLLMClients = /* @__PURE__ */ new Map();
|
|
2339
2488
|
function getSessionLLMClient(sessionId) {
|
|
2340
2489
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -2409,6 +2558,7 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
|
|
|
2409
2558
|
client.sendQueue.push({ data, seq });
|
|
2410
2559
|
processSendQueue(client);
|
|
2411
2560
|
}
|
|
2561
|
+
moduleEnqueueSend = enqueueSend;
|
|
2412
2562
|
function processSendQueue(client) {
|
|
2413
2563
|
if (client.isSending || client.sendQueue.length === 0) {
|
|
2414
2564
|
return;
|
|
@@ -2540,6 +2690,7 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
|
|
|
2540
2690
|
clients.set(ws, {
|
|
2541
2691
|
ws,
|
|
2542
2692
|
activeSessionId: null,
|
|
2693
|
+
activeWorkdir: null,
|
|
2543
2694
|
globalSubscription: null,
|
|
2544
2695
|
sendQueue: [],
|
|
2545
2696
|
isSending: false,
|
|
@@ -2617,15 +2768,18 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
|
|
|
2617
2768
|
ws.on("close", () => {
|
|
2618
2769
|
logger.debug("WebSocket client disconnected");
|
|
2619
2770
|
const client = clients.get(ws);
|
|
2771
|
+
const disconnectedWorkdir = client?.activeWorkdir ?? null;
|
|
2620
2772
|
if (client?.globalSubscription) {
|
|
2621
2773
|
client.globalSubscription();
|
|
2622
2774
|
}
|
|
2623
2775
|
unsubscribeAllFromTerminal(ws);
|
|
2624
|
-
if (client) {
|
|
2625
|
-
client.sendQueue = [];
|
|
2626
|
-
client.isSending = false;
|
|
2627
|
-
}
|
|
2628
2776
|
clients.delete(ws);
|
|
2777
|
+
if (disconnectedWorkdir) {
|
|
2778
|
+
const hasRemaining = [...clients.values()].some((c) => c.activeWorkdir === disconnectedWorkdir);
|
|
2779
|
+
if (!hasRemaining) {
|
|
2780
|
+
moduleStopGitPolling(disconnectedWorkdir);
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2629
2783
|
});
|
|
2630
2784
|
ws.on("error", (error) => {
|
|
2631
2785
|
logger.error("WebSocket error", { error });
|
|
@@ -2701,6 +2855,8 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
2701
2855
|
return;
|
|
2702
2856
|
}
|
|
2703
2857
|
client.activeSessionId = session.id;
|
|
2858
|
+
client.activeWorkdir = session.workdir;
|
|
2859
|
+
if (session.workdir) moduleStartGitPolling(session.workdir);
|
|
2704
2860
|
ensureEventStoreSubscription(session.id);
|
|
2705
2861
|
const eventStore = getEventStore();
|
|
2706
2862
|
const events = eventStore.getEvents(session.id);
|
|
@@ -2712,7 +2868,17 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
2712
2868
|
messageCount: messages.length,
|
|
2713
2869
|
pendingConfirmationsCount: pendingConfirmations.length
|
|
2714
2870
|
});
|
|
2715
|
-
|
|
2871
|
+
const initialGitStatus = (async () => {
|
|
2872
|
+
if (!session.workdir) return void 0;
|
|
2873
|
+
const branch = await moduleGitBranch(session.workdir);
|
|
2874
|
+
const { files } = await moduleGitDiff(session.workdir);
|
|
2875
|
+
return { branch, diff: { files } };
|
|
2876
|
+
})();
|
|
2877
|
+
const gitStatusPayload = await initialGitStatus;
|
|
2878
|
+
sendForSession(
|
|
2879
|
+
session.id,
|
|
2880
|
+
createSessionStateMessage(session, messages, pendingConfirmations, gitStatusPayload, message.id)
|
|
2881
|
+
);
|
|
2716
2882
|
const contextState = sessionManager.getContextState(session.id);
|
|
2717
2883
|
sendForSession(session.id, createContextStateMessage(contextState));
|
|
2718
2884
|
break;
|
|
@@ -2899,7 +3065,7 @@ ${content}` : workflowInfo;
|
|
|
2899
3065
|
}
|
|
2900
3066
|
|
|
2901
3067
|
// src/server/lsp/server.ts
|
|
2902
|
-
import { spawn as
|
|
3068
|
+
import { spawn as spawn3 } from "child_process";
|
|
2903
3069
|
import { extname } from "path";
|
|
2904
3070
|
import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from "vscode-jsonrpc/node.js";
|
|
2905
3071
|
var LSP = {
|
|
@@ -2961,7 +3127,7 @@ var LspServer = class {
|
|
|
2961
3127
|
}
|
|
2962
3128
|
this.state = "starting";
|
|
2963
3129
|
try {
|
|
2964
|
-
this.process =
|
|
3130
|
+
this.process = spawn3(this.commandPath, this.config.serverArgs, {
|
|
2965
3131
|
cwd: this.workdir,
|
|
2966
3132
|
stdio: ["pipe", "pipe", "pipe"],
|
|
2967
3133
|
env: {
|
|
@@ -5261,7 +5427,7 @@ function createTerminalRoutes() {
|
|
|
5261
5427
|
}
|
|
5262
5428
|
|
|
5263
5429
|
// src/constants.ts
|
|
5264
|
-
var VERSION = "1.6.
|
|
5430
|
+
var VERSION = "1.6.87";
|
|
5265
5431
|
|
|
5266
5432
|
// src/server/index.ts
|
|
5267
5433
|
var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
|
|
@@ -5380,7 +5546,7 @@ async function createServerHandle(config) {
|
|
|
5380
5546
|
res.json({ tools });
|
|
5381
5547
|
});
|
|
5382
5548
|
app.get("/api/projects", async (_req, res) => {
|
|
5383
|
-
const { listProjects } = await import("./projects-
|
|
5549
|
+
const { listProjects } = await import("./projects-55F45PH3.js");
|
|
5384
5550
|
const projects = listProjects();
|
|
5385
5551
|
res.json({ projects });
|
|
5386
5552
|
});
|
|
@@ -5389,7 +5555,7 @@ async function createServerHandle(config) {
|
|
|
5389
5555
|
if (!name || !workdir) {
|
|
5390
5556
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5391
5557
|
}
|
|
5392
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
5558
|
+
const { createDirectoryWithGit } = await import("./project-creator-25F7KUPX.js");
|
|
5393
5559
|
try {
|
|
5394
5560
|
const project = await createDirectoryWithGit(name, workdir);
|
|
5395
5561
|
res.status(201).json({ project });
|
|
@@ -5434,7 +5600,7 @@ async function createServerHandle(config) {
|
|
|
5434
5600
|
}
|
|
5435
5601
|
});
|
|
5436
5602
|
app.get("/api/projects/:id", async (req, res) => {
|
|
5437
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5603
|
+
const { getProject: getProject2 } = await import("./projects-55F45PH3.js");
|
|
5438
5604
|
const project = getProject2(req.params.id);
|
|
5439
5605
|
if (!project) {
|
|
5440
5606
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5442,7 +5608,7 @@ async function createServerHandle(config) {
|
|
|
5442
5608
|
res.json({ project });
|
|
5443
5609
|
});
|
|
5444
5610
|
app.put("/api/projects/:id", async (req, res) => {
|
|
5445
|
-
const { updateProject } = await import("./projects-
|
|
5611
|
+
const { updateProject } = await import("./projects-55F45PH3.js");
|
|
5446
5612
|
const { name, customInstructions, dangerLevel } = req.body;
|
|
5447
5613
|
const updates = {};
|
|
5448
5614
|
if (name !== void 0) updates.name = name;
|
|
@@ -5455,7 +5621,7 @@ async function createServerHandle(config) {
|
|
|
5455
5621
|
res.json({ project: updated });
|
|
5456
5622
|
});
|
|
5457
5623
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
5458
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
5624
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-55F45PH3.js");
|
|
5459
5625
|
const project = getProject2(req.params.id);
|
|
5460
5626
|
if (!project) {
|
|
5461
5627
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5463,8 +5629,20 @@ async function createServerHandle(config) {
|
|
|
5463
5629
|
deleteProject(req.params.id);
|
|
5464
5630
|
res.json({ success: true });
|
|
5465
5631
|
});
|
|
5632
|
+
app.put("/api/projects/:id/star", async (req, res) => {
|
|
5633
|
+
const { toggleStar } = await import("./projects-55F45PH3.js");
|
|
5634
|
+
const { isStarred } = req.body;
|
|
5635
|
+
if (typeof isStarred !== "boolean") {
|
|
5636
|
+
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
5637
|
+
}
|
|
5638
|
+
const project = toggleStar(req.params.id, isStarred);
|
|
5639
|
+
if (!project) {
|
|
5640
|
+
return res.status(404).json({ error: "Project not found" });
|
|
5641
|
+
}
|
|
5642
|
+
res.json({ project });
|
|
5643
|
+
});
|
|
5466
5644
|
app.get("/api/sessions", async (req, res) => {
|
|
5467
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5645
|
+
const { getRecentUserPromptsForSession } = await import("./events-ZHG3VBZC.js");
|
|
5468
5646
|
const projectId = req.query["projectId"];
|
|
5469
5647
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5470
5648
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5497,7 +5675,7 @@ async function createServerHandle(config) {
|
|
|
5497
5675
|
res.status(201).json({ session });
|
|
5498
5676
|
});
|
|
5499
5677
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5500
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5678
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZHG3VBZC.js");
|
|
5501
5679
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
|
|
5502
5680
|
const session = sessionManager.getSession(req.params.id);
|
|
5503
5681
|
if (!session) {
|
|
@@ -5528,7 +5706,7 @@ async function createServerHandle(config) {
|
|
|
5528
5706
|
res.json({ success: true });
|
|
5529
5707
|
});
|
|
5530
5708
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5531
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5709
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZHG3VBZC.js");
|
|
5532
5710
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
|
|
5533
5711
|
const sessionId = req.params.id;
|
|
5534
5712
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5566,7 +5744,7 @@ async function createServerHandle(config) {
|
|
|
5566
5744
|
res.json({ success: true });
|
|
5567
5745
|
});
|
|
5568
5746
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5569
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5747
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZHG3VBZC.js");
|
|
5570
5748
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
|
|
5571
5749
|
const sessionId = req.params.id;
|
|
5572
5750
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5619,14 +5797,14 @@ async function createServerHandle(config) {
|
|
|
5619
5797
|
if (!callId || approved === void 0) {
|
|
5620
5798
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5621
5799
|
}
|
|
5622
|
-
const { providePathConfirmation } = await import("./tools-
|
|
5800
|
+
const { providePathConfirmation } = await import("./tools-XZBUMSMC.js");
|
|
5623
5801
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
5624
5802
|
if (!result.found) {
|
|
5625
5803
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5626
5804
|
}
|
|
5627
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5805
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZHG3VBZC.js");
|
|
5628
5806
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-4VHGQE6Y.js");
|
|
5629
|
-
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-
|
|
5807
|
+
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-QDSVJTRN.js");
|
|
5630
5808
|
const eventStore = getEventStore2();
|
|
5631
5809
|
const events = eventStore.getEvents(sessionId);
|
|
5632
5810
|
const messages = buildMessagesFromStoredEvents2(events);
|
|
@@ -5643,7 +5821,7 @@ async function createServerHandle(config) {
|
|
|
5643
5821
|
if (!callId || !answer) {
|
|
5644
5822
|
return res.status(400).json({ error: "callId and answer are required" });
|
|
5645
5823
|
}
|
|
5646
|
-
const { provideAnswer: provideAnswer2 } = await import("./tools-
|
|
5824
|
+
const { provideAnswer: provideAnswer2 } = await import("./tools-XZBUMSMC.js");
|
|
5647
5825
|
const found = provideAnswer2(callId, answer);
|
|
5648
5826
|
if (!found) {
|
|
5649
5827
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5679,14 +5857,14 @@ async function createServerHandle(config) {
|
|
|
5679
5857
|
if (!session) {
|
|
5680
5858
|
return res.status(404).json({ error: "Session not found" });
|
|
5681
5859
|
}
|
|
5682
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5683
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5860
|
+
const { stopSessionExecution } = await import("./chat-handler-7H7KENGR.js");
|
|
5861
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-XZBUMSMC.js");
|
|
5684
5862
|
stopSessionExecution(sessionId, sessionManager);
|
|
5685
5863
|
abortSession(sessionId);
|
|
5686
5864
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
5687
5865
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
5688
5866
|
sessionManager.clearMessageQueue(sessionId);
|
|
5689
|
-
const eventStore = (await import("./events-
|
|
5867
|
+
const eventStore = (await import("./events-ZHG3VBZC.js")).getEventStore();
|
|
5690
5868
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5691
5869
|
res.json({ success: true });
|
|
5692
5870
|
});
|
|
@@ -5700,7 +5878,7 @@ async function createServerHandle(config) {
|
|
|
5700
5878
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
5701
5879
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
5702
5880
|
}
|
|
5703
|
-
const { truncateSessionMessages } = await import("./events-
|
|
5881
|
+
const { truncateSessionMessages } = await import("./events-ZHG3VBZC.js");
|
|
5704
5882
|
truncateSessionMessages(sessionId, messageIndex);
|
|
5705
5883
|
res.json({ success: true });
|
|
5706
5884
|
});
|
|
@@ -5731,13 +5909,13 @@ async function createServerHandle(config) {
|
|
|
5731
5909
|
res.json({ accepted: true });
|
|
5732
5910
|
});
|
|
5733
5911
|
app.get("/api/settings/:key", async (req, res) => {
|
|
5734
|
-
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-
|
|
5912
|
+
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-VTVOBDYG.js");
|
|
5735
5913
|
const key = req.params.key;
|
|
5736
5914
|
const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
5737
5915
|
res.json({ key, value });
|
|
5738
5916
|
});
|
|
5739
5917
|
app.put("/api/settings/:key", async (req, res) => {
|
|
5740
|
-
const { setSetting } = await import("./settings-
|
|
5918
|
+
const { setSetting } = await import("./settings-VTVOBDYG.js");
|
|
5741
5919
|
const key = req.params.key;
|
|
5742
5920
|
const { value } = req.body;
|
|
5743
5921
|
if (value === void 0) {
|
|
@@ -6169,7 +6347,7 @@ async function createServerHandle(config) {
|
|
|
6169
6347
|
providerManager
|
|
6170
6348
|
);
|
|
6171
6349
|
const wss = wssExports.wss;
|
|
6172
|
-
const { QueueProcessor } = await import("./processor-
|
|
6350
|
+
const { QueueProcessor } = await import("./processor-JKBK7BAN.js");
|
|
6173
6351
|
const queueProcessor = new QueueProcessor({
|
|
6174
6352
|
sessionManager,
|
|
6175
6353
|
providerManager,
|
|
@@ -6244,4 +6422,4 @@ export {
|
|
|
6244
6422
|
createServerHandle,
|
|
6245
6423
|
createServer
|
|
6246
6424
|
};
|
|
6247
|
-
//# sourceMappingURL=chunk-
|
|
6425
|
+
//# sourceMappingURL=chunk-6JSQNOQG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5GVCNVKV.js";
|
|
4
4
|
import {
|
|
5
5
|
buildContextMessagesFromEventHistory,
|
|
6
6
|
buildMessagesFromStoredEvents,
|
|
@@ -1279,4 +1279,4 @@ export {
|
|
|
1279
1279
|
compactContext,
|
|
1280
1280
|
getRecentUserPromptsForSession
|
|
1281
1281
|
};
|
|
1282
|
-
//# sourceMappingURL=chunk-
|
|
1282
|
+
//# sourceMappingURL=chunk-ENH5AUOX.js.map
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PLWQJCN4.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ENH5AUOX.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
23
|
} from "./chunk-XVWVAWSG.js";
|
|
@@ -327,4 +327,4 @@ export {
|
|
|
327
327
|
runBuilderTurn,
|
|
328
328
|
runVerifierTurn
|
|
329
329
|
};
|
|
330
|
-
//# sourceMappingURL=chunk-
|
|
330
|
+
//# sourceMappingURL=chunk-FTT3HMDU.js.map
|
|
@@ -190,7 +190,7 @@ async function runCli(options) {
|
|
|
190
190
|
if (!configExists) {
|
|
191
191
|
await runNetworkSetup(mode);
|
|
192
192
|
}
|
|
193
|
-
const { runServe } = await import("./serve-
|
|
193
|
+
const { runServe } = await import("./serve-54UN2X54.js");
|
|
194
194
|
const serveOptions = { mode };
|
|
195
195
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
196
196
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -202,4 +202,4 @@ async function runCli(options) {
|
|
|
202
202
|
export {
|
|
203
203
|
runCli
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=chunk-
|
|
205
|
+
//# sourceMappingURL=chunk-GQTY7TSD.js.map
|