@columenlabs/lumen-ai 0.1.228 → 0.1.229
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/agent.d.ts +6 -1
- package/dist/agent/agent.js +9 -2
- package/package.json +3 -3
package/dist/agent/agent.d.ts
CHANGED
|
@@ -218,7 +218,12 @@ export declare abstract class LumenAgent<Env = unknown> extends Think<Env> {
|
|
|
218
218
|
dismissCard(id: string): AgentCard;
|
|
219
219
|
/** The person undid a write made at once. */
|
|
220
220
|
undoCard(id: string): Promise<AgentCard>;
|
|
221
|
-
/**
|
|
221
|
+
/**
|
|
222
|
+
* Past this many tokens Think summarizes the chat's older part, out of sight of the person
|
|
223
|
+
* (`COMPACT_AT` by default). An app overrides it to keep its chats shorter.
|
|
224
|
+
*/
|
|
225
|
+
protected compactAt(): number;
|
|
226
|
+
/** Think compacts the chat past `compactAt()` tokens, on the last turn's model and key. */
|
|
222
227
|
configureSession(session: Session): Session;
|
|
223
228
|
/** Never read: `beforeTurn` gives every turn its own model. */
|
|
224
229
|
getModel(): ThinkModel;
|
package/dist/agent/agent.js
CHANGED
|
@@ -481,11 +481,18 @@ export class LumenAgent extends Think {
|
|
|
481
481
|
this.sql `UPDATE lumen_cards SET told = 1 WHERE id = ${r.id}`;
|
|
482
482
|
return cardNews(rows.map(cardOf));
|
|
483
483
|
}
|
|
484
|
-
/**
|
|
484
|
+
/**
|
|
485
|
+
* Past this many tokens Think summarizes the chat's older part, out of sight of the person
|
|
486
|
+
* (`COMPACT_AT` by default). An app overrides it to keep its chats shorter.
|
|
487
|
+
*/
|
|
488
|
+
compactAt() {
|
|
489
|
+
return COMPACT_AT;
|
|
490
|
+
}
|
|
491
|
+
/** Think compacts the chat past `compactAt()` tokens, on the last turn's model and key. */
|
|
485
492
|
configureSession(session) {
|
|
486
493
|
return session
|
|
487
494
|
.onCompaction(createCompactFunction({ summarize: (prompt) => this.#summarize(prompt) }))
|
|
488
|
-
.compactAfter(
|
|
495
|
+
.compactAfter(this.compactAt());
|
|
489
496
|
}
|
|
490
497
|
async #summarize(prompt) {
|
|
491
498
|
const last = this.#last;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@columenlabs/lumen-ai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.229",
|
|
4
4
|
"description": "Lumen's assistant and agent parts: a chat assistant's server (Claude tiers, tools over MCP, the web, hand off, spend caps), serving an MCP server from a Worker, read-only tool sets and metered tool calls.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@ai-sdk/openai": "4.0.108",
|
|
53
53
|
"@anthropic-ai/sdk": "0.133.0",
|
|
54
54
|
"@cloudflare/think": "0.23.0",
|
|
55
|
-
"@columenlabs/lumen-ops": "0.1.
|
|
56
|
-
"@columenlabs/lumen-ui-types": "0.1.
|
|
55
|
+
"@columenlabs/lumen-ops": "0.1.229",
|
|
56
|
+
"@columenlabs/lumen-ui-types": "0.1.229",
|
|
57
57
|
"agents": "0.32.0",
|
|
58
58
|
"ai": "7.0.162",
|
|
59
59
|
"just-bash": "3.6.0",
|