@okrlinkhub/agent-factory 2.0.3 → 3.0.1

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.
Files changed (38) hide show
  1. package/README.md +102 -0
  2. package/dist/client/index.d.ts +53 -21
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +74 -3
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/component/_generated/api.d.ts +2 -0
  7. package/dist/component/_generated/api.d.ts.map +1 -1
  8. package/dist/component/_generated/api.js.map +1 -1
  9. package/dist/component/_generated/component.d.ts +119 -2
  10. package/dist/component/_generated/component.d.ts.map +1 -1
  11. package/dist/component/identity.d.ts +6 -6
  12. package/dist/component/lib.d.ts +2 -1
  13. package/dist/component/lib.d.ts.map +1 -1
  14. package/dist/component/lib.js +2 -1
  15. package/dist/component/lib.js.map +1 -1
  16. package/dist/component/messageTemplates.d.ts +37 -0
  17. package/dist/component/messageTemplates.d.ts.map +1 -0
  18. package/dist/component/messageTemplates.js +177 -0
  19. package/dist/component/messageTemplates.js.map +1 -0
  20. package/dist/component/pushing.d.ts +37 -37
  21. package/dist/component/queue.d.ts +113 -90
  22. package/dist/component/queue.d.ts.map +1 -1
  23. package/dist/component/queue.js +122 -47
  24. package/dist/component/queue.js.map +1 -1
  25. package/dist/component/scheduler.d.ts +23 -23
  26. package/dist/component/schema.d.ts +86 -44
  27. package/dist/component/schema.d.ts.map +1 -1
  28. package/dist/component/schema.js +19 -1
  29. package/dist/component/schema.js.map +1 -1
  30. package/package.json +1 -1
  31. package/src/client/index.ts +76 -3
  32. package/src/component/_generated/api.ts +2 -0
  33. package/src/component/_generated/component.ts +159 -2
  34. package/src/component/lib.test.ts +125 -0
  35. package/src/component/lib.ts +8 -0
  36. package/src/component/messageTemplates.ts +205 -0
  37. package/src/component/queue.ts +165 -49
  38. package/src/component/schema.ts +22 -1
@@ -11,50 +11,50 @@ type PreparedTelegramAttachment = {
11
11
  downloadUrl?: string;
12
12
  };
13
13
  export declare const enqueueMessage: import("convex/server").RegisteredMutation<"public", {
14
- priority?: number | undefined;
15
- scheduledFor?: number | undefined;
16
- maxAttempts?: number | undefined;
14
+ nowMs?: number | undefined;
17
15
  providerConfig?: {
18
- kind: "fly" | "runpod" | "ecs";
19
16
  appName: string;
20
- region: string;
17
+ kind: "fly" | "runpod" | "ecs";
21
18
  organizationSlug: string;
22
19
  image: string;
20
+ region: string;
23
21
  volumeName: string;
24
22
  volumePath: string;
25
23
  volumeSizeGb: number;
26
24
  } | undefined;
27
- nowMs?: number | undefined;
25
+ maxAttempts?: number | undefined;
26
+ priority?: number | undefined;
27
+ scheduledFor?: number | undefined;
28
28
  agentKey: string;
29
29
  conversationId: string;
30
30
  payload: {
31
- externalMessageId?: string | undefined;
32
- rawUpdateJson?: string | undefined;
33
31
  metadata?: Record<string, string> | undefined;
34
32
  attachments?: {
33
+ sizeBytes?: number | undefined;
35
34
  fileName?: string | undefined;
36
35
  mimeType?: string | undefined;
37
- sizeBytes?: number | undefined;
38
36
  downloadUrl?: string | undefined;
39
- status: "ready" | "expired";
40
- kind: "photo" | "video" | "audio" | "voice" | "document";
37
+ status: "expired" | "ready";
41
38
  storageId: import("convex/values").GenericId<"_storage">;
39
+ kind: "photo" | "video" | "audio" | "voice" | "document";
42
40
  telegramFileId: string;
43
41
  expiresAt: number;
44
42
  }[] | undefined;
43
+ externalMessageId?: string | undefined;
44
+ rawUpdateJson?: string | undefined;
45
45
  provider: string;
46
46
  providerUserId: string;
47
47
  messageText: string;
48
48
  };
49
49
  }, Promise<import("convex/values").GenericId<"messageQueue">>>;
50
50
  export declare const appendConversationMessages: import("convex/server").RegisteredMutation<"public", {
51
- workspaceId?: string | undefined;
52
51
  nowMs?: number | undefined;
52
+ workspaceId?: string | undefined;
53
53
  conversationId: string;
54
54
  messages: {
55
55
  at?: number | undefined;
56
- role: "system" | "user" | "assistant" | "tool";
57
56
  content: string;
57
+ role: "system" | "user" | "assistant" | "tool";
58
58
  }[];
59
59
  }, Promise<{
60
60
  updated: boolean;
@@ -70,9 +70,9 @@ export declare const upsertAgentProfile: import("convex/server").RegisteredMutat
70
70
  enabled: boolean;
71
71
  } | undefined;
72
72
  agentKey: string;
73
- version: string;
74
- secretsRef: string[];
75
73
  enabled: boolean;
74
+ secretsRef: string[];
75
+ version: string;
76
76
  }, Promise<import("convex/values").GenericId<"agentProfiles">>>;
77
77
  export declare const importPlaintextSecret: import("convex/server").RegisteredMutation<"public", {
78
78
  metadata?: Record<string, string> | undefined;
@@ -99,11 +99,11 @@ export declare const getWorkerSpawnOpenClawEnv: import("convex/server").Register
99
99
  OPENCLAW_LINKING_SHARED_SECRET?: string;
100
100
  }>>;
101
101
  export declare const getProviderRuntimeConfig: import("convex/server").RegisteredQuery<"internal", {}, Promise<{
102
- kind: "fly" | "runpod" | "ecs";
103
102
  appName: string;
104
- region: string;
103
+ kind: "fly" | "runpod" | "ecs";
105
104
  organizationSlug: string;
106
105
  image: string;
106
+ region: string;
107
107
  volumeName: string;
108
108
  volumePath: string;
109
109
  volumeSizeGb: number;
@@ -111,22 +111,22 @@ export declare const getProviderRuntimeConfig: import("convex/server").Registere
111
111
  export declare const upsertProviderRuntimeConfig: import("convex/server").RegisteredMutation<"internal", {
112
112
  nowMs?: number | undefined;
113
113
  providerConfig: {
114
- kind: "fly" | "runpod" | "ecs";
115
114
  appName: string;
116
- region: string;
115
+ kind: "fly" | "runpod" | "ecs";
117
116
  organizationSlug: string;
118
117
  image: string;
118
+ region: string;
119
119
  volumeName: string;
120
120
  volumePath: string;
121
121
  volumeSizeGb: number;
122
122
  };
123
123
  }, Promise<null>>;
124
124
  export declare const providerRuntimeConfig: import("convex/server").RegisteredQuery<"public", {}, Promise<{
125
- kind: "fly" | "runpod" | "ecs";
126
125
  appName: string;
127
- region: string;
126
+ kind: "fly" | "runpod" | "ecs";
128
127
  organizationSlug: string;
129
128
  image: string;
129
+ region: string;
130
130
  volumeName: string;
131
131
  volumePath: string;
132
132
  volumeSizeGb: number;
@@ -134,11 +134,11 @@ export declare const providerRuntimeConfig: import("convex/server").RegisteredQu
134
134
  export declare const setProviderRuntimeConfig: import("convex/server").RegisteredMutation<"public", {
135
135
  nowMs?: number | undefined;
136
136
  providerConfig: {
137
- kind: "fly" | "runpod" | "ecs";
138
137
  appName: string;
139
- region: string;
138
+ kind: "fly" | "runpod" | "ecs";
140
139
  organizationSlug: string;
141
140
  image: string;
141
+ region: string;
142
142
  volumeName: string;
143
143
  volumePath: string;
144
144
  volumeSizeGb: number;
@@ -157,9 +157,9 @@ export declare const getTelegramIngressRuntimeConfig: import("convex/server").Re
157
157
  export declare const prepareTelegramAttachmentsForEnqueue: import("convex/server").RegisteredAction<"public", {
158
158
  agentKey: string;
159
159
  attachments: {
160
+ sizeBytes?: number | undefined;
160
161
  fileName?: string | undefined;
161
162
  mimeType?: string | undefined;
162
- sizeBytes?: number | undefined;
163
163
  kind: "photo" | "video" | "audio" | "voice" | "document";
164
164
  telegramFileId: string;
165
165
  }[];
@@ -183,16 +183,20 @@ export declare const setMessageRuntimeConfig: import("convex/server").Registered
183
183
  };
184
184
  }, Promise<null>>;
185
185
  export declare const deployGlobalSkill: import("convex/server").RegisteredMutation<"public", {
186
- displayName?: string | undefined;
186
+ nowMs?: number | undefined;
187
+ actor?: string | undefined;
187
188
  description?: string | undefined;
188
- moduleFormat?: "esm" | "cjs" | undefined;
189
+ displayName?: string | undefined;
189
190
  entryPoint?: string | undefined;
191
+ moduleFormat?: "esm" | "cjs" | undefined;
190
192
  releaseChannel?: "stable" | "canary" | undefined;
191
- nowMs?: number | undefined;
192
- actor?: string | undefined;
193
193
  version: string;
194
194
  slug: string;
195
- sourceJs: string;
195
+ files: {
196
+ content: string;
197
+ sha256: string;
198
+ path: string;
199
+ }[];
196
200
  }, Promise<{
197
201
  skillId: import("convex/values").GenericId<"globalSkills">;
198
202
  versionId: import("convex/values").GenericId<"globalSkillVersions">;
@@ -204,8 +208,8 @@ export declare const deployGlobalSkill: import("convex/server").RegisteredMutati
204
208
  }>>;
205
209
  export declare const listGlobalSkills: import("convex/server").RegisteredQuery<"public", {
206
210
  status?: "active" | "disabled" | undefined;
207
- releaseChannel?: "stable" | "canary" | undefined;
208
211
  limit?: number | undefined;
212
+ releaseChannel?: "stable" | "canary" | undefined;
209
213
  }, Promise<{
210
214
  skillId: any;
211
215
  slug: string;
@@ -225,8 +229,8 @@ export declare const listGlobalSkills: import("convex/server").RegisteredQuery<"
225
229
  } | null;
226
230
  }[]>>;
227
231
  export declare const getWorkerGlobalSkillsManifest: import("convex/server").RegisteredQuery<"public", {
228
- workerId?: string | undefined;
229
232
  workspaceId?: string | undefined;
233
+ workerId?: string | undefined;
230
234
  releaseChannel?: "stable" | "canary" | undefined;
231
235
  }, Promise<{
232
236
  layoutVersion: "openclaw-workspace-skill-v1";
@@ -239,7 +243,6 @@ export declare const getWorkerGlobalSkillsManifest: import("convex/server").Regi
239
243
  version: string;
240
244
  moduleFormat: "esm" | "cjs";
241
245
  entryPoint: string;
242
- sourceJs: string;
243
246
  sha256: string;
244
247
  skillDirName: string;
245
248
  files: Array<{
@@ -278,8 +281,8 @@ export declare const attachMessageMetadata: import("convex/server").RegisteredMu
278
281
  messageId: import("convex/values").GenericId<"messageQueue">;
279
282
  }, Promise<boolean>>;
280
283
  export declare const claimNextJob: import("convex/server").RegisteredMutation<"public", {
281
- conversationId?: string | undefined;
282
284
  nowMs?: number | undefined;
285
+ conversationId?: string | undefined;
283
286
  workerId: string;
284
287
  }, Promise<{
285
288
  messageId: import("convex/values").GenericId<"messageQueue">;
@@ -288,20 +291,20 @@ export declare const claimNextJob: import("convex/server").RegisteredMutation<"p
288
291
  leaseId: string;
289
292
  leaseExpiresAt: number;
290
293
  payload: {
291
- externalMessageId?: string | undefined;
292
- rawUpdateJson?: string | undefined;
293
294
  metadata?: Record<string, string> | undefined;
294
295
  attachments?: {
296
+ sizeBytes?: number | undefined;
295
297
  fileName?: string | undefined;
296
298
  mimeType?: string | undefined;
297
- sizeBytes?: number | undefined;
298
299
  downloadUrl?: string | undefined;
299
- status: "ready" | "expired";
300
- kind: "photo" | "video" | "audio" | "voice" | "document";
300
+ status: "expired" | "ready";
301
301
  storageId: import("convex/values").GenericId<"_storage">;
302
+ kind: "photo" | "video" | "audio" | "voice" | "document";
302
303
  telegramFileId: string;
303
304
  expiresAt: number;
304
305
  }[] | undefined;
306
+ externalMessageId?: string | undefined;
307
+ rawUpdateJson?: string | undefined;
305
308
  provider: string;
306
309
  providerUserId: string;
307
310
  messageText: string;
@@ -309,41 +312,41 @@ export declare const claimNextJob: import("convex/server").RegisteredMutation<"p
309
312
  } | null>>;
310
313
  export declare const heartbeatJob: import("convex/server").RegisteredMutation<"public", {
311
314
  nowMs?: number | undefined;
312
- leaseId: string;
313
- workerId: string;
314
315
  messageId: import("convex/values").GenericId<"messageQueue">;
316
+ workerId: string;
317
+ leaseId: string;
315
318
  }, Promise<boolean>>;
316
319
  export declare const completeJob: import("convex/server").RegisteredMutation<"public", {
320
+ nowMs?: number | undefined;
317
321
  providerConfig?: {
318
- kind: "fly" | "runpod" | "ecs";
319
322
  appName: string;
320
- region: string;
323
+ kind: "fly" | "runpod" | "ecs";
321
324
  organizationSlug: string;
322
325
  image: string;
326
+ region: string;
323
327
  volumeName: string;
324
328
  volumePath: string;
325
329
  volumeSizeGb: number;
326
330
  } | undefined;
327
- nowMs?: number | undefined;
328
- leaseId: string;
329
- workerId: string;
330
331
  messageId: import("convex/values").GenericId<"messageQueue">;
332
+ workerId: string;
333
+ leaseId: string;
331
334
  }, Promise<boolean>>;
332
335
  export declare const failJob: import("convex/server").RegisteredMutation<"public", {
336
+ nowMs?: number | undefined;
333
337
  providerConfig?: {
334
- kind: "fly" | "runpod" | "ecs";
335
338
  appName: string;
336
- region: string;
339
+ kind: "fly" | "runpod" | "ecs";
337
340
  organizationSlug: string;
338
341
  image: string;
342
+ region: string;
339
343
  volumeName: string;
340
344
  volumePath: string;
341
345
  volumeSizeGb: number;
342
346
  } | undefined;
343
- nowMs?: number | undefined;
344
- leaseId: string;
345
- workerId: string;
346
347
  messageId: import("convex/values").GenericId<"messageQueue">;
348
+ workerId: string;
349
+ leaseId: string;
347
350
  errorMessage: string;
348
351
  }, Promise<{
349
352
  requeued: boolean;
@@ -365,8 +368,8 @@ export declare const releaseStuckJobs: import("convex/server").RegisteredMutatio
365
368
  unlocked: number;
366
369
  }>>;
367
370
  export declare const getHydrationBundleForClaimedJob: import("convex/server").RegisteredQuery<"public", {
368
- messageId: import("convex/values").GenericId<"messageQueue">;
369
371
  workspaceId: string;
372
+ messageId: import("convex/values").GenericId<"messageQueue">;
370
373
  }, Promise<{
371
374
  messageId: import("convex/values").GenericId<"messageQueue">;
372
375
  conversationId: string;
@@ -392,14 +395,14 @@ export declare const getHydrationBundleForClaimedJob: import("convex/server").Re
392
395
  };
393
396
  conversationState: {
394
397
  contextHistory: {
395
- role: "system" | "user" | "assistant" | "tool";
396
398
  content: string;
399
+ role: "system" | "user" | "assistant" | "tool";
397
400
  at: number;
398
401
  }[];
399
402
  pendingToolCalls: {
403
+ status: "pending" | "failed" | "running" | "done";
400
404
  toolName: string;
401
405
  callId: string;
402
- status: "pending" | "running" | "done" | "failed";
403
406
  }[];
404
407
  };
405
408
  telegramBotToken: string | null;
@@ -430,27 +433,27 @@ export declare const listQueueItemsForConversation: import("convex/server").Regi
430
433
  _creationTime: number;
431
434
  conversationId: string;
432
435
  agentKey: string;
433
- status: "done" | "failed" | "queued" | "processing" | "dead_letter";
436
+ status: "failed" | "done" | "queued" | "processing" | "dead_letter";
434
437
  priority: number;
435
438
  scheduledFor: number;
436
439
  attempts: number;
437
440
  maxAttempts: number;
438
441
  lastError: string | null;
439
442
  payload: {
440
- externalMessageId?: string | undefined;
441
- rawUpdateJson?: string | undefined;
442
443
  metadata?: Record<string, string> | undefined;
443
444
  attachments?: {
445
+ sizeBytes?: number | undefined;
444
446
  fileName?: string | undefined;
445
447
  mimeType?: string | undefined;
446
- sizeBytes?: number | undefined;
447
448
  downloadUrl?: string | undefined;
448
- status: "ready" | "expired";
449
- kind: "photo" | "video" | "audio" | "voice" | "document";
449
+ status: "expired" | "ready";
450
450
  storageId: import("convex/values").GenericId<"_storage">;
451
+ kind: "photo" | "video" | "audio" | "voice" | "document";
451
452
  telegramFileId: string;
452
453
  expiresAt: number;
453
454
  }[] | undefined;
455
+ externalMessageId?: string | undefined;
456
+ rawUpdateJson?: string | undefined;
454
457
  provider: string;
455
458
  providerUserId: string;
456
459
  messageText: string;
@@ -458,7 +461,7 @@ export declare const listQueueItemsForConversation: import("convex/server").Regi
458
461
  }[]>>;
459
462
  export declare const listQueueItemsForUserAgent: import("convex/server").RegisteredQuery<"public", {
460
463
  limit?: number | undefined;
461
- statuses?: ("done" | "failed" | "queued" | "processing" | "dead_letter")[] | undefined;
464
+ statuses?: ("failed" | "done" | "queued" | "processing" | "dead_letter")[] | undefined;
462
465
  agentKey: string;
463
466
  consumerUserId: string;
464
467
  }, Promise<{
@@ -466,27 +469,27 @@ export declare const listQueueItemsForUserAgent: import("convex/server").Registe
466
469
  _creationTime: number;
467
470
  conversationId: string;
468
471
  agentKey: string;
469
- status: "done" | "failed" | "queued" | "processing" | "dead_letter";
472
+ status: "failed" | "done" | "queued" | "processing" | "dead_letter";
470
473
  priority: number;
471
474
  scheduledFor: number;
472
475
  attempts: number;
473
476
  maxAttempts: number;
474
477
  lastError: string | null;
475
478
  payload: {
476
- externalMessageId?: string | undefined;
477
- rawUpdateJson?: string | undefined;
478
479
  metadata?: Record<string, string> | undefined;
479
480
  attachments?: {
481
+ sizeBytes?: number | undefined;
480
482
  fileName?: string | undefined;
481
483
  mimeType?: string | undefined;
482
- sizeBytes?: number | undefined;
483
484
  downloadUrl?: string | undefined;
484
- status: "ready" | "expired";
485
- kind: "photo" | "video" | "audio" | "voice" | "document";
485
+ status: "expired" | "ready";
486
486
  storageId: import("convex/values").GenericId<"_storage">;
487
+ kind: "photo" | "video" | "audio" | "voice" | "document";
487
488
  telegramFileId: string;
488
489
  expiresAt: number;
489
490
  }[] | undefined;
491
+ externalMessageId?: string | undefined;
492
+ rawUpdateJson?: string | undefined;
490
493
  provider: string;
491
494
  providerUserId: string;
492
495
  messageText: string;
@@ -499,41 +502,41 @@ export declare const getConversationViewForUserAgent: import("convex/server").Re
499
502
  }, Promise<{
500
503
  conversationId: string;
501
504
  contextHistory: {
502
- role: "system" | "user" | "assistant" | "tool";
503
505
  content: string;
506
+ role: "system" | "user" | "assistant" | "tool";
504
507
  at: number;
505
508
  }[];
506
509
  pendingToolCalls: {
510
+ status: "pending" | "failed" | "running" | "done";
507
511
  toolName: string;
508
512
  callId: string;
509
- status: "pending" | "running" | "done" | "failed";
510
513
  }[];
511
514
  queueItems: {
512
515
  _id: import("convex/values").GenericId<"messageQueue">;
513
516
  _creationTime: number;
514
517
  conversationId: string;
515
518
  agentKey: string;
516
- status: "done" | "failed" | "queued" | "processing" | "dead_letter";
519
+ status: "failed" | "done" | "queued" | "processing" | "dead_letter";
517
520
  priority: number;
518
521
  scheduledFor: number;
519
522
  attempts: number;
520
523
  maxAttempts: number;
521
524
  lastError: string | null;
522
525
  payload: {
523
- externalMessageId?: string | undefined;
524
- rawUpdateJson?: string | undefined;
525
526
  metadata?: Record<string, string> | undefined;
526
527
  attachments?: {
528
+ sizeBytes?: number | undefined;
527
529
  fileName?: string | undefined;
528
530
  mimeType?: string | undefined;
529
- sizeBytes?: number | undefined;
530
531
  downloadUrl?: string | undefined;
531
- status: "ready" | "expired";
532
- kind: "photo" | "video" | "audio" | "voice" | "document";
532
+ status: "expired" | "ready";
533
533
  storageId: import("convex/values").GenericId<"_storage">;
534
+ kind: "photo" | "video" | "audio" | "voice" | "document";
534
535
  telegramFileId: string;
535
536
  expiresAt: number;
536
537
  }[] | undefined;
538
+ externalMessageId?: string | undefined;
539
+ rawUpdateJson?: string | undefined;
537
540
  provider: string;
538
541
  providerUserId: string;
539
542
  messageText: string;
@@ -546,21 +549,41 @@ export declare const getConversationViewForUserAgent: import("convex/server").Re
546
549
  }>>;
547
550
  export declare const sendMessageToUserAgent: import("convex/server").RegisteredMutation<"public", {
548
551
  metadata?: Record<string, string> | undefined;
552
+ nowMs?: number | undefined;
549
553
  providerConfig?: {
550
- kind: "fly" | "runpod" | "ecs";
551
554
  appName: string;
552
- region: string;
555
+ kind: "fly" | "runpod" | "ecs";
553
556
  organizationSlug: string;
554
557
  image: string;
558
+ region: string;
555
559
  volumeName: string;
556
560
  volumePath: string;
557
561
  volumeSizeGb: number;
558
562
  } | undefined;
559
- nowMs?: number | undefined;
560
563
  agentKey: string;
561
- content: string;
562
564
  consumerUserId: string;
565
+ content: string;
563
566
  }, Promise<import("convex/values").GenericId<"messageQueue">>>;
567
+ export declare const sendMessageTemplateToUserAgent: import("convex/server").RegisteredMutation<"public", {
568
+ metadata?: Record<string, string> | undefined;
569
+ nowMs?: number | undefined;
570
+ providerConfig?: {
571
+ appName: string;
572
+ kind: "fly" | "runpod" | "ecs";
573
+ organizationSlug: string;
574
+ image: string;
575
+ region: string;
576
+ volumeName: string;
577
+ volumePath: string;
578
+ volumeSizeGb: number;
579
+ } | undefined;
580
+ agentKey: string;
581
+ consumerUserId: string;
582
+ templateId: import("convex/values").GenericId<"messageTemplates">;
583
+ }, Promise<{
584
+ messageId: import("convex/values").GenericId<"messageQueue">;
585
+ usageCount: number;
586
+ }>>;
564
587
  export declare const listSnapshotsForConversation: import("convex/server").RegisteredQuery<"public", {
565
588
  nowMs?: number | undefined;
566
589
  limit?: number | undefined;
@@ -571,7 +594,7 @@ export declare const listSnapshotsForConversation: import("convex/server").Regis
571
594
  sizeBytes: number | null;
572
595
  sha256: string | null;
573
596
  downloadUrl: string | null;
574
- status: "failed" | "ready" | "expired" | "uploading";
597
+ status: "expired" | "failed" | "ready" | "uploading";
575
598
  conversationId: string;
576
599
  }[]>>;
577
600
  export declare const listSnapshotsForUserAgent: import("convex/server").RegisteredQuery<"public", {
@@ -585,7 +608,7 @@ export declare const listSnapshotsForUserAgent: import("convex/server").Register
585
608
  sizeBytes: number | null;
586
609
  sha256: string | null;
587
610
  downloadUrl: string | null;
588
- status: "failed" | "ready" | "expired" | "uploading";
611
+ status: "expired" | "failed" | "ready" | "uploading";
589
612
  conversationId: string;
590
613
  }[]>>;
591
614
  export declare const getLatestSnapshotForUserAgent: import("convex/server").RegisteredQuery<"public", {
@@ -598,7 +621,7 @@ export declare const getLatestSnapshotForUserAgent: import("convex/server").Regi
598
621
  sizeBytes: number | null;
599
622
  sha256: string | null;
600
623
  downloadUrl: string | null;
601
- status: "failed" | "ready" | "expired" | "uploading";
624
+ status: "expired" | "failed" | "ready" | "uploading";
602
625
  conversationId: string;
603
626
  }>>;
604
627
  export declare const getReadyConversationCountForScheduler: import("convex/server").RegisteredQuery<"internal", {
@@ -615,13 +638,13 @@ export declare const getActiveConversationIdsForScheduler: import("convex/server
615
638
  }, Promise<string[]>>;
616
639
  export declare const listJobsByStatus: import("convex/server").RegisteredQuery<"public", {
617
640
  limit?: number | undefined;
618
- status: "done" | "failed" | "queued" | "processing" | "dead_letter";
641
+ status: "failed" | "done" | "queued" | "processing" | "dead_letter";
619
642
  }, Promise<{
620
643
  _id: import("convex/values").GenericId<"messageQueue">;
621
644
  _creationTime: number;
622
645
  conversationId: string;
623
646
  agentKey: string;
624
- status: "done" | "failed" | "queued" | "processing" | "dead_letter";
647
+ status: "failed" | "done" | "queued" | "processing" | "dead_letter";
625
648
  priority: number;
626
649
  scheduledFor: number;
627
650
  attempts: number;
@@ -629,12 +652,12 @@ export declare const listJobsByStatus: import("convex/server").RegisteredQuery<"
629
652
  lastError: string | undefined;
630
653
  }[]>>;
631
654
  export declare const upsertWorkerState: import("convex/server").RegisteredMutation<"internal", {
655
+ nowMs?: number | undefined;
632
656
  appName?: string | undefined;
633
- machineId?: string | undefined;
634
657
  region?: string | undefined;
658
+ machineId?: string | undefined;
635
659
  scheduledShutdownAt?: number | undefined;
636
660
  stoppedAt?: number | undefined;
637
- nowMs?: number | undefined;
638
661
  clearLastSnapshotId?: boolean | undefined;
639
662
  clearMachineRef?: boolean | undefined;
640
663
  status: "active" | "draining" | "stopping" | "stopped";
@@ -651,9 +674,9 @@ export declare const prepareDataSnapshotUpload: import("convex/server").Register
651
674
  nowMs?: number | undefined;
652
675
  agentKey: string;
653
676
  conversationId: string;
654
- workerId: string;
655
677
  workspaceId: string;
656
- reason: "drain" | "signal" | "manual";
678
+ workerId: string;
679
+ reason: "manual" | "drain" | "signal";
657
680
  }, Promise<{
658
681
  snapshotId: import("convex/values").GenericId<"dataSnapshots">;
659
682
  uploadUrl: string;
@@ -663,14 +686,14 @@ export declare const finalizeDataSnapshotUpload: import("convex/server").Registe
663
686
  nowMs?: number | undefined;
664
687
  workerId: string;
665
688
  storageId: import("convex/values").GenericId<"_storage">;
666
- sizeBytes: number;
667
- sha256: string;
668
689
  snapshotId: import("convex/values").GenericId<"dataSnapshots">;
690
+ sha256: string;
691
+ sizeBytes: number;
669
692
  }, Promise<boolean>>;
670
693
  export declare const failDataSnapshotUpload: import("convex/server").RegisteredMutation<"public", {
671
694
  nowMs?: number | undefined;
672
- workerId: string;
673
695
  error: string;
696
+ workerId: string;
674
697
  snapshotId: import("convex/values").GenericId<"dataSnapshots">;
675
698
  }, Promise<boolean>>;
676
699
  export declare const getLatestDataSnapshotForRestore: import("convex/server").RegisteredQuery<"public", {
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/component/queue.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAsOpD,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IACzD,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,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