openfox 2.0.84 → 2.0.85
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-377ZHEDW.js → chat-handler-3CWMOIOR.js} +14 -13
- package/dist/{chunk-3D3N2PXI.js → chunk-2KKFOVK7.js} +2 -2
- package/dist/{chunk-JKZPMRH2.js → chunk-3JYPDZT2.js} +2 -2
- package/dist/chunk-7WAOMWR3.js +7 -0
- package/dist/{chunk-IIRXKSB5.js → chunk-ACL4YUJH.js} +10 -2
- package/dist/{chunk-J5E6ZE7O.js → chunk-DLJYYWM2.js} +132 -100
- package/dist/{chunk-G4PVYDVM.js → chunk-FTJ7U3VN.js} +20 -17
- package/dist/chunk-FYYPQ27K.js +399 -0
- package/dist/{chunk-XIVQNOXU.js → chunk-GLRTJJOB.js} +23 -20
- package/dist/{chunk-FVY2JOTO.js → chunk-H765CIHN.js} +2 -2
- package/dist/{chunk-AANVMTYU.js → chunk-L4S5N3WV.js} +8 -3
- package/dist/{chunk-VB23QPW3.js → chunk-M6X72DYZ.js} +3 -3
- package/dist/{chunk-SBSQD7MG.js → chunk-MTZ3PC6K.js} +2 -2
- package/dist/{chunk-NH2PVB6R.js → chunk-N54PQSCH.js} +33 -24
- package/dist/{chunk-A2IZ4PWQ.js → chunk-OHKBGMLO.js} +15 -4
- package/dist/{chunk-CKWD5V4W.js → chunk-RSO2HKNH.js} +90 -364
- package/dist/{chunk-WL6AOKRD.js → chunk-SGFQWQCE.js} +10 -8
- package/dist/{chunk-CNJ63FXJ.js → chunk-STFIEU5F.js} +3 -2
- package/dist/{chunk-BUXIESO5.js → chunk-V5LOH363.js} +6 -74
- package/dist/{chunk-5ZHVQOI3.js → chunk-W23S3TU5.js} +2 -2
- package/dist/{chunk-DQP5HSDS.js → chunk-WVMOGE7U.js} +3 -3
- package/dist/{chunk-55L4SHCO.js → chunk-XXII6DS3.js} +7 -7
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-TA2VD4LR.js → client-C2P67MA4.js} +4 -4
- package/dist/{compactor-YKESKGHL.js → compactor-2YT66FDZ.js} +10 -8
- package/dist/{config-EN3WEH4A.js → config-JN6MW5SL.js} +2 -2
- package/dist/{events-GF2WNELM.js → events-OEDAFNEI.js} +7 -4
- package/dist/{folding-UACKBHUZ.js → folding-FGTCP73N.js} +7 -2
- package/dist/{http-client-QZY7W36Q.js → http-client-I52X7GQB.js} +3 -3
- package/dist/{manager-WOUOQVLV.js → manager-TD2UT62O.js} +4 -4
- package/dist/{orchestrator-LRKFV4MN.js → orchestrator-6RYJYR3T.js} +13 -12
- package/dist/package.json +1 -1
- package/dist/{path-security-AWDNKRZ4.js → path-security-7ZNIG3ZE.js} +8 -5
- package/dist/{platform-7AK5MB4K.js → platform-OYKGQ7Z3.js} +3 -3
- package/dist/{processor-LXVRVPBN.js → processor-IGRFA3KA.js} +14 -13
- package/dist/{protocol-9WP7lLec.d.ts → protocol-5NJx1N4c.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-QVVJ6XNZ.js → provider-YNYYAR6C.js} +7 -7
- package/dist/{provider-manager-7246YSJT.js → provider-manager-3DW3A2VC.js} +5 -5
- package/dist/{serve-SYGARZPL.js → serve-LFC7D5B7.js} +20 -19
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +19 -18
- package/dist/{server-ZU3IU7WH.js → server-E5IA4SK7.js} +15 -14
- package/dist/{sessions-SFG42M4W.js → sessions-V3BF2OTU.js} +5 -2
- package/dist/{settings-6TJIHDVX.js → settings-AGNYWEIE.js} +2 -2
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tools-6NVILBHW.js → tools-ZUTPBREL.js} +12 -11
- package/dist/{types-ulRvCqQX.d.ts → types-B4wa_vGm.d.ts} +2 -0
- package/dist/{types-BtY5XChg.d.ts → types-CrLD4iRS.d.ts} +1 -1
- package/dist/{update-VHU2XFPH.js → update-KDMUVXXI.js} +2 -2
- package/dist/web/assets/index-mJ_RQ-yF.js +305 -0
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-YWBJRUDI.js +0 -7
- package/dist/web/assets/index-BhxPPOY-.js +0 -305
|
@@ -21,41 +21,22 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GLRTJJOB.js";
|
|
25
25
|
import {
|
|
26
|
-
agentExists,
|
|
27
26
|
createToolRegistry,
|
|
28
|
-
deleteAgent,
|
|
29
|
-
deleteItemFromDir,
|
|
30
27
|
deleteOwnedSkill,
|
|
31
|
-
deleteProjectAgent,
|
|
32
28
|
deleteProjectSkill,
|
|
33
29
|
deleteSkill,
|
|
34
30
|
devServerManager,
|
|
35
|
-
findAgentById,
|
|
36
31
|
findSkillById,
|
|
37
|
-
getDefaultAgentIds,
|
|
38
|
-
getDefaultIds,
|
|
39
32
|
getDefaultSkillIds,
|
|
40
|
-
getTopLevelAgents,
|
|
41
|
-
isDefaultAgent,
|
|
42
33
|
isDefaultSkill,
|
|
43
34
|
isSkillEnabled,
|
|
44
|
-
loadAllAgents,
|
|
45
|
-
loadAllAgentsDefault,
|
|
46
35
|
loadAllSkills,
|
|
47
36
|
loadAllSkillsWithDiagnostics,
|
|
48
|
-
loadDefaultAgents,
|
|
49
37
|
loadDefaultSkills,
|
|
50
|
-
loadItemsFromDir,
|
|
51
|
-
loadProjectAgents,
|
|
52
38
|
loadProjectSkills,
|
|
53
|
-
loadUserAgents,
|
|
54
39
|
loadUserSkills,
|
|
55
|
-
pathExists,
|
|
56
|
-
saveAgent,
|
|
57
|
-
saveAgentToProject,
|
|
58
|
-
saveItemToDir,
|
|
59
40
|
saveSkill,
|
|
60
41
|
saveSkillToProject,
|
|
61
42
|
setMcpConfigMode,
|
|
@@ -66,7 +47,7 @@ import {
|
|
|
66
47
|
setSkillEnabled,
|
|
67
48
|
skillExists,
|
|
68
49
|
updateOwnedSkill
|
|
69
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-RSO2HKNH.js";
|
|
70
51
|
import {
|
|
71
52
|
createMcpTools
|
|
72
53
|
} from "./chunk-NWO6GRYE.js";
|
|
@@ -96,17 +77,17 @@ import {
|
|
|
96
77
|
ALWAYS_ALLOWED,
|
|
97
78
|
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
98
79
|
TOP_LEVEL_ONLY_TOOLS
|
|
99
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-H765CIHN.js";
|
|
100
81
|
import {
|
|
101
82
|
getPathSeparator,
|
|
102
83
|
isAbsolutePath
|
|
103
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-W23S3TU5.js";
|
|
104
85
|
import {
|
|
105
86
|
getProject
|
|
106
87
|
} from "./chunk-6AE3JPDJ.js";
|
|
107
88
|
import {
|
|
108
89
|
VERSION
|
|
109
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-7WAOMWR3.js";
|
|
110
91
|
import {
|
|
111
92
|
emitAssistantMessageStart,
|
|
112
93
|
emitContextState,
|
|
@@ -120,9 +101,8 @@ import {
|
|
|
120
101
|
emitUserMessage,
|
|
121
102
|
getEventStore,
|
|
122
103
|
getSessionState,
|
|
123
|
-
initEventStore
|
|
124
|
-
|
|
125
|
-
} from "./chunk-BUXIESO5.js";
|
|
104
|
+
initEventStore
|
|
105
|
+
} from "./chunk-V5LOH363.js";
|
|
126
106
|
import {
|
|
127
107
|
createSession,
|
|
128
108
|
deleteSession,
|
|
@@ -137,13 +117,35 @@ import {
|
|
|
137
117
|
updateSessionProvider,
|
|
138
118
|
updateSessionRunning,
|
|
139
119
|
updateSessionWorkdir
|
|
140
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-L4S5N3WV.js";
|
|
121
|
+
import {
|
|
122
|
+
agentExists,
|
|
123
|
+
deleteAgent,
|
|
124
|
+
deleteItemFromDir,
|
|
125
|
+
deleteProjectAgent,
|
|
126
|
+
findAgentById,
|
|
127
|
+
getDefaultAgentIds,
|
|
128
|
+
getDefaultIds,
|
|
129
|
+
getTopLevelAgents,
|
|
130
|
+
isDefaultAgent,
|
|
131
|
+
loadAllAgents,
|
|
132
|
+
loadAllAgentsDefault,
|
|
133
|
+
loadDefaultAgents,
|
|
134
|
+
loadItemsFromDir,
|
|
135
|
+
loadProjectAgents,
|
|
136
|
+
loadUserAgents,
|
|
137
|
+
pathExists,
|
|
138
|
+
saveAgent,
|
|
139
|
+
saveAgentToProject,
|
|
140
|
+
saveItemToDir,
|
|
141
|
+
setRuntimeConfig
|
|
142
|
+
} from "./chunk-FYYPQ27K.js";
|
|
141
143
|
import {
|
|
142
144
|
createProviderManager,
|
|
143
145
|
detectModel,
|
|
144
146
|
getLlmStatus,
|
|
145
147
|
parseDefaultModelSelection
|
|
146
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-M6X72DYZ.js";
|
|
147
149
|
import {
|
|
148
150
|
getModelProfile
|
|
149
151
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -155,13 +157,14 @@ import {
|
|
|
155
157
|
} from "./chunk-HNCM3D7Y.js";
|
|
156
158
|
import {
|
|
157
159
|
SessionNotFoundError,
|
|
160
|
+
WorkspaceInUseError,
|
|
158
161
|
proxyFetch
|
|
159
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-ACL4YUJH.js";
|
|
160
163
|
import {
|
|
161
164
|
deleteSetting,
|
|
162
165
|
getSetting,
|
|
163
166
|
setSetting
|
|
164
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-STFIEU5F.js";
|
|
165
168
|
import {
|
|
166
169
|
initDatabase
|
|
167
170
|
} from "./chunk-RGUUZD5B.js";
|
|
@@ -3457,7 +3460,7 @@ All file and git operations should use this directory.
|
|
|
3457
3460
|
* switches to original first. Throws if target is "original".
|
|
3458
3461
|
* Refuses deletion if other sessions reference this workspace.
|
|
3459
3462
|
*/
|
|
3460
|
-
async deleteWorkspace(sessionId, target) {
|
|
3463
|
+
async deleteWorkspace(sessionId, target, force = false) {
|
|
3461
3464
|
if (target === "original") throw new Error("Cannot delete the original workspace");
|
|
3462
3465
|
validateWorkspaceName(target);
|
|
3463
3466
|
const session = this.requireSession(sessionId);
|
|
@@ -3467,10 +3470,23 @@ All file and git operations should use this directory.
|
|
|
3467
3470
|
(s) => s.id !== sessionId && s.workspace?.split("/").pop() === target
|
|
3468
3471
|
);
|
|
3469
3472
|
if (otherSessionsUsingIt.length > 0) {
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3473
|
+
if (force) {
|
|
3474
|
+
for (const other of otherSessionsUsingIt) {
|
|
3475
|
+
try {
|
|
3476
|
+
await this.switchWorkspace(other.id, "original");
|
|
3477
|
+
} catch (err) {
|
|
3478
|
+
throw new Error(
|
|
3479
|
+
`Failed to switch session ${other.id} to original: ${err instanceof Error ? err.message : String(err)}`
|
|
3480
|
+
);
|
|
3481
|
+
}
|
|
3482
|
+
}
|
|
3483
|
+
} else {
|
|
3484
|
+
const conflictingSessionIds = otherSessionsUsingIt.map((s) => s.id);
|
|
3485
|
+
throw new WorkspaceInUseError(
|
|
3486
|
+
`Workspace "${target}" is in use by other session(s): ${conflictingSessionIds.join(", ")}. Switch them to original first, or retry with force=true.`,
|
|
3487
|
+
conflictingSessionIds
|
|
3488
|
+
);
|
|
3489
|
+
}
|
|
3474
3490
|
}
|
|
3475
3491
|
const currentWsName = session.workspace?.split("/").pop();
|
|
3476
3492
|
if (currentWsName === target) {
|
|
@@ -4102,6 +4118,12 @@ function createCommandRoutes(configDir, projectDir) {
|
|
|
4102
4118
|
}
|
|
4103
4119
|
|
|
4104
4120
|
// src/server/routes/agents.ts
|
|
4121
|
+
var defaultAgentIds = [];
|
|
4122
|
+
getDefaultAgentIds().then((ids) => {
|
|
4123
|
+
defaultAgentIds = ids;
|
|
4124
|
+
}).catch((err) => {
|
|
4125
|
+
logger.debug("Failed to pre-load default agent IDs", { error: err instanceof Error ? err.message : String(err) });
|
|
4126
|
+
});
|
|
4105
4127
|
var config2 = {
|
|
4106
4128
|
dirName: "agents",
|
|
4107
4129
|
ext: ".agent.md",
|
|
@@ -4120,6 +4142,10 @@ var config2 = {
|
|
|
4120
4142
|
validateCreate: (body) => {
|
|
4121
4143
|
const meta = body["metadata"];
|
|
4122
4144
|
if (!meta?.["id"] || !body["prompt"]) return "Missing required fields: metadata.id, prompt";
|
|
4145
|
+
const id = String(meta["id"]);
|
|
4146
|
+
if (defaultAgentIds.includes(id)) {
|
|
4147
|
+
return `ID "${id}" conflicts with a built-in agent. Use a different ID.`;
|
|
4148
|
+
}
|
|
4123
4149
|
return null;
|
|
4124
4150
|
},
|
|
4125
4151
|
mapToResponse: (a) => a.metadata
|
|
@@ -4851,7 +4877,7 @@ function createProviderAuthRoutes(config3, providerManager, registry) {
|
|
|
4851
4877
|
try {
|
|
4852
4878
|
const { challenge, completion } = await adapter.beginLogin({ providerId: provider.id });
|
|
4853
4879
|
void completion.then(async ({ credentialRef }) => {
|
|
4854
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
4880
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-JN6MW5SL.js");
|
|
4855
4881
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
4856
4882
|
const updatedConfig = updateProvider(globalConfig, provider.id, { credentialRef, authAdapter: adapter.id });
|
|
4857
4883
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -4885,7 +4911,7 @@ function createProviderAuthRoutes(config3, providerManager, registry) {
|
|
|
4885
4911
|
if (!context) return;
|
|
4886
4912
|
const { provider, adapter } = context;
|
|
4887
4913
|
if (provider.credentialRef && adapter) await adapter.logout(provider.credentialRef);
|
|
4888
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
4914
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
4889
4915
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
4890
4916
|
const updatedConfig = {
|
|
4891
4917
|
...globalConfig,
|
|
@@ -5365,7 +5391,7 @@ async function createServerHandle(config3) {
|
|
|
5365
5391
|
const mcpManager = new McpManager({
|
|
5366
5392
|
onToolsDiscovered: async (name, tools) => {
|
|
5367
5393
|
try {
|
|
5368
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5394
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
5369
5395
|
const mode = config3.mode ?? "production";
|
|
5370
5396
|
const globalConfig = await loadGlobalConfig(mode, config3.globalConfigPath);
|
|
5371
5397
|
const mcpServers2 = {
|
|
@@ -5396,7 +5422,7 @@ async function createServerHandle(config3) {
|
|
|
5396
5422
|
setMcpTools(mcpTools);
|
|
5397
5423
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5398
5424
|
}
|
|
5399
|
-
const { signalMcpReady } = await import("./server-
|
|
5425
|
+
const { signalMcpReady } = await import("./server-E5IA4SK7.js");
|
|
5400
5426
|
signalMcpReady();
|
|
5401
5427
|
});
|
|
5402
5428
|
const app = express();
|
|
@@ -5573,7 +5599,7 @@ async function createServerHandle(config3) {
|
|
|
5573
5599
|
}
|
|
5574
5600
|
try {
|
|
5575
5601
|
await checkoutBranch(project.workdir, branch);
|
|
5576
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5602
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-V3BF2OTU.js");
|
|
5577
5603
|
const allSessions = sessionManager.listSessions();
|
|
5578
5604
|
for (const s of allSessions) {
|
|
5579
5605
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -5609,7 +5635,7 @@ async function createServerHandle(config3) {
|
|
|
5609
5635
|
);
|
|
5610
5636
|
}
|
|
5611
5637
|
await createBranch(project.workdir, name, sb);
|
|
5612
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5638
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-V3BF2OTU.js");
|
|
5613
5639
|
const allSessions = sessionManager.listSessions();
|
|
5614
5640
|
for (const s of allSessions) {
|
|
5615
5641
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -5641,7 +5667,7 @@ async function createServerHandle(config3) {
|
|
|
5641
5667
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
5642
5668
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5643
5669
|
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-MMV6V5P4.js");
|
|
5644
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5670
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-V3BF2OTU.js");
|
|
5645
5671
|
try {
|
|
5646
5672
|
await validateRef2(effectiveWorkdir, branch);
|
|
5647
5673
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -5684,7 +5710,7 @@ All file and git operations should use this branch.
|
|
|
5684
5710
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
5685
5711
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5686
5712
|
const { validateRef: validateRef2 } = await import("./workspace-MMV6V5P4.js");
|
|
5687
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5713
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-V3BF2OTU.js");
|
|
5688
5714
|
try {
|
|
5689
5715
|
await validateRef2(effectiveWorkdir, name);
|
|
5690
5716
|
if (sourceBranch) {
|
|
@@ -5739,8 +5765,8 @@ All file and git operations should use this branch.
|
|
|
5739
5765
|
res.json({ workspaces: workspacesList });
|
|
5740
5766
|
});
|
|
5741
5767
|
app.get("/api/sessions", async (req, res) => {
|
|
5742
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5743
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
5768
|
+
const { getRecentUserPromptsForSession } = await import("./events-OEDAFNEI.js");
|
|
5769
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-7ZNIG3ZE.js");
|
|
5744
5770
|
const projectId = req.query["projectId"];
|
|
5745
5771
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5746
5772
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5824,7 +5850,7 @@ All file and git operations should use this branch.
|
|
|
5824
5850
|
app.post("/api/sessions/:id/delete-workspace", async (req, res) => {
|
|
5825
5851
|
const session = sessionManager.getSession(req.params.id);
|
|
5826
5852
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
5827
|
-
const { target } = req.body;
|
|
5853
|
+
const { target, force } = req.body;
|
|
5828
5854
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
5829
5855
|
const project = sessionManager.getProject(session.projectId);
|
|
5830
5856
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
@@ -5833,17 +5859,23 @@ All file and git operations should use this branch.
|
|
|
5833
5859
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
5834
5860
|
}
|
|
5835
5861
|
try {
|
|
5836
|
-
const updated = await sessionManager.deleteWorkspace(req.params.id, target);
|
|
5862
|
+
const updated = await sessionManager.deleteWorkspace(req.params.id, target, force === true);
|
|
5837
5863
|
res.json({ session: updated });
|
|
5838
5864
|
} catch (err) {
|
|
5865
|
+
if (err instanceof WorkspaceInUseError) {
|
|
5866
|
+
return res.status(409).json({
|
|
5867
|
+
error: err.message,
|
|
5868
|
+
conflictingSessionIds: err.conflictingSessionIds
|
|
5869
|
+
});
|
|
5870
|
+
}
|
|
5839
5871
|
res.status(400).json({ error: err instanceof Error ? err.message : "Failed to delete workspace" });
|
|
5840
5872
|
}
|
|
5841
5873
|
});
|
|
5842
5874
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5843
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
5844
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
5845
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5846
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
5875
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-OEDAFNEI.js");
|
|
5876
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-FGTCP73N.js");
|
|
5877
|
+
const { getPendingQuestionsForSession } = await import("./tools-ZUTPBREL.js");
|
|
5878
|
+
const { getMaxVisibleItems } = await import("./settings-AGNYWEIE.js");
|
|
5847
5879
|
const session = sessionManager.getSession(req.params.id);
|
|
5848
5880
|
if (!session) {
|
|
5849
5881
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5873,8 +5905,8 @@ All file and git operations should use this branch.
|
|
|
5873
5905
|
if (!session) {
|
|
5874
5906
|
return res.status(404).json({ error: "Session not found" });
|
|
5875
5907
|
}
|
|
5876
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5877
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5908
|
+
const { stopSessionExecution } = await import("./chat-handler-3CWMOIOR.js");
|
|
5909
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-ZUTPBREL.js");
|
|
5878
5910
|
sessionManager.clearMessageQueue(sessionId);
|
|
5879
5911
|
stopSessionExecution(sessionId, sessionManager);
|
|
5880
5912
|
abortSession(sessionId);
|
|
@@ -5903,9 +5935,9 @@ All file and git operations should use this branch.
|
|
|
5903
5935
|
res.json({ success: true });
|
|
5904
5936
|
});
|
|
5905
5937
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5906
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
5907
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
5908
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
5938
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-OEDAFNEI.js");
|
|
5939
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-FGTCP73N.js");
|
|
5940
|
+
const { getMaxVisibleItems } = await import("./settings-AGNYWEIE.js");
|
|
5909
5941
|
const sessionId = req.params.id;
|
|
5910
5942
|
const session = sessionManager.getSession(sessionId);
|
|
5911
5943
|
if (!session) {
|
|
@@ -5940,7 +5972,7 @@ All file and git operations should use this branch.
|
|
|
5940
5972
|
if (!result.success) {
|
|
5941
5973
|
return res.status(500).json({ error: result.error ?? "Failed to set default model" });
|
|
5942
5974
|
}
|
|
5943
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
5975
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-JN6MW5SL.js");
|
|
5944
5976
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
5945
5977
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model);
|
|
5946
5978
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -6018,9 +6050,9 @@ All file and git operations should use this branch.
|
|
|
6018
6050
|
res.json({ success: true });
|
|
6019
6051
|
});
|
|
6020
6052
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6021
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6022
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6023
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6053
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-OEDAFNEI.js");
|
|
6054
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-FGTCP73N.js");
|
|
6055
|
+
const { getMaxVisibleItems } = await import("./settings-AGNYWEIE.js");
|
|
6024
6056
|
const sessionId = req.params.id;
|
|
6025
6057
|
const session = sessionManager.getSession(sessionId);
|
|
6026
6058
|
if (!session) {
|
|
@@ -6081,7 +6113,7 @@ All file and git operations should use this branch.
|
|
|
6081
6113
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6082
6114
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6083
6115
|
}
|
|
6084
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6116
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-ZUTPBREL.js");
|
|
6085
6117
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6086
6118
|
if (!pendingSessionId) {
|
|
6087
6119
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6093,11 +6125,11 @@ All file and git operations should use this branch.
|
|
|
6093
6125
|
if (!result.found) {
|
|
6094
6126
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6095
6127
|
}
|
|
6096
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6097
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6128
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-OEDAFNEI.js");
|
|
6129
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-FGTCP73N.js");
|
|
6098
6130
|
const { createSessionStateMessage } = await import("./protocol-Q7X4NEME.js");
|
|
6099
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6100
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6131
|
+
const { getPendingQuestionsForSession } = await import("./tools-ZUTPBREL.js");
|
|
6132
|
+
const { getMaxVisibleItems } = await import("./settings-AGNYWEIE.js");
|
|
6101
6133
|
const eventStore = getEventStore2();
|
|
6102
6134
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6103
6135
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6133,7 +6165,7 @@ All file and git operations should use this branch.
|
|
|
6133
6165
|
if (!skip && typeof answer !== "string") {
|
|
6134
6166
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6135
6167
|
}
|
|
6136
|
-
const { provideAnswer } = await import("./tools-
|
|
6168
|
+
const { provideAnswer } = await import("./tools-ZUTPBREL.js");
|
|
6137
6169
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6138
6170
|
if (!found) {
|
|
6139
6171
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6161,7 +6193,7 @@ All file and git operations should use this branch.
|
|
|
6161
6193
|
if (!session) {
|
|
6162
6194
|
return res.status(404).json({ error: "Session not found" });
|
|
6163
6195
|
}
|
|
6164
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6196
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-AGNYWEIE.js");
|
|
6165
6197
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6166
6198
|
return res.json({ success: false, reason: "disabled" });
|
|
6167
6199
|
}
|
|
@@ -6193,7 +6225,7 @@ All file and git operations should use this branch.
|
|
|
6193
6225
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6194
6226
|
model: llmClient.getModel()
|
|
6195
6227
|
};
|
|
6196
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6228
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-6RYJYR3T.js");
|
|
6197
6229
|
runAgentTurn(
|
|
6198
6230
|
{
|
|
6199
6231
|
sessionManager,
|
|
@@ -6231,15 +6263,15 @@ All file and git operations should use this branch.
|
|
|
6231
6263
|
if (!session) {
|
|
6232
6264
|
return res.status(404).json({ error: "Session not found" });
|
|
6233
6265
|
}
|
|
6234
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6235
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6266
|
+
const { stopSessionExecution } = await import("./chat-handler-3CWMOIOR.js");
|
|
6267
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-ZUTPBREL.js");
|
|
6236
6268
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6237
6269
|
sessionManager.clearMessageQueue(sessionId);
|
|
6238
6270
|
stopSessionExecution(sessionId, sessionManager);
|
|
6239
6271
|
abortSession(sessionId);
|
|
6240
6272
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6241
6273
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6242
|
-
const eventStore = (await import("./events-
|
|
6274
|
+
const eventStore = (await import("./events-OEDAFNEI.js")).getEventStore();
|
|
6243
6275
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6244
6276
|
res.json({ success: true, queuedMessages });
|
|
6245
6277
|
});
|
|
@@ -6253,7 +6285,7 @@ All file and git operations should use this branch.
|
|
|
6253
6285
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6254
6286
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6255
6287
|
}
|
|
6256
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6288
|
+
const { truncateSessionMessages } = await import("./events-OEDAFNEI.js");
|
|
6257
6289
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6258
6290
|
res.json({ success: true });
|
|
6259
6291
|
});
|
|
@@ -6270,8 +6302,8 @@ All file and git operations should use this branch.
|
|
|
6270
6302
|
if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
|
|
6271
6303
|
return res.status(400).json({ error: "content must be a non-empty string if provided" });
|
|
6272
6304
|
}
|
|
6273
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6274
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6305
|
+
const { getEventStore: getEventStore2 } = await import("./events-OEDAFNEI.js");
|
|
6306
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-FGTCP73N.js");
|
|
6275
6307
|
const eventStore = getEventStore2();
|
|
6276
6308
|
const events = eventStore.getEvents(sessionId);
|
|
6277
6309
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -6283,7 +6315,7 @@ All file and git operations should use this branch.
|
|
|
6283
6315
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
6284
6316
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
6285
6317
|
}
|
|
6286
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6318
|
+
const { truncateSessionMessages } = await import("./events-OEDAFNEI.js");
|
|
6287
6319
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
6288
6320
|
sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
|
|
6289
6321
|
res.json({ success: true });
|
|
@@ -6315,7 +6347,7 @@ All file and git operations should use this branch.
|
|
|
6315
6347
|
res.json({ accepted: true });
|
|
6316
6348
|
});
|
|
6317
6349
|
app.get("/api/settings", async (req, res) => {
|
|
6318
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6350
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-AGNYWEIE.js");
|
|
6319
6351
|
const keysParam = req.query["keys"];
|
|
6320
6352
|
if (!keysParam) {
|
|
6321
6353
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -6328,19 +6360,19 @@ All file and git operations should use this branch.
|
|
|
6328
6360
|
res.json(result);
|
|
6329
6361
|
});
|
|
6330
6362
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6331
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6363
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-AGNYWEIE.js");
|
|
6332
6364
|
const key = req.params.key;
|
|
6333
6365
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6334
6366
|
res.json({ key, value });
|
|
6335
6367
|
});
|
|
6336
6368
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6337
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6369
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-AGNYWEIE.js");
|
|
6338
6370
|
const key = req.params.key;
|
|
6339
6371
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6340
6372
|
res.json({ key, value });
|
|
6341
6373
|
});
|
|
6342
6374
|
app.put("/api/settings/:key", async (req, res) => {
|
|
6343
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
6375
|
+
const { setSetting: setSetting2 } = await import("./settings-AGNYWEIE.js");
|
|
6344
6376
|
const key = req.params.key;
|
|
6345
6377
|
const { value } = req.body;
|
|
6346
6378
|
if (value === void 0) {
|
|
@@ -6367,7 +6399,7 @@ All file and git operations should use this branch.
|
|
|
6367
6399
|
}
|
|
6368
6400
|
});
|
|
6369
6401
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
6370
|
-
const { listAvailableShells } = await import("./platform-
|
|
6402
|
+
const { listAvailableShells } = await import("./platform-OYKGQ7Z3.js");
|
|
6371
6403
|
res.json({ shells: listAvailableShells() });
|
|
6372
6404
|
});
|
|
6373
6405
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -6376,7 +6408,7 @@ All file and git operations should use this branch.
|
|
|
6376
6408
|
let visionFallback;
|
|
6377
6409
|
let globalWorkdir;
|
|
6378
6410
|
try {
|
|
6379
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
6411
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-JN6MW5SL.js");
|
|
6380
6412
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6381
6413
|
const fallback = getVisionFallback(globalConfig);
|
|
6382
6414
|
if (fallback) {
|
|
@@ -6526,7 +6558,7 @@ All file and git operations should use this branch.
|
|
|
6526
6558
|
}
|
|
6527
6559
|
});
|
|
6528
6560
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
6529
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6561
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-AGNYWEIE.js");
|
|
6530
6562
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
6531
6563
|
if (!proxyUrl) {
|
|
6532
6564
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -6553,7 +6585,7 @@ All file and git operations should use this branch.
|
|
|
6553
6585
|
const backend = req.query["backend"];
|
|
6554
6586
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6555
6587
|
try {
|
|
6556
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6588
|
+
const { fetchModelsWithContext } = await import("./provider-manager-3DW3A2VC.js");
|
|
6557
6589
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6558
6590
|
const models = await fetchModelsWithContext(
|
|
6559
6591
|
url,
|
|
@@ -6624,7 +6656,7 @@ All file and git operations should use this branch.
|
|
|
6624
6656
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6625
6657
|
const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
|
|
6626
6658
|
const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
|
|
6627
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
6659
|
+
const { OpenAIHttpClient } = await import("./http-client-I52X7GQB.js");
|
|
6628
6660
|
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
6629
6661
|
const profile = getModelProfile2(model);
|
|
6630
6662
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -6693,7 +6725,7 @@ All file and git operations should use this branch.
|
|
|
6693
6725
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
6694
6726
|
}
|
|
6695
6727
|
try {
|
|
6696
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
6728
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-JN6MW5SL.js");
|
|
6697
6729
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6698
6730
|
const providerBackend = backend;
|
|
6699
6731
|
const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
|
|
@@ -6733,7 +6765,7 @@ All file and git operations should use this branch.
|
|
|
6733
6765
|
app.post("/api/init/config", async (req, res) => {
|
|
6734
6766
|
const { workdir, visionFallback } = req.body;
|
|
6735
6767
|
try {
|
|
6736
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
6768
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
6737
6769
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6738
6770
|
const updatedConfig = {
|
|
6739
6771
|
...globalConfig,
|
|
@@ -6772,7 +6804,7 @@ All file and git operations should use this branch.
|
|
|
6772
6804
|
});
|
|
6773
6805
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
6774
6806
|
const { id } = req.params;
|
|
6775
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
6807
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-JN6MW5SL.js");
|
|
6776
6808
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6777
6809
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
6778
6810
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -6784,7 +6816,7 @@ All file and git operations should use this branch.
|
|
|
6784
6816
|
const { id } = req.params;
|
|
6785
6817
|
const { isLocal } = req.body;
|
|
6786
6818
|
try {
|
|
6787
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
6819
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-JN6MW5SL.js");
|
|
6788
6820
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6789
6821
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
6790
6822
|
if (!provider) {
|
|
@@ -6815,7 +6847,7 @@ All file and git operations should use this branch.
|
|
|
6815
6847
|
transportAdapter
|
|
6816
6848
|
} = req.body;
|
|
6817
6849
|
try {
|
|
6818
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
6850
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-JN6MW5SL.js");
|
|
6819
6851
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6820
6852
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
6821
6853
|
if (!provider) {
|
|
@@ -6855,7 +6887,7 @@ All file and git operations should use this branch.
|
|
|
6855
6887
|
return res.status(400).json({ error: result.error });
|
|
6856
6888
|
}
|
|
6857
6889
|
const llmClient = getLLMClient();
|
|
6858
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
6890
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-JN6MW5SL.js");
|
|
6859
6891
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6860
6892
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
6861
6893
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -6882,7 +6914,7 @@ All file and git operations should use this branch.
|
|
|
6882
6914
|
});
|
|
6883
6915
|
async function rebuildMcpTools() {
|
|
6884
6916
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
6885
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
6917
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-ZUTPBREL.js");
|
|
6886
6918
|
const mcpTools = createMcpTools2(mcpManager);
|
|
6887
6919
|
setMcpTools2(mcpTools);
|
|
6888
6920
|
}
|
|
@@ -6952,7 +6984,7 @@ All file and git operations should use this branch.
|
|
|
6952
6984
|
};
|
|
6953
6985
|
await mcpManager.addServer(name, serverCfg);
|
|
6954
6986
|
const server = mcpManager.getServer(name);
|
|
6955
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
6987
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
6956
6988
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6957
6989
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
|
|
6958
6990
|
await saveGlobalConfig(
|
|
@@ -7005,7 +7037,7 @@ All file and git operations should use this branch.
|
|
|
7005
7037
|
return res.status(400).json({ error: "timeout must be a positive number" });
|
|
7006
7038
|
}
|
|
7007
7039
|
try {
|
|
7008
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7040
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
7009
7041
|
const { applyMcpServerUpdate } = await import("./update-server-V6GJ43WH.js");
|
|
7010
7042
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7011
7043
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
@@ -7049,7 +7081,7 @@ All file and git operations should use this branch.
|
|
|
7049
7081
|
return res.status(404).json({ error: `MCP server '${name}' not found` });
|
|
7050
7082
|
}
|
|
7051
7083
|
mcpManager.removeServer(name);
|
|
7052
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7084
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
7053
7085
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7054
7086
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
|
|
7055
7087
|
delete updatedMcpServers[name];
|
|
@@ -7078,7 +7110,7 @@ All file and git operations should use this branch.
|
|
|
7078
7110
|
await mcpManager.setToolEnabled(name, toolName, enabled);
|
|
7079
7111
|
const server = mcpManager.getServer(name);
|
|
7080
7112
|
if (server) {
|
|
7081
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7113
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-JN6MW5SL.js");
|
|
7082
7114
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7083
7115
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
7084
7116
|
const serverCfg = mcpServers2[name];
|
|
@@ -7129,13 +7161,13 @@ All file and git operations should use this branch.
|
|
|
7129
7161
|
})
|
|
7130
7162
|
);
|
|
7131
7163
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
7132
|
-
const { getSessionProcesses } = await import("./manager-
|
|
7164
|
+
const { getSessionProcesses } = await import("./manager-TD2UT62O.js");
|
|
7133
7165
|
const sessionId = req.params.id;
|
|
7134
7166
|
const processes = getSessionProcesses(sessionId);
|
|
7135
7167
|
res.json({ processes });
|
|
7136
7168
|
});
|
|
7137
7169
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
7138
|
-
const { stopProcess } = await import("./manager-
|
|
7170
|
+
const { stopProcess } = await import("./manager-TD2UT62O.js");
|
|
7139
7171
|
const sessionId = req.params.id;
|
|
7140
7172
|
const processId = req.params.processId;
|
|
7141
7173
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -7278,7 +7310,7 @@ All file and git operations should use this branch.
|
|
|
7278
7310
|
const state = sessionManager.getContextState(sessionId);
|
|
7279
7311
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
7280
7312
|
});
|
|
7281
|
-
const { QueueProcessor } = await import("./processor-
|
|
7313
|
+
const { QueueProcessor } = await import("./processor-IGRFA3KA.js");
|
|
7282
7314
|
const queueProcessor = new QueueProcessor({
|
|
7283
7315
|
sessionManager,
|
|
7284
7316
|
providerManager,
|
|
@@ -7358,4 +7390,4 @@ export {
|
|
|
7358
7390
|
createServerHandle,
|
|
7359
7391
|
createServer
|
|
7360
7392
|
};
|
|
7361
|
-
//# sourceMappingURL=chunk-
|
|
7393
|
+
//# sourceMappingURL=chunk-DLJYYWM2.js.map
|