openfox 2.0.80 → 2.0.82
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/{chat-handler-2ZEI2WBE.js → chat-handler-73HNN7TQ.js} +15 -15
- package/dist/{chunk-4GMRZU7A.js → chunk-3D3N2PXI.js} +4 -4
- package/dist/{chunk-V77VNKN6.js → chunk-4VDEVDMG.js} +7 -19
- package/dist/{chunk-MTUYDBSL.js → chunk-5ZHVQOI3.js} +2 -2
- package/dist/{chunk-MAGDRXHW.js → chunk-7QCJCIVB.js} +33 -93
- package/dist/{chunk-F56O4B67.js → chunk-ATU2X6EP.js} +4 -4
- package/dist/{chunk-AFJLY43Z.js → chunk-CNJ63FXJ.js} +6 -3
- package/dist/{chunk-LYZ3LQRX.js → chunk-DQP5HSDS.js} +2 -2
- package/dist/{chunk-EHVDAVYG.js → chunk-FVY2JOTO.js} +2 -2
- package/dist/{chunk-ZO5EXQMG.js → chunk-IIRXKSB5.js} +53 -2
- package/dist/{chunk-5CQRB7AD.js → chunk-JKZPMRH2.js} +2 -2
- package/dist/{chunk-YZUZHWXM.js → chunk-KC7NXZHK.js} +111 -70
- package/dist/{chunk-PXF4KHAP.js → chunk-KSVE7RMK.js} +35 -31
- package/dist/{chunk-WL2WEJAK.js → chunk-SBSQD7MG.js} +2 -2
- package/dist/chunk-UFX46Z5J.js +7 -0
- package/dist/{chunk-CJDYSUU5.js → chunk-VB23QPW3.js} +9 -6
- package/dist/{chunk-GBVS4LCP.js → chunk-WL6AOKRD.js} +8 -8
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-V5DZRO2D.js → client-TA2VD4LR.js} +5 -3
- package/dist/{compactor-LJFUIKWB.js → compactor-YKESKGHL.js} +6 -6
- package/dist/http-client-QZY7W36Q.js +11 -0
- package/dist/{manager-ATWZUL3O.js → manager-WOUOQVLV.js} +4 -4
- package/dist/{orchestrator-SSTGBBOU.js → orchestrator-CMKIFPOS.js} +10 -10
- package/dist/package.json +1 -1
- package/dist/{path-security-EKTUMDJW.js → path-security-AWDNKRZ4.js} +3 -3
- package/dist/{platform-VBNNMTR5.js → platform-7AK5MB4K.js} +3 -3
- package/dist/{processor-YLPZJMXH.js → processor-XNFEP2DV.js} +14 -14
- package/dist/{provider-TIZV4IFE.js → provider-QVVJ6XNZ.js} +6 -4
- package/dist/{provider-manager-PD3BXUHY.js → provider-manager-7246YSJT.js} +6 -4
- package/dist/{serve-U53R54PO.js → serve-PHRKCACD.js} +17 -17
- package/dist/server/index.d.ts +0 -5
- package/dist/server/index.js +16 -16
- package/dist/{server-2TQ3DFYA.js → server-OLE7676B.js} +12 -12
- package/dist/{settings-6M55N4Q2.js → settings-6TJIHDVX.js} +2 -2
- package/dist/{tools-APH5FLYT.js → tools-NXEKDL2V.js} +9 -9
- package/dist/{update-6OFFUWZN.js → update-BGQRA2UG.js} +2 -2
- package/dist/web/assets/{index-CO9RvnPX.css → index-DfmXvFVe.css} +1 -1
- package/dist/web/assets/{index-DHsXL2KP.js → index-V9yNKJy4.js} +76 -76
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-RJWYZ6KK.js +0 -7
- package/dist/http-client-PIWB7BXK.js +0 -9
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KSVE7RMK.js";
|
|
25
25
|
import {
|
|
26
26
|
agentExists,
|
|
27
27
|
createToolRegistry,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
setSkillEnabled,
|
|
67
67
|
skillExists,
|
|
68
68
|
updateOwnedSkill
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-7QCJCIVB.js";
|
|
70
70
|
import {
|
|
71
71
|
createMcpTools
|
|
72
72
|
} from "./chunk-NWO6GRYE.js";
|
|
@@ -86,6 +86,9 @@ import {
|
|
|
86
86
|
validateWorkspaceName,
|
|
87
87
|
workspaceExists
|
|
88
88
|
} from "./chunk-37WF2Z3T.js";
|
|
89
|
+
import {
|
|
90
|
+
createContextStateMessage
|
|
91
|
+
} from "./chunk-SJTG56CH.js";
|
|
89
92
|
import {
|
|
90
93
|
EventEmitter
|
|
91
94
|
} from "./chunk-EU3WWTFH.js";
|
|
@@ -93,22 +96,17 @@ import {
|
|
|
93
96
|
ALWAYS_ALLOWED,
|
|
94
97
|
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
95
98
|
TOP_LEVEL_ONLY_TOOLS
|
|
96
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-FVY2JOTO.js";
|
|
97
100
|
import {
|
|
98
101
|
getPathSeparator,
|
|
99
102
|
isAbsolutePath
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import {
|
|
102
|
-
deleteSetting,
|
|
103
|
-
getSetting,
|
|
104
|
-
setSetting
|
|
105
|
-
} from "./chunk-AFJLY43Z.js";
|
|
103
|
+
} from "./chunk-5ZHVQOI3.js";
|
|
106
104
|
import {
|
|
107
105
|
getProject
|
|
108
106
|
} from "./chunk-6AE3JPDJ.js";
|
|
109
107
|
import {
|
|
110
108
|
VERSION
|
|
111
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-UFX46Z5J.js";
|
|
112
110
|
import {
|
|
113
111
|
emitAssistantMessageStart,
|
|
114
112
|
emitContextState,
|
|
@@ -140,18 +138,12 @@ import {
|
|
|
140
138
|
updateSessionRunning,
|
|
141
139
|
updateSessionWorkdir
|
|
142
140
|
} from "./chunk-AANVMTYU.js";
|
|
143
|
-
import {
|
|
144
|
-
initDatabase
|
|
145
|
-
} from "./chunk-RGUUZD5B.js";
|
|
146
|
-
import {
|
|
147
|
-
createContextStateMessage
|
|
148
|
-
} from "./chunk-SJTG56CH.js";
|
|
149
141
|
import {
|
|
150
142
|
createProviderManager,
|
|
151
143
|
detectModel,
|
|
152
144
|
getLlmStatus,
|
|
153
145
|
parseDefaultModelSelection
|
|
154
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-VB23QPW3.js";
|
|
155
147
|
import {
|
|
156
148
|
getModelProfile
|
|
157
149
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -162,8 +154,17 @@ import {
|
|
|
162
154
|
buildModelsUrl
|
|
163
155
|
} from "./chunk-HNCM3D7Y.js";
|
|
164
156
|
import {
|
|
165
|
-
SessionNotFoundError
|
|
166
|
-
|
|
157
|
+
SessionNotFoundError,
|
|
158
|
+
proxyFetch
|
|
159
|
+
} from "./chunk-IIRXKSB5.js";
|
|
160
|
+
import {
|
|
161
|
+
deleteSetting,
|
|
162
|
+
getSetting,
|
|
163
|
+
setSetting
|
|
164
|
+
} from "./chunk-CNJ63FXJ.js";
|
|
165
|
+
import {
|
|
166
|
+
initDatabase
|
|
167
|
+
} from "./chunk-RGUUZD5B.js";
|
|
167
168
|
import {
|
|
168
169
|
logger,
|
|
169
170
|
setLogLevel
|
|
@@ -2653,19 +2654,6 @@ var SessionManager = class {
|
|
|
2653
2654
|
const branch = await getGitBranch(effectiveWorkdir);
|
|
2654
2655
|
return { workdir: effectiveWorkdir, branch };
|
|
2655
2656
|
}
|
|
2656
|
-
/**
|
|
2657
|
-
* Check that the session's persisted branch matches the actual branch on disk.
|
|
2658
|
-
* If they differ (and persisted branch exists), returns a warning message.
|
|
2659
|
-
*/
|
|
2660
|
-
async checkBranchConsistency(sessionId) {
|
|
2661
|
-
const session = this.getSession(sessionId);
|
|
2662
|
-
if (!session?.branch) return null;
|
|
2663
|
-
const actualBranch = await getGitBranch(session.workspace ?? session.workdir);
|
|
2664
|
-
if (actualBranch && actualBranch !== session.branch) {
|
|
2665
|
-
return `Branch mismatch: session expects "${session.branch}" but workspace is on "${actualBranch}". The workspace branch was changed externally.`;
|
|
2666
|
-
}
|
|
2667
|
-
return null;
|
|
2668
|
-
}
|
|
2669
2657
|
// ============================================================================
|
|
2670
2658
|
// Session Lifecycle
|
|
2671
2659
|
// ============================================================================
|
|
@@ -3312,8 +3300,7 @@ var SessionManager = class {
|
|
|
3312
3300
|
* Uses workspace path when active, otherwise the project workdir.
|
|
3313
3301
|
*/
|
|
3314
3302
|
getLspManager(sessionId) {
|
|
3315
|
-
const
|
|
3316
|
-
const effectiveWorkdir = session.workspace ?? session.workdir;
|
|
3303
|
+
const effectiveWorkdir = this.getEffectiveWorkdir(sessionId);
|
|
3317
3304
|
return getLspManager(sessionId, effectiveWorkdir);
|
|
3318
3305
|
}
|
|
3319
3306
|
async applyBranchIfNeeded(projectDir, projectName, workspaceName, branch, sourceBranch) {
|
|
@@ -3355,7 +3342,7 @@ var SessionManager = class {
|
|
|
3355
3342
|
if (target === "original" && !session.workspace && !branch) return session;
|
|
3356
3343
|
if (target !== "original" && session.workspace?.split("/").pop() === target && !branch) return session;
|
|
3357
3344
|
if (isBranchChangeOnly) {
|
|
3358
|
-
const currentBranch = await getGitBranch(
|
|
3345
|
+
const currentBranch = await getGitBranch(this.getEffectiveWorkdir(sessionId));
|
|
3359
3346
|
if (currentBranch === branch) return session;
|
|
3360
3347
|
}
|
|
3361
3348
|
const previousPath = session.workspace;
|
|
@@ -5409,7 +5396,7 @@ async function createServerHandle(config3) {
|
|
|
5409
5396
|
setMcpTools(mcpTools);
|
|
5410
5397
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5411
5398
|
}
|
|
5412
|
-
const { signalMcpReady } = await import("./server-
|
|
5399
|
+
const { signalMcpReady } = await import("./server-OLE7676B.js");
|
|
5413
5400
|
signalMcpReady();
|
|
5414
5401
|
});
|
|
5415
5402
|
const app = express();
|
|
@@ -5586,8 +5573,7 @@ async function createServerHandle(config3) {
|
|
|
5586
5573
|
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
|
|
5587
5574
|
const allSessions = sessionManager.listSessions();
|
|
5588
5575
|
for (const s of allSessions) {
|
|
5589
|
-
|
|
5590
|
-
if (effectiveWorkdir === project.workdir) {
|
|
5576
|
+
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
5591
5577
|
updateSessionBranch2(s.id, branch);
|
|
5592
5578
|
sessionManager.emitBranchChange(s.id);
|
|
5593
5579
|
}
|
|
@@ -5614,8 +5600,7 @@ async function createServerHandle(config3) {
|
|
|
5614
5600
|
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
|
|
5615
5601
|
const allSessions = sessionManager.listSessions();
|
|
5616
5602
|
for (const s of allSessions) {
|
|
5617
|
-
|
|
5618
|
-
if (effectiveWorkdir === project.workdir) {
|
|
5603
|
+
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
5619
5604
|
updateSessionBranch2(s.id, name);
|
|
5620
5605
|
sessionManager.emitBranchChange(s.id);
|
|
5621
5606
|
}
|
|
@@ -5628,7 +5613,7 @@ async function createServerHandle(config3) {
|
|
|
5628
5613
|
app.get("/api/sessions/:id/branches", async (req, res) => {
|
|
5629
5614
|
const session = sessionManager.getSession(req.params.id);
|
|
5630
5615
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
5631
|
-
const effectiveWorkdir =
|
|
5616
|
+
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5632
5617
|
const { listBranches, getDefaultBranch: getDefaultBranch2 } = await import("./workspace-J74ZMSOJ.js");
|
|
5633
5618
|
const [branches, defaultBranch] = await Promise.all([
|
|
5634
5619
|
listBranches(effectiveWorkdir),
|
|
@@ -5642,7 +5627,7 @@ async function createServerHandle(config3) {
|
|
|
5642
5627
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
5643
5628
|
const { branch } = req.body;
|
|
5644
5629
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
5645
|
-
const effectiveWorkdir =
|
|
5630
|
+
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5646
5631
|
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-J74ZMSOJ.js");
|
|
5647
5632
|
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
|
|
5648
5633
|
try {
|
|
@@ -5658,6 +5643,23 @@ async function createServerHandle(config3) {
|
|
|
5658
5643
|
}
|
|
5659
5644
|
}
|
|
5660
5645
|
}
|
|
5646
|
+
const reminderContent = `<system-reminder>
|
|
5647
|
+
This session is now operating on branch "${branch}".
|
|
5648
|
+
All file and git operations should use this branch.
|
|
5649
|
+
</system-reminder>`;
|
|
5650
|
+
sessionManager.addMessage(req.params.id, {
|
|
5651
|
+
role: "user",
|
|
5652
|
+
content: reminderContent,
|
|
5653
|
+
isSystemGenerated: true,
|
|
5654
|
+
messageKind: "auto-prompt",
|
|
5655
|
+
metadata: {
|
|
5656
|
+
type: "branch",
|
|
5657
|
+
name: "Branch",
|
|
5658
|
+
color: "#22c55e",
|
|
5659
|
+
kind: "definition",
|
|
5660
|
+
branchName: branch
|
|
5661
|
+
}
|
|
5662
|
+
});
|
|
5661
5663
|
res.json({ branch });
|
|
5662
5664
|
} catch (err) {
|
|
5663
5665
|
res.status(400).json({ error: err instanceof Error ? err.message : "Failed to checkout branch" });
|
|
@@ -5668,7 +5670,7 @@ async function createServerHandle(config3) {
|
|
|
5668
5670
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
5669
5671
|
const { name, sourceBranch } = req.body;
|
|
5670
5672
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
5671
|
-
const effectiveWorkdir =
|
|
5673
|
+
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5672
5674
|
const { validateRef: validateRef2 } = await import("./workspace-J74ZMSOJ.js");
|
|
5673
5675
|
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-SFG42M4W.js");
|
|
5674
5676
|
try {
|
|
@@ -5691,6 +5693,23 @@ async function createServerHandle(config3) {
|
|
|
5691
5693
|
}
|
|
5692
5694
|
}
|
|
5693
5695
|
}
|
|
5696
|
+
const reminderContent = `<system-reminder>
|
|
5697
|
+
This session is now operating on branch "${name}".
|
|
5698
|
+
All file and git operations should use this branch.
|
|
5699
|
+
</system-reminder>`;
|
|
5700
|
+
sessionManager.addMessage(req.params.id, {
|
|
5701
|
+
role: "user",
|
|
5702
|
+
content: reminderContent,
|
|
5703
|
+
isSystemGenerated: true,
|
|
5704
|
+
messageKind: "auto-prompt",
|
|
5705
|
+
metadata: {
|
|
5706
|
+
type: "branch",
|
|
5707
|
+
name: "Branch",
|
|
5708
|
+
color: "#22c55e",
|
|
5709
|
+
kind: "definition",
|
|
5710
|
+
branchName: name
|
|
5711
|
+
}
|
|
5712
|
+
});
|
|
5694
5713
|
res.json({ branch: name, sourceBranch: sourceBranch ?? null });
|
|
5695
5714
|
} catch (err) {
|
|
5696
5715
|
res.status(400).json({ error: err instanceof Error ? err.message : "Failed to create branch" });
|
|
@@ -5707,7 +5726,7 @@ async function createServerHandle(config3) {
|
|
|
5707
5726
|
});
|
|
5708
5727
|
app.get("/api/sessions", async (req, res) => {
|
|
5709
5728
|
const { getRecentUserPromptsForSession } = await import("./events-GF2WNELM.js");
|
|
5710
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
5729
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-AWDNKRZ4.js");
|
|
5711
5730
|
const projectId = req.query["projectId"];
|
|
5712
5731
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5713
5732
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5797,8 +5816,8 @@ async function createServerHandle(config3) {
|
|
|
5797
5816
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5798
5817
|
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-GF2WNELM.js");
|
|
5799
5818
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-UACKBHUZ.js");
|
|
5800
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5801
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
5819
|
+
const { getPendingQuestionsForSession } = await import("./tools-NXEKDL2V.js");
|
|
5820
|
+
const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
|
|
5802
5821
|
const session = sessionManager.getSession(req.params.id);
|
|
5803
5822
|
if (!session) {
|
|
5804
5823
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5828,8 +5847,8 @@ async function createServerHandle(config3) {
|
|
|
5828
5847
|
if (!session) {
|
|
5829
5848
|
return res.status(404).json({ error: "Session not found" });
|
|
5830
5849
|
}
|
|
5831
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5832
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5850
|
+
const { stopSessionExecution } = await import("./chat-handler-73HNN7TQ.js");
|
|
5851
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NXEKDL2V.js");
|
|
5833
5852
|
sessionManager.clearMessageQueue(sessionId);
|
|
5834
5853
|
stopSessionExecution(sessionId, sessionManager);
|
|
5835
5854
|
abortSession(sessionId);
|
|
@@ -5860,7 +5879,7 @@ async function createServerHandle(config3) {
|
|
|
5860
5879
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5861
5880
|
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GF2WNELM.js");
|
|
5862
5881
|
const { buildMessagesFromStoredEvents } = await import("./folding-UACKBHUZ.js");
|
|
5863
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
5882
|
+
const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
|
|
5864
5883
|
const sessionId = req.params.id;
|
|
5865
5884
|
const session = sessionManager.getSession(sessionId);
|
|
5866
5885
|
if (!session) {
|
|
@@ -5975,7 +5994,7 @@ async function createServerHandle(config3) {
|
|
|
5975
5994
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5976
5995
|
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GF2WNELM.js");
|
|
5977
5996
|
const { buildMessagesFromStoredEvents } = await import("./folding-UACKBHUZ.js");
|
|
5978
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
5997
|
+
const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
|
|
5979
5998
|
const sessionId = req.params.id;
|
|
5980
5999
|
const session = sessionManager.getSession(sessionId);
|
|
5981
6000
|
if (!session) {
|
|
@@ -6036,7 +6055,7 @@ async function createServerHandle(config3) {
|
|
|
6036
6055
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6037
6056
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6038
6057
|
}
|
|
6039
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6058
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-NXEKDL2V.js");
|
|
6040
6059
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6041
6060
|
if (!pendingSessionId) {
|
|
6042
6061
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6051,8 +6070,8 @@ async function createServerHandle(config3) {
|
|
|
6051
6070
|
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-GF2WNELM.js");
|
|
6052
6071
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-UACKBHUZ.js");
|
|
6053
6072
|
const { createSessionStateMessage } = await import("./protocol-Q7X4NEME.js");
|
|
6054
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6055
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6073
|
+
const { getPendingQuestionsForSession } = await import("./tools-NXEKDL2V.js");
|
|
6074
|
+
const { getMaxVisibleItems } = await import("./settings-6TJIHDVX.js");
|
|
6056
6075
|
const eventStore = getEventStore2();
|
|
6057
6076
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6058
6077
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6088,7 +6107,7 @@ async function createServerHandle(config3) {
|
|
|
6088
6107
|
if (!skip && typeof answer !== "string") {
|
|
6089
6108
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6090
6109
|
}
|
|
6091
|
-
const { provideAnswer } = await import("./tools-
|
|
6110
|
+
const { provideAnswer } = await import("./tools-NXEKDL2V.js");
|
|
6092
6111
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6093
6112
|
if (!found) {
|
|
6094
6113
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6116,7 +6135,7 @@ async function createServerHandle(config3) {
|
|
|
6116
6135
|
if (!session) {
|
|
6117
6136
|
return res.status(404).json({ error: "Session not found" });
|
|
6118
6137
|
}
|
|
6119
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6138
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-6TJIHDVX.js");
|
|
6120
6139
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6121
6140
|
return res.json({ success: false, reason: "disabled" });
|
|
6122
6141
|
}
|
|
@@ -6148,7 +6167,7 @@ async function createServerHandle(config3) {
|
|
|
6148
6167
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6149
6168
|
model: llmClient.getModel()
|
|
6150
6169
|
};
|
|
6151
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6170
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-CMKIFPOS.js");
|
|
6152
6171
|
runAgentTurn(
|
|
6153
6172
|
{
|
|
6154
6173
|
sessionManager,
|
|
@@ -6186,8 +6205,8 @@ async function createServerHandle(config3) {
|
|
|
6186
6205
|
if (!session) {
|
|
6187
6206
|
return res.status(404).json({ error: "Session not found" });
|
|
6188
6207
|
}
|
|
6189
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6190
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6208
|
+
const { stopSessionExecution } = await import("./chat-handler-73HNN7TQ.js");
|
|
6209
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NXEKDL2V.js");
|
|
6191
6210
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6192
6211
|
sessionManager.clearMessageQueue(sessionId);
|
|
6193
6212
|
stopSessionExecution(sessionId, sessionManager);
|
|
@@ -6270,7 +6289,7 @@ async function createServerHandle(config3) {
|
|
|
6270
6289
|
res.json({ accepted: true });
|
|
6271
6290
|
});
|
|
6272
6291
|
app.get("/api/settings", async (req, res) => {
|
|
6273
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6292
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-6TJIHDVX.js");
|
|
6274
6293
|
const keysParam = req.query["keys"];
|
|
6275
6294
|
if (!keysParam) {
|
|
6276
6295
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -6283,19 +6302,19 @@ async function createServerHandle(config3) {
|
|
|
6283
6302
|
res.json(result);
|
|
6284
6303
|
});
|
|
6285
6304
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6286
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6305
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-6TJIHDVX.js");
|
|
6287
6306
|
const key = req.params.key;
|
|
6288
6307
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6289
6308
|
res.json({ key, value });
|
|
6290
6309
|
});
|
|
6291
6310
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6292
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6311
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-6TJIHDVX.js");
|
|
6293
6312
|
const key = req.params.key;
|
|
6294
6313
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6295
6314
|
res.json({ key, value });
|
|
6296
6315
|
});
|
|
6297
6316
|
app.put("/api/settings/:key", async (req, res) => {
|
|
6298
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
6317
|
+
const { setSetting: setSetting2 } = await import("./settings-6TJIHDVX.js");
|
|
6299
6318
|
const key = req.params.key;
|
|
6300
6319
|
const { value } = req.body;
|
|
6301
6320
|
if (value === void 0) {
|
|
@@ -6322,7 +6341,7 @@ async function createServerHandle(config3) {
|
|
|
6322
6341
|
}
|
|
6323
6342
|
});
|
|
6324
6343
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
6325
|
-
const { listAvailableShells } = await import("./platform-
|
|
6344
|
+
const { listAvailableShells } = await import("./platform-7AK5MB4K.js");
|
|
6326
6345
|
res.json({ shells: listAvailableShells() });
|
|
6327
6346
|
});
|
|
6328
6347
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -6480,13 +6499,35 @@ async function createServerHandle(config3) {
|
|
|
6480
6499
|
return res.status(400).json({ success: false, error: message });
|
|
6481
6500
|
}
|
|
6482
6501
|
});
|
|
6502
|
+
app.post("/api/proxy/test", async (_req, res) => {
|
|
6503
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-6TJIHDVX.js");
|
|
6504
|
+
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
6505
|
+
if (!proxyUrl) {
|
|
6506
|
+
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
6507
|
+
}
|
|
6508
|
+
try {
|
|
6509
|
+
const response = await proxyFetch("http://example.com", {
|
|
6510
|
+
signal: AbortSignal.timeout(1e4)
|
|
6511
|
+
});
|
|
6512
|
+
if (!response.ok) {
|
|
6513
|
+
return res.status(400).json({ success: false, error: `Proxy returned HTTP ${response.status}` });
|
|
6514
|
+
}
|
|
6515
|
+
return res.json({ success: true, message: "Proxy connection OK" });
|
|
6516
|
+
} catch (error) {
|
|
6517
|
+
const message = error instanceof Error ? error.message : "Connection failed";
|
|
6518
|
+
if (error instanceof DOMException && error.name === "AbortError") {
|
|
6519
|
+
return res.status(400).json({ success: false, error: "Connection timed out" });
|
|
6520
|
+
}
|
|
6521
|
+
return res.status(400).json({ success: false, error: message });
|
|
6522
|
+
}
|
|
6523
|
+
});
|
|
6483
6524
|
app.get("/api/providers/models", async (req, res) => {
|
|
6484
6525
|
const url = req.query["url"];
|
|
6485
6526
|
const apiKey = req.query["apiKey"];
|
|
6486
6527
|
const backend = req.query["backend"];
|
|
6487
6528
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6488
6529
|
try {
|
|
6489
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6530
|
+
const { fetchModelsWithContext } = await import("./provider-manager-7246YSJT.js");
|
|
6490
6531
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6491
6532
|
const models = await fetchModelsWithContext(
|
|
6492
6533
|
url,
|
|
@@ -6557,7 +6598,7 @@ async function createServerHandle(config3) {
|
|
|
6557
6598
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6558
6599
|
const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
|
|
6559
6600
|
const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
|
|
6560
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
6601
|
+
const { OpenAIHttpClient } = await import("./http-client-QZY7W36Q.js");
|
|
6561
6602
|
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
6562
6603
|
const profile = getModelProfile2(model);
|
|
6563
6604
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -6815,7 +6856,7 @@ async function createServerHandle(config3) {
|
|
|
6815
6856
|
});
|
|
6816
6857
|
async function rebuildMcpTools() {
|
|
6817
6858
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
6818
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
6859
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-NXEKDL2V.js");
|
|
6819
6860
|
const mcpTools = createMcpTools2(mcpManager);
|
|
6820
6861
|
setMcpTools2(mcpTools);
|
|
6821
6862
|
}
|
|
@@ -7062,13 +7103,13 @@ async function createServerHandle(config3) {
|
|
|
7062
7103
|
})
|
|
7063
7104
|
);
|
|
7064
7105
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
7065
|
-
const { getSessionProcesses } = await import("./manager-
|
|
7106
|
+
const { getSessionProcesses } = await import("./manager-WOUOQVLV.js");
|
|
7066
7107
|
const sessionId = req.params.id;
|
|
7067
7108
|
const processes = getSessionProcesses(sessionId);
|
|
7068
7109
|
res.json({ processes });
|
|
7069
7110
|
});
|
|
7070
7111
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
7071
|
-
const { stopProcess } = await import("./manager-
|
|
7112
|
+
const { stopProcess } = await import("./manager-WOUOQVLV.js");
|
|
7072
7113
|
const sessionId = req.params.id;
|
|
7073
7114
|
const processId = req.params.processId;
|
|
7074
7115
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -7211,7 +7252,7 @@ async function createServerHandle(config3) {
|
|
|
7211
7252
|
const state = sessionManager.getContextState(sessionId);
|
|
7212
7253
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
7213
7254
|
});
|
|
7214
|
-
const { QueueProcessor } = await import("./processor-
|
|
7255
|
+
const { QueueProcessor } = await import("./processor-XNFEP2DV.js");
|
|
7215
7256
|
const queueProcessor = new QueueProcessor({
|
|
7216
7257
|
sessionManager,
|
|
7217
7258
|
providerManager,
|
|
@@ -7291,4 +7332,4 @@ export {
|
|
|
7291
7332
|
createServerHandle,
|
|
7292
7333
|
createServer
|
|
7293
7334
|
};
|
|
7294
|
-
//# sourceMappingURL=chunk-
|
|
7335
|
+
//# sourceMappingURL=chunk-KC7NXZHK.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
computeSessionHash,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4VDEVDMG.js";
|
|
7
7
|
import {
|
|
8
8
|
deleteItemFromDir,
|
|
9
9
|
devServerManager,
|
|
@@ -13,32 +13,44 @@ import {
|
|
|
13
13
|
jsonSerializer,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
saveItemToDir
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7QCJCIVB.js";
|
|
17
17
|
import {
|
|
18
18
|
checkAborted,
|
|
19
19
|
onProcessEvent,
|
|
20
20
|
spawnShellProcess
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JKZPMRH2.js";
|
|
22
22
|
import {
|
|
23
23
|
gitSpawnEnv
|
|
24
24
|
} from "./chunk-WGMJCFCE.js";
|
|
25
|
+
import {
|
|
26
|
+
createChatErrorMessage,
|
|
27
|
+
createChatMessageMessage,
|
|
28
|
+
createContextStateMessage,
|
|
29
|
+
createErrorMessage,
|
|
30
|
+
createGitStatusMessage,
|
|
31
|
+
createQueueStateMessage,
|
|
32
|
+
createSessionRunningMessage,
|
|
33
|
+
createSessionStateMessage,
|
|
34
|
+
isAskAnswerPayload,
|
|
35
|
+
isSessionLoadPayload,
|
|
36
|
+
parseClientMessage,
|
|
37
|
+
serializeServerMessage,
|
|
38
|
+
storedEventToServerMessage
|
|
39
|
+
} from "./chunk-SJTG56CH.js";
|
|
25
40
|
import {
|
|
26
41
|
getPendingQuestionsForSession,
|
|
27
42
|
provideAnswer
|
|
28
43
|
} from "./chunk-EU3WWTFH.js";
|
|
29
44
|
import {
|
|
30
45
|
appendCompactionPrompt
|
|
31
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-DQP5HSDS.js";
|
|
32
47
|
import {
|
|
33
48
|
TurnMetrics,
|
|
34
49
|
createMessageStartEvent
|
|
35
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-FVY2JOTO.js";
|
|
36
51
|
import {
|
|
37
52
|
getPlatformShell
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import {
|
|
40
|
-
getMaxVisibleItems
|
|
41
|
-
} from "./chunk-AFJLY43Z.js";
|
|
53
|
+
} from "./chunk-5ZHVQOI3.js";
|
|
42
54
|
import {
|
|
43
55
|
killProcessTree,
|
|
44
56
|
terminateProcessTree
|
|
@@ -54,20 +66,8 @@ import {
|
|
|
54
66
|
foldPendingConfirmations
|
|
55
67
|
} from "./chunk-A2IZ4PWQ.js";
|
|
56
68
|
import {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
createContextStateMessage,
|
|
60
|
-
createErrorMessage,
|
|
61
|
-
createGitStatusMessage,
|
|
62
|
-
createQueueStateMessage,
|
|
63
|
-
createSessionRunningMessage,
|
|
64
|
-
createSessionStateMessage,
|
|
65
|
-
isAskAnswerPayload,
|
|
66
|
-
isSessionLoadPayload,
|
|
67
|
-
parseClientMessage,
|
|
68
|
-
serializeServerMessage,
|
|
69
|
-
storedEventToServerMessage
|
|
70
|
-
} from "./chunk-SJTG56CH.js";
|
|
69
|
+
getMaxVisibleItems
|
|
70
|
+
} from "./chunk-CNJ63FXJ.js";
|
|
71
71
|
import {
|
|
72
72
|
logger
|
|
73
73
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -628,9 +628,8 @@ function formatCriteriaList(entries) {
|
|
|
628
628
|
return `- **${e.id}** ${status}: ${e.description}`;
|
|
629
629
|
}).join("\n");
|
|
630
630
|
}
|
|
631
|
-
async function formatModifiedFiles(
|
|
632
|
-
|
|
633
|
-
return formatGitDiffFiles(effectiveWorkdir);
|
|
631
|
+
async function formatModifiedFiles(workdir) {
|
|
632
|
+
return formatGitDiffFiles(workdir);
|
|
634
633
|
}
|
|
635
634
|
function resolveTemplate(template, ctx) {
|
|
636
635
|
let result = template;
|
|
@@ -806,14 +805,14 @@ async function executeWorkflow(workflow, options, subGroup) {
|
|
|
806
805
|
const currentWindowMessageOptions = getCurrentWindowMessageOptions(sessionId);
|
|
807
806
|
const criteriaEntries = session.metadataEntries["criteria"] ?? [];
|
|
808
807
|
const templateCtx = {
|
|
809
|
-
workdir:
|
|
808
|
+
workdir: sessionManager.getEffectiveWorkdir(sessionId),
|
|
810
809
|
reason: buildReason(session.metadataEntries),
|
|
811
810
|
verifierFindings: lastStepOutput["content"] ?? "",
|
|
812
811
|
previousStepOutput: lastStepOutput["stdout"] ?? "",
|
|
813
812
|
criteriaCount: criteriaEntries.length,
|
|
814
813
|
pendingCount: criteriaEntries.filter((e) => e.status !== "passed").length,
|
|
815
814
|
criteriaList: formatCriteriaList(criteriaEntries),
|
|
816
|
-
modifiedFiles: await formatModifiedFiles(
|
|
815
|
+
modifiedFiles: await formatModifiedFiles(sessionManager.getEffectiveWorkdir(sessionId)),
|
|
817
816
|
stepOutput: lastStepOutput
|
|
818
817
|
};
|
|
819
818
|
sessionManager.setPhase(sessionId, step.phase);
|
|
@@ -978,7 +977,12 @@ async function executeWorkflow(workflow, options, subGroup) {
|
|
|
978
977
|
})
|
|
979
978
|
);
|
|
980
979
|
}
|
|
981
|
-
const result = await executeShellCommand(
|
|
980
|
+
const result = await executeShellCommand(
|
|
981
|
+
command,
|
|
982
|
+
sessionManager.getEffectiveWorkdir(sessionId),
|
|
983
|
+
timeout,
|
|
984
|
+
signal
|
|
985
|
+
);
|
|
982
986
|
const output = [result.stdout, result.stderr].filter(Boolean).join("\n").trim();
|
|
983
987
|
lastStepOutput = { stdout: result.stdout ?? "", stderr: result.stderr ?? "", exitCode: String(result.exitCode) };
|
|
984
988
|
const outputContent = output ? `Exit code: ${result.exitCode}
|
|
@@ -1887,7 +1891,7 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1887
1891
|
return;
|
|
1888
1892
|
}
|
|
1889
1893
|
client.activeSessionId = session.id;
|
|
1890
|
-
const effectiveWorkdir =
|
|
1894
|
+
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(session.id);
|
|
1891
1895
|
client.activeWorkdir = effectiveWorkdir;
|
|
1892
1896
|
if (effectiveWorkdir) {
|
|
1893
1897
|
const branch = await moduleGitBranch(effectiveWorkdir);
|
|
@@ -2213,4 +2217,4 @@ export {
|
|
|
2213
2217
|
signalMcpReady,
|
|
2214
2218
|
createWebSocketServer
|
|
2215
2219
|
};
|
|
2216
|
-
//# sourceMappingURL=chunk-
|
|
2220
|
+
//# sourceMappingURL=chunk-KSVE7RMK.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
LLMError,
|
|
19
19
|
OpenAIHttpClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IIRXKSB5.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-SBSQD7MG.js.map
|