openfox 2.0.70 → 2.0.71
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-K3DWIGHG.js → chat-handler-IKLQ3ZUN.js} +11 -11
- package/dist/{chunk-XDWV5CYV.js → chunk-6V7DU7ID.js} +15 -20
- package/dist/{chunk-E4POUD2M.js → chunk-6XOA2WPU.js} +2 -2
- package/dist/chunk-7NMOWPNY.js +7 -0
- package/dist/{chunk-JHGKXQBO.js → chunk-EZK7CGJ7.js} +87 -30
- package/dist/{chunk-PK2RMVMB.js → chunk-I72ACQ6R.js} +19 -18
- package/dist/{chunk-64GN6OPR.js → chunk-NEL2REUM.js} +5 -5
- package/dist/{chunk-7OW6X764.js → chunk-OHGQILRF.js} +15 -4
- package/dist/{chunk-ZZ5JPVBT.js → chunk-OLXHRPAD.js} +38 -37
- package/dist/{chunk-TFCHWMOJ.js → chunk-PVUBCGAT.js} +2 -2
- package/dist/{chunk-QFSDJIUS.js → chunk-RKD2FML3.js} +2 -2
- package/dist/{chunk-YQ3MEZJL.js → chunk-TQGGMWS6.js} +2 -2
- package/dist/{chunk-UTSSFPYA.js → chunk-X7OCC37J.js} +5 -5
- package/dist/{chunk-PVWAE43V.js → chunk-Y4YESMVA.js} +50 -22
- package/dist/{chunk-46OR4W3L.js → chunk-Z42YTK3O.js} +17 -14
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-63U5CTPE.js → client-SC6X65GY.js} +3 -3
- package/dist/{client-pure-XHH4RRLB.js → client-pure-NMLDKRDN.js} +6 -4
- package/dist/{compactor-IPMMFFHM.js → compactor-MXXF5WQR.js} +4 -4
- package/dist/{manager-JXYRGR6B.js → manager-EHIQCIUP.js} +3 -3
- package/dist/{orchestrator-PUV4WG77.js → orchestrator-YGCZZNNV.js} +10 -10
- package/dist/package.json +2 -2
- package/dist/{processor-O2QW27BD.js → processor-K6UPVMIP.js} +11 -11
- package/dist/{provider-IBIWR4AI.js → provider-OJUCZ5RN.js} +4 -4
- package/dist/{provider-manager-7C3JVOLW.js → provider-manager-MAKXSL6L.js} +4 -4
- package/dist/{pwa-T6JRAYJB.js → pwa-SEWCVKZX.js} +7 -8
- package/dist/{serve-NOHD22CT.js → serve-5IOKFKGL.js} +18 -16
- package/dist/server/index.js +15 -14
- package/dist/{server-RLNPHLY2.js → server-T5QDCUBN.js} +12 -12
- package/dist/{service-6DL3MJZD.js → service-2PW2V25M.js} +6 -1
- package/dist/{store-FXTCHBI4.js → store-SARB6V2N.js} +2 -2
- package/dist/{tools-CALGWIV2.js → tools-K3SNGBI2.js} +14 -14
- package/dist/update-734IDLKT.js +40 -0
- package/dist/web/assets/{index-CtWMMQ_X.js → index-HTzupfR0.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +2 -2
- package/dist/cli/update.sh +0 -16
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Z42YTK3O.js";
|
|
25
25
|
import {
|
|
26
26
|
agentExists,
|
|
27
27
|
createToolRegistry,
|
|
@@ -66,12 +66,19 @@ import {
|
|
|
66
66
|
setSkillEnabled,
|
|
67
67
|
skillExists,
|
|
68
68
|
updateOwnedSkill
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-Y4YESMVA.js";
|
|
70
|
+
import {
|
|
71
|
+
ensureWorktree,
|
|
72
|
+
syncIgnoredAssets
|
|
73
|
+
} from "./chunk-VLV3XWZS.js";
|
|
74
|
+
import {
|
|
75
|
+
EventEmitter
|
|
76
|
+
} from "./chunk-EU3WWTFH.js";
|
|
70
77
|
import {
|
|
71
78
|
ALWAYS_ALLOWED,
|
|
72
79
|
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
73
80
|
TOP_LEVEL_ONLY_TOOLS
|
|
74
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-RKD2FML3.js";
|
|
75
82
|
import {
|
|
76
83
|
getProject
|
|
77
84
|
} from "./chunk-KXVFHMSM.js";
|
|
@@ -79,9 +86,8 @@ import {
|
|
|
79
86
|
createMcpTools
|
|
80
87
|
} from "./chunk-NWO6GRYE.js";
|
|
81
88
|
import {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
} from "./chunk-VLV3XWZS.js";
|
|
89
|
+
VERSION
|
|
90
|
+
} from "./chunk-7NMOWPNY.js";
|
|
85
91
|
import {
|
|
86
92
|
createSession,
|
|
87
93
|
deleteSession,
|
|
@@ -125,15 +131,12 @@ import {
|
|
|
125
131
|
import {
|
|
126
132
|
initDatabase
|
|
127
133
|
} from "./chunk-GMXKJGJ2.js";
|
|
128
|
-
import {
|
|
129
|
-
EventEmitter
|
|
130
|
-
} from "./chunk-EU3WWTFH.js";
|
|
131
134
|
import {
|
|
132
135
|
createProviderManager,
|
|
133
136
|
detectModel,
|
|
134
137
|
getLlmStatus,
|
|
135
138
|
parseDefaultModelSelection
|
|
136
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-OHGQILRF.js";
|
|
137
140
|
import {
|
|
138
141
|
getModelProfile
|
|
139
142
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -4282,11 +4285,6 @@ function fuzzyScore(filePath, query) {
|
|
|
4282
4285
|
// src/server/routes/auto-update.ts
|
|
4283
4286
|
import { Router as Router9 } from "express";
|
|
4284
4287
|
import { spawn as spawn2 } from "child_process";
|
|
4285
|
-
|
|
4286
|
-
// src/constants.ts
|
|
4287
|
-
var VERSION = "2.0.70";
|
|
4288
|
-
|
|
4289
|
-
// src/server/routes/auto-update.ts
|
|
4290
4288
|
var updateInProgress = false;
|
|
4291
4289
|
function isRunningAsService() {
|
|
4292
4290
|
return process.env["OPENFOX_SERVICE"] === "true";
|
|
@@ -4308,8 +4306,10 @@ function createAutoUpdateRoutes(options = {}) {
|
|
|
4308
4306
|
const current = VERSION;
|
|
4309
4307
|
try {
|
|
4310
4308
|
const latest = await new Promise((resolve8, reject) => {
|
|
4311
|
-
const
|
|
4309
|
+
const win = process.platform === "win32";
|
|
4310
|
+
const child = spawn2(win ? "npm view openfox version" : "npm", win ? [] : ["view", "openfox", "version"], {
|
|
4312
4311
|
stdio: ["ignore", "pipe", "pipe"],
|
|
4312
|
+
shell: win,
|
|
4313
4313
|
windowsHide: true
|
|
4314
4314
|
});
|
|
4315
4315
|
let stdout = "";
|
|
@@ -4347,8 +4347,9 @@ function createAutoUpdateRoutes(options = {}) {
|
|
|
4347
4347
|
updateInProgress = true;
|
|
4348
4348
|
try {
|
|
4349
4349
|
const isService = isRunningAsService();
|
|
4350
|
-
const child = spawn2("
|
|
4350
|
+
const child = spawn2("openfox update", {
|
|
4351
4351
|
stdio: ["ignore", "pipe", "pipe"],
|
|
4352
|
+
shell: true,
|
|
4352
4353
|
windowsHide: true
|
|
4353
4354
|
});
|
|
4354
4355
|
let stdout = "";
|
|
@@ -4387,9 +4388,10 @@ function createAutoUpdateRoutes(options = {}) {
|
|
|
4387
4388
|
return;
|
|
4388
4389
|
}
|
|
4389
4390
|
try {
|
|
4390
|
-
const child = spawn2("
|
|
4391
|
+
const child = spawn2("openfox service restart", {
|
|
4391
4392
|
detached: true,
|
|
4392
4393
|
stdio: "ignore",
|
|
4394
|
+
shell: true,
|
|
4393
4395
|
windowsHide: true
|
|
4394
4396
|
});
|
|
4395
4397
|
child.unref();
|
|
@@ -4921,7 +4923,7 @@ async function createServerHandle(config3) {
|
|
|
4921
4923
|
setMcpTools(mcpTools);
|
|
4922
4924
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
4923
4925
|
}
|
|
4924
|
-
const { signalMcpReady } = await import("./server-
|
|
4926
|
+
const { signalMcpReady } = await import("./server-T5QDCUBN.js");
|
|
4925
4927
|
signalMcpReady();
|
|
4926
4928
|
});
|
|
4927
4929
|
const app = express();
|
|
@@ -5193,7 +5195,7 @@ async function createServerHandle(config3) {
|
|
|
5193
5195
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5194
5196
|
const { getEventStore: getEventStore2 } = await import("./events-CDQ4HASP.js");
|
|
5195
5197
|
const { buildMessagesFromStoredEvents } = await import("./folding-V2K34EGN.js");
|
|
5196
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5198
|
+
const { getPendingQuestionsForSession } = await import("./tools-K3SNGBI2.js");
|
|
5197
5199
|
const session = sessionManager.getSession(req.params.id);
|
|
5198
5200
|
if (!session) {
|
|
5199
5201
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5212,8 +5214,8 @@ async function createServerHandle(config3) {
|
|
|
5212
5214
|
if (!session) {
|
|
5213
5215
|
return res.status(404).json({ error: "Session not found" });
|
|
5214
5216
|
}
|
|
5215
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5216
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5217
|
+
const { stopSessionExecution } = await import("./chat-handler-IKLQ3ZUN.js");
|
|
5218
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-K3SNGBI2.js");
|
|
5217
5219
|
sessionManager.clearMessageQueue(sessionId);
|
|
5218
5220
|
stopSessionExecution(sessionId, sessionManager);
|
|
5219
5221
|
abortSession(sessionId);
|
|
@@ -5399,7 +5401,7 @@ async function createServerHandle(config3) {
|
|
|
5399
5401
|
if (!callId || approved === void 0) {
|
|
5400
5402
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5401
5403
|
}
|
|
5402
|
-
const { providePathConfirmation } = await import("./tools-
|
|
5404
|
+
const { providePathConfirmation } = await import("./tools-K3SNGBI2.js");
|
|
5403
5405
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
5404
5406
|
if (!result.found) {
|
|
5405
5407
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -5407,7 +5409,7 @@ async function createServerHandle(config3) {
|
|
|
5407
5409
|
const { getEventStore: getEventStore2 } = await import("./events-CDQ4HASP.js");
|
|
5408
5410
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-V2K34EGN.js");
|
|
5409
5411
|
const { createSessionStateMessage } = await import("./protocol-CTNE3ANP.js");
|
|
5410
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5412
|
+
const { getPendingQuestionsForSession } = await import("./tools-K3SNGBI2.js");
|
|
5411
5413
|
const eventStore = getEventStore2();
|
|
5412
5414
|
const events = eventStore.getEvents(sessionId);
|
|
5413
5415
|
const messages = buildMessagesFromStoredEvents(events);
|
|
@@ -5428,7 +5430,7 @@ async function createServerHandle(config3) {
|
|
|
5428
5430
|
if (!skip && typeof answer !== "string") {
|
|
5429
5431
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
5430
5432
|
}
|
|
5431
|
-
const { provideAnswer } = await import("./tools-
|
|
5433
|
+
const { provideAnswer } = await import("./tools-K3SNGBI2.js");
|
|
5432
5434
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
5433
5435
|
if (!found) {
|
|
5434
5436
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5488,7 +5490,7 @@ async function createServerHandle(config3) {
|
|
|
5488
5490
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
5489
5491
|
model: llmClient.getModel()
|
|
5490
5492
|
};
|
|
5491
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
5493
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-YGCZZNNV.js");
|
|
5492
5494
|
runAgentTurn(
|
|
5493
5495
|
{
|
|
5494
5496
|
sessionManager,
|
|
@@ -5526,8 +5528,8 @@ async function createServerHandle(config3) {
|
|
|
5526
5528
|
if (!session) {
|
|
5527
5529
|
return res.status(404).json({ error: "Session not found" });
|
|
5528
5530
|
}
|
|
5529
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5530
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5531
|
+
const { stopSessionExecution } = await import("./chat-handler-IKLQ3ZUN.js");
|
|
5532
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-K3SNGBI2.js");
|
|
5531
5533
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
5532
5534
|
sessionManager.clearMessageQueue(sessionId);
|
|
5533
5535
|
stopSessionExecution(sessionId, sessionManager);
|
|
@@ -5821,7 +5823,7 @@ async function createServerHandle(config3) {
|
|
|
5821
5823
|
const backend = req.query["backend"];
|
|
5822
5824
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
5823
5825
|
try {
|
|
5824
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
5826
|
+
const { fetchModelsWithContext } = await import("./provider-manager-MAKXSL6L.js");
|
|
5825
5827
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
5826
5828
|
const models = await fetchModelsWithContext(
|
|
5827
5829
|
url,
|
|
@@ -5891,7 +5893,7 @@ async function createServerHandle(config3) {
|
|
|
5891
5893
|
}
|
|
5892
5894
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
5893
5895
|
const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
|
|
5894
|
-
const { buildNonStreamingCreateParams } = await import("./client-pure-
|
|
5896
|
+
const { buildNonStreamingCreateParams } = await import("./client-pure-NMLDKRDN.js");
|
|
5895
5897
|
const { OpenAIHttpClient } = await import("./http-client-PIWB7BXK.js");
|
|
5896
5898
|
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
5897
5899
|
const profile = getModelProfile2(model);
|
|
@@ -6150,7 +6152,7 @@ async function createServerHandle(config3) {
|
|
|
6150
6152
|
});
|
|
6151
6153
|
async function rebuildMcpTools() {
|
|
6152
6154
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
6153
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
6155
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-K3SNGBI2.js");
|
|
6154
6156
|
const mcpTools = createMcpTools2(mcpManager);
|
|
6155
6157
|
setMcpTools2(mcpTools);
|
|
6156
6158
|
}
|
|
@@ -6385,13 +6387,13 @@ async function createServerHandle(config3) {
|
|
|
6385
6387
|
})
|
|
6386
6388
|
);
|
|
6387
6389
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
6388
|
-
const { getSessionProcesses } = await import("./manager-
|
|
6390
|
+
const { getSessionProcesses } = await import("./manager-EHIQCIUP.js");
|
|
6389
6391
|
const sessionId = req.params.id;
|
|
6390
6392
|
const processes = getSessionProcesses(sessionId);
|
|
6391
6393
|
res.json({ processes });
|
|
6392
6394
|
});
|
|
6393
6395
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
6394
|
-
const { stopProcess } = await import("./manager-
|
|
6396
|
+
const { stopProcess } = await import("./manager-EHIQCIUP.js");
|
|
6395
6397
|
const sessionId = req.params.id;
|
|
6396
6398
|
const processId = req.params.processId;
|
|
6397
6399
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -6534,7 +6536,7 @@ async function createServerHandle(config3) {
|
|
|
6534
6536
|
const state = sessionManager.getContextState(sessionId);
|
|
6535
6537
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
6536
6538
|
});
|
|
6537
|
-
const { QueueProcessor } = await import("./processor-
|
|
6539
|
+
const { QueueProcessor } = await import("./processor-K6UPVMIP.js");
|
|
6538
6540
|
const queueProcessor = new QueueProcessor({
|
|
6539
6541
|
sessionManager,
|
|
6540
6542
|
providerManager,
|
|
@@ -6578,7 +6580,7 @@ async function createServerHandle(config3) {
|
|
|
6578
6580
|
await mcpManager.disconnectAll();
|
|
6579
6581
|
const { stopAllInspectProxies } = await import("./inspect-proxy-OVEFBJ26.js");
|
|
6580
6582
|
stopAllInspectProxies();
|
|
6581
|
-
const { cleanupAllProcesses } = await import("./store-
|
|
6583
|
+
const { cleanupAllProcesses } = await import("./store-SARB6V2N.js");
|
|
6582
6584
|
cleanupAllProcesses();
|
|
6583
6585
|
viteServer?.close();
|
|
6584
6586
|
if (config3.globalConfigPath) {
|
|
@@ -6611,8 +6613,7 @@ async function createServer(config3) {
|
|
|
6611
6613
|
}
|
|
6612
6614
|
|
|
6613
6615
|
export {
|
|
6614
|
-
VERSION,
|
|
6615
6616
|
createServerHandle,
|
|
6616
6617
|
createServer
|
|
6617
6618
|
};
|
|
6618
|
-
//# sourceMappingURL=chunk-
|
|
6619
|
+
//# sourceMappingURL=chunk-OLXHRPAD.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
removeProcess,
|
|
9
9
|
startProcess,
|
|
10
10
|
updateStatus
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I72ACQ6R.js";
|
|
12
12
|
import {
|
|
13
13
|
getPlatformShell
|
|
14
14
|
} from "./chunk-X5DOUA3Z.js";
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
getSessionProcesses2 as getSessionProcesses,
|
|
148
148
|
getProcessLogs
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=chunk-
|
|
150
|
+
//# sourceMappingURL=chunk-PVUBCGAT.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-YHEQTVFV.js";
|
|
13
13
|
import {
|
|
14
14
|
buildModelParams
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EZK7CGJ7.js";
|
|
16
16
|
import {
|
|
17
17
|
logger
|
|
18
18
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -678,4 +678,4 @@ export {
|
|
|
678
678
|
createChatDoneEvent,
|
|
679
679
|
consumeStreamGenerator
|
|
680
680
|
};
|
|
681
|
-
//# sourceMappingURL=chunk-
|
|
681
|
+
//# sourceMappingURL=chunk-RKD2FML3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
COMPACTION_PROMPT,
|
|
3
3
|
createMessageStartEvent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RKD2FML3.js";
|
|
5
5
|
import {
|
|
6
6
|
getCurrentWindowMessageOptions
|
|
7
7
|
} from "./chunk-TFDK6VSG.js";
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
shouldCompact,
|
|
32
32
|
getCompactionTarget
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-TQGGMWS6.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
loadAllAgentsDefault,
|
|
11
11
|
processEventsForConversation,
|
|
12
12
|
runTopLevelAgentLoop
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y4YESMVA.js";
|
|
14
14
|
import {
|
|
15
15
|
TurnMetrics,
|
|
16
16
|
buildAgentReminder,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
buildTopLevelSystemPrompt,
|
|
19
19
|
createChatDoneEvent,
|
|
20
20
|
createMessageStartEvent
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RKD2FML3.js";
|
|
22
22
|
import {
|
|
23
23
|
getCurrentContextWindowId,
|
|
24
24
|
getCurrentWindowMessageOptions,
|
|
@@ -64,7 +64,7 @@ function resolveAgentDef(sessionManager, sessionId) {
|
|
|
64
64
|
}
|
|
65
65
|
async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
66
66
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
67
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
67
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-K3SNGBI2.js");
|
|
68
68
|
const tools = getToolRegistryForAgent2(agentDef).definitions;
|
|
69
69
|
const toolFingerprint = getToolFingerprint(tools);
|
|
70
70
|
const allAgents = await loadAllAgentsDefault();
|
|
@@ -77,7 +77,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
|
77
77
|
async function computeSessionHash(sessionManager, sessionId) {
|
|
78
78
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
79
79
|
const agentDef = await resolveAgentDef(sessionManager, sessionId);
|
|
80
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
80
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-K3SNGBI2.js");
|
|
81
81
|
const tools = getToolRegistryForAgent2(agentDef).definitions;
|
|
82
82
|
const toolFingerprint = getToolFingerprint(tools);
|
|
83
83
|
return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
|
|
@@ -357,4 +357,4 @@ export {
|
|
|
357
357
|
runChatTurn,
|
|
358
358
|
runAgentTurn
|
|
359
359
|
};
|
|
360
|
-
//# sourceMappingURL=chunk-
|
|
360
|
+
//# sourceMappingURL=chunk-X7OCC37J.js.map
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listBranches
|
|
3
|
+
} from "./chunk-VLV3XWZS.js";
|
|
4
|
+
import {
|
|
5
|
+
AskUserInterrupt,
|
|
6
|
+
askUserTool
|
|
7
|
+
} from "./chunk-EU3WWTFH.js";
|
|
1
8
|
import {
|
|
2
9
|
COMPACTION_PROMPT,
|
|
3
10
|
TurnMetrics,
|
|
@@ -10,7 +17,7 @@ import {
|
|
|
10
17
|
createToolCallEvent,
|
|
11
18
|
createToolResultEvent,
|
|
12
19
|
streamLLMPure
|
|
13
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RKD2FML3.js";
|
|
14
21
|
import {
|
|
15
22
|
startInspectProxy
|
|
16
23
|
} from "./chunk-4QBDV6LX.js";
|
|
@@ -27,21 +34,18 @@ import {
|
|
|
27
34
|
spawnShellProcess,
|
|
28
35
|
startProcessCommand,
|
|
29
36
|
stopProcess
|
|
30
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-PVUBCGAT.js";
|
|
31
38
|
import {
|
|
32
39
|
getMaxPerSession,
|
|
33
40
|
getSessionProcessCount,
|
|
34
41
|
terminateProcessTree
|
|
35
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-I72ACQ6R.js";
|
|
36
43
|
import {
|
|
37
44
|
createMcpTools
|
|
38
45
|
} from "./chunk-NWO6GRYE.js";
|
|
39
46
|
import {
|
|
40
47
|
applyMcpServerUpdate
|
|
41
48
|
} from "./chunk-UN26GIQG.js";
|
|
42
|
-
import {
|
|
43
|
-
listBranches
|
|
44
|
-
} from "./chunk-VLV3XWZS.js";
|
|
45
49
|
import {
|
|
46
50
|
getCurrentContextWindowId,
|
|
47
51
|
getCurrentWindowMessageOptions,
|
|
@@ -71,10 +75,6 @@ import {
|
|
|
71
75
|
getSetting,
|
|
72
76
|
setSetting
|
|
73
77
|
} from "./chunk-XUPKS5FL.js";
|
|
74
|
-
import {
|
|
75
|
-
AskUserInterrupt,
|
|
76
|
-
askUserTool
|
|
77
|
-
} from "./chunk-EU3WWTFH.js";
|
|
78
78
|
import {
|
|
79
79
|
modelSupportsVision
|
|
80
80
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
formatPdfErrorMessage,
|
|
85
85
|
isPdfBuffer,
|
|
86
86
|
processPdfContent
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-EZK7CGJ7.js";
|
|
88
88
|
import {
|
|
89
89
|
logger
|
|
90
90
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -1444,13 +1444,14 @@ async function checkRtkAvailability() {
|
|
|
1444
1444
|
return rtkAvailable;
|
|
1445
1445
|
}
|
|
1446
1446
|
function hasBackgroundAmpersand(command) {
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1447
|
+
let processed = command.replace(/'[^']*'/g, " ").replace(/"[^"]*"/g, " ");
|
|
1448
|
+
processed = processed.replace(/\\./g, " ");
|
|
1449
|
+
processed = processed.replace(/&&/g, " ");
|
|
1450
|
+
processed = processed.replace(/\|&/g, " ");
|
|
1451
|
+
processed = processed.replace(/&>/g, " ");
|
|
1452
|
+
processed = processed.replace(/>&\d/g, " ");
|
|
1453
|
+
processed = processed.replace(/>&/g, " ");
|
|
1454
|
+
return processed.includes("&");
|
|
1454
1455
|
}
|
|
1455
1456
|
var runCommandTool = createTool(
|
|
1456
1457
|
"run_command",
|
|
@@ -1598,6 +1599,32 @@ function executeCommand(command, cwd, timeout, signal, onProgress) {
|
|
|
1598
1599
|
stderr += chunk;
|
|
1599
1600
|
onProgress?.(`[stderr] ${chunk}`);
|
|
1600
1601
|
});
|
|
1602
|
+
proc.on("exit", () => {
|
|
1603
|
+
if (aborted) {
|
|
1604
|
+
clearTimeout(timer);
|
|
1605
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1606
|
+
let output = stdout.trim();
|
|
1607
|
+
if (output) output += "\n\n";
|
|
1608
|
+
output += "[interrupted by user]";
|
|
1609
|
+
resolve6({
|
|
1610
|
+
stdout: output,
|
|
1611
|
+
stderr: stderr.trim(),
|
|
1612
|
+
exitCode: 130
|
|
1613
|
+
});
|
|
1614
|
+
} else if (timedOut) {
|
|
1615
|
+
clearTimeout(timer);
|
|
1616
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1617
|
+
let output = stdout.trim();
|
|
1618
|
+
if (output) output += "\n\n";
|
|
1619
|
+
output += `[Exit code: 124]
|
|
1620
|
+
[Process timed out after ${timeout}ms]`;
|
|
1621
|
+
resolve6({
|
|
1622
|
+
stdout: output,
|
|
1623
|
+
stderr: stderr.trim(),
|
|
1624
|
+
exitCode: 124
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1601
1628
|
proc.on("close", (code) => {
|
|
1602
1629
|
exited = true;
|
|
1603
1630
|
clearTimeout(timer);
|
|
@@ -2523,6 +2550,7 @@ async function executeTools(assistantMsgId, toolCalls, ctx, append) {
|
|
|
2523
2550
|
type: "chat.ask_user",
|
|
2524
2551
|
data: { callId: error.callId, question: error.question, type: error.type, options: error.options }
|
|
2525
2552
|
});
|
|
2553
|
+
append(createChatDoneEvent(assistantMsgId, "waiting_for_user"));
|
|
2526
2554
|
const { awaitAnswer } = await import("./ask-TOBEA6KD.js");
|
|
2527
2555
|
const answerPromise = awaitAnswer(error.callId);
|
|
2528
2556
|
if (!answerPromise) {
|
|
@@ -2877,7 +2905,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2877
2905
|
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
|
|
2878
2906
|
if (!compacting) {
|
|
2879
2907
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
2880
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
2908
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-MXXF5WQR.js");
|
|
2881
2909
|
if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
|
|
2882
2910
|
appendCompactionPrompt(sessionId, append);
|
|
2883
2911
|
compacting = true;
|
|
@@ -3782,7 +3810,7 @@ var callSubAgentTool = {
|
|
|
3782
3810
|
};
|
|
3783
3811
|
}
|
|
3784
3812
|
try {
|
|
3785
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3813
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-K3SNGBI2.js");
|
|
3786
3814
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3787
3815
|
const turnMetrics = new TurnMetrics();
|
|
3788
3816
|
const result = await executeSubAgent({
|
|
@@ -4781,7 +4809,7 @@ var mcpConfigTool = createTool(
|
|
|
4781
4809
|
mcpNotifyChanged?.(sessionId);
|
|
4782
4810
|
}
|
|
4783
4811
|
async function rebuildTools() {
|
|
4784
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4812
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-K3SNGBI2.js");
|
|
4785
4813
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4786
4814
|
setMcpTools2(mcpTools);
|
|
4787
4815
|
}
|
|
@@ -5476,4 +5504,4 @@ export {
|
|
|
5476
5504
|
getToolRegistryForAgent,
|
|
5477
5505
|
createToolRegistry
|
|
5478
5506
|
};
|
|
5479
|
-
//# sourceMappingURL=chunk-
|
|
5507
|
+
//# sourceMappingURL=chunk-Y4YESMVA.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
computeSessionHash,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X7OCC37J.js";
|
|
7
7
|
import {
|
|
8
8
|
deleteItemFromDir,
|
|
9
9
|
devServerManager,
|
|
@@ -13,22 +13,29 @@ import {
|
|
|
13
13
|
jsonSerializer,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
saveItemToDir
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Y4YESMVA.js";
|
|
17
|
+
import {
|
|
18
|
+
gitSpawnEnv
|
|
19
|
+
} from "./chunk-WGMJCFCE.js";
|
|
20
|
+
import {
|
|
21
|
+
getPendingQuestionsForSession,
|
|
22
|
+
provideAnswer
|
|
23
|
+
} from "./chunk-EU3WWTFH.js";
|
|
17
24
|
import {
|
|
18
25
|
appendCompactionPrompt
|
|
19
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TQGGMWS6.js";
|
|
20
27
|
import {
|
|
21
28
|
TurnMetrics,
|
|
22
29
|
createMessageStartEvent
|
|
23
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RKD2FML3.js";
|
|
24
31
|
import {
|
|
25
32
|
checkAborted,
|
|
26
33
|
onProcessEvent,
|
|
27
34
|
spawnShellProcess
|
|
28
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-PVUBCGAT.js";
|
|
29
36
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
37
|
+
terminateProcessTree
|
|
38
|
+
} from "./chunk-I72ACQ6R.js";
|
|
32
39
|
import {
|
|
33
40
|
getCurrentContextWindowId,
|
|
34
41
|
getEventStore,
|
|
@@ -56,10 +63,6 @@ import {
|
|
|
56
63
|
import {
|
|
57
64
|
getPlatformShell
|
|
58
65
|
} from "./chunk-X5DOUA3Z.js";
|
|
59
|
-
import {
|
|
60
|
-
getPendingQuestionsForSession,
|
|
61
|
-
provideAnswer
|
|
62
|
-
} from "./chunk-EU3WWTFH.js";
|
|
63
66
|
import {
|
|
64
67
|
logger
|
|
65
68
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -548,13 +551,13 @@ function executeShellCommand(command, cwd, timeout, signal) {
|
|
|
548
551
|
let killed = false;
|
|
549
552
|
const timer = setTimeout(() => {
|
|
550
553
|
killed = true;
|
|
551
|
-
proc
|
|
554
|
+
void terminateProcessTree(proc);
|
|
552
555
|
resolve({ exitCode: 1, stdout, stderr: stderr + "\nCommand timed out", success: false });
|
|
553
556
|
}, timeout);
|
|
554
557
|
const onAbort = () => {
|
|
555
558
|
if (!killed) {
|
|
556
559
|
killed = true;
|
|
557
|
-
proc
|
|
560
|
+
void terminateProcessTree(proc, { immediate: true });
|
|
558
561
|
clearTimeout(timer);
|
|
559
562
|
reject(new Error("Aborted"));
|
|
560
563
|
}
|
|
@@ -2158,4 +2161,4 @@ export {
|
|
|
2158
2161
|
signalMcpReady,
|
|
2159
2162
|
createWebSocketServer
|
|
2160
2163
|
};
|
|
2161
|
-
//# sourceMappingURL=chunk-
|
|
2164
|
+
//# sourceMappingURL=chunk-Z42YTK3O.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6XOA2WPU.js";
|
|
4
4
|
import "./chunk-V4IE7HJY.js";
|
|
5
5
|
import "./chunk-YHEQTVFV.js";
|
|
6
6
|
import "./chunk-HNCM3D7Y.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-EZK7CGJ7.js";
|
|
8
8
|
import "./chunk-ZO5EXQMG.js";
|
|
9
9
|
import "./chunk-K44MW7JJ.js";
|
|
10
10
|
import "./chunk-5WRI5ZAA.js";
|
|
11
11
|
export {
|
|
12
12
|
createLLMClient
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=client-
|
|
14
|
+
//# sourceMappingURL=client-SC6X65GY.js.map
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
convertTools,
|
|
7
7
|
getThinking,
|
|
8
8
|
mapFinishReason,
|
|
9
|
-
parseToolArguments
|
|
10
|
-
|
|
9
|
+
parseToolArguments,
|
|
10
|
+
resolveAttachmentsInMessages
|
|
11
|
+
} from "./chunk-EZK7CGJ7.js";
|
|
11
12
|
import "./chunk-5WRI5ZAA.js";
|
|
12
13
|
export {
|
|
13
14
|
buildModelParams,
|
|
@@ -17,6 +18,7 @@ export {
|
|
|
17
18
|
convertTools,
|
|
18
19
|
getThinking,
|
|
19
20
|
mapFinishReason,
|
|
20
|
-
parseToolArguments
|
|
21
|
+
parseToolArguments,
|
|
22
|
+
resolveAttachmentsInMessages
|
|
21
23
|
};
|
|
22
|
-
//# sourceMappingURL=client-pure-
|
|
24
|
+
//# sourceMappingURL=client-pure-NMLDKRDN.js.map
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
appendCompactionPrompt,
|
|
3
3
|
getCompactionTarget,
|
|
4
4
|
shouldCompact
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-TQGGMWS6.js";
|
|
6
|
+
import "./chunk-RKD2FML3.js";
|
|
7
7
|
import "./chunk-TFDK6VSG.js";
|
|
8
8
|
import "./chunk-C3VLGVSQ.js";
|
|
9
9
|
import "./chunk-X5DOUA3Z.js";
|
|
@@ -12,7 +12,7 @@ import "./chunk-GMXKJGJ2.js";
|
|
|
12
12
|
import "./chunk-J2GP3J3X.js";
|
|
13
13
|
import "./chunk-V4IE7HJY.js";
|
|
14
14
|
import "./chunk-YHEQTVFV.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-EZK7CGJ7.js";
|
|
16
16
|
import "./chunk-K44MW7JJ.js";
|
|
17
17
|
import "./chunk-5WRI5ZAA.js";
|
|
18
18
|
export {
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
getCompactionTarget,
|
|
21
21
|
shouldCompact
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=compactor-
|
|
23
|
+
//# sourceMappingURL=compactor-MXXF5WQR.js.map
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
onProcessEvent,
|
|
7
7
|
startProcessCommand,
|
|
8
8
|
stopProcess
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-PVUBCGAT.js";
|
|
10
|
+
import "./chunk-I72ACQ6R.js";
|
|
11
11
|
import "./chunk-X5DOUA3Z.js";
|
|
12
12
|
import "./chunk-XUPKS5FL.js";
|
|
13
13
|
import "./chunk-GMXKJGJ2.js";
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
startProcessCommand,
|
|
23
23
|
stopProcess
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=manager-
|
|
25
|
+
//# sourceMappingURL=manager-EHIQCIUP.js.map
|