@myagentroam/agent 0.12.3 → 0.12.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.
|
@@ -11,6 +11,8 @@ export interface ExtensionCompactMessage {
|
|
|
11
11
|
export interface ExtensionCompactContext {
|
|
12
12
|
readonly reportModelUsage?: ((usage: import('../model/usage-observer.js').ModelRequestUsage) => Promise<void> | void) | undefined;
|
|
13
13
|
readonly operationId: string;
|
|
14
|
+
/** Actual execution model configuration ID, not the session default or summary model. */
|
|
15
|
+
readonly modelId?: string;
|
|
14
16
|
readonly reason: 'manual' | 'automatic';
|
|
15
17
|
readonly messages: readonly ExtensionCompactMessage[];
|
|
16
18
|
readonly focus?: string;
|
|
@@ -4,6 +4,7 @@ import type { CompactionOperation } from '../runtime/compaction/operation.js';
|
|
|
4
4
|
import type { ModelRequestUsage } from '../model/usage-observer.js';
|
|
5
5
|
/** Bounds Extension diagnostics and validates its candidate before native fallback. */
|
|
6
6
|
export declare function createExecutionCompactExtension(ports: {
|
|
7
|
+
readonly modelId: string;
|
|
7
8
|
readonly contextWindowTokens: number;
|
|
8
9
|
readonly maxOutputTokens: number;
|
|
9
10
|
hasInterceptor(): boolean;
|
|
@@ -10,6 +10,7 @@ export function createExecutionCompactExtension(ports) {
|
|
|
10
10
|
let acceptsDiagnostics = true;
|
|
11
11
|
try {
|
|
12
12
|
const result = await compaction.generate((signal) => ports.invoke(Object.freeze({
|
|
13
|
+
modelId: ports.modelId,
|
|
13
14
|
reason,
|
|
14
15
|
messages: compactExtensionMessages(history),
|
|
15
16
|
...(focus === undefined ? {} : { focus }),
|
|
@@ -530,6 +530,7 @@ export function createSessionExecutionFactory(ports) {
|
|
|
530
530
|
? buildExecutionSystemPrompt(toolCatalog.tools, 'run')
|
|
531
531
|
: buildExecutionSystemPrompt();
|
|
532
532
|
const generateCompactExtension = createExecutionCompactExtension({
|
|
533
|
+
modelId: selectedModel.id,
|
|
533
534
|
contextWindowTokens: selectedModel.contextWindowTokens,
|
|
534
535
|
maxOutputTokens: selectedModel.maxOutputTokens,
|
|
535
536
|
hasInterceptor: () => coreExtensions.hooks.hasInterceptors('compact.generate'),
|