openfox 2.0.115 → 2.0.117
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/CHANGELOG.md +46 -0
- package/dist/CHANGELOG.md +46 -0
- package/dist/{ask-ZYPCJKZD.js → ask-UBIRH3SO.js} +2 -2
- package/dist/{auth-YY5PJYSC.js → auth-GTGIGX5X.js} +2 -2
- package/dist/{auto-config-T5GR2N6X.js → auto-config-AAUO4PKW.js} +2 -2
- package/dist/{backend-LVYHLGQJ.js → backend-67OLCS5O.js} +2 -2
- package/dist/{branch.api-XVTYACSH.js → branch.api-UMKSQMSA.js} +2 -2
- package/dist/changelog-FZUE6OSG.js +63 -0
- package/dist/{chat-handler-5SP265CR.js → chat-handler-URSNELCE.js} +17 -17
- package/dist/{chunk-JFK4GKQD.js → chunk-2PQA3DHY.js} +62 -91
- package/dist/{chunk-TFF5T3K3.js → chunk-3PEYTWCS.js} +3 -3
- package/dist/{chunk-I7FY2LTR.js → chunk-4GHLULHB.js} +18 -2
- package/dist/{chunk-TGLVWAFC.js → chunk-6XHDNSA3.js} +5 -5
- package/dist/{chunk-3QQAIUZI.js → chunk-7SDJXHJH.js} +175 -30
- package/dist/{chunk-4H427UBV.js → chunk-AGXJ5O63.js} +2 -2
- package/dist/{chunk-OCBBAEMT.js → chunk-ECCSVMRT.js} +179 -137
- package/dist/{chunk-OCSTEGK7.js → chunk-EQ5CGNOT.js} +2 -2
- package/dist/{chunk-YX3OQBNX.js → chunk-EQ7DK2TG.js} +9 -5
- package/dist/{chunk-OKVHMKE2.js → chunk-EZD7WFBZ.js} +33 -29
- package/dist/{chunk-BVVCRIVM.js → chunk-GZTMCTUS.js} +3 -3
- package/dist/{chunk-6RGACY4E.js → chunk-HZSKKJHQ.js} +4 -3
- package/dist/{chunk-3NPLERPQ.js → chunk-I6MY65LO.js} +9 -8
- package/dist/{chunk-VWEATA7R.js → chunk-KLQEL2DZ.js} +7 -1
- package/dist/{chunk-JGWHRYWG.js → chunk-MKWS7TQH.js} +2 -2
- package/dist/chunk-NPTI5RCQ.js +7 -0
- package/dist/{chunk-6KPJLELC.js → chunk-QQVPUZQB.js} +156 -20
- package/dist/{chunk-ERNWAKUB.js → chunk-TGVDUK4N.js} +2 -2
- package/dist/{chunk-V4IE7HJY.js → chunk-W7VIYHPQ.js} +2 -2
- package/dist/{chunk-BWVO5WFK.js → chunk-X3XKYGUN.js} +3 -3
- package/dist/{chunk-5WRI5ZAA.js → chunk-YLJ4XMA6.js} +6 -2
- package/dist/{chunk-X25Q6RAV.js → chunk-ZKLE2Q3I.js} +1 -1
- package/dist/{chunk-37QLXLML.js → chunk-ZS6MW2WM.js} +14 -14
- package/dist/cli/dev.js +3 -3
- package/dist/cli/index.js +3 -3
- package/dist/{client-KE7EDI2D.js → client-KCNTDTIR.js} +4 -4
- package/dist/{client-pure-66Z6FWS6.js → client-pure-B5DHEKQJ.js} +2 -2
- package/dist/command-defaults/mark-done.command.md +6 -6
- package/dist/{compactor-SKVC2VNL.js → compactor-LAXZLPPA.js} +7 -7
- package/dist/{config-EAB3V4QK.js → config-TUCHLIWD.js} +2 -2
- package/dist/{dynamic-context-QNB4ELLP.js → dynamic-context-NNBVVFBT.js} +3 -3
- package/dist/{events-5PLO4QJU.js → events-IVPAMMR5.js} +4 -4
- package/dist/{folding-CJWYFUKD.js → folding-RTGU63BW.js} +2 -2
- package/dist/{http-client-KLODRQC2.js → http-client-IPUW2MSW.js} +2 -2
- package/dist/{inspect-proxy-K6QKEYDT.js → inspect-proxy-WPEDMCG7.js} +2 -2
- package/dist/{install-CPOPMCSE.js → install-VA2F6X6Z.js} +2 -2
- package/dist/{launch-EOXVWLOP.js → launch-HSSFGQ5A.js} +17 -17
- package/dist/{manager-LZ3JQ443.js → manager-EMLSLMMT.js} +2 -2
- package/dist/{model-overrides-5UVW3KTE.js → model-overrides-7F2EOA4U.js} +2 -2
- package/dist/{oauth-provider-52YILVUJ.js → oauth-provider-DGBC2YM6.js} +2 -2
- package/dist/{oauth-store-XCFXV2VM.js → oauth-store-KECHUT54.js} +2 -2
- package/dist/{openFolder-HX7X356L.js → openFolder-XCMSU3OI.js} +2 -2
- package/dist/{orchestrator-ED3KFPXO.js → orchestrator-FVXUJW3K.js} +16 -16
- package/dist/package.json +5 -2
- package/dist/{path-security-B6EZC63L.js → path-security-JTCHWYG3.js} +7 -7
- package/dist/{paths-F27V3S4I.js → paths-BHR7CZ7I.js} +2 -2
- package/dist/{permissions-K6YEA2ZZ.js → permissions-UKR524ZB.js} +2 -2
- package/dist/{platform-6RPPBHKH.js → platform-ECDDYMAR.js} +2 -2
- package/dist/{processor-226ZOTRI.js → processor-JRVW5QBA.js} +16 -16
- package/dist/profiles-GYHXBWPV.js +10 -0
- package/dist/{project-creator-VBFE35NI.js → project-creator-PMQ65NKN.js} +2 -2
- package/dist/{projects-AXHZOBR2.js → projects-NDPNOV6D.js} +2 -2
- package/dist/{protocol-JdxRpPxM.d.ts → protocol-CfUkCYxF.d.ts} +11 -2
- package/dist/{protocol-RKSWKNXI.js → protocol-HYA5BYVN.js} +8 -4
- package/dist/{provider-DL4ZWQY7.js → provider-Q7J4UFTS.js} +7 -7
- package/dist/{provider-manager-6CLRMGDE.js → provider-manager-TMBO4DFG.js} +5 -5
- package/dist/{pwa-XPHP3PY2.js → pwa-2GRFSXD7.js} +3 -3
- package/dist/{registry-5XI5NDBF.js → registry-5QL3BOWN.js} +2 -2
- package/dist/{serve-DARV4NJG.js → serve-CW6PR3M2.js} +22 -22
- package/dist/server/index.d.ts +15 -2
- package/dist/server/index.js +21 -21
- package/dist/{server-LQJ7MBDS.js → server-V46SOIGP.js} +20 -20
- package/dist/{service-4JKTGPRG.js → service-M7XJHAK4.js} +6 -6
- package/dist/{service-CXWJQFOZ.js → service-WKABQHKL.js} +2 -2
- package/dist/{session-overrides-AZKV6BRD.js → session-overrides-CWBKPHMF.js} +4 -4
- package/dist/{sessions-752IZIIK.js → sessions-I7ELDIIP.js} +5 -3
- package/dist/{settings-2AHDKCD7.js → settings-FGXQHKUH.js} +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +2 -2
- package/dist/{store-SARB6V2N.js → store-JYPZ2RXB.js} +2 -2
- package/dist/{tasks-XJXHU623.js → tasks-X5H5HM4J.js} +6 -6
- package/dist/{tool-adapter-FEAHWU5C.js → tool-adapter-FJAFLDZA.js} +2 -2
- package/dist/{tools-QYYNFMGU.js → tools-2Q3GRECI.js} +14 -14
- package/dist/{update-2REP2WB6.js → update-YP7IRT6M.js} +4 -4
- package/dist/{update-server-LOOXIXDW.js → update-server-SVPV6ZJZ.js} +2 -2
- package/dist/{url-utils-SAJP7AEX.js → url-utils-C5BM7NF7.js} +2 -2
- package/dist/web/assets/index-C58KXxRi.js +324 -0
- package/dist/web/assets/{index-BmILAZrT.css → index-DTiVSJJu.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +2 -2
- package/dist/{workspace-RMZVTFJD.js → workspace-IQLLHMYR.js} +2 -2
- package/package.json +5 -2
- package/dist/chunk-5V3BF67X.js +0 -7
- package/dist/profiles-5J7F4BML.js +0 -10
- package/dist/web/assets/index-M7ToECa4.js +0 -324
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMcpDisabledServers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KLQEL2DZ.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
6
|
} from "./chunk-5PT4UMRR.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
clearSessionOverrides,
|
|
63
63
|
getAllSessionOverrides
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-EQ5CGNOT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-J2GP3J3X.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackendCapabilities
|
|
9
9
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -84,7 +84,7 @@ function computeAggregatedStats(input) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// src/server/chat/stream-pure.ts
|
|
87
|
-
function createEmptyStreamResult(aborted, modelParams, patternMatch) {
|
|
87
|
+
function createEmptyStreamResult(aborted, modelParams, patternMatch, error) {
|
|
88
88
|
return {
|
|
89
89
|
content: "",
|
|
90
90
|
toolCalls: [],
|
|
@@ -94,7 +94,8 @@ function createEmptyStreamResult(aborted, modelParams, patternMatch) {
|
|
|
94
94
|
aborted,
|
|
95
95
|
modelParams,
|
|
96
96
|
finishReason: "stop",
|
|
97
|
-
...patternMatch ? { patternMatch } : {}
|
|
97
|
+
...patternMatch ? { patternMatch } : {},
|
|
98
|
+
...error ? { error } : {}
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
async function* streamLLMPure(options) {
|
|
@@ -142,6 +143,7 @@ async function* streamLLMPure(options) {
|
|
|
142
143
|
const toolArgs = /* @__PURE__ */ new Map();
|
|
143
144
|
let result = null;
|
|
144
145
|
let aborted = false;
|
|
146
|
+
let streamError;
|
|
145
147
|
let accumulatedContent = "";
|
|
146
148
|
let accumulatedThinking = "";
|
|
147
149
|
let patternMatch;
|
|
@@ -241,6 +243,8 @@ async function* streamLLMPure(options) {
|
|
|
241
243
|
}
|
|
242
244
|
case "error":
|
|
243
245
|
if (signal?.aborted) break;
|
|
246
|
+
streamError = value.error;
|
|
247
|
+
if (options.suppressChatError) break;
|
|
244
248
|
yield {
|
|
245
249
|
type: "chat.error",
|
|
246
250
|
data: { error: value.error, recoverable: true }
|
|
@@ -267,7 +271,7 @@ async function* streamLLMPure(options) {
|
|
|
267
271
|
return createEmptyStreamResult(false, modelParams, patternMatch);
|
|
268
272
|
}
|
|
269
273
|
if (!result) {
|
|
270
|
-
return createEmptyStreamResult(aborted, modelParams);
|
|
274
|
+
return createEmptyStreamResult(aborted, modelParams, void 0, streamError);
|
|
271
275
|
}
|
|
272
276
|
const baseResult = {
|
|
273
277
|
content: result.content,
|
|
@@ -438,4 +442,4 @@ export {
|
|
|
438
442
|
createChatDoneEvent,
|
|
439
443
|
consumeStreamGenerator
|
|
440
444
|
};
|
|
441
|
-
//# sourceMappingURL=chunk-
|
|
445
|
+
//# sourceMappingURL=chunk-EQ7DK2TG.js.map
|
|
@@ -2,24 +2,24 @@ import {
|
|
|
2
2
|
generateSessionNameForSession,
|
|
3
3
|
getSessionMessageCount,
|
|
4
4
|
needsNameGeneration
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6XHDNSA3.js";
|
|
6
6
|
import {
|
|
7
7
|
launchWorkflowRun
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7SDJXHJH.js";
|
|
9
9
|
import {
|
|
10
10
|
runChatTurn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I6MY65LO.js";
|
|
12
12
|
import {
|
|
13
13
|
devServerManager
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2PQA3DHY.js";
|
|
15
15
|
import {
|
|
16
16
|
applyDynamicContext,
|
|
17
17
|
computeSessionHash,
|
|
18
18
|
computeUnifiedDiff
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3PEYTWCS.js";
|
|
20
20
|
import {
|
|
21
21
|
appendCompactionPrompt
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-X3XKYGUN.js";
|
|
23
23
|
import {
|
|
24
24
|
onProcessEvent
|
|
25
25
|
} from "./chunk-ZTOG6LJD.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
combineEventsWithSnapshot,
|
|
34
34
|
getEventStore
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TGVDUK4N.js";
|
|
36
36
|
import {
|
|
37
37
|
createChatErrorMessage,
|
|
38
38
|
createChatMessageMessage,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
parseClientMessage,
|
|
48
48
|
serializeServerMessage,
|
|
49
49
|
storedEventToServerMessage
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-4GHLULHB.js";
|
|
51
51
|
import {
|
|
52
52
|
getPlatformShell
|
|
53
53
|
} from "./chunk-AESOGRFK.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
} from "./chunk-K44MW7JJ.js";
|
|
71
71
|
import {
|
|
72
72
|
createServerMessage
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ZKLE2Q3I.js";
|
|
74
74
|
|
|
75
75
|
// src/server/ws/server.ts
|
|
76
76
|
import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
|
|
@@ -885,7 +885,7 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
885
885
|
const { messages, hiddenCount } = buildMessagesFromStoredEvents(events, maxVisible || void 0);
|
|
886
886
|
const pendingConfirmations = foldPendingConfirmations(events);
|
|
887
887
|
const pendingQuestions = getPendingQuestionsForSession(updatedSession.id);
|
|
888
|
-
const activeWorkflowExecution = sessionManager.
|
|
888
|
+
const activeWorkflowExecution = sessionManager.getDisplayWorkflowExecution(updatedSession.id);
|
|
889
889
|
const effectiveWorkdir = updatedSession.workspace ?? updatedSession.workdir;
|
|
890
890
|
for (const [, client] of clients) {
|
|
891
891
|
if (client.activeSessionId === updatedSession.id && client.activeWorkdir !== effectiveWorkdir) {
|
|
@@ -1168,12 +1168,13 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1168
1168
|
// Context Management
|
|
1169
1169
|
// =========================================================================
|
|
1170
1170
|
case "context.compact": {
|
|
1171
|
-
|
|
1171
|
+
const payload = message.payload;
|
|
1172
|
+
const sessionId = payload?.sessionId ?? client.activeSessionId;
|
|
1173
|
+
if (!sessionId) {
|
|
1172
1174
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1173
1175
|
return;
|
|
1174
1176
|
}
|
|
1175
|
-
const session = sessionManager.requireSession(
|
|
1176
|
-
const sessionId = client.activeSessionId;
|
|
1177
|
+
const session = sessionManager.requireSession(sessionId);
|
|
1177
1178
|
if (session.isRunning) {
|
|
1178
1179
|
send(createErrorMessage("SESSION_RUNNING", "Cannot compact while session is running", message.id));
|
|
1179
1180
|
return;
|
|
@@ -1266,15 +1267,16 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1266
1267
|
break;
|
|
1267
1268
|
}
|
|
1268
1269
|
case "context.applyDynamic.preview": {
|
|
1269
|
-
|
|
1270
|
+
const payload = message.payload;
|
|
1271
|
+
const sessionId = payload?.sessionId ?? client.activeSessionId;
|
|
1272
|
+
if (!sessionId) {
|
|
1270
1273
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1271
1274
|
return;
|
|
1272
1275
|
}
|
|
1273
|
-
const sessionId = client.activeSessionId;
|
|
1274
1276
|
const session = sessionManager.requireSession(sessionId);
|
|
1275
1277
|
try {
|
|
1276
|
-
const { buildCachedPrompt } = await import("./dynamic-context-
|
|
1277
|
-
const allAgents = await import("./registry-
|
|
1278
|
+
const { buildCachedPrompt } = await import("./dynamic-context-NNBVVFBT.js");
|
|
1279
|
+
const allAgents = await import("./registry-5QL3BOWN.js");
|
|
1278
1280
|
const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
|
|
1279
1281
|
const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
|
|
1280
1282
|
const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(
|
|
@@ -1313,11 +1315,12 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1313
1315
|
break;
|
|
1314
1316
|
}
|
|
1315
1317
|
case "context.applyDynamic": {
|
|
1316
|
-
|
|
1318
|
+
const payload = message.payload;
|
|
1319
|
+
const sessionId = payload?.sessionId ?? client.activeSessionId;
|
|
1320
|
+
if (!sessionId) {
|
|
1317
1321
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1318
1322
|
return;
|
|
1319
1323
|
}
|
|
1320
|
-
const sessionId = client.activeSessionId;
|
|
1321
1324
|
const session = sessionManager.requireSession(sessionId);
|
|
1322
1325
|
if (session.isRunning) {
|
|
1323
1326
|
send(createErrorMessage("SESSION_RUNNING", "Cannot apply dynamic context while session is running", message.id));
|
|
@@ -1349,11 +1352,13 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1349
1352
|
// Runner (Auto-Loop)
|
|
1350
1353
|
// =========================================================================
|
|
1351
1354
|
case "runner.launch": {
|
|
1352
|
-
|
|
1355
|
+
const launchPayloadEarly = message.payload;
|
|
1356
|
+
const sessionId = launchPayloadEarly?.sessionId ?? client.activeSessionId;
|
|
1357
|
+
if (!sessionId) {
|
|
1353
1358
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1354
1359
|
return;
|
|
1355
1360
|
}
|
|
1356
|
-
const session = sessionManager.requireSession(
|
|
1361
|
+
const session = sessionManager.requireSession(sessionId);
|
|
1357
1362
|
if (session.isRunning) {
|
|
1358
1363
|
const launchPayload2 = message.payload;
|
|
1359
1364
|
const content = launchPayload2?.content ?? "";
|
|
@@ -1366,16 +1371,15 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1366
1371
|
|
|
1367
1372
|
${content}` : workflowInfo;
|
|
1368
1373
|
}
|
|
1369
|
-
sessionManager.queueMessage(
|
|
1370
|
-
const queueState = sessionManager.getQueueState(
|
|
1371
|
-
|
|
1374
|
+
sessionManager.queueMessage(sessionId, "asap", fullContent, attachments, "workflow-launch");
|
|
1375
|
+
const queueState = sessionManager.getQueueState(sessionId);
|
|
1376
|
+
sendForSession(sessionId, {
|
|
1372
1377
|
type: "queue.state",
|
|
1373
1378
|
payload: { success: true, queueState },
|
|
1374
1379
|
id: message.id
|
|
1375
1380
|
});
|
|
1376
1381
|
return;
|
|
1377
1382
|
}
|
|
1378
|
-
const launchPayloadEarly = message.payload;
|
|
1379
1383
|
if (!launchPayloadEarly?.resumeFrom) {
|
|
1380
1384
|
const pendingCriteria = session.criteria.filter((c) => c.status.type !== "passed");
|
|
1381
1385
|
if (!launchPayloadEarly?.workflowId && pendingCriteria.length === 0) {
|
|
@@ -1383,7 +1387,6 @@ ${content}` : workflowInfo;
|
|
|
1383
1387
|
return;
|
|
1384
1388
|
}
|
|
1385
1389
|
}
|
|
1386
|
-
const sessionId = client.activeSessionId;
|
|
1387
1390
|
if (session.phase === "blocked") {
|
|
1388
1391
|
logger.info("User launched runner - resetting blocked state", { sessionId });
|
|
1389
1392
|
sessionManager.setPhase(sessionId, "build");
|
|
@@ -1491,11 +1494,12 @@ ${content}` : workflowInfo;
|
|
|
1491
1494
|
// Workflow
|
|
1492
1495
|
// =========================================================================
|
|
1493
1496
|
case "workflow.exit": {
|
|
1494
|
-
|
|
1497
|
+
const payload = message.payload;
|
|
1498
|
+
const exitSessionId = payload?.sessionId ?? client.activeSessionId;
|
|
1499
|
+
if (!exitSessionId) {
|
|
1495
1500
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1496
1501
|
return;
|
|
1497
1502
|
}
|
|
1498
|
-
const exitSessionId = client.activeSessionId;
|
|
1499
1503
|
const exitSession = sessionManager.getSession(exitSessionId);
|
|
1500
1504
|
if (!exitSession) {
|
|
1501
1505
|
send(createErrorMessage("NOT_FOUND", "Session not found", message.id));
|
|
@@ -1542,4 +1546,4 @@ export {
|
|
|
1542
1546
|
signalMcpReady,
|
|
1543
1547
|
createWebSocketServer
|
|
1544
1548
|
};
|
|
1545
|
-
//# sourceMappingURL=chunk-
|
|
1549
|
+
//# sourceMappingURL=chunk-EZD7WFBZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MKWS7TQH.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackendCapabilities
|
|
9
9
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -803,4 +803,4 @@ export {
|
|
|
803
803
|
parseDefaultModelSelection,
|
|
804
804
|
createProviderManager
|
|
805
805
|
};
|
|
806
|
-
//# sourceMappingURL=chunk-
|
|
806
|
+
//# sourceMappingURL=chunk-GZTMCTUS.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-3PG65AXG.js";
|
|
12
12
|
import {
|
|
13
13
|
parseDefaultModelSelection
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GZTMCTUS.js";
|
|
15
15
|
import {
|
|
16
16
|
getDatabase
|
|
17
17
|
} from "./chunk-5PT4UMRR.js";
|
|
@@ -342,10 +342,11 @@ async function resolveSlashLaunch(configDir, projectDir, prompt) {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
// src/server/db/tasks.ts
|
|
345
|
+
import { randomBytes } from "crypto";
|
|
345
346
|
function createTask(projectId, input) {
|
|
346
347
|
const db = getDatabase();
|
|
347
348
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
348
|
-
const id =
|
|
349
|
+
const id = randomBytes(8).toString("hex");
|
|
349
350
|
const position = db.prepare(`SELECT COALESCE(MAX(position), -1) + 1 AS pos FROM tasks WHERE project_id = ? AND status = 'todo'`).get(projectId);
|
|
350
351
|
db.prepare(
|
|
351
352
|
`INSERT INTO tasks (id, project_id, prompt, attachments, status, run_state, position, version, agent_id, provider_id, model, created_at, updated_at)
|
|
@@ -1078,4 +1079,4 @@ export {
|
|
|
1078
1079
|
isTaskGateError,
|
|
1079
1080
|
createTasksService
|
|
1080
1081
|
};
|
|
1081
|
-
//# sourceMappingURL=chunk-
|
|
1082
|
+
//# sourceMappingURL=chunk-HZSKKJHQ.js.map
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getToolRegistryForAgent,
|
|
5
5
|
processEventsForConversation,
|
|
6
6
|
runTopLevelAgentLoop
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2PQA3DHY.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCachedPrompt,
|
|
10
10
|
computeDynamicContextHash,
|
|
11
11
|
getToolFingerprint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3PEYTWCS.js";
|
|
13
13
|
import {
|
|
14
14
|
getAllInstructions,
|
|
15
15
|
getEnabledSkillMetadata
|
|
@@ -18,19 +18,19 @@ import {
|
|
|
18
18
|
TurnMetrics,
|
|
19
19
|
createChatDoneEvent,
|
|
20
20
|
createMessageStartEvent
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EQ7DK2TG.js";
|
|
22
22
|
import {
|
|
23
23
|
buildAgentReminder,
|
|
24
24
|
buildAgentSmallReminder
|
|
25
25
|
} from "./chunk-27NABDXB.js";
|
|
26
26
|
import {
|
|
27
27
|
PathAccessDeniedError
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-QQVPUZQB.js";
|
|
29
29
|
import {
|
|
30
30
|
getCurrentContextWindowId,
|
|
31
31
|
getCurrentWindowMessageOptions,
|
|
32
32
|
getEventStore
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TGVDUK4N.js";
|
|
34
34
|
import {
|
|
35
35
|
buildSnapshotFromSessionState
|
|
36
36
|
} from "./chunk-3KBRMBTP.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
|
|
50
50
|
// src/server/chat/orchestrator.ts
|
|
51
51
|
async function buildRetryPatterns() {
|
|
52
|
-
const { getSetting, SETTINGS_KEYS } = await import("./settings-
|
|
52
|
+
const { getSetting, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
53
53
|
const raw = getSetting(SETTINGS_KEYS.RETRY_PATTERNS);
|
|
54
54
|
if (!raw) {
|
|
55
55
|
const oldXmlProtection = getSetting("llm.disableXmlProtection");
|
|
@@ -228,7 +228,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
|
|
|
228
228
|
const agentDef = findAgentById(agentId, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
|
|
229
229
|
const agentLlmClient = options.sessionManager.createClientForAgent(agentId, options.llmClient);
|
|
230
230
|
const statsIdentity = resolveStatsIdentity({ ...options, llmClient: agentLlmClient });
|
|
231
|
-
if (!options.warmup) {
|
|
231
|
+
if (!options.warmup && !options.skipAgentReminder) {
|
|
232
232
|
injectAgentReminder(options.sessionId, agentDef);
|
|
233
233
|
}
|
|
234
234
|
const session = options.sessionManager.requireSession(options.sessionId);
|
|
@@ -296,6 +296,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
|
|
|
296
296
|
...options.initialCompacting ? { initialCompacting: true } : {},
|
|
297
297
|
...callbacks?.injectKickoff ? { injectKickoff: callbacks.injectKickoff } : {},
|
|
298
298
|
...callbacks?.onToolExecuted ? { onToolExecuted: callbacks.onToolExecuted } : {},
|
|
299
|
+
...options.suppressRecoverableErrors ? { suppressChatError: true } : {},
|
|
299
300
|
...options.warmup ? { warmup: true } : {}
|
|
300
301
|
},
|
|
301
302
|
turnMetrics
|
|
@@ -319,4 +320,4 @@ export {
|
|
|
319
320
|
runChatTurn,
|
|
320
321
|
runAgentTurn
|
|
321
322
|
};
|
|
322
|
-
//# sourceMappingURL=chunk-
|
|
323
|
+
//# sourceMappingURL=chunk-I6MY65LO.js.map
|
|
@@ -396,6 +396,11 @@ function getActiveWorkflowExecution(sessionId) {
|
|
|
396
396
|
).get(sessionId);
|
|
397
397
|
return row;
|
|
398
398
|
}
|
|
399
|
+
function getLatestWorkflowExecution(sessionId) {
|
|
400
|
+
const db = getDatabase();
|
|
401
|
+
const row = db.prepare(`SELECT * FROM workflow_executions WHERE session_id = ? ORDER BY updated_at DESC LIMIT 1`).get(sessionId);
|
|
402
|
+
return row;
|
|
403
|
+
}
|
|
399
404
|
function clearWorkflowExecution(executionId) {
|
|
400
405
|
const db = getDatabase();
|
|
401
406
|
const now = Date.now();
|
|
@@ -427,6 +432,7 @@ export {
|
|
|
427
432
|
createWorkflowExecution,
|
|
428
433
|
updateWorkflowExecutionStatus,
|
|
429
434
|
getActiveWorkflowExecution,
|
|
435
|
+
getLatestWorkflowExecution,
|
|
430
436
|
clearWorkflowExecution
|
|
431
437
|
};
|
|
432
|
-
//# sourceMappingURL=chunk-
|
|
438
|
+
//# sourceMappingURL=chunk-KLQEL2DZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getModelProfile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
4
4
|
import {
|
|
5
5
|
getBackendCapabilities
|
|
6
6
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -310,4 +310,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
310
310
|
export {
|
|
311
311
|
createLLMClient
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-MKWS7TQH.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEventStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TGVDUK4N.js";
|
|
4
4
|
import {
|
|
5
5
|
createChatPathConfirmationMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4GHLULHB.js";
|
|
7
7
|
import {
|
|
8
8
|
getPlatformShell
|
|
9
9
|
} from "./chunk-AESOGRFK.js";
|
|
@@ -140,6 +140,151 @@ function normalizeExtracted(path) {
|
|
|
140
140
|
function isPlaceholderToken(str) {
|
|
141
141
|
return str.includes("__URL__") || str.includes("__FILEURL__") || str.includes("__SED__") || str.includes("__COMMIT_MSG__");
|
|
142
142
|
}
|
|
143
|
+
var REGEX_TOOL_RE = /\b(?:sed|awk|gawk|mawk|perl|ruby|raku)\b/;
|
|
144
|
+
var SHELL_TOKEN_END_RE = /[\s'"`|&;,<>()]/;
|
|
145
|
+
function isRegexAddress(command, start, end, hasRegexTool, quote) {
|
|
146
|
+
const content = command.slice(start + 1, end);
|
|
147
|
+
if (looksLikeRegex(content)) return true;
|
|
148
|
+
if (command[end + 1] === ",") return true;
|
|
149
|
+
if (quote === null && command[start - 1] === "~" && (command[start - 2] === "=" || command[start - 2] === "!")) {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
const action = command[end + 1];
|
|
153
|
+
if (action !== void 0 && /[a-zA-Z]/.test(action)) {
|
|
154
|
+
const after = command[end + 2];
|
|
155
|
+
const terminated = quote === null ? SHELL_TOKEN_END_RE.test(after ?? "") : after === quote;
|
|
156
|
+
if (terminated) return true;
|
|
157
|
+
}
|
|
158
|
+
return hasRegexTool && quote !== null && !/\s/.test(content);
|
|
159
|
+
}
|
|
160
|
+
function maskRegexAddresses(command) {
|
|
161
|
+
const work = command.replace(/(?:=|!)~\s+/g, " __SED__ ");
|
|
162
|
+
if (!work.includes("/")) return work;
|
|
163
|
+
const hasRegexTool = REGEX_TOOL_RE.test(work);
|
|
164
|
+
const out = [];
|
|
165
|
+
let quote = null;
|
|
166
|
+
let i = 0;
|
|
167
|
+
const n = work.length;
|
|
168
|
+
const maskSpan = (end) => {
|
|
169
|
+
if (out[out.length - 1] === "~" && (out[out.length - 2] === "=" || out[out.length - 2] === "!")) {
|
|
170
|
+
out.pop();
|
|
171
|
+
out.pop();
|
|
172
|
+
}
|
|
173
|
+
out.push(" __SED__ ");
|
|
174
|
+
i = end + 1;
|
|
175
|
+
};
|
|
176
|
+
while (i < n) {
|
|
177
|
+
const ch = work[i];
|
|
178
|
+
if (quote !== null) {
|
|
179
|
+
if (ch === "\\" && quote !== "'") {
|
|
180
|
+
out.push(ch, work[i + 1] ?? "");
|
|
181
|
+
i += 2;
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
if (ch === quote) {
|
|
185
|
+
out.push(ch);
|
|
186
|
+
quote = null;
|
|
187
|
+
i += 1;
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if (ch === "/") {
|
|
191
|
+
let j = i + 1;
|
|
192
|
+
while (j < n) {
|
|
193
|
+
if (work[j] === "\\" && quote !== "'") {
|
|
194
|
+
j += 2;
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
if (work[j] === quote || work[j] === "/") break;
|
|
198
|
+
j += 1;
|
|
199
|
+
}
|
|
200
|
+
if (j < n && work[j] === "/" && isRegexAddress(work, i, j, hasRegexTool, quote)) {
|
|
201
|
+
maskSpan(j);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
out.push(ch);
|
|
206
|
+
i += 1;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
if (ch === "'" || ch === '"' || ch === "`") {
|
|
210
|
+
quote = ch;
|
|
211
|
+
out.push(ch);
|
|
212
|
+
i += 1;
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (ch === "/") {
|
|
216
|
+
let j = i + 1;
|
|
217
|
+
while (j < n && work[j] !== "/" && !/[\s|&;<>()'"`]/.test(work[j])) j += 1;
|
|
218
|
+
if (j < n && work[j] === "/" && isRegexAddress(work, i, j, hasRegexTool, null)) {
|
|
219
|
+
maskSpan(j);
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
out.push(ch);
|
|
224
|
+
i += 1;
|
|
225
|
+
}
|
|
226
|
+
return out.join("");
|
|
227
|
+
}
|
|
228
|
+
function extractUnquotedTildePaths(command, home) {
|
|
229
|
+
const paths = [];
|
|
230
|
+
let quote = null;
|
|
231
|
+
let i = 0;
|
|
232
|
+
const n = command.length;
|
|
233
|
+
while (i < n) {
|
|
234
|
+
const ch = command[i];
|
|
235
|
+
if (quote !== null) {
|
|
236
|
+
if (ch === "\\" && quote !== "'") {
|
|
237
|
+
i += 2;
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
if (ch === quote) {
|
|
241
|
+
quote = null;
|
|
242
|
+
i += 1;
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
i += 1;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (ch === "'" || ch === '"' || ch === "`") {
|
|
249
|
+
quote = ch;
|
|
250
|
+
i += 1;
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
if (ch === "~" && (i === 0 || /[\s=(]/.test(command[i - 1]))) {
|
|
254
|
+
let j = i + 1;
|
|
255
|
+
while (j < n && !/[\s'"()]/.test(command[j])) j += 1;
|
|
256
|
+
const tail = command.slice(i + 1, j);
|
|
257
|
+
if (tail === "" || tail.startsWith("/")) {
|
|
258
|
+
const resolved = normalize(resolve(home + tail));
|
|
259
|
+
if (!isSafePath(resolved)) {
|
|
260
|
+
paths.push(resolved);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
i = j;
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
i += 1;
|
|
267
|
+
}
|
|
268
|
+
return paths;
|
|
269
|
+
}
|
|
270
|
+
var TRAVERSAL_SEGMENT_RE = /(?:^|\/)\.\.(?:\/|$)/;
|
|
271
|
+
function extractRelativeTraversals(command) {
|
|
272
|
+
const out = [];
|
|
273
|
+
const isTraversal = (token) => TRAVERSAL_SEGMENT_RE.test(token);
|
|
274
|
+
const quotedPattern = /["']([^"']+)["']/g;
|
|
275
|
+
let m;
|
|
276
|
+
while ((m = quotedPattern.exec(command)) !== null) {
|
|
277
|
+
const content = m[1];
|
|
278
|
+
if (!content || content.startsWith("/") || content.startsWith("~") || isWindowsAbsolutePath(content)) continue;
|
|
279
|
+
if (isTraversal(content)) out.push(content);
|
|
280
|
+
}
|
|
281
|
+
const bare = command.replace(/["'][^"']*["']/g, " ").split(/[\s|&;<>()]+/);
|
|
282
|
+
for (const token of bare) {
|
|
283
|
+
if (!token || token.startsWith("/") || token.startsWith("~")) continue;
|
|
284
|
+
if (isTraversal(token)) out.push(token);
|
|
285
|
+
}
|
|
286
|
+
return [...new Set(out)];
|
|
287
|
+
}
|
|
143
288
|
function extractAbsolutePathsFromCommand(command) {
|
|
144
289
|
if (!command.trim()) {
|
|
145
290
|
return [];
|
|
@@ -151,6 +296,7 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
151
296
|
sanitized = sanitized.replace(/(?<!\w)s\/[^/]*\/[^/]*\/[gip]*/g, " __SED__ ");
|
|
152
297
|
sanitized = sanitized.replace(/(?<!\w)s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
|
|
153
298
|
sanitized = sanitized.replace(/(?<!\w)s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
|
|
299
|
+
sanitized = maskRegexAddresses(sanitized);
|
|
154
300
|
sanitized = sanitized.replace(
|
|
155
301
|
/git\s+commit\b.*?(?:-(?:[a-zA-Z]*m)(?=\s)|--message)\s+(["'])(?:(?!\1).)*\1/g,
|
|
156
302
|
(match2) => match2.replace(/\/[^\s"'|&;<>`()]+/g, " __COMMIT_MSG__ ")
|
|
@@ -163,17 +309,9 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
163
309
|
}
|
|
164
310
|
}
|
|
165
311
|
sanitized = sanitized.replace(/file:\/\/[^\s'"]+/g, " __FILEURL__ ");
|
|
166
|
-
|
|
167
|
-
let match;
|
|
168
|
-
while ((match = tildePattern.exec(sanitized)) !== null) {
|
|
169
|
-
const pathPart = match[1] ?? "";
|
|
170
|
-
const fullPath = home + pathPart;
|
|
171
|
-
const resolved = normalize(resolve(fullPath));
|
|
172
|
-
if (!isSafePath(resolved)) {
|
|
173
|
-
paths.push(resolved);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
312
|
+
paths.push(...extractUnquotedTildePaths(sanitized, home));
|
|
176
313
|
const quotedPattern = /["']([^"']+)["']/g;
|
|
314
|
+
let match;
|
|
177
315
|
while ((match = quotedPattern.exec(sanitized)) !== null) {
|
|
178
316
|
const content = match[1];
|
|
179
317
|
if (content.startsWith("/") && content.endsWith("/")) {
|
|
@@ -192,13 +330,6 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
192
330
|
if (!isSafePath(resolved)) {
|
|
193
331
|
paths.push(resolved);
|
|
194
332
|
}
|
|
195
|
-
} else if (content.startsWith("~")) {
|
|
196
|
-
const pathPart = content.slice(1);
|
|
197
|
-
const fullPath = join(home, pathPart);
|
|
198
|
-
const resolved = normalize(resolve(fullPath));
|
|
199
|
-
if (!isSafePath(resolved)) {
|
|
200
|
-
paths.push(resolved);
|
|
201
|
-
}
|
|
202
333
|
}
|
|
203
334
|
}
|
|
204
335
|
if (isWindows()) {
|
|
@@ -214,6 +345,10 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
214
345
|
}
|
|
215
346
|
if (posixShell) {
|
|
216
347
|
const absolutePattern = /(?:^|[\s=(])(\/[^\s"'|&;<>`()]+)/g;
|
|
348
|
+
const rootPattern = /(?:^|[\s=(])\/(?=$|[\s'"`|&;,<()])/g;
|
|
349
|
+
if (rootPattern.test(sanitized)) {
|
|
350
|
+
paths.push("/");
|
|
351
|
+
}
|
|
217
352
|
while ((match = absolutePattern.exec(sanitized)) !== null) {
|
|
218
353
|
const candidate = match[1];
|
|
219
354
|
if (isPlaceholderToken(candidate)) continue;
|
|
@@ -225,6 +360,7 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
225
360
|
}
|
|
226
361
|
}
|
|
227
362
|
}
|
|
363
|
+
paths.push(...extractRelativeTraversals(sanitized));
|
|
228
364
|
return [...new Set(paths)];
|
|
229
365
|
}
|
|
230
366
|
function extractSensitivePathsFromCommand(command) {
|
|
@@ -535,4 +671,4 @@ export {
|
|
|
535
671
|
getConfirmationSessionId,
|
|
536
672
|
getPendingConfirmationsBySession
|
|
537
673
|
};
|
|
538
|
-
//# sourceMappingURL=chunk-
|
|
674
|
+
//# sourceMappingURL=chunk-QQVPUZQB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMessageCount
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KLQEL2DZ.js";
|
|
4
4
|
import {
|
|
5
5
|
buildContextMessagesFromEventHistory,
|
|
6
6
|
buildMessagesFromStoredEvents,
|
|
@@ -1465,4 +1465,4 @@ export {
|
|
|
1465
1465
|
truncateSessionMessages,
|
|
1466
1466
|
getRecentUserPromptsForSession
|
|
1467
1467
|
};
|
|
1468
|
-
//# sourceMappingURL=chunk-
|
|
1468
|
+
//# sourceMappingURL=chunk-TGVDUK4N.js.map
|
|
@@ -3,7 +3,7 @@ var DEFAULT_PROFILE = {
|
|
|
3
3
|
name: "default",
|
|
4
4
|
temperature: 0.7,
|
|
5
5
|
topP: 0.9,
|
|
6
|
-
defaultMaxTokens:
|
|
6
|
+
defaultMaxTokens: 16384,
|
|
7
7
|
supportsVision: true
|
|
8
8
|
};
|
|
9
9
|
var MOCK_PROFILE = {
|
|
@@ -172,4 +172,4 @@ export {
|
|
|
172
172
|
getModelProfile,
|
|
173
173
|
modelSupportsVision
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-W7VIYHPQ.js.map
|