openfox 1.6.3 → 1.6.5
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/{auto-compaction-BRT6SDEP.js → auto-compaction-BGPUJ2IJ.js} +5 -5
- package/dist/{chat-handler-55LA4LI2.js → chat-handler-DELWKHRW.js} +7 -7
- package/dist/{chunk-RVTM7K76.js → chunk-2FZLQNUN.js} +23 -22
- package/dist/{chunk-XQQ2BRJA.js → chunk-G7BJX3NE.js} +1 -1
- package/dist/{chunk-5P6FOMEG.js → chunk-IOSH6XWL.js} +2 -2
- package/dist/{chunk-GBBTJ6ND.js → chunk-JHGYGSPS.js} +30 -7
- package/dist/{chunk-S73ATBSR.js → chunk-LL6IJWJ2.js} +4 -4
- package/dist/{chunk-EBOKO2PW.js → chunk-RALYW2S4.js} +2 -2
- package/dist/{chunk-CIXMZ73F.js → chunk-ZRDRYL6W.js} +4 -3
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{events-OZKDX6XE.js → events-EILPWKYE.js} +2 -2
- package/dist/{orchestrator-IEYZSNVH.js → orchestrator-RUIWZI2U.js} +6 -6
- package/dist/package.json +1 -1
- package/dist/{processor-I4BGYK3T.js → processor-MS4OX46A.js} +5 -5
- package/dist/{protocol-vX_YbJXE.d.ts → protocol-CwUrtnZR.d.ts} +1 -0
- package/dist/{protocol-ODKD7QJO.js → protocol-THDNQDER.js} +3 -3
- package/dist/{serve-R4MKJGMB.js → serve-45IVLLMI.js} +7 -7
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +6 -6
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/{tools-GQ3PJL6N.js → tools-M457R5HW.js} +5 -5
- package/dist/web/assets/{index-D4iB5Uzz.js → index-DKTHAEgV.js} +55 -55
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JHGYGSPS.js";
|
|
6
6
|
import "./chunk-NBU6KIOD.js";
|
|
7
7
|
import "./chunk-574HZVLE.js";
|
|
8
8
|
import "./chunk-XFXOSPYH.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ZRDRYL6W.js";
|
|
10
10
|
import "./chunk-WQ4W5H6A.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-RALYW2S4.js";
|
|
12
12
|
import "./chunk-22CTURMH.js";
|
|
13
13
|
import "./chunk-7IOZFJBW.js";
|
|
14
14
|
import "./chunk-XKFPU2FA.js";
|
|
15
15
|
import "./chunk-3EHGGBWE.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-G7BJX3NE.js";
|
|
17
17
|
import "./chunk-R4HADRYO.js";
|
|
18
18
|
import "./chunk-TVQOONDR.js";
|
|
19
19
|
import "./chunk-PNBH3RAX.js";
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
performManualContextCompaction,
|
|
23
23
|
resolveCompactionStatsIdentity
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=auto-compaction-
|
|
25
|
+
//# sourceMappingURL=auto-compaction-BGPUJ2IJ.js.map
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "./chunk-QDEKU5RL.js";
|
|
5
5
|
import {
|
|
6
6
|
runChatTurn
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-LL6IJWJ2.js";
|
|
8
|
+
import "./chunk-JHGYGSPS.js";
|
|
9
9
|
import "./chunk-NBU6KIOD.js";
|
|
10
10
|
import "./chunk-574HZVLE.js";
|
|
11
11
|
import "./chunk-XFXOSPYH.js";
|
|
12
12
|
import {
|
|
13
13
|
getEventStore,
|
|
14
14
|
updateSessionMetadata
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZRDRYL6W.js";
|
|
16
16
|
import {
|
|
17
17
|
buildMessagesFromStoredEvents,
|
|
18
18
|
foldPendingConfirmations
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
createPhaseChangedMessage,
|
|
24
24
|
createSessionRunningMessage,
|
|
25
25
|
createSessionStateMessage
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RALYW2S4.js";
|
|
27
27
|
import "./chunk-22CTURMH.js";
|
|
28
28
|
import "./chunk-7IOZFJBW.js";
|
|
29
29
|
import "./chunk-XKFPU2FA.js";
|
|
30
30
|
import "./chunk-3EHGGBWE.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-G7BJX3NE.js";
|
|
32
32
|
import "./chunk-R4HADRYO.js";
|
|
33
33
|
import "./chunk-TVQOONDR.js";
|
|
34
34
|
import {
|
|
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
61
61
|
sessionManager.setRunning(sessionId, true);
|
|
62
62
|
broadcastForSession(sessionId, createSessionRunningMessage(true));
|
|
63
63
|
try {
|
|
64
|
-
const { maybeAutoCompactContext } = await import("./auto-compaction-
|
|
64
|
+
const { maybeAutoCompactContext } = await import("./auto-compaction-BGPUJ2IJ.js");
|
|
65
65
|
await maybeAutoCompactContext({
|
|
66
66
|
sessionManager,
|
|
67
67
|
sessionId,
|
|
@@ -200,4 +200,4 @@ export {
|
|
|
200
200
|
startChatSession,
|
|
201
201
|
stopSessionExecution
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=chat-handler-
|
|
203
|
+
//# sourceMappingURL=chat-handler-DELWKHRW.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createVerifierNudgeConfig,
|
|
7
7
|
runBuilderTurn,
|
|
8
8
|
runChatTurn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LL6IJWJ2.js";
|
|
10
10
|
import {
|
|
11
11
|
TurnMetrics,
|
|
12
12
|
agentExists,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
saveSkill,
|
|
45
45
|
setSkillEnabled,
|
|
46
46
|
skillExists
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-JHGYGSPS.js";
|
|
48
48
|
import {
|
|
49
49
|
getPathSeparator,
|
|
50
50
|
getPlatformShell,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
updateSessionProvider,
|
|
90
90
|
updateSessionRunning,
|
|
91
91
|
updateSessionSummary
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-ZRDRYL6W.js";
|
|
93
93
|
import {
|
|
94
94
|
buildContextMessagesFromEventHistory,
|
|
95
95
|
buildMessagesFromStoredEvents,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
parseClientMessage,
|
|
111
111
|
serializeServerMessage,
|
|
112
112
|
storedEventToServerMessage
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-RALYW2S4.js";
|
|
114
114
|
import {
|
|
115
115
|
EventEmitter,
|
|
116
116
|
cancelQuestionsForSession,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
} from "./chunk-QY7BMXWT.js";
|
|
128
128
|
import {
|
|
129
129
|
createServerMessage
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-G7BJX3NE.js";
|
|
131
131
|
import {
|
|
132
132
|
getGlobalConfigDir
|
|
133
133
|
} from "./chunk-R4HADRYO.js";
|
|
@@ -4545,7 +4545,7 @@ ${summary}`, {
|
|
|
4545
4545
|
* Emits a context.state event with the real promptTokens from the LLM.
|
|
4546
4546
|
* maxTokens comes from providerManager.getCurrentModelContext() - the currently selected model's limit.
|
|
4547
4547
|
*/
|
|
4548
|
-
setCurrentContextSize(sessionId, promptTokens) {
|
|
4548
|
+
setCurrentContextSize(sessionId, promptTokens, subAgentId) {
|
|
4549
4549
|
const state = getSessionState(sessionId, this.providerManager.getCurrentModelContext());
|
|
4550
4550
|
const maxTokens = this.providerManager.getCurrentModelContext();
|
|
4551
4551
|
const compactionCount = state?.contextState.compactionCount ?? 0;
|
|
@@ -4555,9 +4555,10 @@ ${summary}`, {
|
|
|
4555
4555
|
maxTokens,
|
|
4556
4556
|
compactionCount,
|
|
4557
4557
|
isInDangerZone(promptTokens, maxTokens),
|
|
4558
|
-
canCompact(promptTokens, maxTokens)
|
|
4558
|
+
canCompact(promptTokens, maxTokens),
|
|
4559
|
+
subAgentId
|
|
4559
4560
|
);
|
|
4560
|
-
logger.debug("Context state updated", { sessionId, promptTokens, maxTokens });
|
|
4561
|
+
logger.debug("Context state updated", { sessionId, promptTokens, maxTokens, subAgentId });
|
|
4561
4562
|
}
|
|
4562
4563
|
// ============================================================================
|
|
4563
4564
|
// Criteria Operations (delegates to EventStore)
|
|
@@ -5543,7 +5544,7 @@ function createTerminalRoutes() {
|
|
|
5543
5544
|
}
|
|
5544
5545
|
|
|
5545
5546
|
// src/constants.ts
|
|
5546
|
-
var VERSION = "1.6.
|
|
5547
|
+
var VERSION = "1.6.5";
|
|
5547
5548
|
|
|
5548
5549
|
// src/server/index.ts
|
|
5549
5550
|
var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
|
|
@@ -5708,7 +5709,7 @@ async function createServerHandle(config) {
|
|
|
5708
5709
|
res.json({ success: true });
|
|
5709
5710
|
});
|
|
5710
5711
|
app.get("/api/sessions", async (req, res) => {
|
|
5711
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5712
|
+
const { getRecentUserPromptsForSession } = await import("./events-EILPWKYE.js");
|
|
5712
5713
|
const projectId = req.query["projectId"];
|
|
5713
5714
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5714
5715
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5741,7 +5742,7 @@ async function createServerHandle(config) {
|
|
|
5741
5742
|
res.status(201).json({ session });
|
|
5742
5743
|
});
|
|
5743
5744
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5744
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5745
|
+
const { getEventStore: getEventStore2 } = await import("./events-EILPWKYE.js");
|
|
5745
5746
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
|
|
5746
5747
|
const session = sessionManager.getSession(req.params.id);
|
|
5747
5748
|
if (!session) {
|
|
@@ -5772,7 +5773,7 @@ async function createServerHandle(config) {
|
|
|
5772
5773
|
res.json({ success: true });
|
|
5773
5774
|
});
|
|
5774
5775
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5775
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5776
|
+
const { getEventStore: getEventStore2 } = await import("./events-EILPWKYE.js");
|
|
5776
5777
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
|
|
5777
5778
|
const sessionId = req.params.id;
|
|
5778
5779
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5810,7 +5811,7 @@ async function createServerHandle(config) {
|
|
|
5810
5811
|
res.json({ success: true });
|
|
5811
5812
|
});
|
|
5812
5813
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5813
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5814
|
+
const { getEventStore: getEventStore2 } = await import("./events-EILPWKYE.js");
|
|
5814
5815
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
|
|
5815
5816
|
const sessionId = req.params.id;
|
|
5816
5817
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5849,14 +5850,14 @@ async function createServerHandle(config) {
|
|
|
5849
5850
|
if (!callId || approved === void 0) {
|
|
5850
5851
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5851
5852
|
}
|
|
5852
|
-
const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-
|
|
5853
|
+
const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-M457R5HW.js");
|
|
5853
5854
|
const result = providePathConfirmation2(callId, approved, alwaysAllow);
|
|
5854
5855
|
if (!result.found) {
|
|
5855
5856
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5856
5857
|
}
|
|
5857
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5858
|
+
const { getEventStore: getEventStore2 } = await import("./events-EILPWKYE.js");
|
|
5858
5859
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-NZYOXNKK.js");
|
|
5859
|
-
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-
|
|
5860
|
+
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-THDNQDER.js");
|
|
5860
5861
|
const eventStore = getEventStore2();
|
|
5861
5862
|
const events = eventStore.getEvents(sessionId);
|
|
5862
5863
|
const messages = buildMessagesFromStoredEvents2(events);
|
|
@@ -5874,7 +5875,7 @@ async function createServerHandle(config) {
|
|
|
5874
5875
|
if (!callId || !answer) {
|
|
5875
5876
|
return res.status(400).json({ error: "callId and answer are required" });
|
|
5876
5877
|
}
|
|
5877
|
-
const { provideAnswer: provideAnswer2 } = await import("./tools-
|
|
5878
|
+
const { provideAnswer: provideAnswer2 } = await import("./tools-M457R5HW.js");
|
|
5878
5879
|
const found = provideAnswer2(callId, answer);
|
|
5879
5880
|
if (!found) {
|
|
5880
5881
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5910,14 +5911,14 @@ async function createServerHandle(config) {
|
|
|
5910
5911
|
if (!session) {
|
|
5911
5912
|
return res.status(404).json({ error: "Session not found" });
|
|
5912
5913
|
}
|
|
5913
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5914
|
-
const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-
|
|
5914
|
+
const { stopSessionExecution } = await import("./chat-handler-DELWKHRW.js");
|
|
5915
|
+
const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-M457R5HW.js");
|
|
5915
5916
|
stopSessionExecution(sessionId, sessionManager);
|
|
5916
5917
|
abortSession(sessionId);
|
|
5917
5918
|
cancelQuestionsForSession2(sessionId, "Session stopped by user");
|
|
5918
5919
|
cancelPathConfirmationsForSession2(sessionId, "Session stopped by user");
|
|
5919
5920
|
sessionManager.clearMessageQueue(sessionId);
|
|
5920
|
-
const eventStore = (await import("./events-
|
|
5921
|
+
const eventStore = (await import("./events-EILPWKYE.js")).getEventStore();
|
|
5921
5922
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5922
5923
|
res.json({ success: true });
|
|
5923
5924
|
});
|
|
@@ -6359,7 +6360,7 @@ async function createServerHandle(config) {
|
|
|
6359
6360
|
providerManager
|
|
6360
6361
|
);
|
|
6361
6362
|
const wss = wssExports.wss;
|
|
6362
|
-
const { QueueProcessor } = await import("./processor-
|
|
6363
|
+
const { QueueProcessor } = await import("./processor-MS4OX46A.js");
|
|
6363
6364
|
const queueProcessor = new QueueProcessor({
|
|
6364
6365
|
sessionManager,
|
|
6365
6366
|
providerManager,
|
|
@@ -6432,4 +6433,4 @@ export {
|
|
|
6432
6433
|
createServerHandle,
|
|
6433
6434
|
createServer
|
|
6434
6435
|
};
|
|
6435
|
-
//# sourceMappingURL=chunk-
|
|
6436
|
+
//# sourceMappingURL=chunk-2FZLQNUN.js.map
|
|
@@ -154,7 +154,7 @@ async function runCli(options) {
|
|
|
154
154
|
if (!configExists) {
|
|
155
155
|
await runNetworkSetup(mode);
|
|
156
156
|
}
|
|
157
|
-
const { runServe } = await import("./serve-
|
|
157
|
+
const { runServe } = await import("./serve-45IVLLMI.js");
|
|
158
158
|
await runServe({
|
|
159
159
|
mode,
|
|
160
160
|
port: values.port ? parseInt(values.port) : void 0,
|
|
@@ -167,4 +167,4 @@ async function runCli(options) {
|
|
|
167
167
|
export {
|
|
168
168
|
runCli
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-IOSH6XWL.js.map
|
|
@@ -18,14 +18,16 @@ import {
|
|
|
18
18
|
getContextMessages,
|
|
19
19
|
getCurrentContextWindowId,
|
|
20
20
|
getEventStore
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZRDRYL6W.js";
|
|
22
22
|
import {
|
|
23
|
+
createChatDoneMessage,
|
|
23
24
|
createChatMessageMessage,
|
|
25
|
+
createChatMessageUpdatedMessage,
|
|
24
26
|
createChatPathConfirmationMessage,
|
|
25
27
|
createChatToolOutputMessage,
|
|
26
28
|
createChatVisionFallbackMessage,
|
|
27
29
|
createQueueStateMessage
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RALYW2S4.js";
|
|
29
31
|
import {
|
|
30
32
|
AskUserInterrupt,
|
|
31
33
|
askUserTool
|
|
@@ -3401,6 +3403,13 @@ async function executeSubAgent(options) {
|
|
|
3401
3403
|
if (signal?.aborted) {
|
|
3402
3404
|
throw new Error("Aborted");
|
|
3403
3405
|
}
|
|
3406
|
+
await maybeAutoCompactContext({
|
|
3407
|
+
sessionManager,
|
|
3408
|
+
sessionId,
|
|
3409
|
+
llmClient,
|
|
3410
|
+
statsIdentity: resolveCompactionStatsIdentity(llmClient),
|
|
3411
|
+
...signal ? { signal } : {}
|
|
3412
|
+
});
|
|
3404
3413
|
const assistantMsgId = crypto.randomUUID();
|
|
3405
3414
|
eventStore.append(sessionId, createMessageStartEvent(assistantMsgId, "assistant", void 0, {
|
|
3406
3415
|
...currentWindowMessageOptions ?? {},
|
|
@@ -3444,6 +3453,7 @@ async function executeSubAgent(options) {
|
|
|
3444
3453
|
throw new Error("Aborted");
|
|
3445
3454
|
}
|
|
3446
3455
|
turnMetrics.addLLMCall(result.timing, result.usage.promptTokens, result.usage.completionTokens);
|
|
3456
|
+
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens, subAgentId);
|
|
3447
3457
|
finalContent = result.content;
|
|
3448
3458
|
customMessages.push({
|
|
3449
3459
|
role: "assistant",
|
|
@@ -3528,9 +3538,22 @@ async function executeSubAgent(options) {
|
|
|
3528
3538
|
});
|
|
3529
3539
|
if (batchResult.returnValueContent) {
|
|
3530
3540
|
returnValueContent = batchResult.returnValueContent;
|
|
3531
|
-
}
|
|
3532
|
-
if (batchResult.returnValueResult) {
|
|
3533
3541
|
returnValueResult = batchResult.returnValueResult;
|
|
3542
|
+
customMessages = [...customMessages, ...batchResult.toolMessages];
|
|
3543
|
+
const stats = turnMetrics.buildStats(statsIdentity, subAgentType);
|
|
3544
|
+
eventStore.append(sessionId, createMessageDoneEvent(assistantMsgId, {
|
|
3545
|
+
segments: result.segments,
|
|
3546
|
+
stats,
|
|
3547
|
+
promptContext
|
|
3548
|
+
}));
|
|
3549
|
+
if (onMessage) {
|
|
3550
|
+
onMessage(createChatMessageUpdatedMessage(assistantMsgId, { isStreaming: false, stats, promptContext }));
|
|
3551
|
+
}
|
|
3552
|
+
eventStore.append(sessionId, createChatDoneEvent(assistantMsgId, "complete", stats));
|
|
3553
|
+
if (onMessage) {
|
|
3554
|
+
onMessage(createChatDoneMessage(assistantMsgId, "complete", stats));
|
|
3555
|
+
}
|
|
3556
|
+
break;
|
|
3534
3557
|
}
|
|
3535
3558
|
customMessages = [...customMessages, ...batchResult.toolMessages];
|
|
3536
3559
|
session = sessionManager.requireSession(sessionId);
|
|
@@ -3625,7 +3648,7 @@ var callSubAgentTool = {
|
|
|
3625
3648
|
};
|
|
3626
3649
|
}
|
|
3627
3650
|
try {
|
|
3628
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3651
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-M457R5HW.js");
|
|
3629
3652
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3630
3653
|
const turnMetrics = new TurnMetrics();
|
|
3631
3654
|
const result = await executeSubAgent({
|
|
@@ -4693,7 +4716,7 @@ ${COMPACTION_PROMPT}
|
|
|
4693
4716
|
function resolveCompactionStatsIdentity(llmClient, getActiveProvider) {
|
|
4694
4717
|
const provider = getActiveProvider?.();
|
|
4695
4718
|
const model = llmClient.getModel();
|
|
4696
|
-
const backend =
|
|
4719
|
+
const backend = llmClient.getBackend?.() ?? "unknown";
|
|
4697
4720
|
return {
|
|
4698
4721
|
providerId: provider?.id ?? `provider:${model}`,
|
|
4699
4722
|
providerName: provider?.name ?? "Unknown Provider",
|
|
@@ -4758,4 +4781,4 @@ export {
|
|
|
4758
4781
|
getToolRegistryForAgent,
|
|
4759
4782
|
createToolRegistry
|
|
4760
4783
|
};
|
|
4761
|
-
//# sourceMappingURL=chunk-
|
|
4784
|
+
//# sourceMappingURL=chunk-JHGYGSPS.js.map
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JHGYGSPS.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZRDRYL6W.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
23
|
} from "./chunk-WQ4W5H6A.js";
|
|
24
24
|
import {
|
|
25
25
|
createChatMessageMessage
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RALYW2S4.js";
|
|
27
27
|
import {
|
|
28
28
|
logger
|
|
29
29
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
runBuilderTurn,
|
|
312
312
|
runVerifierTurn
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-LL6IJWJ2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServerMessage,
|
|
3
3
|
isClientMessage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G7BJX3NE.js";
|
|
5
5
|
|
|
6
6
|
// src/server/ws/protocol.ts
|
|
7
7
|
function enrichMessagesWithToolResults(messages) {
|
|
@@ -340,4 +340,4 @@ export {
|
|
|
340
340
|
isQueueCancelPayload,
|
|
341
341
|
storedEventToServerMessage
|
|
342
342
|
};
|
|
343
|
-
//# sourceMappingURL=chunk-
|
|
343
|
+
//# sourceMappingURL=chunk-RALYW2S4.js.map
|
|
@@ -970,7 +970,7 @@ function emitContextCompacted(sessionId, closedWindowId, newWindowId, beforeToke
|
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
972
|
}
|
|
973
|
-
function emitContextState(sessionId, currentTokens, maxTokens, compactionCount, dangerZone, canCompact) {
|
|
973
|
+
function emitContextState(sessionId, currentTokens, maxTokens, compactionCount, dangerZone, canCompact, subAgentId) {
|
|
974
974
|
const eventStore = getEventStore();
|
|
975
975
|
eventStore.append(sessionId, {
|
|
976
976
|
type: "context.state",
|
|
@@ -979,7 +979,8 @@ function emitContextState(sessionId, currentTokens, maxTokens, compactionCount,
|
|
|
979
979
|
maxTokens,
|
|
980
980
|
compactionCount,
|
|
981
981
|
dangerZone,
|
|
982
|
-
canCompact
|
|
982
|
+
canCompact,
|
|
983
|
+
...subAgentId !== void 0 && { subAgentId }
|
|
983
984
|
}
|
|
984
985
|
});
|
|
985
986
|
}
|
|
@@ -1143,4 +1144,4 @@ export {
|
|
|
1143
1144
|
compactContext,
|
|
1144
1145
|
getRecentUserPromptsForSession
|
|
1145
1146
|
};
|
|
1146
|
-
//# sourceMappingURL=chunk-
|
|
1147
|
+
//# sourceMappingURL=chunk-ZRDRYL6W.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
isFileInCache,
|
|
37
37
|
isStoredEvent,
|
|
38
38
|
isTurnEvent
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ZRDRYL6W.js";
|
|
40
40
|
import {
|
|
41
41
|
buildContextMessagesFromEventHistory,
|
|
42
42
|
buildContextMessagesFromMessages,
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
isStoredEvent,
|
|
112
112
|
isTurnEvent
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=events-
|
|
114
|
+
//# sourceMappingURL=events-EILPWKYE.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn,
|
|
5
5
|
runVerifierTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LL6IJWJ2.js";
|
|
7
7
|
import {
|
|
8
8
|
TurnMetrics,
|
|
9
9
|
createChatDoneEvent,
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
createMessageStartEvent,
|
|
12
12
|
createToolCallEvent,
|
|
13
13
|
createToolResultEvent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JHGYGSPS.js";
|
|
15
15
|
import "./chunk-NBU6KIOD.js";
|
|
16
16
|
import "./chunk-574HZVLE.js";
|
|
17
17
|
import "./chunk-XFXOSPYH.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-ZRDRYL6W.js";
|
|
19
19
|
import "./chunk-WQ4W5H6A.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-RALYW2S4.js";
|
|
21
21
|
import "./chunk-22CTURMH.js";
|
|
22
22
|
import "./chunk-7IOZFJBW.js";
|
|
23
23
|
import "./chunk-XKFPU2FA.js";
|
|
24
24
|
import "./chunk-3EHGGBWE.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-G7BJX3NE.js";
|
|
26
26
|
import "./chunk-R4HADRYO.js";
|
|
27
27
|
import "./chunk-TVQOONDR.js";
|
|
28
28
|
import "./chunk-PNBH3RAX.js";
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
runChatTurn,
|
|
39
39
|
runVerifierTurn
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=orchestrator-
|
|
41
|
+
//# sourceMappingURL=orchestrator-RUIWZI2U.js.map
|
package/dist/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getEventStore,
|
|
7
7
|
updateSessionMetadata
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZRDRYL6W.js";
|
|
9
9
|
import {
|
|
10
10
|
buildMessagesFromStoredEvents,
|
|
11
11
|
foldPendingConfirmations
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
createContextStateMessage,
|
|
16
16
|
createSessionRunningMessage,
|
|
17
17
|
createSessionStateMessage
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RALYW2S4.js";
|
|
19
19
|
import "./chunk-3EHGGBWE.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-G7BJX3NE.js";
|
|
21
21
|
import "./chunk-TVQOONDR.js";
|
|
22
22
|
import {
|
|
23
23
|
logger
|
|
@@ -188,7 +188,7 @@ var QueueProcessor = class {
|
|
|
188
188
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
189
189
|
model: llmClient.getModel()
|
|
190
190
|
};
|
|
191
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
191
|
+
const { runChatTurn } = await import("./orchestrator-RUIWZI2U.js");
|
|
192
192
|
runChatTurn({
|
|
193
193
|
sessionManager,
|
|
194
194
|
sessionId,
|
|
@@ -233,4 +233,4 @@ var QueueProcessor = class {
|
|
|
233
233
|
export {
|
|
234
234
|
QueueProcessor
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=processor-
|
|
236
|
+
//# sourceMappingURL=processor-MS4OX46A.js.map
|
|
@@ -40,8 +40,8 @@ import {
|
|
|
40
40
|
parseClientMessage,
|
|
41
41
|
serializeServerMessage,
|
|
42
42
|
storedEventToServerMessage
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-RALYW2S4.js";
|
|
44
|
+
import "./chunk-G7BJX3NE.js";
|
|
45
45
|
export {
|
|
46
46
|
createChatAskUserMessage,
|
|
47
47
|
createChatDeltaMessage,
|
|
@@ -85,4 +85,4 @@ export {
|
|
|
85
85
|
serializeServerMessage,
|
|
86
86
|
storedEventToServerMessage
|
|
87
87
|
};
|
|
88
|
-
//# sourceMappingURL=protocol-
|
|
88
|
+
//# sourceMappingURL=protocol-THDNQDER.js.map
|
|
@@ -6,24 +6,24 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
createServer
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2FZLQNUN.js";
|
|
10
10
|
import "./chunk-QDEKU5RL.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-LL6IJWJ2.js";
|
|
12
|
+
import "./chunk-JHGYGSPS.js";
|
|
13
13
|
import "./chunk-NBU6KIOD.js";
|
|
14
14
|
import "./chunk-574HZVLE.js";
|
|
15
15
|
import "./chunk-AE5GO5GZ.js";
|
|
16
16
|
import "./chunk-XCJPBJCE.js";
|
|
17
17
|
import "./chunk-XFXOSPYH.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-ZRDRYL6W.js";
|
|
19
19
|
import "./chunk-WQ4W5H6A.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-RALYW2S4.js";
|
|
21
21
|
import "./chunk-22CTURMH.js";
|
|
22
22
|
import "./chunk-7IOZFJBW.js";
|
|
23
23
|
import "./chunk-XKFPU2FA.js";
|
|
24
24
|
import "./chunk-3EHGGBWE.js";
|
|
25
25
|
import "./chunk-QY7BMXWT.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-G7BJX3NE.js";
|
|
27
27
|
import {
|
|
28
28
|
ensureDataDirExists,
|
|
29
29
|
getDatabasePath,
|
|
@@ -188,4 +188,4 @@ async function runServe(options) {
|
|
|
188
188
|
export {
|
|
189
189
|
runServe
|
|
190
190
|
};
|
|
191
|
-
//# sourceMappingURL=serve-
|
|
191
|
+
//# sourceMappingURL=serve-45IVLLMI.js.map
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aT as ToolCall, c as Attachment, V as Diagnostic, ap as Provider, aa as ModelConfig, aF as Session, aO as SessionSummary, ah as Project, aJ as SessionMode, aL as SessionPhase, M as Message, N as Criterion, P as CriterionStatus, aB as QueuedMessage, H as ContextState, R as DangerLevel$1, aD as ServerMessage, aQ as StatsIdentity, aW as ToolResult, F as Config } from '../protocol-
|
|
1
|
+
import { aT as ToolCall, c as Attachment, V as Diagnostic, ap as Provider, aa as ModelConfig, aF as Session, aO as SessionSummary, ah as Project, aJ as SessionMode, aL as SessionPhase, M as Message, N as Criterion, P as CriterionStatus, aB as QueuedMessage, H as ContextState, R as DangerLevel$1, aD as ServerMessage, aQ as StatsIdentity, aW as ToolResult, F as Config } from '../protocol-CwUrtnZR.js';
|
|
2
2
|
import { Server } from 'node:http';
|
|
3
3
|
|
|
4
4
|
interface LLMMessage {
|
|
@@ -359,7 +359,7 @@ declare class SessionManager {
|
|
|
359
359
|
* Emits a context.state event with the real promptTokens from the LLM.
|
|
360
360
|
* maxTokens comes from providerManager.getCurrentModelContext() - the currently selected model's limit.
|
|
361
361
|
*/
|
|
362
|
-
setCurrentContextSize(sessionId: string, promptTokens: number): void;
|
|
362
|
+
setCurrentContextSize(sessionId: string, promptTokens: number, subAgentId?: string): void;
|
|
363
363
|
/**
|
|
364
364
|
* Set criteria. Delegates to EventStore.
|
|
365
365
|
*/
|
package/dist/server/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2FZLQNUN.js";
|
|
5
5
|
import "../chunk-QDEKU5RL.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-LL6IJWJ2.js";
|
|
7
|
+
import "../chunk-JHGYGSPS.js";
|
|
8
8
|
import "../chunk-NBU6KIOD.js";
|
|
9
9
|
import "../chunk-574HZVLE.js";
|
|
10
10
|
import "../chunk-AE5GO5GZ.js";
|
|
11
11
|
import "../chunk-XCJPBJCE.js";
|
|
12
12
|
import "../chunk-XFXOSPYH.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-ZRDRYL6W.js";
|
|
14
14
|
import "../chunk-WQ4W5H6A.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-RALYW2S4.js";
|
|
16
16
|
import "../chunk-22CTURMH.js";
|
|
17
17
|
import "../chunk-7IOZFJBW.js";
|
|
18
18
|
import "../chunk-XKFPU2FA.js";
|
|
19
19
|
import "../chunk-3EHGGBWE.js";
|
|
20
20
|
import "../chunk-QY7BMXWT.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-G7BJX3NE.js";
|
|
22
22
|
import "../chunk-R4HADRYO.js";
|
|
23
23
|
import "../chunk-TVQOONDR.js";
|
|
24
24
|
import "../chunk-T3CIBJDW.js";
|