openfox 2.0.75 → 2.0.76
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/README.md +5 -2
- package/dist/{chat-handler-QLMBYRDY.js → chat-handler-3BZ4PDL2.js} +14 -14
- package/dist/{chunk-KEVRZWL3.js → chunk-46RORSKU.js} +2 -2
- package/dist/{chunk-S7O77CVO.js → chunk-4QHDQP2N.js} +2 -2
- package/dist/{chunk-XWBNYU2L.js → chunk-7772ENZN.js} +4 -3
- package/dist/{chunk-I4RWK2L2.js → chunk-7QXRQ5ZL.js} +3 -3
- package/dist/{chunk-6ZMGWDOD.js → chunk-D6CI2B7B.js} +34 -43
- package/dist/{chunk-E5LLEO3C.js → chunk-DH3SSBZN.js} +2 -2
- package/dist/{chunk-LUG5QTFC.js → chunk-HAQV6AJP.js} +3 -3
- package/dist/{chunk-PJQW6TYI.js → chunk-HHUIXHHX.js} +4 -4
- package/dist/{chunk-J3VQBVGO.js → chunk-HLHGNHMV.js} +8 -8
- package/dist/{chunk-MIJX54CG.js → chunk-J7VCI5EX.js} +91 -65
- package/dist/chunk-KQEVAO2Q.js +7 -0
- package/dist/{chunk-UN26GIQG.js → chunk-KVRSAC4Z.js} +1 -1
- package/dist/{chunk-UV3EMWL4.js → chunk-LXFLRM7M.js} +2 -2
- package/dist/{chunk-YFFP4DR4.js → chunk-NGJ5XJ7D.js} +2 -2
- package/dist/{chunk-LTFB2WWE.js → chunk-OBQPXUXI.js} +2 -2
- package/dist/{chunk-OHGQILRF.js → chunk-OCVRIPQP.js} +2 -2
- package/dist/{chunk-LKUAKQZY.js → chunk-OMWVB2XC.js} +8 -8
- package/dist/{chunk-6XOA2WPU.js → chunk-W4ZEG3LX.js} +5 -2
- package/dist/{chunk-CJ2AJ7HU.js → chunk-XTK6E2QR.js} +3 -3
- package/dist/{chunk-QNKXZH3Z.js → chunk-YMFCFMMB.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-SC6X65GY.js → client-TDPQVBQ7.js} +2 -2
- package/dist/{compactor-AERNYEMP.js → compactor-BB3YYVRP.js} +7 -7
- package/dist/{events-X353XCPN.js → events-FLWRLM6V.js} +3 -3
- package/dist/{inspect-proxy-PHVZBZUO.js → inspect-proxy-JHZV34QR.js} +4 -4
- package/dist/{manager-5GILDCVD.js → manager-OPMCSYN2.js} +5 -5
- package/dist/{orchestrator-BIFTALBG.js → orchestrator-5IMCWX5P.js} +13 -13
- package/dist/package.json +1 -1
- package/dist/{path-security-3FAIPJSV.js → path-security-ZROWNL22.js} +4 -4
- package/dist/{platform-XQ7BS3KQ.js → platform-QGXO3CNR.js} +4 -4
- package/dist/plugins-registry.json +6 -0
- package/dist/{processor-MQ47QSDR.js → processor-3R4GS6VB.js} +14 -14
- package/dist/{project-creator-FQRBN3RG.js → project-creator-C22J43BC.js} +3 -3
- package/dist/{projects-LHRNCUGW.js → projects-WSVINK2C.js} +3 -3
- package/dist/{provider-OJUCZ5RN.js → provider-G2YC2IC4.js} +3 -3
- package/dist/{provider-manager-MAKXSL6L.js → provider-manager-SQIELYLK.js} +3 -3
- package/dist/{serve-UD27KOL2.js → serve-MXKMKZYY.js} +19 -19
- package/dist/server/index.js +18 -18
- package/dist/{server-TJ3PP5EW.js → server-SPYFMFQE.js} +15 -15
- package/dist/{settings-PFXRYXZU.js → settings-7XDMSPIC.js} +3 -3
- package/dist/{tools-RZ464GUJ.js → tools-JRCUWPJO.js} +12 -12
- package/dist/{update-MWIZH4P2.js → update-OXDQ75M7.js} +2 -2
- package/dist/{update-server-MYYQUNZX.js → update-server-4MTM7M5P.js} +2 -2
- package/dist/web/assets/{index-Bn4hwZeP.js → index-ghDkIdlf.js} +28 -28
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/plugins-registry.json +6 -0
- package/dist/chunk-6COWK53A.js +0 -7
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OMWVB2XC.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-D6CI2B7B.js";
|
|
70
70
|
import {
|
|
71
71
|
createMcpTools
|
|
72
72
|
} from "./chunk-NWO6GRYE.js";
|
|
@@ -89,22 +89,22 @@ import {
|
|
|
89
89
|
ALWAYS_ALLOWED,
|
|
90
90
|
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
91
91
|
TOP_LEVEL_ONLY_TOOLS
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-7772ENZN.js";
|
|
93
93
|
import {
|
|
94
94
|
getProject
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-LXFLRM7M.js";
|
|
96
96
|
import {
|
|
97
97
|
getPathSeparator,
|
|
98
98
|
isAbsolutePath
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-4QHDQP2N.js";
|
|
100
100
|
import {
|
|
101
101
|
deleteSetting,
|
|
102
102
|
getSetting,
|
|
103
103
|
setSetting
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-YMFCFMMB.js";
|
|
105
105
|
import {
|
|
106
106
|
VERSION
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-KQEVAO2Q.js";
|
|
108
108
|
import {
|
|
109
109
|
createSession,
|
|
110
110
|
deleteSession,
|
|
@@ -132,10 +132,10 @@ import {
|
|
|
132
132
|
updateSessionProvider,
|
|
133
133
|
updateSessionRunning,
|
|
134
134
|
updateSessionWorkdir
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-NGJ5XJ7D.js";
|
|
136
136
|
import {
|
|
137
137
|
initDatabase
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
139
139
|
import {
|
|
140
140
|
createContextStateMessage
|
|
141
141
|
} from "./chunk-O3NUNU4H.js";
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
detectModel,
|
|
145
145
|
getLlmStatus,
|
|
146
146
|
parseDefaultModelSelection
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-OCVRIPQP.js";
|
|
148
148
|
import {
|
|
149
149
|
getModelProfile
|
|
150
150
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -4221,6 +4221,16 @@ function createDirectoryRoutes() {
|
|
|
4221
4221
|
// src/server/routes/file-search.ts
|
|
4222
4222
|
import { Router as Router8 } from "express";
|
|
4223
4223
|
import fg from "fast-glob";
|
|
4224
|
+
var IGNORED_PATTERNS = [
|
|
4225
|
+
"**/node_modules/**",
|
|
4226
|
+
"**/.git/**",
|
|
4227
|
+
"**/dist/**",
|
|
4228
|
+
"**/.next/**",
|
|
4229
|
+
"**/.cache/**",
|
|
4230
|
+
"**/__pycache__/**",
|
|
4231
|
+
"**/*.lock",
|
|
4232
|
+
"**/.openfox/**"
|
|
4233
|
+
];
|
|
4224
4234
|
function createFileSearchRoutes() {
|
|
4225
4235
|
const router = Router8();
|
|
4226
4236
|
router.get("/", async (req, res) => {
|
|
@@ -4236,21 +4246,15 @@ function createFileSearchRoutes() {
|
|
|
4236
4246
|
return router;
|
|
4237
4247
|
}
|
|
4238
4248
|
async function searchFiles(query, workdir) {
|
|
4249
|
+
if (query.endsWith("/")) {
|
|
4250
|
+
return listDirectoryContents(query, workdir);
|
|
4251
|
+
}
|
|
4239
4252
|
const entries = await fg(["**/*"], {
|
|
4240
4253
|
cwd: workdir,
|
|
4241
4254
|
dot: true,
|
|
4242
|
-
deep:
|
|
4255
|
+
deep: 32,
|
|
4243
4256
|
onlyFiles: false,
|
|
4244
|
-
ignore:
|
|
4245
|
-
"**/node_modules/**",
|
|
4246
|
-
"**/.git/**",
|
|
4247
|
-
"**/dist/**",
|
|
4248
|
-
"**/.next/**",
|
|
4249
|
-
"**/.cache/**",
|
|
4250
|
-
"**/__pycache__/**",
|
|
4251
|
-
"**/*.lock",
|
|
4252
|
-
"**/.openfox/**"
|
|
4253
|
-
],
|
|
4257
|
+
ignore: IGNORED_PATTERNS,
|
|
4254
4258
|
objectMode: true
|
|
4255
4259
|
});
|
|
4256
4260
|
const scored = [];
|
|
@@ -4274,6 +4278,28 @@ async function searchFiles(query, workdir) {
|
|
|
4274
4278
|
scored.sort((a, b) => b.score - a.score);
|
|
4275
4279
|
return scored.slice(0, 20);
|
|
4276
4280
|
}
|
|
4281
|
+
async function listDirectoryContents(query, workdir) {
|
|
4282
|
+
const dirPath = query.slice(0, -1).replace(/\/+/g, "/");
|
|
4283
|
+
const pattern = dirPath ? `${dirPath}/*` : "*";
|
|
4284
|
+
const entries = await fg([pattern], {
|
|
4285
|
+
cwd: workdir,
|
|
4286
|
+
dot: true,
|
|
4287
|
+
onlyFiles: false,
|
|
4288
|
+
ignore: IGNORED_PATTERNS,
|
|
4289
|
+
objectMode: true
|
|
4290
|
+
});
|
|
4291
|
+
const results = entries.map((entry) => {
|
|
4292
|
+
const isDir = entry.dirent.isDirectory();
|
|
4293
|
+
return {
|
|
4294
|
+
path: entry.path,
|
|
4295
|
+
name: entry.path.split("/").pop() || entry.path,
|
|
4296
|
+
type: isDir ? "directory" : "file",
|
|
4297
|
+
score: isDir ? 110 : 100
|
|
4298
|
+
};
|
|
4299
|
+
});
|
|
4300
|
+
results.sort((a, b) => b.score - a.score);
|
|
4301
|
+
return results.slice(0, 20);
|
|
4302
|
+
}
|
|
4277
4303
|
function fuzzyScore(filePath, query) {
|
|
4278
4304
|
if (!query) {
|
|
4279
4305
|
return 1;
|
|
@@ -5078,7 +5104,7 @@ async function createServerHandle(config3) {
|
|
|
5078
5104
|
setMcpTools(mcpTools);
|
|
5079
5105
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5080
5106
|
}
|
|
5081
|
-
const { signalMcpReady } = await import("./server-
|
|
5107
|
+
const { signalMcpReady } = await import("./server-SPYFMFQE.js");
|
|
5082
5108
|
signalMcpReady();
|
|
5083
5109
|
});
|
|
5084
5110
|
const app = express();
|
|
@@ -5140,7 +5166,7 @@ async function createServerHandle(config3) {
|
|
|
5140
5166
|
res.json({ tools });
|
|
5141
5167
|
});
|
|
5142
5168
|
app.get("/api/projects", async (_req, res) => {
|
|
5143
|
-
const { listProjects } = await import("./projects-
|
|
5169
|
+
const { listProjects } = await import("./projects-WSVINK2C.js");
|
|
5144
5170
|
const projects = listProjects();
|
|
5145
5171
|
res.json({ projects });
|
|
5146
5172
|
});
|
|
@@ -5149,7 +5175,7 @@ async function createServerHandle(config3) {
|
|
|
5149
5175
|
if (!name || !workdir) {
|
|
5150
5176
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5151
5177
|
}
|
|
5152
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
5178
|
+
const { createDirectoryWithGit } = await import("./project-creator-C22J43BC.js");
|
|
5153
5179
|
try {
|
|
5154
5180
|
const project = await createDirectoryWithGit(name, workdir);
|
|
5155
5181
|
res.status(201).json({ project });
|
|
@@ -5194,7 +5220,7 @@ async function createServerHandle(config3) {
|
|
|
5194
5220
|
}
|
|
5195
5221
|
});
|
|
5196
5222
|
app.get("/api/projects/:id", async (req, res) => {
|
|
5197
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5223
|
+
const { getProject: getProject2 } = await import("./projects-WSVINK2C.js");
|
|
5198
5224
|
const project = getProject2(req.params.id);
|
|
5199
5225
|
if (!project) {
|
|
5200
5226
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5202,7 +5228,7 @@ async function createServerHandle(config3) {
|
|
|
5202
5228
|
res.json({ project });
|
|
5203
5229
|
});
|
|
5204
5230
|
app.put("/api/projects/:id", async (req, res) => {
|
|
5205
|
-
const { updateProject } = await import("./projects-
|
|
5231
|
+
const { updateProject } = await import("./projects-WSVINK2C.js");
|
|
5206
5232
|
const { name, customInstructions, dangerLevel } = req.body;
|
|
5207
5233
|
const updates = {};
|
|
5208
5234
|
if (name !== void 0) updates.name = name;
|
|
@@ -5215,7 +5241,7 @@ async function createServerHandle(config3) {
|
|
|
5215
5241
|
res.json({ project: updated });
|
|
5216
5242
|
});
|
|
5217
5243
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
5218
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
5244
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-WSVINK2C.js");
|
|
5219
5245
|
const project = getProject2(req.params.id);
|
|
5220
5246
|
if (!project) {
|
|
5221
5247
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5224,7 +5250,7 @@ async function createServerHandle(config3) {
|
|
|
5224
5250
|
res.json({ success: true });
|
|
5225
5251
|
});
|
|
5226
5252
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
5227
|
-
const { toggleStar } = await import("./projects-
|
|
5253
|
+
const { toggleStar } = await import("./projects-WSVINK2C.js");
|
|
5228
5254
|
const { isStarred } = req.body;
|
|
5229
5255
|
if (typeof isStarred !== "boolean") {
|
|
5230
5256
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -5236,7 +5262,7 @@ async function createServerHandle(config3) {
|
|
|
5236
5262
|
res.json({ project });
|
|
5237
5263
|
});
|
|
5238
5264
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
5239
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5265
|
+
const { getProject: getProject2 } = await import("./projects-WSVINK2C.js");
|
|
5240
5266
|
const project = getProject2(req.params.id);
|
|
5241
5267
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5242
5268
|
const { listBranches } = await import("./workspace-6QTTUMMW.js");
|
|
@@ -5244,7 +5270,7 @@ async function createServerHandle(config3) {
|
|
|
5244
5270
|
res.json({ branches });
|
|
5245
5271
|
});
|
|
5246
5272
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
5247
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5273
|
+
const { getProject: getProject2 } = await import("./projects-WSVINK2C.js");
|
|
5248
5274
|
const project = getProject2(req.params.id);
|
|
5249
5275
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5250
5276
|
const { branch } = req.body;
|
|
@@ -5258,7 +5284,7 @@ async function createServerHandle(config3) {
|
|
|
5258
5284
|
}
|
|
5259
5285
|
});
|
|
5260
5286
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
5261
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5287
|
+
const { getProject: getProject2 } = await import("./projects-WSVINK2C.js");
|
|
5262
5288
|
const project = getProject2(req.params.id);
|
|
5263
5289
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5264
5290
|
const { name } = req.body;
|
|
@@ -5310,7 +5336,7 @@ async function createServerHandle(config3) {
|
|
|
5310
5336
|
}
|
|
5311
5337
|
});
|
|
5312
5338
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
5313
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5339
|
+
const { getProject: getProject2 } = await import("./projects-WSVINK2C.js");
|
|
5314
5340
|
const project = getProject2(req.params.id);
|
|
5315
5341
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5316
5342
|
const { listWorkspaces } = await import("./workspace-6QTTUMMW.js");
|
|
@@ -5319,8 +5345,8 @@ async function createServerHandle(config3) {
|
|
|
5319
5345
|
res.json({ workspaces: workspacesList });
|
|
5320
5346
|
});
|
|
5321
5347
|
app.get("/api/sessions", async (req, res) => {
|
|
5322
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5323
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
5348
|
+
const { getRecentUserPromptsForSession } = await import("./events-FLWRLM6V.js");
|
|
5349
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-ZROWNL22.js");
|
|
5324
5350
|
const projectId = req.query["projectId"];
|
|
5325
5351
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5326
5352
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5408,9 +5434,9 @@ async function createServerHandle(config3) {
|
|
|
5408
5434
|
}
|
|
5409
5435
|
});
|
|
5410
5436
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5411
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5437
|
+
const { getEventStore: getEventStore2 } = await import("./events-FLWRLM6V.js");
|
|
5412
5438
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-ONH3D4OK.js");
|
|
5413
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5439
|
+
const { getPendingQuestionsForSession } = await import("./tools-JRCUWPJO.js");
|
|
5414
5440
|
const session = sessionManager.getSession(req.params.id);
|
|
5415
5441
|
if (!session) {
|
|
5416
5442
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5430,8 +5456,8 @@ async function createServerHandle(config3) {
|
|
|
5430
5456
|
if (!session) {
|
|
5431
5457
|
return res.status(404).json({ error: "Session not found" });
|
|
5432
5458
|
}
|
|
5433
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5434
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5459
|
+
const { stopSessionExecution } = await import("./chat-handler-3BZ4PDL2.js");
|
|
5460
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-JRCUWPJO.js");
|
|
5435
5461
|
sessionManager.clearMessageQueue(sessionId);
|
|
5436
5462
|
stopSessionExecution(sessionId, sessionManager);
|
|
5437
5463
|
abortSession(sessionId);
|
|
@@ -5460,7 +5486,7 @@ async function createServerHandle(config3) {
|
|
|
5460
5486
|
res.json({ success: true });
|
|
5461
5487
|
});
|
|
5462
5488
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5463
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5489
|
+
const { getEventStore: getEventStore2 } = await import("./events-FLWRLM6V.js");
|
|
5464
5490
|
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5465
5491
|
const sessionId = req.params.id;
|
|
5466
5492
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5572,7 +5598,7 @@ async function createServerHandle(config3) {
|
|
|
5572
5598
|
res.json({ success: true });
|
|
5573
5599
|
});
|
|
5574
5600
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5575
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5601
|
+
const { getEventStore: getEventStore2 } = await import("./events-FLWRLM6V.js");
|
|
5576
5602
|
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5577
5603
|
const sessionId = req.params.id;
|
|
5578
5604
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5629,15 +5655,15 @@ async function createServerHandle(config3) {
|
|
|
5629
5655
|
if (!callId || approved === void 0) {
|
|
5630
5656
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5631
5657
|
}
|
|
5632
|
-
const { providePathConfirmation } = await import("./tools-
|
|
5658
|
+
const { providePathConfirmation } = await import("./tools-JRCUWPJO.js");
|
|
5633
5659
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
5634
5660
|
if (!result.found) {
|
|
5635
5661
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5636
5662
|
}
|
|
5637
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5663
|
+
const { getEventStore: getEventStore2 } = await import("./events-FLWRLM6V.js");
|
|
5638
5664
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-ONH3D4OK.js");
|
|
5639
5665
|
const { createSessionStateMessage } = await import("./protocol-EWEVW65B.js");
|
|
5640
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5666
|
+
const { getPendingQuestionsForSession } = await import("./tools-JRCUWPJO.js");
|
|
5641
5667
|
const eventStore = getEventStore2();
|
|
5642
5668
|
const events = eventStore.getEvents(sessionId);
|
|
5643
5669
|
const messages = buildMessagesFromStoredEvents(events);
|
|
@@ -5663,7 +5689,7 @@ async function createServerHandle(config3) {
|
|
|
5663
5689
|
if (!skip && typeof answer !== "string") {
|
|
5664
5690
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
5665
5691
|
}
|
|
5666
|
-
const { provideAnswer } = await import("./tools-
|
|
5692
|
+
const { provideAnswer } = await import("./tools-JRCUWPJO.js");
|
|
5667
5693
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
5668
5694
|
if (!found) {
|
|
5669
5695
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5691,7 +5717,7 @@ async function createServerHandle(config3) {
|
|
|
5691
5717
|
if (!session) {
|
|
5692
5718
|
return res.status(404).json({ error: "Session not found" });
|
|
5693
5719
|
}
|
|
5694
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
5720
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-7XDMSPIC.js");
|
|
5695
5721
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
5696
5722
|
return res.json({ success: false, reason: "disabled" });
|
|
5697
5723
|
}
|
|
@@ -5723,7 +5749,7 @@ async function createServerHandle(config3) {
|
|
|
5723
5749
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
5724
5750
|
model: llmClient.getModel()
|
|
5725
5751
|
};
|
|
5726
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
5752
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-5IMCWX5P.js");
|
|
5727
5753
|
runAgentTurn(
|
|
5728
5754
|
{
|
|
5729
5755
|
sessionManager,
|
|
@@ -5761,15 +5787,15 @@ async function createServerHandle(config3) {
|
|
|
5761
5787
|
if (!session) {
|
|
5762
5788
|
return res.status(404).json({ error: "Session not found" });
|
|
5763
5789
|
}
|
|
5764
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5765
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5790
|
+
const { stopSessionExecution } = await import("./chat-handler-3BZ4PDL2.js");
|
|
5791
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-JRCUWPJO.js");
|
|
5766
5792
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
5767
5793
|
sessionManager.clearMessageQueue(sessionId);
|
|
5768
5794
|
stopSessionExecution(sessionId, sessionManager);
|
|
5769
5795
|
abortSession(sessionId);
|
|
5770
5796
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
5771
5797
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
5772
|
-
const eventStore = (await import("./events-
|
|
5798
|
+
const eventStore = (await import("./events-FLWRLM6V.js")).getEventStore();
|
|
5773
5799
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5774
5800
|
res.json({ success: true, queuedMessages });
|
|
5775
5801
|
});
|
|
@@ -5783,7 +5809,7 @@ async function createServerHandle(config3) {
|
|
|
5783
5809
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
5784
5810
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
5785
5811
|
}
|
|
5786
|
-
const { truncateSessionMessages } = await import("./events-
|
|
5812
|
+
const { truncateSessionMessages } = await import("./events-FLWRLM6V.js");
|
|
5787
5813
|
truncateSessionMessages(sessionId, messageIndex);
|
|
5788
5814
|
res.json({ success: true });
|
|
5789
5815
|
});
|
|
@@ -5800,7 +5826,7 @@ async function createServerHandle(config3) {
|
|
|
5800
5826
|
if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
|
|
5801
5827
|
return res.status(400).json({ error: "content must be a non-empty string if provided" });
|
|
5802
5828
|
}
|
|
5803
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5829
|
+
const { getEventStore: getEventStore2 } = await import("./events-FLWRLM6V.js");
|
|
5804
5830
|
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5805
5831
|
const eventStore = getEventStore2();
|
|
5806
5832
|
const events = eventStore.getEvents(sessionId);
|
|
@@ -5813,7 +5839,7 @@ async function createServerHandle(config3) {
|
|
|
5813
5839
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
5814
5840
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
5815
5841
|
}
|
|
5816
|
-
const { truncateSessionMessages } = await import("./events-
|
|
5842
|
+
const { truncateSessionMessages } = await import("./events-FLWRLM6V.js");
|
|
5817
5843
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
5818
5844
|
sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
|
|
5819
5845
|
res.json({ success: true });
|
|
@@ -5845,7 +5871,7 @@ async function createServerHandle(config3) {
|
|
|
5845
5871
|
res.json({ accepted: true });
|
|
5846
5872
|
});
|
|
5847
5873
|
app.get("/api/settings", async (req, res) => {
|
|
5848
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
5874
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-7XDMSPIC.js");
|
|
5849
5875
|
const keysParam = req.query["keys"];
|
|
5850
5876
|
if (!keysParam) {
|
|
5851
5877
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -5858,19 +5884,19 @@ async function createServerHandle(config3) {
|
|
|
5858
5884
|
res.json(result);
|
|
5859
5885
|
});
|
|
5860
5886
|
app.get("/api/settings/:key", async (req, res) => {
|
|
5861
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
5887
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-7XDMSPIC.js");
|
|
5862
5888
|
const key = req.params.key;
|
|
5863
5889
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
5864
5890
|
res.json({ key, value });
|
|
5865
5891
|
});
|
|
5866
5892
|
app.get("/api/settings/:key", async (req, res) => {
|
|
5867
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
5893
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-7XDMSPIC.js");
|
|
5868
5894
|
const key = req.params.key;
|
|
5869
5895
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
5870
5896
|
res.json({ key, value });
|
|
5871
5897
|
});
|
|
5872
5898
|
app.put("/api/settings/:key", async (req, res) => {
|
|
5873
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
5899
|
+
const { setSetting: setSetting2 } = await import("./settings-7XDMSPIC.js");
|
|
5874
5900
|
const key = req.params.key;
|
|
5875
5901
|
const { value } = req.body;
|
|
5876
5902
|
if (value === void 0) {
|
|
@@ -5897,7 +5923,7 @@ async function createServerHandle(config3) {
|
|
|
5897
5923
|
}
|
|
5898
5924
|
});
|
|
5899
5925
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
5900
|
-
const { listAvailableShells } = await import("./platform-
|
|
5926
|
+
const { listAvailableShells } = await import("./platform-QGXO3CNR.js");
|
|
5901
5927
|
res.json({ shells: listAvailableShells() });
|
|
5902
5928
|
});
|
|
5903
5929
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -6060,7 +6086,7 @@ async function createServerHandle(config3) {
|
|
|
6060
6086
|
const backend = req.query["backend"];
|
|
6061
6087
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6062
6088
|
try {
|
|
6063
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6089
|
+
const { fetchModelsWithContext } = await import("./provider-manager-SQIELYLK.js");
|
|
6064
6090
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6065
6091
|
const models = await fetchModelsWithContext(
|
|
6066
6092
|
url,
|
|
@@ -6389,7 +6415,7 @@ async function createServerHandle(config3) {
|
|
|
6389
6415
|
});
|
|
6390
6416
|
async function rebuildMcpTools() {
|
|
6391
6417
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
6392
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
6418
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-JRCUWPJO.js");
|
|
6393
6419
|
const mcpTools = createMcpTools2(mcpManager);
|
|
6394
6420
|
setMcpTools2(mcpTools);
|
|
6395
6421
|
}
|
|
@@ -6502,7 +6528,7 @@ async function createServerHandle(config3) {
|
|
|
6502
6528
|
}
|
|
6503
6529
|
try {
|
|
6504
6530
|
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-EUMVEFHU.js");
|
|
6505
|
-
const { applyMcpServerUpdate } = await import("./update-server-
|
|
6531
|
+
const { applyMcpServerUpdate } = await import("./update-server-4MTM7M5P.js");
|
|
6506
6532
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6507
6533
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
6508
6534
|
const patch = {
|
|
@@ -6624,13 +6650,13 @@ async function createServerHandle(config3) {
|
|
|
6624
6650
|
})
|
|
6625
6651
|
);
|
|
6626
6652
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
6627
|
-
const { getSessionProcesses } = await import("./manager-
|
|
6653
|
+
const { getSessionProcesses } = await import("./manager-OPMCSYN2.js");
|
|
6628
6654
|
const sessionId = req.params.id;
|
|
6629
6655
|
const processes = getSessionProcesses(sessionId);
|
|
6630
6656
|
res.json({ processes });
|
|
6631
6657
|
});
|
|
6632
6658
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
6633
|
-
const { stopProcess } = await import("./manager-
|
|
6659
|
+
const { stopProcess } = await import("./manager-OPMCSYN2.js");
|
|
6634
6660
|
const sessionId = req.params.id;
|
|
6635
6661
|
const processId = req.params.processId;
|
|
6636
6662
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -6773,7 +6799,7 @@ async function createServerHandle(config3) {
|
|
|
6773
6799
|
const state = sessionManager.getContextState(sessionId);
|
|
6774
6800
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
6775
6801
|
});
|
|
6776
|
-
const { QueueProcessor } = await import("./processor-
|
|
6802
|
+
const { QueueProcessor } = await import("./processor-3R4GS6VB.js");
|
|
6777
6803
|
const queueProcessor = new QueueProcessor({
|
|
6778
6804
|
sessionManager,
|
|
6779
6805
|
providerManager,
|
|
@@ -6815,7 +6841,7 @@ async function createServerHandle(config3) {
|
|
|
6815
6841
|
void (async () => {
|
|
6816
6842
|
await devServerManager.stopAll();
|
|
6817
6843
|
await mcpManager.disconnectAll();
|
|
6818
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
6844
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-JHZV34QR.js");
|
|
6819
6845
|
stopAllInspectProxies();
|
|
6820
6846
|
const { cleanupAllProcesses } = await import("./store-SARB6V2N.js");
|
|
6821
6847
|
cleanupAllProcesses();
|
|
@@ -6853,4 +6879,4 @@ export {
|
|
|
6853
6879
|
createServerHandle,
|
|
6854
6880
|
createServer
|
|
6855
6881
|
};
|
|
6856
|
-
//# sourceMappingURL=chunk-
|
|
6882
|
+
//# sourceMappingURL=chunk-J7VCI5EX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
4
4
|
|
|
5
5
|
// src/server/db/projects.ts
|
|
6
6
|
function createProject(name, workdir) {
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
deleteProject,
|
|
118
118
|
toggleStar
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-LXFLRM7M.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
4
4
|
import {
|
|
5
5
|
buildContextMessagesFromEventHistory,
|
|
6
6
|
buildMessagesFromStoredEvents,
|
|
@@ -1460,4 +1460,4 @@ export {
|
|
|
1460
1460
|
truncateSessionMessages,
|
|
1461
1461
|
getRecentUserPromptsForSession
|
|
1462
1462
|
};
|
|
1463
|
-
//# sourceMappingURL=chunk-
|
|
1463
|
+
//# sourceMappingURL=chunk-NGJ5XJ7D.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPlatformShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4QHDQP2N.js";
|
|
4
4
|
import {
|
|
5
5
|
appendLog,
|
|
6
6
|
createProcess,
|
|
@@ -153,4 +153,4 @@ export {
|
|
|
153
153
|
getSessionProcesses2 as getSessionProcesses,
|
|
154
154
|
getProcessLogs
|
|
155
155
|
};
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-OBQPXUXI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4ZEG3LX.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -807,4 +807,4 @@ export {
|
|
|
807
807
|
parseDefaultModelSelection,
|
|
808
808
|
createProviderManager
|
|
809
809
|
};
|
|
810
|
-
//# sourceMappingURL=chunk-
|
|
810
|
+
//# sourceMappingURL=chunk-OCVRIPQP.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
computeSessionHash,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HLHGNHMV.js";
|
|
7
7
|
import {
|
|
8
8
|
deleteItemFromDir,
|
|
9
9
|
devServerManager,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
jsonSerializer,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
saveItemToDir
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-D6CI2B7B.js";
|
|
17
17
|
import {
|
|
18
18
|
gitSpawnEnv
|
|
19
19
|
} from "./chunk-WGMJCFCE.js";
|
|
@@ -23,19 +23,19 @@ import {
|
|
|
23
23
|
} from "./chunk-EU3WWTFH.js";
|
|
24
24
|
import {
|
|
25
25
|
appendCompactionPrompt
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HAQV6AJP.js";
|
|
27
27
|
import {
|
|
28
28
|
TurnMetrics,
|
|
29
29
|
createMessageStartEvent
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7772ENZN.js";
|
|
31
31
|
import {
|
|
32
32
|
checkAborted,
|
|
33
33
|
onProcessEvent,
|
|
34
34
|
spawnShellProcess
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OBQPXUXI.js";
|
|
36
36
|
import {
|
|
37
37
|
getPlatformShell
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-4QHDQP2N.js";
|
|
39
39
|
import {
|
|
40
40
|
killProcessTree,
|
|
41
41
|
terminateProcessTree
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
getCurrentContextWindowId,
|
|
45
45
|
getEventStore,
|
|
46
46
|
getRuntimeConfig
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-NGJ5XJ7D.js";
|
|
48
48
|
import {
|
|
49
49
|
buildMessagesFromStoredEvents,
|
|
50
50
|
foldPendingConfirmations
|
|
@@ -2194,4 +2194,4 @@ export {
|
|
|
2194
2194
|
signalMcpReady,
|
|
2195
2195
|
createWebSocketServer
|
|
2196
2196
|
};
|
|
2197
|
-
//# sourceMappingURL=chunk-
|
|
2197
|
+
//# sourceMappingURL=chunk-OMWVB2XC.js.map
|
|
@@ -94,7 +94,10 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
94
94
|
const content = message.content ?? "";
|
|
95
95
|
const thinkingContent = getThinking(message, thinkingField) ?? "";
|
|
96
96
|
const toolCalls = message.tool_calls?.map((tc) => {
|
|
97
|
-
const { arguments: args, parseError } = parseToolArguments(tc.function.arguments, {
|
|
97
|
+
const { arguments: args, parseError } = parseToolArguments(tc.function.arguments, {
|
|
98
|
+
id: tc.id,
|
|
99
|
+
name: tc.function.name
|
|
100
|
+
});
|
|
98
101
|
return { id: tc.id, name: tc.function.name, arguments: args, ...parseError ? { parseError } : {} };
|
|
99
102
|
});
|
|
100
103
|
return {
|
|
@@ -265,4 +268,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
265
268
|
export {
|
|
266
269
|
createLLMClient
|
|
267
270
|
};
|
|
268
|
-
//# sourceMappingURL=chunk-
|
|
271
|
+
//# sourceMappingURL=chunk-W4ZEG3LX.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getEventStore,
|
|
6
6
|
getRuntimeConfig,
|
|
7
7
|
updateSessionMetadata
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NGJ5XJ7D.js";
|
|
9
9
|
import {
|
|
10
10
|
buildMessagesFromStoredEvents,
|
|
11
11
|
foldPendingConfirmations
|
|
@@ -135,7 +135,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
|
|
|
135
135
|
client = deps.getLLMClient();
|
|
136
136
|
client.setModel(providerConfig.model);
|
|
137
137
|
} else if (providerConfig) {
|
|
138
|
-
const { createLLMClient } = await import("./client-
|
|
138
|
+
const { createLLMClient } = await import("./client-TDPQVBQ7.js");
|
|
139
139
|
client = createLLMClient({
|
|
140
140
|
llm: {
|
|
141
141
|
baseUrl: providerConfig.baseUrl,
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
buildRunChatTurnParams,
|
|
185
185
|
generateSessionNameForSession
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-XTK6E2QR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
4
4
|
|
|
5
5
|
// src/server/db/settings.ts
|
|
6
6
|
var SETTINGS_KEYS = {
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
deleteSetting,
|
|
102
102
|
getAllSettings
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-YMFCFMMB.js.map
|