@vellumai/assistant 0.3.25 → 0.3.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "vellum": "./src/index.ts"
@@ -45,7 +45,7 @@ describe('reminder-store', () => {
45
45
  expect(r.status).toBe('pending');
46
46
  expect(r.firedAt).toBeNull();
47
47
  expect(r.conversationId).toBeNull();
48
- expect(r.routingIntent).toBe('single_channel');
48
+ expect(r.routingIntent).toBe('all_channels');
49
49
  expect(r.routingHints).toEqual({});
50
50
  expect(r.createdAt).toBeGreaterThan(0);
51
51
  expect(r.updatedAt).toBeGreaterThan(0);
@@ -69,7 +69,7 @@ describe('reminder-store', () => {
69
69
  expect(fetched!.routingHints).toEqual({ preferred: ['telegram', 'sms'] });
70
70
  });
71
71
 
72
- test('insertReminder defaults routingIntent to single_channel when omitted', () => {
72
+ test('insertReminder defaults routingIntent to all_channels when omitted', () => {
73
73
  const r = insertReminder({
74
74
  label: 'No routing',
75
75
  message: 'Should default',
@@ -77,11 +77,11 @@ describe('reminder-store', () => {
77
77
  mode: 'notify',
78
78
  });
79
79
 
80
- expect(r.routingIntent).toBe('single_channel');
80
+ expect(r.routingIntent).toBe('all_channels');
81
81
  expect(r.routingHints).toEqual({});
82
82
 
83
83
  const fetched = getReminder(r.id);
84
- expect(fetched!.routingIntent).toBe('single_channel');
84
+ expect(fetched!.routingIntent).toBe('all_channels');
85
85
  expect(fetched!.routingHints).toEqual({});
86
86
  });
87
87
 
@@ -113,7 +113,7 @@ describe('reminder-store', () => {
113
113
 
114
114
  const all = listReminders();
115
115
  expect(all).toHaveLength(2);
116
- expect(all[0].routingIntent).toBe('single_channel');
116
+ expect(all[0].routingIntent).toBe('all_channels');
117
117
  expect(all[1].routingIntent).toBe('multi_channel');
118
118
  });
119
119
 
@@ -154,16 +154,16 @@ describe('reminder tool', () => {
154
154
 
155
155
  // ── routing ────────────────────────────────────────────────────────
156
156
 
157
- test('create defaults routing_intent to single_channel', async () => {
157
+ test('create defaults routing_intent to all_channels', async () => {
158
158
  const future = new Date(Date.now() + 60_000).toISOString();
159
159
  const result = executeReminderCreate({
160
160
  fire_at: future,
161
161
  label: 'Default routing',
162
- message: 'Should default to single_channel',
162
+ message: 'Should default to all_channels',
163
163
  });
164
164
 
165
165
  expect(result.isError).toBe(false);
166
- expect(result.content).toContain('Routing: single_channel');
166
+ expect(result.content).toContain('Routing: all_channels');
167
167
  });
168
168
 
169
169
  test('create with routing_intent all_channels succeeds', async () => {
@@ -242,7 +242,7 @@ describe('reminder tool', () => {
242
242
 
243
243
  expect(result.isError).toBe(false);
244
244
  expect(result.content).toContain('Reminder created');
245
- expect(result.content).toContain('Routing: single_channel');
245
+ expect(result.content).toContain('Routing: all_channels');
246
246
  });
247
247
 
248
248
  // ── list ────────────────────────────────────────────────────────────
@@ -246,7 +246,7 @@ export const reminders = sqliteTable('reminders', {
246
246
  status: text('status').notNull(), // 'pending' | 'firing' | 'fired' | 'cancelled'
247
247
  firedAt: integer('fired_at'),
248
248
  conversationId: text('conversation_id'),
249
- routingIntent: text('routing_intent').notNull().default('single_channel'), // 'single_channel' | 'multi_channel' | 'all_channels'
249
+ routingIntent: text('routing_intent').notNull().default('all_channels'), // 'single_channel' | 'multi_channel' | 'all_channels'
250
250
  routingHintsJson: text('routing_hints_json').notNull().default('{}'),
251
251
  createdAt: integer('created_at').notNull(),
252
252
  updatedAt: integer('updated_at').notNull(),
@@ -277,6 +277,7 @@ export class RuntimeHttpServer {
277
277
  this.server = Bun.serve<AllWebSocketData>({
278
278
  port: this.port,
279
279
  hostname: this.hostname,
280
+ idleTimeout: 0,
280
281
  maxRequestBodySize: MAX_REQUEST_BODY_BYTES,
281
282
  fetch: (req, server) => this.handleRequest(req, server),
282
283
  websocket: {
@@ -372,6 +373,12 @@ export class RuntimeHttpServer {
372
373
  }
373
374
 
374
375
  private async handleRequest(req: Request, server: ReturnType<typeof Bun.serve>): Promise<Response> {
376
+ server.timeout(req, 1800);
377
+ // Skip request logging for health-check probes to reduce log noise.
378
+ const url = new URL(req.url);
379
+ if (url.pathname === '/healthz' && req.method === 'GET') {
380
+ return this.routeRequest(req, server);
381
+ }
375
382
  return withRequestLogging(req, () => this.routeRequest(req, server));
376
383
  }
377
384