openfox 2.0.94 → 2.0.95
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 +12 -0
- package/dist/CHANGELOG.md +12 -0
- package/dist/{chat-handler-Z7OCNJWO.js → chat-handler-5FV3TGQD.js} +8 -8
- package/dist/{chunk-ZYDPYFRH.js → chunk-5UFTFBNW.js} +3 -3
- package/dist/{chunk-DLCMSSG3.js → chunk-6RHMIMID.js} +7 -7
- package/dist/{chunk-FVV7TZC2.js → chunk-7P7OKBYQ.js} +3 -2
- package/dist/{chunk-KNRE3DG4.js → chunk-D6T3X22W.js} +28 -42
- package/dist/{chunk-YJ5P33SE.js → chunk-HAFRPV7I.js} +12 -2
- package/dist/{chunk-OQXG4MS4.js → chunk-KG2PJVOE.js} +78 -38
- package/dist/{chunk-V4QTGYXL.js → chunk-MB7STVMR.js} +3 -3
- package/dist/{chunk-MUNVSHL5.js → chunk-OZD247P4.js} +5 -5
- package/dist/{chunk-KU3YUGAN.js → chunk-SJJVNSA6.js} +2 -2
- package/dist/{chunk-XNB3JWAR.js → chunk-TDHDLDGQ.js} +9 -19
- package/dist/chunk-VKU7YBLH.js +7 -0
- package/dist/{chunk-3WKAKOU4.js → chunk-W7P5P54O.js} +2 -2
- package/dist/{chunk-LSDJCJWA.js → chunk-YCPUV7AR.js} +4 -4
- package/dist/{chunk-2BCQDYNA.js → chunk-YPBV47DH.js} +6 -9
- package/dist/{chunk-VYN37NXW.js → chunk-ZMSHE564.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-OBMJSTFN.js → client-RENSCJPZ.js} +3 -3
- package/dist/{compactor-RSEV7VYH.js → compactor-3RXIAIPR.js} +3 -3
- package/dist/{dynamic-context-C3BWQ5GK.js → dynamic-context-CJFDFUJF.js} +2 -2
- package/dist/{events-SY5B4VED.js → events-QHZDLHEB.js} +2 -2
- package/dist/{http-client-3MOFAPO6.js → http-client-U6DVFL7F.js} +2 -2
- package/dist/{manager-UP3XMLKX.js → manager-53J5P4EZ.js} +2 -2
- package/dist/{orchestrator-VSUL2C7G.js → orchestrator-LDVMBC23.js} +7 -7
- package/dist/package.json +1 -1
- package/dist/{path-security-E55IEQHD.js → path-security-72KGHGSV.js} +3 -3
- package/dist/{processor-WP34IB3C.js → processor-32QUVPV6.js} +7 -7
- package/dist/{provider-E5IP7RF7.js → provider-A74GHQUO.js} +4 -4
- package/dist/{provider-manager-FVIFMUTO.js → provider-manager-PBOF77RQ.js} +4 -4
- package/dist/{serve-NZZVFNMA.js → serve-GL5WUPRP.js} +15 -15
- package/dist/server/index.js +14 -14
- package/dist/{server-DYJTLAZS.js → server-OYVGQU7O.js} +10 -10
- package/dist/{tools-YXOCUUKE.js → tools-UTA3TV7P.js} +5 -5
- package/dist/{update-5HWU675H.js → update-VUTN743C.js} +2 -2
- package/dist/web/assets/{index-DxAR7yc9.js → index-BUiw9fSe.js} +10 -10
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-O4NHL6IN.js +0 -7
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-D6T3X22W.js";
|
|
25
25
|
import {
|
|
26
26
|
createToolRegistry,
|
|
27
27
|
devServerManager,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
setMcpManagerForTools,
|
|
31
31
|
setMcpTools,
|
|
32
32
|
setNotifyMcpServersChanged
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6RHMIMID.js";
|
|
34
34
|
import {
|
|
35
35
|
createMcpTools
|
|
36
36
|
} from "./chunk-NWO6GRYE.js";
|
|
@@ -104,14 +104,14 @@ import {
|
|
|
104
104
|
getEventStore,
|
|
105
105
|
getSessionState,
|
|
106
106
|
initEventStore
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-7P7OKBYQ.js";
|
|
108
108
|
import {
|
|
109
109
|
getPathSeparator,
|
|
110
110
|
isAbsolutePath
|
|
111
111
|
} from "./chunk-NLN5LPQ4.js";
|
|
112
112
|
import {
|
|
113
113
|
VERSION
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-VKU7YBLH.js";
|
|
115
115
|
import {
|
|
116
116
|
clearWorkflowExecution,
|
|
117
117
|
createSession,
|
|
@@ -159,7 +159,7 @@ import {
|
|
|
159
159
|
detectModel,
|
|
160
160
|
getLlmStatus,
|
|
161
161
|
parseDefaultModelSelection
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-YPBV47DH.js";
|
|
163
163
|
import {
|
|
164
164
|
getModelProfile
|
|
165
165
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -171,9 +171,8 @@ import {
|
|
|
171
171
|
} from "./chunk-HNCM3D7Y.js";
|
|
172
172
|
import {
|
|
173
173
|
SessionNotFoundError,
|
|
174
|
-
WorkspaceInUseError
|
|
175
|
-
|
|
176
|
-
} from "./chunk-XNB3JWAR.js";
|
|
174
|
+
WorkspaceInUseError
|
|
175
|
+
} from "./chunk-TDHDLDGQ.js";
|
|
177
176
|
import {
|
|
178
177
|
deleteSetting,
|
|
179
178
|
getSetting,
|
|
@@ -2973,7 +2972,16 @@ var SessionManager = class {
|
|
|
2973
2972
|
*/
|
|
2974
2973
|
updateWorkflowStep(sessionId, executionId, stepId, stepName, workflowId, workflowName, workflowColor) {
|
|
2975
2974
|
updateWorkflowExecutionStatus(executionId, "running", stepId, stepName);
|
|
2976
|
-
emitWorkflowExecutionChanged(
|
|
2975
|
+
emitWorkflowExecutionChanged(
|
|
2976
|
+
sessionId,
|
|
2977
|
+
executionId,
|
|
2978
|
+
workflowId,
|
|
2979
|
+
workflowName,
|
|
2980
|
+
workflowColor,
|
|
2981
|
+
"running",
|
|
2982
|
+
stepId,
|
|
2983
|
+
stepName
|
|
2984
|
+
);
|
|
2977
2985
|
const updatedSession = this.requireSession(sessionId);
|
|
2978
2986
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
2979
2987
|
}
|
|
@@ -2982,7 +2990,16 @@ var SessionManager = class {
|
|
|
2982
2990
|
*/
|
|
2983
2991
|
waitAtStep(sessionId, executionId, stepId, stepName, stepOutput, workflowId, workflowName, workflowColor) {
|
|
2984
2992
|
updateWorkflowExecutionStatus(executionId, "waiting", stepId, stepName, stepOutput);
|
|
2985
|
-
emitWorkflowExecutionChanged(
|
|
2993
|
+
emitWorkflowExecutionChanged(
|
|
2994
|
+
sessionId,
|
|
2995
|
+
executionId,
|
|
2996
|
+
workflowId,
|
|
2997
|
+
workflowName,
|
|
2998
|
+
workflowColor,
|
|
2999
|
+
"waiting",
|
|
3000
|
+
stepId,
|
|
3001
|
+
stepName
|
|
3002
|
+
);
|
|
2986
3003
|
this.setPhase(sessionId, "waiting");
|
|
2987
3004
|
const updatedSession = this.requireSession(sessionId);
|
|
2988
3005
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
@@ -3001,6 +3018,7 @@ var SessionManager = class {
|
|
|
3001
3018
|
workflowName,
|
|
3002
3019
|
workflowColor,
|
|
3003
3020
|
"running",
|
|
3021
|
+
row.current_step_id ?? void 0,
|
|
3004
3022
|
row.current_step_name ?? void 0
|
|
3005
3023
|
);
|
|
3006
3024
|
const updatedSession = this.requireSession(sessionId);
|
|
@@ -5693,7 +5711,7 @@ async function createServerHandle(config3) {
|
|
|
5693
5711
|
setMcpTools(mcpTools);
|
|
5694
5712
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5695
5713
|
}
|
|
5696
|
-
const { signalMcpReady } = await import("./server-
|
|
5714
|
+
const { signalMcpReady } = await import("./server-OYVGQU7O.js");
|
|
5697
5715
|
signalMcpReady();
|
|
5698
5716
|
});
|
|
5699
5717
|
const app = express();
|
|
@@ -6052,8 +6070,8 @@ All file and git operations should use this branch.
|
|
|
6052
6070
|
res.json({ workspaces: workspacesList });
|
|
6053
6071
|
});
|
|
6054
6072
|
app.get("/api/sessions", async (req, res) => {
|
|
6055
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
6056
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6073
|
+
const { getRecentUserPromptsForSession } = await import("./events-QHZDLHEB.js");
|
|
6074
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-72KGHGSV.js");
|
|
6057
6075
|
const projectId = req.query["projectId"];
|
|
6058
6076
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
6059
6077
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -6172,9 +6190,9 @@ All file and git operations should use this branch.
|
|
|
6172
6190
|
}
|
|
6173
6191
|
});
|
|
6174
6192
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6175
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6193
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-QHZDLHEB.js");
|
|
6176
6194
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-O4OYOTPS.js");
|
|
6177
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6195
|
+
const { getPendingQuestionsForSession } = await import("./tools-UTA3TV7P.js");
|
|
6178
6196
|
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6179
6197
|
const session = sessionManager.getSession(req.params.id);
|
|
6180
6198
|
if (!session) {
|
|
@@ -6207,8 +6225,8 @@ All file and git operations should use this branch.
|
|
|
6207
6225
|
if (!session) {
|
|
6208
6226
|
return res.status(404).json({ error: "Session not found" });
|
|
6209
6227
|
}
|
|
6210
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6211
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6228
|
+
const { stopSessionExecution } = await import("./chat-handler-5FV3TGQD.js");
|
|
6229
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-UTA3TV7P.js");
|
|
6212
6230
|
sessionManager.clearMessageQueue(sessionId);
|
|
6213
6231
|
stopSessionExecution(sessionId, sessionManager);
|
|
6214
6232
|
abortSession(sessionId);
|
|
@@ -6237,7 +6255,7 @@ All file and git operations should use this branch.
|
|
|
6237
6255
|
res.json({ success: true });
|
|
6238
6256
|
});
|
|
6239
6257
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6240
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6258
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-QHZDLHEB.js");
|
|
6241
6259
|
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6242
6260
|
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6243
6261
|
const sessionId = req.params.id;
|
|
@@ -6352,7 +6370,7 @@ All file and git operations should use this branch.
|
|
|
6352
6370
|
res.json({ success: true });
|
|
6353
6371
|
});
|
|
6354
6372
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6355
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6373
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-QHZDLHEB.js");
|
|
6356
6374
|
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6357
6375
|
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6358
6376
|
const sessionId = req.params.id;
|
|
@@ -6440,7 +6458,7 @@ All file and git operations should use this branch.
|
|
|
6440
6458
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6441
6459
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6442
6460
|
}
|
|
6443
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6461
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-UTA3TV7P.js");
|
|
6444
6462
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6445
6463
|
if (!pendingSessionId) {
|
|
6446
6464
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6452,10 +6470,10 @@ All file and git operations should use this branch.
|
|
|
6452
6470
|
if (!result.found) {
|
|
6453
6471
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6454
6472
|
}
|
|
6455
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6473
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-QHZDLHEB.js");
|
|
6456
6474
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-O4OYOTPS.js");
|
|
6457
6475
|
const { createSessionStateMessage } = await import("./protocol-YDNGGADL.js");
|
|
6458
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6476
|
+
const { getPendingQuestionsForSession } = await import("./tools-UTA3TV7P.js");
|
|
6459
6477
|
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6460
6478
|
const eventStore = getEventStore2();
|
|
6461
6479
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
@@ -6492,7 +6510,7 @@ All file and git operations should use this branch.
|
|
|
6492
6510
|
if (!skip && typeof answer !== "string") {
|
|
6493
6511
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6494
6512
|
}
|
|
6495
|
-
const { provideAnswer } = await import("./tools-
|
|
6513
|
+
const { provideAnswer } = await import("./tools-UTA3TV7P.js");
|
|
6496
6514
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6497
6515
|
if (!found) {
|
|
6498
6516
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6557,7 +6575,7 @@ All file and git operations should use this branch.
|
|
|
6557
6575
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6558
6576
|
model: llmClient.getModel()
|
|
6559
6577
|
};
|
|
6560
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6578
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-LDVMBC23.js");
|
|
6561
6579
|
runAgentTurn(
|
|
6562
6580
|
{
|
|
6563
6581
|
sessionManager,
|
|
@@ -6595,15 +6613,15 @@ All file and git operations should use this branch.
|
|
|
6595
6613
|
if (!session) {
|
|
6596
6614
|
return res.status(404).json({ error: "Session not found" });
|
|
6597
6615
|
}
|
|
6598
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6599
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6616
|
+
const { stopSessionExecution } = await import("./chat-handler-5FV3TGQD.js");
|
|
6617
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-UTA3TV7P.js");
|
|
6600
6618
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6601
6619
|
sessionManager.clearMessageQueue(sessionId);
|
|
6602
6620
|
stopSessionExecution(sessionId, sessionManager);
|
|
6603
6621
|
abortSession(sessionId);
|
|
6604
6622
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6605
6623
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6606
|
-
const eventStore = (await import("./events-
|
|
6624
|
+
const eventStore = (await import("./events-QHZDLHEB.js")).getEventStore();
|
|
6607
6625
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6608
6626
|
res.json({ success: true, queuedMessages });
|
|
6609
6627
|
});
|
|
@@ -6617,7 +6635,7 @@ All file and git operations should use this branch.
|
|
|
6617
6635
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6618
6636
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6619
6637
|
}
|
|
6620
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6638
|
+
const { truncateSessionMessages } = await import("./events-QHZDLHEB.js");
|
|
6621
6639
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6622
6640
|
res.json({ success: true });
|
|
6623
6641
|
});
|
|
@@ -6634,7 +6652,7 @@ All file and git operations should use this branch.
|
|
|
6634
6652
|
if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
|
|
6635
6653
|
return res.status(400).json({ error: "content must be a non-empty string if provided" });
|
|
6636
6654
|
}
|
|
6637
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6655
|
+
const { getEventStore: getEventStore2 } = await import("./events-QHZDLHEB.js");
|
|
6638
6656
|
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6639
6657
|
const eventStore = getEventStore2();
|
|
6640
6658
|
const events = eventStore.getEvents(sessionId);
|
|
@@ -6647,7 +6665,7 @@ All file and git operations should use this branch.
|
|
|
6647
6665
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
6648
6666
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
6649
6667
|
}
|
|
6650
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6668
|
+
const { truncateSessionMessages } = await import("./events-QHZDLHEB.js");
|
|
6651
6669
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
6652
6670
|
sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
|
|
6653
6671
|
res.json({ success: true });
|
|
@@ -6843,6 +6861,28 @@ All file and git operations should use this branch.
|
|
|
6843
6861
|
...m.selected !== void 0 && { selected: m.selected }
|
|
6844
6862
|
}));
|
|
6845
6863
|
}
|
|
6864
|
+
app.post("/api/proxy/test", async (_req, res) => {
|
|
6865
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
|
|
6866
|
+
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
6867
|
+
if (!proxyUrl) {
|
|
6868
|
+
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
6869
|
+
}
|
|
6870
|
+
try {
|
|
6871
|
+
const response = await fetch("http://example.com", {
|
|
6872
|
+
signal: AbortSignal.timeout(1e4)
|
|
6873
|
+
});
|
|
6874
|
+
if (!response.ok) {
|
|
6875
|
+
return res.status(400).json({ success: false, error: `Proxy returned HTTP ${response.status}` });
|
|
6876
|
+
}
|
|
6877
|
+
return res.json({ success: true, message: "Proxy connection OK" });
|
|
6878
|
+
} catch (error) {
|
|
6879
|
+
const message = error instanceof Error ? error.message : "Connection failed";
|
|
6880
|
+
if (error instanceof DOMException && error.name === "AbortError") {
|
|
6881
|
+
return res.status(400).json({ success: false, error: "Connection timed out" });
|
|
6882
|
+
}
|
|
6883
|
+
return res.status(400).json({ success: false, error: message });
|
|
6884
|
+
}
|
|
6885
|
+
});
|
|
6846
6886
|
app.post("/api/providers/test", async (req, res) => {
|
|
6847
6887
|
const { url, backend: reqBackend } = req.body;
|
|
6848
6888
|
if (!url) {
|
|
@@ -6920,7 +6960,7 @@ All file and git operations should use this branch.
|
|
|
6920
6960
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
6921
6961
|
}
|
|
6922
6962
|
try {
|
|
6923
|
-
const response = await
|
|
6963
|
+
const response = await fetch("http://example.com", {
|
|
6924
6964
|
signal: AbortSignal.timeout(1e4)
|
|
6925
6965
|
});
|
|
6926
6966
|
if (!response.ok) {
|
|
@@ -6941,7 +6981,7 @@ All file and git operations should use this branch.
|
|
|
6941
6981
|
const backend = req.query["backend"];
|
|
6942
6982
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6943
6983
|
try {
|
|
6944
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6984
|
+
const { fetchModelsWithContext } = await import("./provider-manager-PBOF77RQ.js");
|
|
6945
6985
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6946
6986
|
const models = await fetchModelsWithContext(
|
|
6947
6987
|
url,
|
|
@@ -7012,7 +7052,7 @@ All file and git operations should use this branch.
|
|
|
7012
7052
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
7013
7053
|
const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
|
|
7014
7054
|
const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
|
|
7015
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7055
|
+
const { OpenAIHttpClient } = await import("./http-client-U6DVFL7F.js");
|
|
7016
7056
|
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
7017
7057
|
const profile = getModelProfile2(model);
|
|
7018
7058
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -7270,7 +7310,7 @@ All file and git operations should use this branch.
|
|
|
7270
7310
|
});
|
|
7271
7311
|
async function rebuildMcpTools() {
|
|
7272
7312
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
7273
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7313
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-UTA3TV7P.js");
|
|
7274
7314
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7275
7315
|
setMcpTools2(mcpTools);
|
|
7276
7316
|
}
|
|
@@ -7526,13 +7566,13 @@ All file and git operations should use this branch.
|
|
|
7526
7566
|
})
|
|
7527
7567
|
);
|
|
7528
7568
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
7529
|
-
const { getSessionProcesses } = await import("./manager-
|
|
7569
|
+
const { getSessionProcesses } = await import("./manager-53J5P4EZ.js");
|
|
7530
7570
|
const sessionId = req.params.id;
|
|
7531
7571
|
const processes = getSessionProcesses(sessionId);
|
|
7532
7572
|
res.json({ processes });
|
|
7533
7573
|
});
|
|
7534
7574
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
7535
|
-
const { stopProcess } = await import("./manager-
|
|
7575
|
+
const { stopProcess } = await import("./manager-53J5P4EZ.js");
|
|
7536
7576
|
const sessionId = req.params.id;
|
|
7537
7577
|
const processId = req.params.processId;
|
|
7538
7578
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -7677,7 +7717,7 @@ All file and git operations should use this branch.
|
|
|
7677
7717
|
const state = sessionManager.getContextState(sessionId);
|
|
7678
7718
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
7679
7719
|
});
|
|
7680
|
-
const { QueueProcessor } = await import("./processor-
|
|
7720
|
+
const { QueueProcessor } = await import("./processor-32QUVPV6.js");
|
|
7681
7721
|
const queueProcessor = new QueueProcessor({
|
|
7682
7722
|
sessionManager,
|
|
7683
7723
|
providerManager,
|
|
@@ -7761,4 +7801,4 @@ export {
|
|
|
7761
7801
|
createServerHandle,
|
|
7762
7802
|
createServer
|
|
7763
7803
|
};
|
|
7764
|
-
//# sourceMappingURL=chunk-
|
|
7804
|
+
//# sourceMappingURL=chunk-KG2PJVOE.js.map
|
|
@@ -104,7 +104,7 @@ function resolveAgentDef(sessionManager, sessionId) {
|
|
|
104
104
|
}
|
|
105
105
|
async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
106
106
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
107
|
-
const { getToolRegistryForAgent } = await import("./tools-
|
|
107
|
+
const { getToolRegistryForAgent } = await import("./tools-UTA3TV7P.js");
|
|
108
108
|
const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
|
|
109
109
|
const toolFingerprint = getToolFingerprint(tools);
|
|
110
110
|
const allAgents = await loadAllAgentsDefault();
|
|
@@ -117,7 +117,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
|
117
117
|
async function computeSessionHash(sessionManager, sessionId) {
|
|
118
118
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
119
119
|
const agentDef = await resolveAgentDef(sessionManager, sessionId);
|
|
120
|
-
const { getToolRegistryForAgent } = await import("./tools-
|
|
120
|
+
const { getToolRegistryForAgent } = await import("./tools-UTA3TV7P.js");
|
|
121
121
|
const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
|
|
122
122
|
const toolFingerprint = getToolFingerprint(tools);
|
|
123
123
|
return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
computeSessionHash,
|
|
142
142
|
applyDynamicContext
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=chunk-
|
|
144
|
+
//# sourceMappingURL=chunk-MB7STVMR.js.map
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
getToolRegistryForAgent,
|
|
5
5
|
processEventsForConversation,
|
|
6
6
|
runTopLevelAgentLoop
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6RHMIMID.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCachedPrompt,
|
|
10
10
|
computeDynamicContextHash,
|
|
11
11
|
getToolFingerprint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MB7STVMR.js";
|
|
13
13
|
import {
|
|
14
14
|
getAllInstructions,
|
|
15
15
|
getEnabledSkillMetadata
|
|
16
16
|
} from "./chunk-MC3MCMAF.js";
|
|
17
17
|
import {
|
|
18
18
|
PathAccessDeniedError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZMSHE564.js";
|
|
20
20
|
import {
|
|
21
21
|
TurnMetrics,
|
|
22
22
|
createChatDoneEvent,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getCurrentContextWindowId,
|
|
31
31
|
getCurrentWindowMessageOptions,
|
|
32
32
|
getEventStore
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7P7OKBYQ.js";
|
|
34
34
|
import {
|
|
35
35
|
buildSnapshotFromSessionState
|
|
36
36
|
} from "./chunk-P637C6X3.js";
|
|
@@ -309,4 +309,4 @@ export {
|
|
|
309
309
|
runChatTurn,
|
|
310
310
|
runAgentTurn
|
|
311
311
|
};
|
|
312
|
-
//# sourceMappingURL=chunk-
|
|
312
|
+
//# sourceMappingURL=chunk-OZD247P4.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
LLMError,
|
|
19
19
|
OpenAIHttpClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TDHDLDGQ.js";
|
|
21
21
|
import {
|
|
22
22
|
logger
|
|
23
23
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -268,4 +268,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
268
268
|
export {
|
|
269
269
|
createLLMClient
|
|
270
270
|
};
|
|
271
|
-
//# sourceMappingURL=chunk-
|
|
271
|
+
//# sourceMappingURL=chunk-SJJVNSA6.js.map
|
|
@@ -58,28 +58,19 @@ function getProxyAgent() {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
_cachedProxyUrl = proxyUrl;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
uri: proxyUrl,
|
|
64
|
-
requestTls: { rejectUnauthorized: true }
|
|
65
|
-
});
|
|
66
|
-
logger.info("[proxy] Proxy agent created", { proxyUrl });
|
|
67
|
-
} catch (err) {
|
|
68
|
-
logger.error("[proxy] Failed to create proxy agent", { proxyUrl, error: err });
|
|
69
|
-
_cachedAgent = void 0;
|
|
70
|
-
_cachedProxyUrl = void 0;
|
|
71
|
-
return void 0;
|
|
72
|
-
}
|
|
61
|
+
_cachedAgent = new ProxyAgent({ uri: proxyUrl, requestTls: { rejectUnauthorized: false } });
|
|
62
|
+
logger.info("[proxy] Proxy agent created");
|
|
73
63
|
}
|
|
74
64
|
return _cachedAgent;
|
|
75
65
|
}
|
|
76
|
-
|
|
66
|
+
var _originalFetch = globalThis.fetch;
|
|
67
|
+
globalThis.fetch = function(input, init) {
|
|
77
68
|
const agent = getProxyAgent();
|
|
78
69
|
if (agent) {
|
|
79
|
-
return undiciFetch(
|
|
70
|
+
return undiciFetch(input, { ...init, dispatcher: agent });
|
|
80
71
|
}
|
|
81
|
-
return
|
|
82
|
-
}
|
|
72
|
+
return _originalFetch(input, init);
|
|
73
|
+
};
|
|
83
74
|
|
|
84
75
|
// src/server/llm/http-client.ts
|
|
85
76
|
var OpenAIHttpClient = class {
|
|
@@ -97,7 +88,7 @@ var OpenAIHttpClient = class {
|
|
|
97
88
|
};
|
|
98
89
|
const bodyStr = JSON.stringify(params);
|
|
99
90
|
logger.debug("HTTP request to LLM", { url, bodyKeys: Object.keys(params) });
|
|
100
|
-
const response = await
|
|
91
|
+
const response = await fetch(url, {
|
|
101
92
|
method: "POST",
|
|
102
93
|
headers,
|
|
103
94
|
body: bodyStr,
|
|
@@ -168,7 +159,6 @@ export {
|
|
|
168
159
|
SessionNotFoundError,
|
|
169
160
|
LLMError,
|
|
170
161
|
WorkspaceInUseError,
|
|
171
|
-
proxyFetch,
|
|
172
162
|
OpenAIHttpClient
|
|
173
163
|
};
|
|
174
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-TDHDLDGQ.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-MRWR3SIT.js";
|
|
7
7
|
import {
|
|
8
8
|
getCurrentWindowMessageOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7P7OKBYQ.js";
|
|
10
10
|
|
|
11
11
|
// src/server/context/compactor.ts
|
|
12
12
|
function appendCompactionPrompt(sessionId, append) {
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
COMPACTION_MAX_RATIO,
|
|
37
37
|
shouldCompact
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-W7P5P54O.js.map
|
|
@@ -163,7 +163,7 @@ async function runCli(options) {
|
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
165
|
case "provider": {
|
|
166
|
-
const { runProviderCommand } = await import("./provider-
|
|
166
|
+
const { runProviderCommand } = await import("./provider-A74GHQUO.js");
|
|
167
167
|
const [, subcommand] = positionals;
|
|
168
168
|
await runProviderCommand(mode, subcommand);
|
|
169
169
|
break;
|
|
@@ -200,7 +200,7 @@ async function runCli(options) {
|
|
|
200
200
|
break;
|
|
201
201
|
}
|
|
202
202
|
case "update": {
|
|
203
|
-
const { runUpdate } = await import("./update-
|
|
203
|
+
const { runUpdate } = await import("./update-VUTN743C.js");
|
|
204
204
|
const code = await runUpdate();
|
|
205
205
|
if (code !== 0) {
|
|
206
206
|
process.exit(code);
|
|
@@ -213,7 +213,7 @@ async function runCli(options) {
|
|
|
213
213
|
if (!configExists) {
|
|
214
214
|
await runNetworkSetup(mode);
|
|
215
215
|
}
|
|
216
|
-
const { runServe } = await import("./serve-
|
|
216
|
+
const { runServe } = await import("./serve-GL5WUPRP.js");
|
|
217
217
|
const serveOptions = { mode };
|
|
218
218
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
219
219
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -225,4 +225,4 @@ async function runCli(options) {
|
|
|
225
225
|
export {
|
|
226
226
|
runCli
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=chunk-
|
|
228
|
+
//# sourceMappingURL=chunk-YCPUV7AR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SJJVNSA6.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -15,9 +15,6 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
resolveAttachmentsInMessages
|
|
17
17
|
} from "./chunk-RMXPVQP4.js";
|
|
18
|
-
import {
|
|
19
|
-
proxyFetch
|
|
20
|
-
} from "./chunk-XNB3JWAR.js";
|
|
21
18
|
import {
|
|
22
19
|
logger
|
|
23
20
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -184,7 +181,7 @@ async function fetchModelsFromBackend(url, apiKey) {
|
|
|
184
181
|
headers["Authorization"] = `Bearer ${apiKey}`;
|
|
185
182
|
}
|
|
186
183
|
try {
|
|
187
|
-
const response = await
|
|
184
|
+
const response = await fetch(url, { method: "GET", headers, signal: AbortSignal.timeout(1e4) });
|
|
188
185
|
if (!response.ok) {
|
|
189
186
|
logger.debug("Failed to fetch models", { url, status: response.status });
|
|
190
187
|
return [];
|
|
@@ -263,7 +260,7 @@ async function fetchModelsWithContext(baseUrl, apiKey, backend) {
|
|
|
263
260
|
async function fetchOllamaModelsWithContext(baseUrl, _apiKey) {
|
|
264
261
|
const tagsUrl = `${baseUrl}/api/tags`;
|
|
265
262
|
try {
|
|
266
|
-
const tagsResponse = await
|
|
263
|
+
const tagsResponse = await fetch(tagsUrl, {
|
|
267
264
|
signal: AbortSignal.timeout(1e4)
|
|
268
265
|
});
|
|
269
266
|
if (!tagsResponse.ok) {
|
|
@@ -278,7 +275,7 @@ async function fetchOllamaModelsWithContext(baseUrl, _apiKey) {
|
|
|
278
275
|
for (const model of tagsData.models) {
|
|
279
276
|
try {
|
|
280
277
|
const showUrl = `${baseUrl}/api/show`;
|
|
281
|
-
const showResponse = await
|
|
278
|
+
const showResponse = await fetch(showUrl, {
|
|
282
279
|
method: "POST",
|
|
283
280
|
headers: { "Content-Type": "application/json" },
|
|
284
281
|
body: JSON.stringify({ name: model.name, verbose: true }),
|
|
@@ -325,7 +322,7 @@ async function fetchLmStudioModelsWithContext(baseUrl, _apiKey) {
|
|
|
325
322
|
const nativeUrl = `${base.replace(/\/v\d+\/?$/, "")}/api/v1/models`;
|
|
326
323
|
try {
|
|
327
324
|
logger.info("Fetching LM Studio native models", { url: nativeUrl });
|
|
328
|
-
const response = await
|
|
325
|
+
const response = await fetch(nativeUrl, {
|
|
329
326
|
signal: AbortSignal.timeout(1e4)
|
|
330
327
|
});
|
|
331
328
|
if (!response.ok) {
|
|
@@ -810,4 +807,4 @@ export {
|
|
|
810
807
|
parseDefaultModelSelection,
|
|
811
808
|
createProviderManager
|
|
812
809
|
};
|
|
813
|
-
//# sourceMappingURL=chunk-
|
|
810
|
+
//# sourceMappingURL=chunk-YPBV47DH.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-27SDWNKL.js";
|
|
4
4
|
import {
|
|
5
5
|
getEventStore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7P7OKBYQ.js";
|
|
7
7
|
|
|
8
8
|
// src/server/tools/path-security.ts
|
|
9
9
|
import { realpath } from "fs/promises";
|
|
@@ -494,4 +494,4 @@ export {
|
|
|
494
494
|
getConfirmationSessionId,
|
|
495
495
|
getPendingConfirmationsBySession
|
|
496
496
|
};
|
|
497
|
-
//# sourceMappingURL=chunk-
|
|
497
|
+
//# sourceMappingURL=chunk-ZMSHE564.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SJJVNSA6.js";
|
|
4
4
|
import "./chunk-V4IE7HJY.js";
|
|
5
5
|
import "./chunk-YHEQTVFV.js";
|
|
6
6
|
import "./chunk-HNCM3D7Y.js";
|
|
7
7
|
import "./chunk-RMXPVQP4.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-TDHDLDGQ.js";
|
|
9
9
|
import "./chunk-UEOEA6BB.js";
|
|
10
10
|
import "./chunk-GLF65XDS.js";
|
|
11
11
|
import "./chunk-K44MW7JJ.js";
|
|
@@ -13,4 +13,4 @@ import "./chunk-5WRI5ZAA.js";
|
|
|
13
13
|
export {
|
|
14
14
|
createLLMClient
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=client-
|
|
16
|
+
//# sourceMappingURL=client-RENSCJPZ.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
COMPACTION_MAX_RATIO,
|
|
4
4
|
appendCompactionPrompt,
|
|
5
5
|
shouldCompact
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7P5P54O.js";
|
|
7
7
|
import "./chunk-K2O7JTCX.js";
|
|
8
8
|
import "./chunk-MRWR3SIT.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-7P7OKBYQ.js";
|
|
10
10
|
import "./chunk-NLN5LPQ4.js";
|
|
11
11
|
import "./chunk-P637C6X3.js";
|
|
12
12
|
import "./chunk-TSHJW7OC.js";
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
appendCompactionPrompt,
|
|
27
27
|
shouldCompact
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=compactor-
|
|
29
|
+
//# sourceMappingURL=compactor-3RXIAIPR.js.map
|