@okrlinkhub/agent-factory 2.0.1 → 2.0.3

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.
@@ -1,32 +1,44 @@
1
1
  import type { Id } from "./_generated/dataModel.js";
2
+ type PreparedTelegramAttachment = {
3
+ kind: "photo" | "video" | "audio" | "voice" | "document";
4
+ status: "ready";
5
+ storageId: Id<"_storage">;
6
+ telegramFileId: string;
7
+ fileName?: string;
8
+ mimeType?: string;
9
+ sizeBytes?: number;
10
+ expiresAt: number;
11
+ downloadUrl?: string;
12
+ };
2
13
  export declare const enqueueMessage: import("convex/server").RegisteredMutation<"public", {
3
- nowMs?: number | undefined;
14
+ priority?: number | undefined;
15
+ scheduledFor?: number | undefined;
16
+ maxAttempts?: number | undefined;
4
17
  providerConfig?: {
5
- appName: string;
6
18
  kind: "fly" | "runpod" | "ecs";
19
+ appName: string;
20
+ region: string;
7
21
  organizationSlug: string;
8
22
  image: string;
9
- region: string;
10
23
  volumeName: string;
11
24
  volumePath: string;
12
25
  volumeSizeGb: number;
13
26
  } | undefined;
14
- maxAttempts?: number | undefined;
15
- priority?: number | undefined;
16
- scheduledFor?: number | undefined;
27
+ nowMs?: number | undefined;
17
28
  agentKey: string;
18
29
  conversationId: string;
19
30
  payload: {
20
- metadata?: Record<string, string> | undefined;
21
31
  externalMessageId?: string | undefined;
22
32
  rawUpdateJson?: string | undefined;
33
+ metadata?: Record<string, string> | undefined;
23
34
  attachments?: {
24
- sizeBytes?: number | undefined;
25
35
  fileName?: string | undefined;
26
36
  mimeType?: string | undefined;
27
- storageId: import("convex/values").GenericId<"_storage">;
28
- status: "expired" | "ready";
37
+ sizeBytes?: number | undefined;
38
+ downloadUrl?: string | undefined;
39
+ status: "ready" | "expired";
29
40
  kind: "photo" | "video" | "audio" | "voice" | "document";
41
+ storageId: import("convex/values").GenericId<"_storage">;
30
42
  telegramFileId: string;
31
43
  expiresAt: number;
32
44
  }[] | undefined;
@@ -36,13 +48,13 @@ export declare const enqueueMessage: import("convex/server").RegisteredMutation<
36
48
  };
37
49
  }, Promise<import("convex/values").GenericId<"messageQueue">>>;
38
50
  export declare const appendConversationMessages: import("convex/server").RegisteredMutation<"public", {
39
- nowMs?: number | undefined;
40
51
  workspaceId?: string | undefined;
52
+ nowMs?: number | undefined;
41
53
  conversationId: string;
42
54
  messages: {
43
55
  at?: number | undefined;
44
- content: string;
45
56
  role: "system" | "user" | "assistant" | "tool";
57
+ content: string;
46
58
  }[];
47
59
  }, Promise<{
48
60
  updated: boolean;
@@ -58,9 +70,9 @@ export declare const upsertAgentProfile: import("convex/server").RegisteredMutat
58
70
  enabled: boolean;
59
71
  } | undefined;
60
72
  agentKey: string;
61
- enabled: boolean;
62
- secretsRef: string[];
63
73
  version: string;
74
+ secretsRef: string[];
75
+ enabled: boolean;
64
76
  }, Promise<import("convex/values").GenericId<"agentProfiles">>>;
65
77
  export declare const importPlaintextSecret: import("convex/server").RegisteredMutation<"public", {
66
78
  metadata?: Record<string, string> | undefined;
@@ -87,11 +99,11 @@ export declare const getWorkerSpawnOpenClawEnv: import("convex/server").Register
87
99
  OPENCLAW_LINKING_SHARED_SECRET?: string;
88
100
  }>>;
89
101
  export declare const getProviderRuntimeConfig: import("convex/server").RegisteredQuery<"internal", {}, Promise<{
90
- appName: string;
91
102
  kind: "fly" | "runpod" | "ecs";
103
+ appName: string;
104
+ region: string;
92
105
  organizationSlug: string;
93
106
  image: string;
94
- region: string;
95
107
  volumeName: string;
96
108
  volumePath: string;
97
109
  volumeSizeGb: number;
@@ -99,22 +111,22 @@ export declare const getProviderRuntimeConfig: import("convex/server").Registere
99
111
  export declare const upsertProviderRuntimeConfig: import("convex/server").RegisteredMutation<"internal", {
100
112
  nowMs?: number | undefined;
101
113
  providerConfig: {
102
- appName: string;
103
114
  kind: "fly" | "runpod" | "ecs";
115
+ appName: string;
116
+ region: string;
104
117
  organizationSlug: string;
105
118
  image: string;
106
- region: string;
107
119
  volumeName: string;
108
120
  volumePath: string;
109
121
  volumeSizeGb: number;
110
122
  };
111
123
  }, Promise<null>>;
112
124
  export declare const providerRuntimeConfig: import("convex/server").RegisteredQuery<"public", {}, Promise<{
113
- appName: string;
114
125
  kind: "fly" | "runpod" | "ecs";
126
+ appName: string;
127
+ region: string;
115
128
  organizationSlug: string;
116
129
  image: string;
117
- region: string;
118
130
  volumeName: string;
119
131
  volumePath: string;
120
132
  volumeSizeGb: number;
@@ -122,11 +134,11 @@ export declare const providerRuntimeConfig: import("convex/server").RegisteredQu
122
134
  export declare const setProviderRuntimeConfig: import("convex/server").RegisteredMutation<"public", {
123
135
  nowMs?: number | undefined;
124
136
  providerConfig: {
125
- appName: string;
126
137
  kind: "fly" | "runpod" | "ecs";
138
+ appName: string;
139
+ region: string;
127
140
  organizationSlug: string;
128
141
  image: string;
129
- region: string;
130
142
  volumeName: string;
131
143
  volumePath: string;
132
144
  volumeSizeGb: number;
@@ -142,6 +154,16 @@ export declare const getTelegramIngressRuntimeConfig: import("convex/server").Re
142
154
  botToken: string | null;
143
155
  attachmentRetentionMs: number;
144
156
  }>>;
157
+ export declare const prepareTelegramAttachmentsForEnqueue: import("convex/server").RegisteredAction<"public", {
158
+ agentKey: string;
159
+ attachments: {
160
+ fileName?: string | undefined;
161
+ mimeType?: string | undefined;
162
+ sizeBytes?: number | undefined;
163
+ kind: "photo" | "video" | "audio" | "voice" | "document";
164
+ telegramFileId: string;
165
+ }[];
166
+ }, Promise<PreparedTelegramAttachment[]>>;
145
167
  export declare const upsertMessageRuntimeConfig: import("convex/server").RegisteredMutation<"internal", {
146
168
  nowMs?: number | undefined;
147
169
  messageConfig: {
@@ -161,13 +183,13 @@ export declare const setMessageRuntimeConfig: import("convex/server").Registered
161
183
  };
162
184
  }, Promise<null>>;
163
185
  export declare const deployGlobalSkill: import("convex/server").RegisteredMutation<"public", {
164
- nowMs?: number | undefined;
165
- actor?: string | undefined;
166
- description?: string | undefined;
167
186
  displayName?: string | undefined;
168
- entryPoint?: string | undefined;
187
+ description?: string | undefined;
169
188
  moduleFormat?: "esm" | "cjs" | undefined;
189
+ entryPoint?: string | undefined;
170
190
  releaseChannel?: "stable" | "canary" | undefined;
191
+ nowMs?: number | undefined;
192
+ actor?: string | undefined;
171
193
  version: string;
172
194
  slug: string;
173
195
  sourceJs: string;
@@ -181,9 +203,9 @@ export declare const deployGlobalSkill: import("convex/server").RegisteredMutati
181
203
  releaseChannel: "stable" | "canary";
182
204
  }>>;
183
205
  export declare const listGlobalSkills: import("convex/server").RegisteredQuery<"public", {
184
- limit?: number | undefined;
185
- releaseChannel?: "stable" | "canary" | undefined;
186
206
  status?: "active" | "disabled" | undefined;
207
+ releaseChannel?: "stable" | "canary" | undefined;
208
+ limit?: number | undefined;
187
209
  }, Promise<{
188
210
  skillId: any;
189
211
  slug: string;
@@ -203,8 +225,8 @@ export declare const listGlobalSkills: import("convex/server").RegisteredQuery<"
203
225
  } | null;
204
226
  }[]>>;
205
227
  export declare const getWorkerGlobalSkillsManifest: import("convex/server").RegisteredQuery<"public", {
206
- workspaceId?: string | undefined;
207
228
  workerId?: string | undefined;
229
+ workspaceId?: string | undefined;
208
230
  releaseChannel?: "stable" | "canary" | undefined;
209
231
  }, Promise<{
210
232
  layoutVersion: "openclaw-workspace-skill-v1";
@@ -230,8 +252,8 @@ export declare const getWorkerGlobalSkillsManifest: import("convex/server").Regi
230
252
  export declare const setGlobalSkillStatus: import("convex/server").RegisteredMutation<"public", {
231
253
  nowMs?: number | undefined;
232
254
  actor?: string | undefined;
233
- slug: string;
234
255
  status: "active" | "disabled";
256
+ slug: string;
235
257
  }, Promise<{
236
258
  updated: boolean;
237
259
  slug: string;
@@ -256,8 +278,8 @@ export declare const attachMessageMetadata: import("convex/server").RegisteredMu
256
278
  messageId: import("convex/values").GenericId<"messageQueue">;
257
279
  }, Promise<boolean>>;
258
280
  export declare const claimNextJob: import("convex/server").RegisteredMutation<"public", {
259
- nowMs?: number | undefined;
260
281
  conversationId?: string | undefined;
282
+ nowMs?: number | undefined;
261
283
  workerId: string;
262
284
  }, Promise<{
263
285
  messageId: import("convex/values").GenericId<"messageQueue">;
@@ -266,16 +288,17 @@ export declare const claimNextJob: import("convex/server").RegisteredMutation<"p
266
288
  leaseId: string;
267
289
  leaseExpiresAt: number;
268
290
  payload: {
269
- metadata?: Record<string, string> | undefined;
270
291
  externalMessageId?: string | undefined;
271
292
  rawUpdateJson?: string | undefined;
293
+ metadata?: Record<string, string> | undefined;
272
294
  attachments?: {
273
- sizeBytes?: number | undefined;
274
295
  fileName?: string | undefined;
275
296
  mimeType?: string | undefined;
276
- storageId: import("convex/values").GenericId<"_storage">;
277
- status: "expired" | "ready";
297
+ sizeBytes?: number | undefined;
298
+ downloadUrl?: string | undefined;
299
+ status: "ready" | "expired";
278
300
  kind: "photo" | "video" | "audio" | "voice" | "document";
301
+ storageId: import("convex/values").GenericId<"_storage">;
279
302
  telegramFileId: string;
280
303
  expiresAt: number;
281
304
  }[] | undefined;
@@ -286,41 +309,41 @@ export declare const claimNextJob: import("convex/server").RegisteredMutation<"p
286
309
  } | null>>;
287
310
  export declare const heartbeatJob: import("convex/server").RegisteredMutation<"public", {
288
311
  nowMs?: number | undefined;
289
- messageId: import("convex/values").GenericId<"messageQueue">;
290
- workerId: string;
291
312
  leaseId: string;
313
+ workerId: string;
314
+ messageId: import("convex/values").GenericId<"messageQueue">;
292
315
  }, Promise<boolean>>;
293
316
  export declare const completeJob: import("convex/server").RegisteredMutation<"public", {
294
- nowMs?: number | undefined;
295
317
  providerConfig?: {
296
- appName: string;
297
318
  kind: "fly" | "runpod" | "ecs";
319
+ appName: string;
320
+ region: string;
298
321
  organizationSlug: string;
299
322
  image: string;
300
- region: string;
301
323
  volumeName: string;
302
324
  volumePath: string;
303
325
  volumeSizeGb: number;
304
326
  } | undefined;
305
- messageId: import("convex/values").GenericId<"messageQueue">;
306
- workerId: string;
327
+ nowMs?: number | undefined;
307
328
  leaseId: string;
329
+ workerId: string;
330
+ messageId: import("convex/values").GenericId<"messageQueue">;
308
331
  }, Promise<boolean>>;
309
332
  export declare const failJob: import("convex/server").RegisteredMutation<"public", {
310
- nowMs?: number | undefined;
311
333
  providerConfig?: {
312
- appName: string;
313
334
  kind: "fly" | "runpod" | "ecs";
335
+ appName: string;
336
+ region: string;
314
337
  organizationSlug: string;
315
338
  image: string;
316
- region: string;
317
339
  volumeName: string;
318
340
  volumePath: string;
319
341
  volumeSizeGb: number;
320
342
  } | undefined;
321
- messageId: import("convex/values").GenericId<"messageQueue">;
322
- workerId: string;
343
+ nowMs?: number | undefined;
323
344
  leaseId: string;
345
+ workerId: string;
346
+ messageId: import("convex/values").GenericId<"messageQueue">;
324
347
  errorMessage: string;
325
348
  }, Promise<{
326
349
  requeued: boolean;
@@ -342,40 +365,41 @@ export declare const releaseStuckJobs: import("convex/server").RegisteredMutatio
342
365
  unlocked: number;
343
366
  }>>;
344
367
  export declare const getHydrationBundleForClaimedJob: import("convex/server").RegisteredQuery<"public", {
345
- workspaceId: string;
346
368
  messageId: import("convex/values").GenericId<"messageQueue">;
369
+ workspaceId: string;
347
370
  }, Promise<{
348
371
  messageId: import("convex/values").GenericId<"messageQueue">;
349
372
  conversationId: string;
350
373
  agentKey: string;
351
374
  payload: {
352
- metadata?: Record<string, string> | undefined;
353
- externalMessageId?: string | undefined;
354
- rawUpdateJson?: string | undefined;
355
- attachments?: {
356
- sizeBytes?: number | undefined;
357
- fileName?: string | undefined;
358
- mimeType?: string | undefined;
359
- storageId: import("convex/values").GenericId<"_storage">;
360
- status: "expired" | "ready";
361
- kind: "photo" | "video" | "audio" | "voice" | "document";
362
- telegramFileId: string;
363
- expiresAt: number;
364
- }[] | undefined;
365
375
  provider: string;
366
376
  providerUserId: string;
367
377
  messageText: string;
378
+ externalMessageId?: string;
379
+ rawUpdateJson?: string;
380
+ metadata?: Record<string, string>;
381
+ attachments?: Array<{
382
+ kind: "photo" | "video" | "audio" | "voice" | "document";
383
+ status: "ready" | "expired";
384
+ storageId: Id<"_storage">;
385
+ telegramFileId: string;
386
+ fileName?: string;
387
+ mimeType?: string;
388
+ sizeBytes?: number;
389
+ expiresAt: number;
390
+ downloadUrl?: string;
391
+ }>;
368
392
  };
369
393
  conversationState: {
370
394
  contextHistory: {
371
- content: string;
372
395
  role: "system" | "user" | "assistant" | "tool";
396
+ content: string;
373
397
  at: number;
374
398
  }[];
375
399
  pendingToolCalls: {
376
- status: "pending" | "failed" | "running" | "done";
377
400
  toolName: string;
378
401
  callId: string;
402
+ status: "pending" | "running" | "done" | "failed";
379
403
  }[];
380
404
  };
381
405
  telegramBotToken: string | null;
@@ -406,23 +430,24 @@ export declare const listQueueItemsForConversation: import("convex/server").Regi
406
430
  _creationTime: number;
407
431
  conversationId: string;
408
432
  agentKey: string;
409
- status: "failed" | "done" | "queued" | "processing" | "dead_letter";
433
+ status: "done" | "failed" | "queued" | "processing" | "dead_letter";
410
434
  priority: number;
411
435
  scheduledFor: number;
412
436
  attempts: number;
413
437
  maxAttempts: number;
414
438
  lastError: string | null;
415
439
  payload: {
416
- metadata?: Record<string, string> | undefined;
417
440
  externalMessageId?: string | undefined;
418
441
  rawUpdateJson?: string | undefined;
442
+ metadata?: Record<string, string> | undefined;
419
443
  attachments?: {
420
- sizeBytes?: number | undefined;
421
444
  fileName?: string | undefined;
422
445
  mimeType?: string | undefined;
423
- storageId: import("convex/values").GenericId<"_storage">;
424
- status: "expired" | "ready";
446
+ sizeBytes?: number | undefined;
447
+ downloadUrl?: string | undefined;
448
+ status: "ready" | "expired";
425
449
  kind: "photo" | "video" | "audio" | "voice" | "document";
450
+ storageId: import("convex/values").GenericId<"_storage">;
426
451
  telegramFileId: string;
427
452
  expiresAt: number;
428
453
  }[] | undefined;
@@ -433,7 +458,7 @@ export declare const listQueueItemsForConversation: import("convex/server").Regi
433
458
  }[]>>;
434
459
  export declare const listQueueItemsForUserAgent: import("convex/server").RegisteredQuery<"public", {
435
460
  limit?: number | undefined;
436
- statuses?: ("failed" | "done" | "queued" | "processing" | "dead_letter")[] | undefined;
461
+ statuses?: ("done" | "failed" | "queued" | "processing" | "dead_letter")[] | undefined;
437
462
  agentKey: string;
438
463
  consumerUserId: string;
439
464
  }, Promise<{
@@ -441,23 +466,24 @@ export declare const listQueueItemsForUserAgent: import("convex/server").Registe
441
466
  _creationTime: number;
442
467
  conversationId: string;
443
468
  agentKey: string;
444
- status: "failed" | "done" | "queued" | "processing" | "dead_letter";
469
+ status: "done" | "failed" | "queued" | "processing" | "dead_letter";
445
470
  priority: number;
446
471
  scheduledFor: number;
447
472
  attempts: number;
448
473
  maxAttempts: number;
449
474
  lastError: string | null;
450
475
  payload: {
451
- metadata?: Record<string, string> | undefined;
452
476
  externalMessageId?: string | undefined;
453
477
  rawUpdateJson?: string | undefined;
478
+ metadata?: Record<string, string> | undefined;
454
479
  attachments?: {
455
- sizeBytes?: number | undefined;
456
480
  fileName?: string | undefined;
457
481
  mimeType?: string | undefined;
458
- storageId: import("convex/values").GenericId<"_storage">;
459
- status: "expired" | "ready";
482
+ sizeBytes?: number | undefined;
483
+ downloadUrl?: string | undefined;
484
+ status: "ready" | "expired";
460
485
  kind: "photo" | "video" | "audio" | "voice" | "document";
486
+ storageId: import("convex/values").GenericId<"_storage">;
461
487
  telegramFileId: string;
462
488
  expiresAt: number;
463
489
  }[] | undefined;
@@ -473,37 +499,38 @@ export declare const getConversationViewForUserAgent: import("convex/server").Re
473
499
  }, Promise<{
474
500
  conversationId: string;
475
501
  contextHistory: {
476
- content: string;
477
502
  role: "system" | "user" | "assistant" | "tool";
503
+ content: string;
478
504
  at: number;
479
505
  }[];
480
506
  pendingToolCalls: {
481
- status: "pending" | "failed" | "running" | "done";
482
507
  toolName: string;
483
508
  callId: string;
509
+ status: "pending" | "running" | "done" | "failed";
484
510
  }[];
485
511
  queueItems: {
486
512
  _id: import("convex/values").GenericId<"messageQueue">;
487
513
  _creationTime: number;
488
514
  conversationId: string;
489
515
  agentKey: string;
490
- status: "failed" | "done" | "queued" | "processing" | "dead_letter";
516
+ status: "done" | "failed" | "queued" | "processing" | "dead_letter";
491
517
  priority: number;
492
518
  scheduledFor: number;
493
519
  attempts: number;
494
520
  maxAttempts: number;
495
521
  lastError: string | null;
496
522
  payload: {
497
- metadata?: Record<string, string> | undefined;
498
523
  externalMessageId?: string | undefined;
499
524
  rawUpdateJson?: string | undefined;
525
+ metadata?: Record<string, string> | undefined;
500
526
  attachments?: {
501
- sizeBytes?: number | undefined;
502
527
  fileName?: string | undefined;
503
528
  mimeType?: string | undefined;
504
- storageId: import("convex/values").GenericId<"_storage">;
505
- status: "expired" | "ready";
529
+ sizeBytes?: number | undefined;
530
+ downloadUrl?: string | undefined;
531
+ status: "ready" | "expired";
506
532
  kind: "photo" | "video" | "audio" | "voice" | "document";
533
+ storageId: import("convex/values").GenericId<"_storage">;
507
534
  telegramFileId: string;
508
535
  expiresAt: number;
509
536
  }[] | undefined;
@@ -519,20 +546,20 @@ export declare const getConversationViewForUserAgent: import("convex/server").Re
519
546
  }>>;
520
547
  export declare const sendMessageToUserAgent: import("convex/server").RegisteredMutation<"public", {
521
548
  metadata?: Record<string, string> | undefined;
522
- nowMs?: number | undefined;
523
549
  providerConfig?: {
524
- appName: string;
525
550
  kind: "fly" | "runpod" | "ecs";
551
+ appName: string;
552
+ region: string;
526
553
  organizationSlug: string;
527
554
  image: string;
528
- region: string;
529
555
  volumeName: string;
530
556
  volumePath: string;
531
557
  volumeSizeGb: number;
532
558
  } | undefined;
559
+ nowMs?: number | undefined;
533
560
  agentKey: string;
534
- consumerUserId: string;
535
561
  content: string;
562
+ consumerUserId: string;
536
563
  }, Promise<import("convex/values").GenericId<"messageQueue">>>;
537
564
  export declare const listSnapshotsForConversation: import("convex/server").RegisteredQuery<"public", {
538
565
  nowMs?: number | undefined;
@@ -544,7 +571,7 @@ export declare const listSnapshotsForConversation: import("convex/server").Regis
544
571
  sizeBytes: number | null;
545
572
  sha256: string | null;
546
573
  downloadUrl: string | null;
547
- status: "expired" | "failed" | "ready" | "uploading";
574
+ status: "failed" | "ready" | "expired" | "uploading";
548
575
  conversationId: string;
549
576
  }[]>>;
550
577
  export declare const listSnapshotsForUserAgent: import("convex/server").RegisteredQuery<"public", {
@@ -558,7 +585,7 @@ export declare const listSnapshotsForUserAgent: import("convex/server").Register
558
585
  sizeBytes: number | null;
559
586
  sha256: string | null;
560
587
  downloadUrl: string | null;
561
- status: "expired" | "failed" | "ready" | "uploading";
588
+ status: "failed" | "ready" | "expired" | "uploading";
562
589
  conversationId: string;
563
590
  }[]>>;
564
591
  export declare const getLatestSnapshotForUserAgent: import("convex/server").RegisteredQuery<"public", {
@@ -571,7 +598,7 @@ export declare const getLatestSnapshotForUserAgent: import("convex/server").Regi
571
598
  sizeBytes: number | null;
572
599
  sha256: string | null;
573
600
  downloadUrl: string | null;
574
- status: "expired" | "failed" | "ready" | "uploading";
601
+ status: "failed" | "ready" | "expired" | "uploading";
575
602
  conversationId: string;
576
603
  }>>;
577
604
  export declare const getReadyConversationCountForScheduler: import("convex/server").RegisteredQuery<"internal", {
@@ -588,13 +615,13 @@ export declare const getActiveConversationIdsForScheduler: import("convex/server
588
615
  }, Promise<string[]>>;
589
616
  export declare const listJobsByStatus: import("convex/server").RegisteredQuery<"public", {
590
617
  limit?: number | undefined;
591
- status: "failed" | "done" | "queued" | "processing" | "dead_letter";
618
+ status: "done" | "failed" | "queued" | "processing" | "dead_letter";
592
619
  }, Promise<{
593
620
  _id: import("convex/values").GenericId<"messageQueue">;
594
621
  _creationTime: number;
595
622
  conversationId: string;
596
623
  agentKey: string;
597
- status: "failed" | "done" | "queued" | "processing" | "dead_letter";
624
+ status: "done" | "failed" | "queued" | "processing" | "dead_letter";
598
625
  priority: number;
599
626
  scheduledFor: number;
600
627
  attempts: number;
@@ -602,16 +629,16 @@ export declare const listJobsByStatus: import("convex/server").RegisteredQuery<"
602
629
  lastError: string | undefined;
603
630
  }[]>>;
604
631
  export declare const upsertWorkerState: import("convex/server").RegisteredMutation<"internal", {
605
- nowMs?: number | undefined;
606
632
  appName?: string | undefined;
607
- region?: string | undefined;
608
633
  machineId?: string | undefined;
634
+ region?: string | undefined;
609
635
  scheduledShutdownAt?: number | undefined;
610
636
  stoppedAt?: number | undefined;
637
+ nowMs?: number | undefined;
611
638
  clearLastSnapshotId?: boolean | undefined;
612
639
  clearMachineRef?: boolean | undefined;
613
- workerId: string;
614
640
  status: "active" | "draining" | "stopping" | "stopped";
641
+ workerId: string;
615
642
  provider: string;
616
643
  load: number;
617
644
  }, Promise<null>>;
@@ -624,9 +651,9 @@ export declare const prepareDataSnapshotUpload: import("convex/server").Register
624
651
  nowMs?: number | undefined;
625
652
  agentKey: string;
626
653
  conversationId: string;
627
- workspaceId: string;
628
654
  workerId: string;
629
- reason: "manual" | "drain" | "signal";
655
+ workspaceId: string;
656
+ reason: "drain" | "signal" | "manual";
630
657
  }, Promise<{
631
658
  snapshotId: import("convex/values").GenericId<"dataSnapshots">;
632
659
  uploadUrl: string;
@@ -636,9 +663,9 @@ export declare const finalizeDataSnapshotUpload: import("convex/server").Registe
636
663
  nowMs?: number | undefined;
637
664
  workerId: string;
638
665
  storageId: import("convex/values").GenericId<"_storage">;
639
- snapshotId: import("convex/values").GenericId<"dataSnapshots">;
640
- sha256: string;
641
666
  sizeBytes: number;
667
+ sha256: string;
668
+ snapshotId: import("convex/values").GenericId<"dataSnapshots">;
642
669
  }, Promise<boolean>>;
643
670
  export declare const failDataSnapshotUpload: import("convex/server").RegisteredMutation<"public", {
644
671
  nowMs?: number | undefined;
@@ -697,4 +724,5 @@ export declare const getWorkerStats: import("convex/server").RegisteredQuery<"pu
697
724
  appName: string | null;
698
725
  }[];
699
726
  }>>;
727
+ export {};
700
728
  //# sourceMappingURL=queue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/component/queue.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAC;AAqNpD,eAAO,MAAM,cAAc;;;;;;;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