@lota-sdk/core 0.4.24 → 0.4.25

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": "@lota-sdk/core",
3
- "version": "0.4.24",
3
+ "version": "0.4.25",
4
4
  "files": [
5
5
  "src",
6
6
  "infrastructure/schema"
@@ -32,7 +32,7 @@
32
32
  "@ai-sdk/provider": "^3.0.9",
33
33
  "@chat-adapter/slack": "^4.26.0",
34
34
  "@chat-adapter/state-ioredis": "^4.26.0",
35
- "@lota-sdk/shared": "0.4.24",
35
+ "@lota-sdk/shared": "0.4.25",
36
36
  "@mendable/firecrawl-js": "^4.20.0",
37
37
  "@surrealdb/node": "^3.0.3",
38
38
  "ai": "^6.0.170",
@@ -11,6 +11,8 @@ import type { QueueJobService, WorkerHandle } from '../workers/worker-utils'
11
11
  import { createQueueFactoryWithDeps } from './queue-factory'
12
12
  import { runStandaloneQueueWorker } from './standalone-worker'
13
13
 
14
+ const POST_CHAT_MEMORY_CONCURRENCY = 2
15
+
14
16
  interface PostChatMemoryMessage {
15
17
  role: 'user' | 'agent'
16
18
  content: string
@@ -105,7 +107,7 @@ export function makePostChatMemoryQueueRuntime(
105
107
  name: 'post-chat-memory',
106
108
  displayName: 'Post-chat memory',
107
109
  jobName: 'extract-memory',
108
- concurrency: 10,
110
+ concurrency: POST_CHAT_MEMORY_CONCURRENCY,
109
111
  lockDuration: 900_000,
110
112
  maxStalledCount: 10,
111
113
  stalledInterval: 120_000,
@@ -13,6 +13,7 @@ import { createQueueFactoryWithDeps } from './queue-factory'
13
13
  import { runStandaloneQueueWorker } from './standalone-worker'
14
14
 
15
15
  export const TITLE_GENERATION_QUEUE = 'title-generation'
16
+ const TITLE_GENERATION_CONCURRENCY = 2
16
17
 
17
18
  // This queue merges thread title generation and recent-activity title
18
19
  // refinement because both are short-lived title synthesis jobs with the same
@@ -68,7 +69,7 @@ export function makeTitleGenerationQueueRuntime(
68
69
  name: TITLE_GENERATION_QUEUE,
69
70
  displayName: 'Title generation',
70
71
  jobName: 'title-generation',
71
- concurrency: 10,
72
+ concurrency: TITLE_GENERATION_CONCURRENCY,
72
73
  lockDuration: 300_000,
73
74
  defaultJobOptions: { attempts: 3, backoff: { type: 'exponential', delay: 2_000 } },
74
75
  connectionProvider,
@@ -87,7 +87,7 @@ export const createWorkerShutdown = (worker: Worker, name: string, logger: typeo
87
87
  return Effect.runPromise(
88
88
  Effect.asVoid(
89
89
  Effect.tryPromise({
90
- try: () => worker.close(),
90
+ try: () => worker.close(true),
91
91
  catch: (cause) => new QueueWorkerError({ phase: 'close', cause }),
92
92
  }),
93
93
  ),