@myagentroam/agent 0.12.3 → 0.12.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.
|
@@ -16,6 +16,8 @@ const delegationPrompt = [
|
|
|
16
16
|
'Prefer following up through the direct delegate; deeper Session inspection is usually useful only when a concrete issue needs independent verification.',
|
|
17
17
|
'While children run, prefer advancing meaningful, non-overlapping task work rather than duplicating delegated work. Waiting is generally useful once no meaningful local task work remains and a required result is needed to unblock or finish the task.',
|
|
18
18
|
'An accepted message normally needs no separate acknowledgment. Requests for receipt-only replies and immediate agent_view calls solely to confirm receipt are usually unnecessary.',
|
|
19
|
+
'The parent automatically collects the latest unread public reply and terminal state from each observed direct child before its next natural model request. Usually reply in the child Session itself rather than sending duplicate progress or completion reports with agent_send.',
|
|
20
|
+
'Contact the parent proactively when timely action or a decision is needed, such as a blocker, scope conflict or major risk, or when explicitly asked to report. Routine child updates usually need no reply; prefer combining related guidance.',
|
|
19
21
|
'Verify consequential findings and changes. Join or stop task-required child work before final delivery, and retain responsibility for the final result.'
|
|
20
22
|
].join('\n\n');
|
|
21
23
|
export { SUBAGENT_NATIVE_SERVICE } from './native.js';
|
|
@@ -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'),
|