@columenlabs/lumen-ai 0.1.186 → 0.1.188

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.
@@ -36,7 +36,6 @@ import { PROVIDERS } from './models.js';
36
36
  import { keyDocName, planDocName, } from './state.js';
37
37
  import { APP_SCOPE } from './store.js';
38
38
  const MUTATING = new Set(['POST', 'PUT', 'PATCH', 'DELETE']);
39
- const MAX_MESSAGE = 20_000;
40
39
  const MAX_CAP = 10_000;
41
40
  const json = (body, status = 200) => new Response(JSON.stringify(body), {
42
41
  status,
@@ -314,26 +313,9 @@ export function assistantRoutes(app, o) {
314
313
  await docs.write(APP_SCOPE, 'scrapeql', { ...d, test });
315
314
  return json(test);
316
315
  }
317
- case 'POST /chat': {
318
- const b = (await body(req));
319
- const message = typeof b.message === 'string' ? b.message.trim() : '';
320
- if (!message || message.length > MAX_MESSAGE)
321
- return fail(`Write a message of up to ${MAX_MESSAGE} characters.`);
322
- const msg = {
323
- message,
324
- ...(typeof b.chat_id === 'string' ? { chat_id: b.chat_id } : {}),
325
- ...(b.context && typeof b.context === 'object' ? { context: b.context } : {}),
326
- ...(Array.isArray(b.refs) ? { refs: b.refs.slice(0, 20) } : {}),
327
- ...(typeof b.tier === 'string' ? { tier: b.tier } : {}),
328
- };
329
- return new Response(a.turnStream(caller, msg, req.signal), {
330
- headers: {
331
- 'content-type': 'text/event-stream',
332
- 'cache-control': 'no-store',
333
- 'x-accel-buffering': 'no',
334
- },
335
- });
336
- }
316
+ // A chat turn runs on the agent (`./agent`, LumenAgent): the app routes it there.
317
+ case 'POST /chat':
318
+ return fail('Chats run on the agent now. Start a new chat.', 410, 'moved');
337
319
  case 'GET /chats':
338
320
  return json(await a.listChats(caller));
339
321
  case 'POST /allowance/request': {
@@ -364,14 +346,6 @@ export function assistantRoutes(app, o) {
364
346
  await a.removeChat(caller, id);
365
347
  return json({ ok: true });
366
348
  }
367
- if (parts.length === 4 && parts[2] === 'drafts' && m === 'POST') {
368
- const action = (await body(req)).action;
369
- if (action !== 'save' && action !== 'dismiss')
370
- return fail('action is save or dismiss.');
371
- return json(await a.settleDraft(caller, id, parts[3], action));
372
- }
373
- if (parts.length === 5 && parts[2] === 'writes' && parts[4] === 'undo' && m === 'POST')
374
- return json(await a.undoWrite(caller, id, parts[3]));
375
349
  }
376
350
  return fail('Not found.', 404);
377
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ai",
3
- "version": "0.1.186",
3
+ "version": "0.1.188",
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",
@@ -48,8 +48,8 @@
48
48
  "@ai-sdk/openai": "4.0.108",
49
49
  "@anthropic-ai/sdk": "0.133.0",
50
50
  "@cloudflare/think": "0.23.0",
51
- "@columenlabs/lumen-ops": "0.1.186",
52
- "@columenlabs/lumen-ui-types": "0.1.186",
51
+ "@columenlabs/lumen-ops": "0.1.188",
52
+ "@columenlabs/lumen-ui-types": "0.1.188",
53
53
  "agents": "0.32.0",
54
54
  "ai": "7.0.162",
55
55
  "just-bash": "3.6.0",