@columenlabs/lumen-ai 0.1.200 → 0.1.201
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.js +1 -0
- package/dist/agent/usage.d.ts +2 -0
- package/dist/agent/usage.js +5 -0
- package/dist/assistant/engine.js +1 -1
- package/package.json +3 -3
package/dist/agent/agent.js
CHANGED
package/dist/agent/usage.d.ts
CHANGED
package/dist/agent/usage.js
CHANGED
|
@@ -40,6 +40,11 @@ export class UsageMeter {
|
|
|
40
40
|
this.p.usd += t.usd;
|
|
41
41
|
return t;
|
|
42
42
|
}
|
|
43
|
+
/** Marks this part as one hand-off to a higher tier; parts of the same label add up their runs. */
|
|
44
|
+
handOff() {
|
|
45
|
+
this.p.runs = 1;
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
43
48
|
part() {
|
|
44
49
|
return { ...this.p };
|
|
45
50
|
}
|
package/dist/assistant/engine.js
CHANGED
|
@@ -426,7 +426,7 @@ export class Assistant {
|
|
|
426
426
|
return {
|
|
427
427
|
error: `${tier.label} runs on ${provider} and no ${provider} key is set for whoever pays this answer: answer yourself.`,
|
|
428
428
|
};
|
|
429
|
-
const meter = tt.meter(sub.model, sub.meter.label, !!key.plan);
|
|
429
|
+
const meter = tt.meter(sub.model, sub.meter.label, !!key.plan).handOff();
|
|
430
430
|
c.counts.handoffs += 1;
|
|
431
431
|
if (this.tiers.indexOf(tier) > this.tiers.indexOf(c.counts.end))
|
|
432
432
|
c.counts.end = tier;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@columenlabs/lumen-ai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.201",
|
|
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.201",
|
|
56
|
+
"@columenlabs/lumen-ui-types": "0.1.201",
|
|
57
57
|
"agents": "0.32.0",
|
|
58
58
|
"ai": "7.0.162",
|
|
59
59
|
"just-bash": "3.6.0",
|