@dexto/core 1.5.2 → 1.5.4
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/agent/DextoAgent.cjs +296 -2
- package/dist/agent/DextoAgent.d.ts +114 -0
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +287 -2
- package/dist/agent/schemas.d.ts +93 -21
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/approval/manager.cjs +16 -0
- package/dist/approval/manager.d.ts +10 -0
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +16 -0
- package/dist/approval/types.d.ts +11 -0
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/context/compaction/overflow.cjs +6 -10
- package/dist/context/compaction/overflow.d.ts +14 -11
- package/dist/context/compaction/overflow.d.ts.map +1 -1
- package/dist/context/compaction/overflow.js +6 -10
- package/dist/context/compaction/providers/reactive-overflow-provider.cjs +15 -0
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts +15 -0
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts.map +1 -1
- package/dist/context/compaction/providers/reactive-overflow-provider.js +15 -0
- package/dist/context/compaction/schemas.cjs +22 -2
- package/dist/context/compaction/schemas.d.ts +45 -0
- package/dist/context/compaction/schemas.d.ts.map +1 -1
- package/dist/context/compaction/schemas.js +22 -2
- package/dist/context/compaction/strategies/reactive-overflow.cjs +166 -26
- package/dist/context/compaction/strategies/reactive-overflow.d.ts +21 -0
- package/dist/context/compaction/strategies/reactive-overflow.d.ts.map +1 -1
- package/dist/context/compaction/strategies/reactive-overflow.js +166 -26
- package/dist/context/manager.cjs +278 -31
- package/dist/context/manager.d.ts +192 -5
- package/dist/context/manager.d.ts.map +1 -1
- package/dist/context/manager.js +285 -32
- package/dist/context/types.d.ts +6 -0
- package/dist/context/types.d.ts.map +1 -1
- package/dist/context/utils.cjs +77 -11
- package/dist/context/utils.d.ts +86 -8
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/context/utils.js +71 -11
- package/dist/events/index.cjs +7 -1
- package/dist/events/index.d.ts +58 -7
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +7 -1
- package/dist/filesystem/filesystem-service.cjs +18 -15
- package/dist/filesystem/filesystem-service.d.ts +3 -3
- package/dist/filesystem/filesystem-service.d.ts.map +1 -1
- package/dist/filesystem/filesystem-service.js +18 -15
- package/dist/filesystem/path-validator.cjs +16 -7
- package/dist/filesystem/path-validator.d.ts +10 -3
- package/dist/filesystem/path-validator.d.ts.map +1 -1
- package/dist/filesystem/path-validator.js +16 -7
- package/dist/filesystem/types.d.ts +4 -0
- package/dist/filesystem/types.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.cjs +19 -1
- package/dist/llm/executor/stream-processor.d.ts +3 -0
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +19 -1
- package/dist/llm/executor/turn-executor.cjs +219 -30
- package/dist/llm/executor/turn-executor.d.ts +62 -10
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +219 -30
- package/dist/llm/executor/types.d.ts +28 -0
- package/dist/llm/executor/types.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.cjs +36 -28
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +36 -28
- package/dist/llm/services/factory.cjs +3 -2
- package/dist/llm/services/factory.d.ts +3 -1
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +3 -2
- package/dist/llm/services/vercel.cjs +34 -6
- package/dist/llm/services/vercel.d.ts +23 -3
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +34 -6
- package/dist/logger/v2/schemas.cjs +4 -0
- package/dist/logger/v2/schemas.d.ts +16 -0
- package/dist/logger/v2/schemas.d.ts.map +1 -1
- package/dist/logger/v2/schemas.js +4 -0
- package/dist/logger/v2/transport-factory.cjs +4 -1
- package/dist/logger/v2/transport-factory.d.ts.map +1 -1
- package/dist/logger/v2/transport-factory.js +4 -1
- package/dist/logger/v2/transports/silent-transport.cjs +33 -0
- package/dist/logger/v2/transports/silent-transport.d.ts +15 -0
- package/dist/logger/v2/transports/silent-transport.d.ts.map +1 -0
- package/dist/logger/v2/transports/silent-transport.js +10 -0
- package/dist/session/chat-session.cjs +20 -11
- package/dist/session/chat-session.d.ts +9 -4
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +20 -11
- package/dist/session/compaction-service.cjs +139 -0
- package/dist/session/compaction-service.d.ts +81 -0
- package/dist/session/compaction-service.d.ts.map +1 -0
- package/dist/session/compaction-service.js +106 -0
- package/dist/session/session-manager.cjs +146 -0
- package/dist/session/session-manager.d.ts +50 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +146 -0
- package/dist/session/title-generator.cjs +2 -2
- package/dist/session/title-generator.js +2 -2
- package/dist/systemPrompt/in-built-prompts.cjs +36 -0
- package/dist/systemPrompt/in-built-prompts.d.ts +18 -1
- package/dist/systemPrompt/in-built-prompts.d.ts.map +1 -1
- package/dist/systemPrompt/in-built-prompts.js +25 -0
- package/dist/systemPrompt/manager.cjs +22 -0
- package/dist/systemPrompt/manager.d.ts +10 -0
- package/dist/systemPrompt/manager.d.ts.map +1 -1
- package/dist/systemPrompt/manager.js +22 -0
- package/dist/systemPrompt/registry.cjs +2 -1
- package/dist/systemPrompt/registry.d.ts +1 -1
- package/dist/systemPrompt/registry.d.ts.map +1 -1
- package/dist/systemPrompt/registry.js +2 -1
- package/dist/systemPrompt/schemas.cjs +7 -0
- package/dist/systemPrompt/schemas.d.ts +13 -13
- package/dist/systemPrompt/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.js +7 -0
- package/dist/tools/error-codes.cjs +1 -0
- package/dist/tools/error-codes.d.ts +1 -0
- package/dist/tools/error-codes.d.ts.map +1 -1
- package/dist/tools/error-codes.js +1 -0
- package/dist/tools/errors.cjs +17 -0
- package/dist/tools/errors.d.ts +9 -0
- package/dist/tools/errors.d.ts.map +1 -1
- package/dist/tools/errors.js +17 -0
- package/dist/tools/internal-tools/provider.cjs +3 -2
- package/dist/tools/internal-tools/provider.d.ts +1 -1
- package/dist/tools/internal-tools/provider.d.ts.map +1 -1
- package/dist/tools/internal-tools/provider.js +3 -2
- package/dist/tools/tool-manager.cjs +77 -4
- package/dist/tools/tool-manager.d.ts +18 -0
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +78 -5
- package/dist/tools/types.d.ts +5 -3
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/index.cjs +3 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
8
9
|
var __typeError = (msg) => {
|
|
@@ -22,6 +23,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
22
23
|
}
|
|
23
24
|
return to;
|
|
24
25
|
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
29
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
+
mod
|
|
33
|
+
));
|
|
25
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
35
|
var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
|
|
27
36
|
var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
|
|
@@ -454,7 +463,10 @@ Either:
|
|
|
454
463
|
llmConfig.model
|
|
455
464
|
);
|
|
456
465
|
}
|
|
457
|
-
const
|
|
466
|
+
const responseEvents = events.filter(
|
|
467
|
+
(e) => e.name === "llm:response"
|
|
468
|
+
);
|
|
469
|
+
const responseEvent = responseEvents[responseEvents.length - 1];
|
|
458
470
|
if (!responseEvent || responseEvent.name !== "llm:response") {
|
|
459
471
|
const llmConfig = this.stateManager.getLLMConfig(sessionId);
|
|
460
472
|
throw import_errors.LLMError.generationFailed(
|
|
@@ -638,6 +650,30 @@ Either:
|
|
|
638
650
|
signal: cleanupSignal
|
|
639
651
|
});
|
|
640
652
|
listeners.push({ event: "tool:running", listener: toolRunningListener });
|
|
653
|
+
const contextCompactingListener = (data) => {
|
|
654
|
+
if (data.sessionId !== sessionId) return;
|
|
655
|
+
eventQueue.push({ name: "context:compacting", ...data });
|
|
656
|
+
};
|
|
657
|
+
this.agentEventBus.on("context:compacting", contextCompactingListener, {
|
|
658
|
+
signal: cleanupSignal
|
|
659
|
+
});
|
|
660
|
+
listeners.push({ event: "context:compacting", listener: contextCompactingListener });
|
|
661
|
+
const contextCompactedListener = (data) => {
|
|
662
|
+
if (data.sessionId !== sessionId) return;
|
|
663
|
+
eventQueue.push({ name: "context:compacted", ...data });
|
|
664
|
+
};
|
|
665
|
+
this.agentEventBus.on("context:compacted", contextCompactedListener, {
|
|
666
|
+
signal: cleanupSignal
|
|
667
|
+
});
|
|
668
|
+
listeners.push({ event: "context:compacted", listener: contextCompactedListener });
|
|
669
|
+
const sessionContinuedListener = (data) => {
|
|
670
|
+
if (data.previousSessionId !== sessionId) return;
|
|
671
|
+
eventQueue.push({ name: "session:continued", ...data });
|
|
672
|
+
};
|
|
673
|
+
this.agentEventBus.on("session:continued", sessionContinuedListener, {
|
|
674
|
+
signal: cleanupSignal
|
|
675
|
+
});
|
|
676
|
+
listeners.push({ event: "session:continued", listener: sessionContinuedListener });
|
|
641
677
|
const messageQueuedListener = (data) => {
|
|
642
678
|
if (data.sessionId !== sessionId) return;
|
|
643
679
|
eventQueue.push({ name: "message:queued", ...data });
|
|
@@ -654,6 +690,14 @@ Either:
|
|
|
654
690
|
signal: cleanupSignal
|
|
655
691
|
});
|
|
656
692
|
listeners.push({ event: "message:dequeued", listener: messageDequeuedListener });
|
|
693
|
+
const serviceEventListener = (data) => {
|
|
694
|
+
if (data.sessionId !== sessionId) return;
|
|
695
|
+
eventQueue.push({ name: "service:event", ...data });
|
|
696
|
+
};
|
|
697
|
+
this.agentEventBus.on("service:event", serviceEventListener, {
|
|
698
|
+
signal: cleanupSignal
|
|
699
|
+
});
|
|
700
|
+
listeners.push({ event: "service:event", listener: serviceEventListener });
|
|
657
701
|
const runCompleteListener = (data) => {
|
|
658
702
|
if (data.sessionId !== sessionId) return;
|
|
659
703
|
eventQueue.push({ name: "run:complete", ...data });
|
|
@@ -789,12 +833,18 @@ Either:
|
|
|
789
833
|
contentParts = [{ type: "text", text: textContent }];
|
|
790
834
|
}
|
|
791
835
|
const session = await this.sessionManager.getSession(sessionId) || await this.sessionManager.createSession(sessionId);
|
|
792
|
-
await session.stream(
|
|
836
|
+
const streamResult = await session.stream(
|
|
837
|
+
contentParts,
|
|
838
|
+
signal ? { signal } : void 0
|
|
839
|
+
);
|
|
793
840
|
this.sessionManager.incrementMessageCount(session.id).catch(
|
|
794
841
|
(error) => this.logger.warn(
|
|
795
842
|
`Failed to increment message count: ${error instanceof Error ? error.message : String(error)}`
|
|
796
843
|
)
|
|
797
844
|
);
|
|
845
|
+
if (streamResult.didCompact && streamResult.compaction) {
|
|
846
|
+
await this.handleSessionContinuation(session, streamResult.compaction);
|
|
847
|
+
}
|
|
798
848
|
} catch (err) {
|
|
799
849
|
const error = err instanceof import_DextoRuntimeError.DextoRuntimeError || err instanceof import_DextoValidationError.DextoValidationError ? err : err instanceof Error ? err : import_errors2.AgentError.streamFailed(String(err));
|
|
800
850
|
completed = true;
|
|
@@ -1168,6 +1218,173 @@ Either:
|
|
|
1168
1218
|
sessionId
|
|
1169
1219
|
});
|
|
1170
1220
|
}
|
|
1221
|
+
/**
|
|
1222
|
+
* Manually compact the context using session-native compaction.
|
|
1223
|
+
*
|
|
1224
|
+
* Session-native compaction creates a NEW session with the summary as initial context,
|
|
1225
|
+
* providing clean session isolation while maintaining traceability via linking.
|
|
1226
|
+
*
|
|
1227
|
+
* The old session is marked as compacted with `continuedTo` pointing to the new session,
|
|
1228
|
+
* and the new session has `continuedFrom` pointing back to the old session.
|
|
1229
|
+
*
|
|
1230
|
+
* @param sessionId Session ID of the session to compact (required)
|
|
1231
|
+
* @returns Compaction result with new session info, or null if compaction was skipped
|
|
1232
|
+
*/
|
|
1233
|
+
async compactContext(sessionId) {
|
|
1234
|
+
this.ensureStarted();
|
|
1235
|
+
if (!sessionId || typeof sessionId !== "string") {
|
|
1236
|
+
throw import_errors2.AgentError.apiValidationError(
|
|
1237
|
+
"sessionId is required and must be a non-empty string"
|
|
1238
|
+
);
|
|
1239
|
+
}
|
|
1240
|
+
const session = await this.sessionManager.getSession(sessionId);
|
|
1241
|
+
if (!session) {
|
|
1242
|
+
throw import_session.SessionError.notFound(sessionId);
|
|
1243
|
+
}
|
|
1244
|
+
const llmService = session.getLLMService();
|
|
1245
|
+
const compactionStrategy = llmService.getCompactionStrategy();
|
|
1246
|
+
if (!compactionStrategy) {
|
|
1247
|
+
this.logger.warn(
|
|
1248
|
+
`Compaction strategy not configured for session ${sessionId} - skipping manual compaction`
|
|
1249
|
+
);
|
|
1250
|
+
return null;
|
|
1251
|
+
}
|
|
1252
|
+
const { SessionCompactionService } = await import("../session/compaction-service.js");
|
|
1253
|
+
const compactionService = new SessionCompactionService(
|
|
1254
|
+
this.sessionManager,
|
|
1255
|
+
compactionStrategy,
|
|
1256
|
+
this.logger
|
|
1257
|
+
);
|
|
1258
|
+
const compactionResult = await compactionService.compact(session, {
|
|
1259
|
+
reason: "manual",
|
|
1260
|
+
eventBus: this.agentEventBus
|
|
1261
|
+
});
|
|
1262
|
+
if (!compactionResult) {
|
|
1263
|
+
this.logger.debug(`Compaction skipped for session ${sessionId} - nothing to compact`);
|
|
1264
|
+
return null;
|
|
1265
|
+
}
|
|
1266
|
+
this.logger.info(
|
|
1267
|
+
`Session-native compaction complete: ${sessionId} \u2192 ${compactionResult.newSessionId}, ${compactionResult.originalMessages} messages \u2192 ~${compactionResult.summaryTokens} token summary`
|
|
1268
|
+
);
|
|
1269
|
+
return {
|
|
1270
|
+
previousSessionId: compactionResult.previousSessionId,
|
|
1271
|
+
newSessionId: compactionResult.newSessionId,
|
|
1272
|
+
summaryTokens: compactionResult.summaryTokens,
|
|
1273
|
+
originalMessages: compactionResult.originalMessages
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Get the chain of linked sessions (ancestors and descendants) for a session.
|
|
1278
|
+
* Useful for displaying session history and understanding compaction lineage.
|
|
1279
|
+
*
|
|
1280
|
+
* @param sessionId Any session ID in the chain
|
|
1281
|
+
* @returns Array of session data in the chain, ordered chronologically (oldest first)
|
|
1282
|
+
*/
|
|
1283
|
+
async getSessionLineage(sessionId) {
|
|
1284
|
+
this.ensureStarted();
|
|
1285
|
+
if (!sessionId || typeof sessionId !== "string") {
|
|
1286
|
+
throw import_errors2.AgentError.apiValidationError(
|
|
1287
|
+
"sessionId is required and must be a non-empty string"
|
|
1288
|
+
);
|
|
1289
|
+
}
|
|
1290
|
+
const chain = await this.sessionManager.getSessionChain(sessionId);
|
|
1291
|
+
if (chain.length === 0) {
|
|
1292
|
+
throw import_session.SessionError.notFound(sessionId);
|
|
1293
|
+
}
|
|
1294
|
+
const currentIndex = chain.findIndex((s) => s.id === sessionId);
|
|
1295
|
+
if (currentIndex < 0) {
|
|
1296
|
+
throw import_session.SessionError.notFound(sessionId);
|
|
1297
|
+
}
|
|
1298
|
+
return {
|
|
1299
|
+
chain: chain.map((s) => {
|
|
1300
|
+
const item = {
|
|
1301
|
+
id: s.id,
|
|
1302
|
+
createdAt: s.createdAt
|
|
1303
|
+
};
|
|
1304
|
+
if (s.continuedFrom !== void 0) {
|
|
1305
|
+
item.continuedFrom = s.continuedFrom;
|
|
1306
|
+
}
|
|
1307
|
+
if (s.continuedTo !== void 0) {
|
|
1308
|
+
item.continuedTo = s.continuedTo;
|
|
1309
|
+
}
|
|
1310
|
+
if (s.compactedAt !== void 0) {
|
|
1311
|
+
item.compactedAt = s.compactedAt;
|
|
1312
|
+
}
|
|
1313
|
+
return item;
|
|
1314
|
+
}),
|
|
1315
|
+
currentIndex
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Get context usage statistics for a session.
|
|
1320
|
+
* Useful for monitoring context window usage and compaction status.
|
|
1321
|
+
*
|
|
1322
|
+
* @param sessionId Session ID (required)
|
|
1323
|
+
* @returns Context statistics including token estimates and message counts
|
|
1324
|
+
*/
|
|
1325
|
+
async getContextStats(sessionId) {
|
|
1326
|
+
this.ensureStarted();
|
|
1327
|
+
if (!sessionId || typeof sessionId !== "string") {
|
|
1328
|
+
throw import_errors2.AgentError.apiValidationError(
|
|
1329
|
+
"sessionId is required and must be a non-empty string"
|
|
1330
|
+
);
|
|
1331
|
+
}
|
|
1332
|
+
const session = await this.sessionManager.getSession(sessionId);
|
|
1333
|
+
if (!session) {
|
|
1334
|
+
throw import_session.SessionError.notFound(sessionId);
|
|
1335
|
+
}
|
|
1336
|
+
const contextManager = session.getContextManager();
|
|
1337
|
+
const contributorContext = { mcpManager: this.mcpManager };
|
|
1338
|
+
const llmService = session.getLLMService();
|
|
1339
|
+
const tools = await llmService.getAllTools();
|
|
1340
|
+
const tokenEstimate = await contextManager.getContextTokenEstimate(
|
|
1341
|
+
contributorContext,
|
|
1342
|
+
tools
|
|
1343
|
+
);
|
|
1344
|
+
const history = await contextManager.getHistory();
|
|
1345
|
+
const runtimeConfig = this.stateManager.getRuntimeConfig(sessionId);
|
|
1346
|
+
const compactionConfig = runtimeConfig.compaction;
|
|
1347
|
+
const modelContextWindow = contextManager.getMaxInputTokens();
|
|
1348
|
+
let maxContextTokens = modelContextWindow;
|
|
1349
|
+
if (compactionConfig?.maxContextTokens !== void 0) {
|
|
1350
|
+
maxContextTokens = Math.min(maxContextTokens, compactionConfig.maxContextTokens);
|
|
1351
|
+
}
|
|
1352
|
+
const thresholdPercent = compactionConfig?.thresholdPercent ?? 0.9;
|
|
1353
|
+
if (thresholdPercent < 1) {
|
|
1354
|
+
maxContextTokens = Math.floor(maxContextTokens * thresholdPercent);
|
|
1355
|
+
}
|
|
1356
|
+
const hasSummary = history.some(
|
|
1357
|
+
(msg) => msg.metadata?.isSummary === true || msg.metadata?.isSessionSummary === true
|
|
1358
|
+
);
|
|
1359
|
+
const llmConfig = runtimeConfig.llm;
|
|
1360
|
+
const { getModelDisplayName } = await import("../llm/registry.js");
|
|
1361
|
+
const modelDisplayName = getModelDisplayName(llmConfig.model, llmConfig.provider);
|
|
1362
|
+
const estimatedTokens = tokenEstimate.estimated;
|
|
1363
|
+
const compactionCount = await this.sessionManager.getCompactionCount(sessionId);
|
|
1364
|
+
return {
|
|
1365
|
+
estimatedTokens,
|
|
1366
|
+
actualTokens: tokenEstimate.actual,
|
|
1367
|
+
maxContextTokens,
|
|
1368
|
+
modelContextWindow,
|
|
1369
|
+
thresholdPercent,
|
|
1370
|
+
usagePercent: maxContextTokens > 0 ? Math.round(estimatedTokens / maxContextTokens * 100) : 0,
|
|
1371
|
+
messageCount: tokenEstimate.stats.originalMessageCount,
|
|
1372
|
+
filteredMessageCount: tokenEstimate.stats.filteredMessageCount,
|
|
1373
|
+
prunedToolCount: tokenEstimate.stats.prunedToolCount,
|
|
1374
|
+
hasSummary,
|
|
1375
|
+
compactionCount,
|
|
1376
|
+
model: llmConfig.model,
|
|
1377
|
+
modelDisplayName,
|
|
1378
|
+
breakdown: {
|
|
1379
|
+
systemPrompt: tokenEstimate.breakdown.systemPrompt,
|
|
1380
|
+
tools: tokenEstimate.breakdown.tools,
|
|
1381
|
+
messages: tokenEstimate.breakdown.messages
|
|
1382
|
+
},
|
|
1383
|
+
...tokenEstimate.calculationBasis && {
|
|
1384
|
+
calculationBasis: tokenEstimate.calculationBasis
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1171
1388
|
// ============= LLM MANAGEMENT =============
|
|
1172
1389
|
/**
|
|
1173
1390
|
* Gets the current LLM configuration with all defaults applied.
|
|
@@ -1243,6 +1460,83 @@ Either:
|
|
|
1243
1460
|
}
|
|
1244
1461
|
return validatedConfig;
|
|
1245
1462
|
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Handles session-native continuation after compaction.
|
|
1465
|
+
*
|
|
1466
|
+
* When context compaction occurs, this method:
|
|
1467
|
+
* 1. Receives compaction data directly (summary text + preserved messages)
|
|
1468
|
+
* 2. Creates a new continuation session
|
|
1469
|
+
* 3. Adds the summary as the first message in the new session
|
|
1470
|
+
* 4. Adds preserved messages to the new session
|
|
1471
|
+
* 5. Links the old and new sessions for traceability
|
|
1472
|
+
* 6. Emits session:continued event for UI to handle session switch
|
|
1473
|
+
*
|
|
1474
|
+
* IMPORTANT: The original session is NOT modified. The summary was never added to it.
|
|
1475
|
+
* This is the clean session-native compaction approach where:
|
|
1476
|
+
* - Original session: UNCHANGED (full history preserved)
|
|
1477
|
+
* - New session: [summary, ...preservedMessages]
|
|
1478
|
+
*
|
|
1479
|
+
* @param currentSession The session that triggered compaction
|
|
1480
|
+
* @param compactionData The compaction data with summary text and preserved messages
|
|
1481
|
+
*/
|
|
1482
|
+
async handleSessionContinuation(currentSession, compactionData) {
|
|
1483
|
+
const currentSessionId = currentSession.id;
|
|
1484
|
+
try {
|
|
1485
|
+
const { summaryText, preservedMessages, summarizedCount } = compactionData;
|
|
1486
|
+
if (!summaryText) {
|
|
1487
|
+
this.logger.warn(
|
|
1488
|
+
`Session continuation skipped: empty summary text for session ${currentSessionId}`
|
|
1489
|
+
);
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
const { sessionId: newSessionId, session: newSession } = await this.sessionManager.createContinuationSession(currentSessionId);
|
|
1493
|
+
const sessionSummaryMessage = {
|
|
1494
|
+
role: "assistant",
|
|
1495
|
+
content: [{ type: "text", text: summaryText }],
|
|
1496
|
+
timestamp: Date.now(),
|
|
1497
|
+
metadata: {
|
|
1498
|
+
isSessionSummary: true,
|
|
1499
|
+
continuedFrom: currentSessionId,
|
|
1500
|
+
summarizedAt: Date.now(),
|
|
1501
|
+
originalMessageCount: summarizedCount,
|
|
1502
|
+
originalFirstTimestamp: compactionData.originalFirstTimestamp,
|
|
1503
|
+
originalLastTimestamp: compactionData.originalLastTimestamp
|
|
1504
|
+
}
|
|
1505
|
+
};
|
|
1506
|
+
const newContextManager = newSession.getContextManager();
|
|
1507
|
+
await newContextManager.addMessage(sessionSummaryMessage);
|
|
1508
|
+
for (const msg of preservedMessages) {
|
|
1509
|
+
await newContextManager.addMessage(msg);
|
|
1510
|
+
}
|
|
1511
|
+
await this.sessionManager.markSessionCompacted(currentSessionId, newSessionId);
|
|
1512
|
+
const { estimateMessagesTokens } = await import("../context/utils.js");
|
|
1513
|
+
const summaryTokens = estimateMessagesTokens([sessionSummaryMessage]);
|
|
1514
|
+
const totalOriginalMessages = summarizedCount + preservedMessages.length;
|
|
1515
|
+
const newSessionLLMConfig = this.stateManager.getRuntimeConfig(newSessionId).llm;
|
|
1516
|
+
const { getModelDisplayName } = await import("../llm/registry.js");
|
|
1517
|
+
const modelDisplayName = getModelDisplayName(
|
|
1518
|
+
newSessionLLMConfig.model,
|
|
1519
|
+
newSessionLLMConfig.provider
|
|
1520
|
+
);
|
|
1521
|
+
this.logger.info(
|
|
1522
|
+
`Session continuation: ${currentSessionId} \u2192 ${newSessionId} (${totalOriginalMessages} messages \u2192 summary + ${preservedMessages.length} preserved)`
|
|
1523
|
+
);
|
|
1524
|
+
this.agentEventBus.emit("session:continued", {
|
|
1525
|
+
previousSessionId: currentSessionId,
|
|
1526
|
+
newSessionId,
|
|
1527
|
+
summaryTokens,
|
|
1528
|
+
originalMessages: totalOriginalMessages,
|
|
1529
|
+
reason: "overflow",
|
|
1530
|
+
sessionId: newSessionId,
|
|
1531
|
+
model: newSessionLLMConfig.model,
|
|
1532
|
+
modelDisplayName
|
|
1533
|
+
});
|
|
1534
|
+
} catch (error) {
|
|
1535
|
+
this.logger.error(
|
|
1536
|
+
`Failed to handle session continuation for ${currentSessionId}: ${error instanceof Error ? error.message : String(error)}`
|
|
1537
|
+
);
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1246
1540
|
/**
|
|
1247
1541
|
* Performs the actual LLM switch with a validated configuration.
|
|
1248
1542
|
* This is a helper method that handles state management and session switching.
|
|
@@ -377,6 +377,100 @@ export declare class DextoAgent {
|
|
|
377
377
|
* @param sessionId Session ID (required)
|
|
378
378
|
*/
|
|
379
379
|
clearContext(sessionId: string): Promise<void>;
|
|
380
|
+
/**
|
|
381
|
+
* Manually compact the context using session-native compaction.
|
|
382
|
+
*
|
|
383
|
+
* Session-native compaction creates a NEW session with the summary as initial context,
|
|
384
|
+
* providing clean session isolation while maintaining traceability via linking.
|
|
385
|
+
*
|
|
386
|
+
* The old session is marked as compacted with `continuedTo` pointing to the new session,
|
|
387
|
+
* and the new session has `continuedFrom` pointing back to the old session.
|
|
388
|
+
*
|
|
389
|
+
* @param sessionId Session ID of the session to compact (required)
|
|
390
|
+
* @returns Compaction result with new session info, or null if compaction was skipped
|
|
391
|
+
*/
|
|
392
|
+
compactContext(sessionId: string): Promise<{
|
|
393
|
+
/** The session that was compacted */
|
|
394
|
+
previousSessionId: string;
|
|
395
|
+
/** The new session created for continuation */
|
|
396
|
+
newSessionId: string;
|
|
397
|
+
/** Estimated tokens in the summary */
|
|
398
|
+
summaryTokens: number;
|
|
399
|
+
/** Number of messages that were summarized */
|
|
400
|
+
originalMessages: number;
|
|
401
|
+
} | null>;
|
|
402
|
+
/**
|
|
403
|
+
* Get the chain of linked sessions (ancestors and descendants) for a session.
|
|
404
|
+
* Useful for displaying session history and understanding compaction lineage.
|
|
405
|
+
*
|
|
406
|
+
* @param sessionId Any session ID in the chain
|
|
407
|
+
* @returns Array of session data in the chain, ordered chronologically (oldest first)
|
|
408
|
+
*/
|
|
409
|
+
getSessionLineage(sessionId: string): Promise<{
|
|
410
|
+
/** All sessions in the chain, ordered chronologically */
|
|
411
|
+
chain: Array<{
|
|
412
|
+
id: string;
|
|
413
|
+
createdAt: number;
|
|
414
|
+
continuedFrom?: string;
|
|
415
|
+
continuedTo?: string;
|
|
416
|
+
compactedAt?: number;
|
|
417
|
+
}>;
|
|
418
|
+
/** Index of the requested session in the chain */
|
|
419
|
+
currentIndex: number;
|
|
420
|
+
}>;
|
|
421
|
+
/**
|
|
422
|
+
* Get context usage statistics for a session.
|
|
423
|
+
* Useful for monitoring context window usage and compaction status.
|
|
424
|
+
*
|
|
425
|
+
* @param sessionId Session ID (required)
|
|
426
|
+
* @returns Context statistics including token estimates and message counts
|
|
427
|
+
*/
|
|
428
|
+
getContextStats(sessionId: string): Promise<{
|
|
429
|
+
estimatedTokens: number;
|
|
430
|
+
/** Last actual token count from LLM API (null if no calls made yet) */
|
|
431
|
+
actualTokens: number | null;
|
|
432
|
+
/** Effective max context tokens (after applying maxContextTokens override and thresholdPercent) */
|
|
433
|
+
maxContextTokens: number;
|
|
434
|
+
/** The model's raw context window before any config overrides */
|
|
435
|
+
modelContextWindow: number;
|
|
436
|
+
/** Configured threshold percent (0.0-1.0), defaults to 1.0 */
|
|
437
|
+
thresholdPercent: number;
|
|
438
|
+
usagePercent: number;
|
|
439
|
+
messageCount: number;
|
|
440
|
+
filteredMessageCount: number;
|
|
441
|
+
prunedToolCount: number;
|
|
442
|
+
hasSummary: boolean;
|
|
443
|
+
/** Number of times this session chain has been compacted */
|
|
444
|
+
compactionCount: number;
|
|
445
|
+
/** Current model identifier */
|
|
446
|
+
model: string;
|
|
447
|
+
/** Display name for the model */
|
|
448
|
+
modelDisplayName: string;
|
|
449
|
+
/** Detailed breakdown of context usage by category */
|
|
450
|
+
breakdown: {
|
|
451
|
+
systemPrompt: number;
|
|
452
|
+
tools: {
|
|
453
|
+
total: number;
|
|
454
|
+
/** Per-tool token estimates */
|
|
455
|
+
perTool: Array<{
|
|
456
|
+
name: string;
|
|
457
|
+
tokens: number;
|
|
458
|
+
}>;
|
|
459
|
+
};
|
|
460
|
+
messages: number;
|
|
461
|
+
};
|
|
462
|
+
/** Calculation basis showing how the estimate was computed */
|
|
463
|
+
calculationBasis?: {
|
|
464
|
+
/** 'actuals' = used lastInput + lastOutput + newEstimate, 'estimate' = pure estimation */
|
|
465
|
+
method: 'actuals' | 'estimate';
|
|
466
|
+
/** Last actual input tokens from API (if method is 'actuals') */
|
|
467
|
+
lastInputTokens?: number;
|
|
468
|
+
/** Last actual output tokens from API (if method is 'actuals') */
|
|
469
|
+
lastOutputTokens?: number;
|
|
470
|
+
/** Estimated tokens for new messages since last call (if method is 'actuals') */
|
|
471
|
+
newMessagesEstimate?: number;
|
|
472
|
+
};
|
|
473
|
+
}>;
|
|
380
474
|
/**
|
|
381
475
|
* Gets the current LLM configuration with all defaults applied.
|
|
382
476
|
* @returns Current LLM configuration
|
|
@@ -420,6 +514,26 @@ export declare class DextoAgent {
|
|
|
420
514
|
* ```
|
|
421
515
|
*/
|
|
422
516
|
switchLLM(llmUpdates: LLMUpdates, sessionId?: string): Promise<ValidatedLLMConfig>;
|
|
517
|
+
/**
|
|
518
|
+
* Handles session-native continuation after compaction.
|
|
519
|
+
*
|
|
520
|
+
* When context compaction occurs, this method:
|
|
521
|
+
* 1. Receives compaction data directly (summary text + preserved messages)
|
|
522
|
+
* 2. Creates a new continuation session
|
|
523
|
+
* 3. Adds the summary as the first message in the new session
|
|
524
|
+
* 4. Adds preserved messages to the new session
|
|
525
|
+
* 5. Links the old and new sessions for traceability
|
|
526
|
+
* 6. Emits session:continued event for UI to handle session switch
|
|
527
|
+
*
|
|
528
|
+
* IMPORTANT: The original session is NOT modified. The summary was never added to it.
|
|
529
|
+
* This is the clean session-native compaction approach where:
|
|
530
|
+
* - Original session: UNCHANGED (full history preserved)
|
|
531
|
+
* - New session: [summary, ...preservedMessages]
|
|
532
|
+
*
|
|
533
|
+
* @param currentSession The session that triggered compaction
|
|
534
|
+
* @param compactionData The compaction data with summary text and preserved messages
|
|
535
|
+
*/
|
|
536
|
+
private handleSessionContinuation;
|
|
423
537
|
/**
|
|
424
538
|
* Performs the actual LLM switch with a validated configuration.
|
|
425
539
|
* This is a helper method that handles state management and session switching.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DextoAgent.d.ts","sourceRoot":"","sources":["../../src/agent/DextoAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,eAAe,EAA2B,MAAM,uBAAuB,CAAC;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,M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