@roj-ai/sdk 0.1.14 → 0.1.15
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/bootstrap.d.ts +1 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/core/agents/agent.d.ts +25 -1
- package/dist/core/agents/agent.d.ts.map +1 -1
- package/dist/core/agents/agent.js +117 -21
- package/dist/core/agents/agent.js.map +1 -1
- package/dist/core/agents/config.d.ts +7 -0
- package/dist/core/agents/config.d.ts.map +1 -1
- package/dist/core/agents/context.d.ts +10 -0
- package/dist/core/agents/context.d.ts.map +1 -1
- package/dist/core/agents/state.d.ts +11 -3
- package/dist/core/agents/state.d.ts.map +1 -1
- package/dist/core/agents/state.js.map +1 -1
- package/dist/core/file-store/file-store.d.ts +5 -1
- package/dist/core/file-store/file-store.d.ts.map +1 -1
- package/dist/core/file-store/file-store.js +31 -21
- package/dist/core/file-store/file-store.js.map +1 -1
- package/dist/core/image/vips-resizer.test.js +26 -14
- package/dist/core/image/vips-resizer.test.js.map +1 -1
- package/dist/core/llm/anthropic.d.ts.map +1 -1
- package/dist/core/llm/anthropic.js +11 -8
- package/dist/core/llm/anthropic.js.map +1 -1
- package/dist/core/llm/cache-breakpoints.d.ts +5 -1
- package/dist/core/llm/cache-breakpoints.d.ts.map +1 -1
- package/dist/core/llm/cache-breakpoints.js +10 -5
- package/dist/core/llm/cache-breakpoints.js.map +1 -1
- package/dist/core/sessions/session.d.ts.map +1 -1
- package/dist/core/sessions/session.js +10 -0
- package/dist/core/sessions/session.js.map +1 -1
- package/dist/core/sessions/session.test.js +5 -0
- package/dist/core/sessions/session.test.js.map +1 -1
- package/dist/core/sessions/state.d.ts.map +1 -1
- package/dist/core/sessions/state.js +5 -1
- package/dist/core/sessions/state.js.map +1 -1
- package/dist/core/tools/executor.test.js +1 -0
- package/dist/core/tools/executor.test.js.map +1 -1
- package/dist/plugins/agent-status/plugin.d.ts.map +1 -1
- package/dist/plugins/agent-status/plugin.js +18 -26
- package/dist/plugins/agent-status/plugin.js.map +1 -1
- package/dist/plugins/context-compact/compaction-live.test.d.ts +17 -0
- package/dist/plugins/context-compact/compaction-live.test.d.ts.map +1 -0
- package/dist/plugins/context-compact/compaction-live.test.js +177 -0
- package/dist/plugins/context-compact/compaction-live.test.js.map +1 -0
- package/dist/plugins/context-compact/context-compact.integration.test.js +123 -3
- package/dist/plugins/context-compact/context-compact.integration.test.js.map +1 -1
- package/dist/plugins/context-compact/context-compactor.d.ts +47 -17
- package/dist/plugins/context-compact/context-compactor.d.ts.map +1 -1
- package/dist/plugins/context-compact/context-compactor.js +60 -36
- package/dist/plugins/context-compact/context-compactor.js.map +1 -1
- package/dist/plugins/context-compact/context-compactor.test.js +69 -103
- package/dist/plugins/context-compact/context-compactor.test.js.map +1 -1
- package/dist/plugins/context-compact/plugin.d.ts +9 -2
- package/dist/plugins/context-compact/plugin.d.ts.map +1 -1
- package/dist/plugins/context-compact/plugin.js +8 -4
- package/dist/plugins/context-compact/plugin.js.map +1 -1
- package/dist/plugins/filesystem/filesystem.integration.test.js +36 -0
- package/dist/plugins/filesystem/filesystem.integration.test.js.map +1 -1
- package/dist/plugins/filesystem/plugin.d.ts.map +1 -1
- package/dist/plugins/filesystem/plugin.js +8 -6
- package/dist/plugins/filesystem/plugin.js.map +1 -1
- package/dist/plugins/mailbox/mailbox.integration.test.js +9 -16
- package/dist/plugins/mailbox/mailbox.integration.test.js.map +1 -1
- package/dist/plugins/resources/plugin.d.ts.map +1 -1
- package/dist/plugins/resources/plugin.js +4 -1
- package/dist/plugins/resources/plugin.js.map +1 -1
- package/dist/plugins/user-chat/plugin.d.ts +2 -0
- package/dist/plugins/user-chat/plugin.d.ts.map +1 -1
- package/dist/plugins/user-chat/plugin.js +47 -3
- package/dist/plugins/user-chat/plugin.js.map +1 -1
- package/dist/plugins/user-chat/schema.d.ts +10 -0
- package/dist/plugins/user-chat/schema.d.ts.map +1 -1
- package/dist/plugins/user-chat/schema.js +1 -0
- package/dist/plugins/user-chat/schema.js.map +1 -1
- package/dist/plugins/user-chat/user-chat.integration.test.js +86 -0
- package/dist/plugins/user-chat/user-chat.integration.test.js.map +1 -1
- package/package.json +2 -2
- package/src/core/agents/agent.ts +134 -20
- package/src/core/agents/config.ts +7 -0
- package/src/core/agents/context.ts +11 -0
- package/src/core/agents/state.ts +11 -4
- package/src/core/file-store/file-store.ts +38 -18
- package/src/core/image/vips-resizer.test.ts +26 -15
- package/src/core/llm/anthropic.ts +19 -12
- package/src/core/llm/cache-breakpoints.ts +15 -6
- package/src/core/sessions/session.test.ts +6 -0
- package/src/core/sessions/session.ts +12 -0
- package/src/core/sessions/state.ts +5 -1
- package/src/core/tools/executor.test.ts +1 -0
- package/src/plugins/agent-status/plugin.ts +18 -25
- package/src/plugins/context-compact/compaction-live.test.ts +221 -0
- package/src/plugins/context-compact/context-compact.integration.test.ts +135 -3
- package/src/plugins/context-compact/context-compactor.test.ts +71 -110
- package/src/plugins/context-compact/context-compactor.ts +88 -43
- package/src/plugins/context-compact/plugin.ts +19 -10
- package/src/plugins/filesystem/filesystem.integration.test.ts +44 -0
- package/src/plugins/filesystem/plugin.ts +8 -6
- package/src/plugins/mailbox/mailbox.integration.test.ts +12 -18
- package/src/plugins/resources/plugin.ts +4 -1
- package/src/plugins/user-chat/plugin.ts +60 -3
- package/src/plugins/user-chat/schema.ts +10 -1
- package/src/plugins/user-chat/user-chat.integration.test.ts +99 -0
|
@@ -2,7 +2,7 @@ import { contextEvents } from '../../core/context/state.js';
|
|
|
2
2
|
import { withSessionId } from '../../core/events/test-helpers.js';
|
|
3
3
|
import { estimateMessagesTokens } from '../../core/llm/tokens.js';
|
|
4
4
|
import { Err, Ok } from '../../lib/utils/result.js';
|
|
5
|
-
import {
|
|
5
|
+
import { wrapContextSummary } from '../../prompts/index.js';
|
|
6
6
|
// ============================================================================
|
|
7
7
|
// Message formatting for summarization
|
|
8
8
|
// ============================================================================
|
|
@@ -56,6 +56,20 @@ function formatToolInput(input) {
|
|
|
56
56
|
}
|
|
57
57
|
return String(input).slice(0, 50);
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Trailing user-message instruction appended to the agent's full prefix when
|
|
61
|
+
* requesting a summary. The model sees its real system prompt, tools and full
|
|
62
|
+
* conversation, then this instruction last. Phrased to discourage tool calls
|
|
63
|
+
* — Sonnet-class models reliably emit a plain text response under this prompt.
|
|
64
|
+
*/
|
|
65
|
+
export const DEFAULT_SUMMARY_INSTRUCTION = '[CONTEXT COMPACTION REQUEST]\n'
|
|
66
|
+
+ 'The conversation above is approaching the context budget. Produce a concise '
|
|
67
|
+
+ 'summary (under 600 words) of everything discussed and decided so far. Cover: '
|
|
68
|
+
+ 'completed tasks and their outcomes, key decisions and rationale, current state '
|
|
69
|
+
+ 'of any in-progress work, important file paths or identifiers, and outstanding '
|
|
70
|
+
+ 'questions.\n\n'
|
|
71
|
+
+ 'Reply with plain text only. Do NOT call any tools. Do NOT acknowledge this '
|
|
72
|
+
+ 'request — just emit the summary directly.';
|
|
59
73
|
// ============================================================================
|
|
60
74
|
// History Offloader
|
|
61
75
|
// ============================================================================
|
|
@@ -65,12 +79,10 @@ export const DEFAULT_HISTORY_PATH_PREFIX = '/session/.history/';
|
|
|
65
79
|
// Context Compactor
|
|
66
80
|
// ============================================================================
|
|
67
81
|
export class ContextCompactor {
|
|
68
|
-
llmProvider;
|
|
69
82
|
logger;
|
|
70
83
|
config;
|
|
71
84
|
historyOffloader;
|
|
72
|
-
constructor(
|
|
73
|
-
this.llmProvider = llmProvider;
|
|
85
|
+
constructor(logger, config, historyOffloader) {
|
|
74
86
|
this.logger = logger;
|
|
75
87
|
this.config = config;
|
|
76
88
|
this.historyOffloader = historyOffloader;
|
|
@@ -105,35 +117,47 @@ export class ContextCompactor {
|
|
|
105
117
|
return count;
|
|
106
118
|
}
|
|
107
119
|
/**
|
|
108
|
-
* Check if compaction is needed
|
|
120
|
+
* Check if compaction is needed.
|
|
121
|
+
*
|
|
122
|
+
* Prefers the provider-reported prompt token count from the previous turn
|
|
123
|
+
* (authoritative — comes straight from the model's tokenizer). Falls back
|
|
124
|
+
* to the in-process estimator when no previous metrics exist (first turn).
|
|
125
|
+
*
|
|
126
|
+
* The estimator under-counts JSON-heavy tool-result history by ~2x, so
|
|
127
|
+
* relying on it alone causes the trigger to never fire in long sessions.
|
|
109
128
|
*/
|
|
110
|
-
needsCompaction(messages) {
|
|
111
|
-
const tokens = estimateMessagesTokens(messages);
|
|
129
|
+
needsCompaction(messages, lastActualPromptTokens) {
|
|
130
|
+
const tokens = lastActualPromptTokens ?? estimateMessagesTokens(messages);
|
|
112
131
|
return tokens > this.config.maxTokens;
|
|
113
132
|
}
|
|
114
133
|
/**
|
|
115
134
|
* Compact conversation history if needed.
|
|
116
135
|
* Returns null if compaction was not needed.
|
|
117
136
|
*/
|
|
118
|
-
async compactIfNeeded(sessionId, agentId, messages) {
|
|
119
|
-
if (!this.needsCompaction(messages)) {
|
|
137
|
+
async compactIfNeeded(sessionId, agentId, messages, runInference, lastActualPromptTokens) {
|
|
138
|
+
if (!this.needsCompaction(messages, lastActualPromptTokens)) {
|
|
120
139
|
return Ok(null);
|
|
121
140
|
}
|
|
122
|
-
return this.compact(sessionId, agentId, messages);
|
|
141
|
+
return this.compact(sessionId, agentId, messages, runInference, lastActualPromptTokens);
|
|
123
142
|
}
|
|
124
143
|
/**
|
|
125
|
-
* Compact conversation history by
|
|
144
|
+
* Compact conversation history by asking the agent's own model to summarize
|
|
145
|
+
* the older portion. The summarization call reuses the agent's existing
|
|
146
|
+
* prompt cache via `runInference`, paying only for the trailing instruction
|
|
147
|
+
* (a few hundred tokens) and the summary output — not the whole conversation
|
|
148
|
+
* a second time.
|
|
126
149
|
*/
|
|
127
|
-
async compact(sessionId, agentId, messages) {
|
|
128
|
-
const originalTokens = estimateMessagesTokens(messages);
|
|
150
|
+
async compact(sessionId, agentId, messages, runInference, lastActualPromptTokens) {
|
|
151
|
+
const originalTokens = lastActualPromptTokens ?? estimateMessagesTokens(messages);
|
|
129
152
|
this.logger.info('Starting context compaction', {
|
|
130
153
|
sessionId,
|
|
131
154
|
agentId,
|
|
132
155
|
messageCount: messages.length,
|
|
133
|
-
|
|
156
|
+
originalTokens,
|
|
157
|
+
actualTokensReported: lastActualPromptTokens !== undefined,
|
|
134
158
|
});
|
|
135
|
-
// Split messages: keep recent, compact older
|
|
136
|
-
// Respect both count limit and token budget (whichever is hit first)
|
|
159
|
+
// Split messages: keep recent, compact older.
|
|
160
|
+
// Respect both count limit and token budget (whichever is hit first).
|
|
137
161
|
const keepCount = this.computeKeepCount(messages);
|
|
138
162
|
const toCompact = messages.slice(0, messages.length - keepCount);
|
|
139
163
|
const toKeep = messages.slice(messages.length - keepCount);
|
|
@@ -147,20 +171,17 @@ export class ContextCompactor {
|
|
|
147
171
|
messagesRemoved: 0,
|
|
148
172
|
});
|
|
149
173
|
}
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
.map(formatMessageForSummary)
|
|
153
|
-
.join('\n\n');
|
|
154
|
-
// Offload history if enabled
|
|
174
|
+
// Offload the dropped messages to disk for forensics / replay.
|
|
175
|
+
// Best-effort; failures are logged but don't block compaction.
|
|
155
176
|
let historyPath;
|
|
156
177
|
if (this.config.offloadHistory && this.historyOffloader) {
|
|
157
178
|
try {
|
|
179
|
+
const conversationText = toCompact.map(formatMessageForSummary).join('\n\n');
|
|
158
180
|
const pathPrefix = this.config.historyPathPrefix ?? DEFAULT_HISTORY_PATH_PREFIX;
|
|
159
181
|
historyPath = await this.historyOffloader.offload(agentId, conversationText, pathPrefix);
|
|
160
182
|
this.logger.info('History offloaded', { sessionId, agentId, historyPath });
|
|
161
183
|
}
|
|
162
184
|
catch (error) {
|
|
163
|
-
// History offloading is best-effort, log and continue
|
|
164
185
|
this.logger.warn('Failed to offload history', {
|
|
165
186
|
sessionId,
|
|
166
187
|
agentId,
|
|
@@ -168,18 +189,14 @@ export class ContextCompactor {
|
|
|
168
189
|
});
|
|
169
190
|
}
|
|
170
191
|
}
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
tools: [],
|
|
182
|
-
});
|
|
192
|
+
// Inline summarization: append the instruction as a trailing user message
|
|
193
|
+
// and let the host run inference with the agent's full live prefix. The
|
|
194
|
+
// agent's prompt cache from the previous turn covers everything up to
|
|
195
|
+
// (but not including) this instruction.
|
|
196
|
+
const summaryInstruction = this.config.summaryPrompt ?? DEFAULT_SUMMARY_INSTRUCTION;
|
|
197
|
+
const summaryResult = await runInference([
|
|
198
|
+
{ role: 'user', content: summaryInstruction },
|
|
199
|
+
]);
|
|
183
200
|
if (!summaryResult.ok) {
|
|
184
201
|
const llmError = summaryResult.error;
|
|
185
202
|
this.logger.error('Failed to generate summary', new Error(llmError.message), {
|
|
@@ -190,9 +207,16 @@ export class ContextCompactor {
|
|
|
190
207
|
return Err(new Error(`Compaction failed: ${llmError.message}`));
|
|
191
208
|
}
|
|
192
209
|
const summary = summaryResult.value.content ?? '';
|
|
193
|
-
|
|
210
|
+
if (!summary.trim()) {
|
|
211
|
+
this.logger.warn('Summarization returned empty content', { sessionId, agentId });
|
|
212
|
+
return Err(new Error('Compaction failed: model returned empty summary'));
|
|
213
|
+
}
|
|
214
|
+
// Replace the compacted portion with a single user-role summary message.
|
|
215
|
+
// Using `user` role (not `system`) so the wrap reads as part of the
|
|
216
|
+
// conversation flow — Anthropic recommends user-role for arbitrary
|
|
217
|
+
// mid-conversation context blocks.
|
|
194
218
|
const summaryMessage = {
|
|
195
|
-
role: '
|
|
219
|
+
role: 'user',
|
|
196
220
|
content: wrapContextSummary(summary, historyPath),
|
|
197
221
|
};
|
|
198
222
|
const compactedMessages = [summaryMessage, ...toKeep];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-compactor.js","sourceRoot":"","sources":["../../../src/plugins/context-compact/context-compactor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAG7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAG7D,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"context-compactor.js","sourceRoot":"","sources":["../../../src/plugins/context-compact/context-compactor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAG7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAG7D,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAY3D,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E,qEAAqE;AACrE,MAAM,sBAAsB,GAAG,GAAG,CAAA;AAClC,MAAM,yBAAyB,GAAG,GAAG,CAAA;AAErC;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAe;IACtD,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,MAAM,CAAC,CAAC,CAAC;YACb,MAAM,OAAO,GAAG,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YAC3F,OAAO,SAAS,OAAO,EAAE,CAAA;QAC1B,CAAC;QAED,KAAK,WAAW,CAAC,CAAC,CAAC;YAClB,MAAM,KAAK,GAAa,EAAE,CAAA;YAC1B,IAAI,GAAG,CAAC,OAAO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