@okrlinkhub/agent-factory 0.2.11 → 0.2.12

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 (69) hide show
  1. package/dist/client/_generated/_ignore.d.ts +1 -0
  2. package/dist/client/_generated/_ignore.d.ts.map +1 -0
  3. package/dist/client/_generated/_ignore.js +3 -0
  4. package/dist/client/_generated/_ignore.js.map +1 -0
  5. package/dist/client/bridge.d.ts +65 -0
  6. package/dist/client/bridge.d.ts.map +1 -0
  7. package/dist/client/bridge.js +192 -0
  8. package/dist/client/bridge.js.map +1 -0
  9. package/dist/client/index.d.ts +516 -0
  10. package/dist/client/index.d.ts.map +1 -0
  11. package/dist/client/index.js +795 -0
  12. package/dist/client/index.js.map +1 -0
  13. package/dist/component/_generated/api.d.ts +46 -0
  14. package/dist/component/_generated/api.d.ts.map +1 -0
  15. package/dist/component/_generated/api.js +31 -0
  16. package/dist/component/_generated/api.js.map +1 -0
  17. package/dist/component/_generated/component.d.ts +1396 -0
  18. package/dist/component/_generated/component.d.ts.map +1 -0
  19. package/dist/component/_generated/component.js +11 -0
  20. package/dist/component/_generated/component.js.map +1 -0
  21. package/dist/component/_generated/dataModel.d.ts +46 -0
  22. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  23. package/dist/component/_generated/dataModel.js +11 -0
  24. package/dist/component/_generated/dataModel.js.map +1 -0
  25. package/dist/component/_generated/server.d.ts +121 -0
  26. package/dist/component/_generated/server.d.ts.map +1 -0
  27. package/dist/component/_generated/server.js +78 -0
  28. package/dist/component/_generated/server.js.map +1 -0
  29. package/dist/component/config.d.ts +254 -0
  30. package/dist/component/config.d.ts.map +1 -0
  31. package/dist/component/config.js +152 -0
  32. package/dist/component/config.js.map +1 -0
  33. package/dist/component/convex.config.d.ts +3 -0
  34. package/dist/component/convex.config.d.ts.map +1 -0
  35. package/dist/component/convex.config.js +3 -0
  36. package/dist/component/convex.config.js.map +1 -0
  37. package/dist/component/identity.d.ts +111 -0
  38. package/dist/component/identity.d.ts.map +1 -0
  39. package/dist/component/identity.js +455 -0
  40. package/dist/component/identity.js.map +1 -0
  41. package/dist/component/lib.d.ts +6 -0
  42. package/dist/component/lib.d.ts.map +1 -0
  43. package/dist/component/lib.js +6 -0
  44. package/dist/component/lib.js.map +1 -0
  45. package/dist/component/providers/fly.d.ts +51 -0
  46. package/dist/component/providers/fly.d.ts.map +1 -0
  47. package/dist/component/providers/fly.js +234 -0
  48. package/dist/component/providers/fly.js.map +1 -0
  49. package/dist/component/pushing.d.ts +256 -0
  50. package/dist/component/pushing.d.ts.map +1 -0
  51. package/dist/component/pushing.js +1009 -0
  52. package/dist/component/pushing.js.map +1 -0
  53. package/dist/component/queue.d.ts +361 -0
  54. package/dist/component/queue.d.ts.map +1 -0
  55. package/dist/component/queue.js +1407 -0
  56. package/dist/component/queue.js.map +1 -0
  57. package/dist/component/scheduler.d.ts +116 -0
  58. package/dist/component/scheduler.d.ts.map +1 -0
  59. package/dist/component/scheduler.js +410 -0
  60. package/dist/component/scheduler.js.map +1 -0
  61. package/dist/component/schema.d.ts +648 -0
  62. package/dist/component/schema.d.ts.map +1 -0
  63. package/dist/component/schema.js +295 -0
  64. package/dist/component/schema.js.map +1 -0
  65. package/dist/react/index.d.ts +2 -0
  66. package/dist/react/index.d.ts.map +1 -0
  67. package/dist/react/index.js +6 -0
  68. package/dist/react/index.js.map +1 -0
  69. package/package.json +1 -1
@@ -0,0 +1,1396 @@
1
+ /**
2
+ * Generated `ComponentApi` utility.
3
+ *
4
+ * THIS CODE IS AUTOMATICALLY GENERATED.
5
+ *
6
+ * To regenerate, run `npx convex dev`.
7
+ * @module
8
+ */
9
+ import type { FunctionReference } from "convex/server";
10
+ /**
11
+ * A utility for referencing a Convex component's exposed API.
12
+ *
13
+ * Useful when expecting a parameter like `components.myComponent`.
14
+ * Usage:
15
+ * ```ts
16
+ * async function myFunction(ctx: QueryCtx, component: ComponentApi) {
17
+ * return ctx.runQuery(component.someFile.someQuery, { ...args });
18
+ * }
19
+ * ```
20
+ */
21
+ export type ComponentApi<Name extends string | undefined = string | undefined> = {
22
+ identity: {
23
+ bindUserAgent: FunctionReference<"mutation", "internal", {
24
+ agentKey: string;
25
+ consumerUserId: string;
26
+ metadata?: Record<string, string>;
27
+ nowMs?: number;
28
+ source?: "manual" | "telegram_pairing" | "api";
29
+ telegramChatId?: string;
30
+ telegramUserId?: string;
31
+ }, {
32
+ agentKey: string;
33
+ boundAt: number;
34
+ consumerUserId: string;
35
+ metadata: null | Record<string, string>;
36
+ revokedAt: null | number;
37
+ source: "manual" | "telegram_pairing" | "api";
38
+ status: "active" | "revoked";
39
+ telegramChatId: null | string;
40
+ telegramUserId: null | string;
41
+ }, Name>;
42
+ configureTelegramWebhook: FunctionReference<"action", "internal", {
43
+ convexSiteUrl: string;
44
+ secretRef?: string;
45
+ }, {
46
+ currentUrl: null | string;
47
+ description: string;
48
+ isReady: boolean;
49
+ lastErrorDate: null | number;
50
+ lastErrorMessage: null | string;
51
+ ok: boolean;
52
+ pendingUpdateCount: number;
53
+ webhookUrl: string;
54
+ }, Name>;
55
+ consumePairingCode: FunctionReference<"mutation", "internal", {
56
+ code: string;
57
+ nowMs?: number;
58
+ telegramChatId: string;
59
+ telegramUserId: string;
60
+ }, {
61
+ agentKey: string;
62
+ code: string;
63
+ consumerUserId: string;
64
+ createdAt: number;
65
+ expiresAt: number;
66
+ status: "pending" | "used" | "expired";
67
+ telegramChatId: null | string;
68
+ telegramUserId: null | string;
69
+ usedAt: null | number;
70
+ }, Name>;
71
+ createPairingCode: FunctionReference<"mutation", "internal", {
72
+ agentKey: string;
73
+ consumerUserId: string;
74
+ nowMs?: number;
75
+ ttlMs?: number;
76
+ }, {
77
+ agentKey: string;
78
+ code: string;
79
+ consumerUserId: string;
80
+ createdAt: number;
81
+ expiresAt: number;
82
+ status: "pending" | "used" | "expired";
83
+ telegramChatId: null | string;
84
+ telegramUserId: null | string;
85
+ usedAt: null | number;
86
+ }, Name>;
87
+ getPairingCodeStatus: FunctionReference<"query", "internal", {
88
+ code: string;
89
+ nowMs?: number;
90
+ }, null | {
91
+ agentKey: string;
92
+ code: string;
93
+ consumerUserId: string;
94
+ createdAt: number;
95
+ expiresAt: number;
96
+ status: "pending" | "used" | "expired";
97
+ telegramChatId: null | string;
98
+ telegramUserId: null | string;
99
+ usedAt: null | number;
100
+ }, Name>;
101
+ getUserAgentBinding: FunctionReference<"query", "internal", {
102
+ consumerUserId: string;
103
+ }, null | {
104
+ agentKey: string;
105
+ boundAt: number;
106
+ consumerUserId: string;
107
+ metadata: null | Record<string, string>;
108
+ revokedAt: null | number;
109
+ source: "manual" | "telegram_pairing" | "api";
110
+ status: "active" | "revoked";
111
+ telegramChatId: null | string;
112
+ telegramUserId: null | string;
113
+ }, Name>;
114
+ resolveAgentForTelegram: FunctionReference<"query", "internal", {
115
+ telegramChatId?: string;
116
+ telegramUserId?: string;
117
+ }, {
118
+ agentKey: null | string;
119
+ consumerUserId: null | string;
120
+ }, Name>;
121
+ resolveAgentForUser: FunctionReference<"query", "internal", {
122
+ consumerUserId: string;
123
+ }, {
124
+ agentKey: null | string;
125
+ consumerUserId: string;
126
+ }, Name>;
127
+ revokeUserAgentBinding: FunctionReference<"mutation", "internal", {
128
+ consumerUserId: string;
129
+ nowMs?: number;
130
+ }, {
131
+ revoked: number;
132
+ }, Name>;
133
+ };
134
+ lib: {
135
+ appendConversationMessages: FunctionReference<"mutation", "internal", {
136
+ conversationId: string;
137
+ messages: Array<{
138
+ at?: number;
139
+ content: string;
140
+ role: "system" | "user" | "assistant" | "tool";
141
+ }>;
142
+ nowMs?: number;
143
+ workspaceId?: string;
144
+ }, {
145
+ messageCount: number;
146
+ updated: boolean;
147
+ }, Name>;
148
+ attachMessageMetadata: FunctionReference<"mutation", "internal", {
149
+ messageId: string;
150
+ metadata: Record<string, string>;
151
+ }, boolean, Name>;
152
+ bindUserAgent: FunctionReference<"mutation", "internal", {
153
+ agentKey: string;
154
+ consumerUserId: string;
155
+ metadata?: Record<string, string>;
156
+ nowMs?: number;
157
+ source?: "manual" | "telegram_pairing" | "api";
158
+ telegramChatId?: string;
159
+ telegramUserId?: string;
160
+ }, {
161
+ agentKey: string;
162
+ boundAt: number;
163
+ consumerUserId: string;
164
+ metadata: null | Record<string, string>;
165
+ revokedAt: null | number;
166
+ source: "manual" | "telegram_pairing" | "api";
167
+ status: "active" | "revoked";
168
+ telegramChatId: null | string;
169
+ telegramUserId: null | string;
170
+ }, Name>;
171
+ checkIdleShutdowns: FunctionReference<"action", "internal", {
172
+ flyApiToken?: string;
173
+ nowMs?: number;
174
+ providerConfig?: {
175
+ appName: string;
176
+ image: string;
177
+ kind: "fly" | "runpod" | "ecs";
178
+ organizationSlug: string;
179
+ region: string;
180
+ volumeName: string;
181
+ volumePath: string;
182
+ volumeSizeGb: number;
183
+ };
184
+ }, {
185
+ checked: number;
186
+ nextCheckScheduled: boolean;
187
+ pending: number;
188
+ stopped: number;
189
+ }, Name>;
190
+ claim: FunctionReference<"mutation", "internal", {
191
+ nowMs?: number;
192
+ workerId: string;
193
+ }, null | {
194
+ agentKey: string;
195
+ conversationId: string;
196
+ leaseExpiresAt: number;
197
+ leaseId: string;
198
+ messageId: string;
199
+ payload: {
200
+ externalMessageId?: string;
201
+ messageText: string;
202
+ metadata?: Record<string, string>;
203
+ provider: string;
204
+ providerUserId: string;
205
+ rawUpdateJson?: string;
206
+ };
207
+ }, Name>;
208
+ complete: FunctionReference<"mutation", "internal", {
209
+ leaseId: string;
210
+ messageId: string;
211
+ nowMs?: number;
212
+ providerConfig?: {
213
+ appName: string;
214
+ image: string;
215
+ kind: "fly" | "runpod" | "ecs";
216
+ organizationSlug: string;
217
+ region: string;
218
+ volumeName: string;
219
+ volumePath: string;
220
+ volumeSizeGb: number;
221
+ };
222
+ workerId: string;
223
+ }, boolean, Name>;
224
+ configureAgent: FunctionReference<"mutation", "internal", {
225
+ agentKey: string;
226
+ bridgeConfig?: {
227
+ appBaseUrlMapJsonSecretRef?: string;
228
+ appKey?: string;
229
+ baseUrl?: string;
230
+ enabled: boolean;
231
+ serviceId?: string;
232
+ serviceKeySecretRef?: string;
233
+ };
234
+ clientMd?: string;
235
+ enabled: boolean;
236
+ providerUserId?: string;
237
+ secretsRef: Array<string>;
238
+ skills: Array<string>;
239
+ soulMd: string;
240
+ version: string;
241
+ }, string, Name>;
242
+ configureTelegramWebhook: FunctionReference<"action", "internal", {
243
+ convexSiteUrl: string;
244
+ secretRef?: string;
245
+ }, {
246
+ currentUrl: null | string;
247
+ description: string;
248
+ isReady: boolean;
249
+ lastErrorDate: null | number;
250
+ lastErrorMessage: null | string;
251
+ ok: boolean;
252
+ pendingUpdateCount: number;
253
+ webhookUrl: string;
254
+ }, Name>;
255
+ consumePairingCode: FunctionReference<"mutation", "internal", {
256
+ code: string;
257
+ nowMs?: number;
258
+ telegramChatId: string;
259
+ telegramUserId: string;
260
+ }, {
261
+ agentKey: string;
262
+ code: string;
263
+ consumerUserId: string;
264
+ createdAt: number;
265
+ expiresAt: number;
266
+ status: "pending" | "used" | "expired";
267
+ telegramChatId: null | string;
268
+ telegramUserId: null | string;
269
+ usedAt: null | number;
270
+ }, Name>;
271
+ createPairingCode: FunctionReference<"mutation", "internal", {
272
+ agentKey: string;
273
+ consumerUserId: string;
274
+ nowMs?: number;
275
+ ttlMs?: number;
276
+ }, {
277
+ agentKey: string;
278
+ code: string;
279
+ consumerUserId: string;
280
+ createdAt: number;
281
+ expiresAt: number;
282
+ status: "pending" | "used" | "expired";
283
+ telegramChatId: null | string;
284
+ telegramUserId: null | string;
285
+ usedAt: null | number;
286
+ }, Name>;
287
+ createPushJobCustom: FunctionReference<"mutation", "internal", {
288
+ companyId: string;
289
+ consumerUserId: string;
290
+ enabled?: boolean;
291
+ nowMs?: number;
292
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
293
+ schedule: {
294
+ kind: "manual";
295
+ } | {
296
+ kind: "daily";
297
+ time: string;
298
+ } | {
299
+ kind: "weekly";
300
+ time: string;
301
+ weekday: number;
302
+ } | {
303
+ dayOfMonth: number | "last";
304
+ kind: "monthly";
305
+ time: string;
306
+ };
307
+ text: string;
308
+ timezone: string;
309
+ title: string;
310
+ }, string, Name>;
311
+ createPushJobFromTemplate: FunctionReference<"mutation", "internal", {
312
+ companyId: string;
313
+ consumerUserId: string;
314
+ enabled?: boolean;
315
+ nowMs?: number;
316
+ schedule?: {
317
+ kind: "manual";
318
+ } | {
319
+ kind: "daily";
320
+ time: string;
321
+ } | {
322
+ kind: "weekly";
323
+ time: string;
324
+ weekday: number;
325
+ } | {
326
+ dayOfMonth: number | "last";
327
+ kind: "monthly";
328
+ time: string;
329
+ };
330
+ templateId: string;
331
+ timezone: string;
332
+ }, string, Name>;
333
+ createPushTemplate: FunctionReference<"mutation", "internal", {
334
+ actorUserId: string;
335
+ companyId: string;
336
+ enabled?: boolean;
337
+ nowMs?: number;
338
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
339
+ suggestedTimes: Array<{
340
+ kind: "daily";
341
+ time: string;
342
+ } | {
343
+ kind: "weekly";
344
+ time: string;
345
+ weekday: number;
346
+ } | {
347
+ dayOfMonth: number | "last";
348
+ kind: "monthly";
349
+ time: string;
350
+ }>;
351
+ templateKey: string;
352
+ text: string;
353
+ title: string;
354
+ }, string, Name>;
355
+ deleteFlyVolume: FunctionReference<"action", "internal", {
356
+ appName: string;
357
+ flyApiToken?: string;
358
+ volumeId: string;
359
+ }, {
360
+ message: string;
361
+ ok: boolean;
362
+ status: number;
363
+ }, Name>;
364
+ deletePushJob: FunctionReference<"mutation", "internal", {
365
+ jobId: string;
366
+ }, boolean, Name>;
367
+ deletePushTemplate: FunctionReference<"mutation", "internal", {
368
+ templateId: string;
369
+ }, boolean, Name>;
370
+ dispatchDuePushJobs: FunctionReference<"mutation", "internal", {
371
+ limit?: number;
372
+ nowMs?: number;
373
+ providerConfig?: {
374
+ appName: string;
375
+ image: string;
376
+ kind: "fly" | "runpod" | "ecs";
377
+ organizationSlug: string;
378
+ region: string;
379
+ volumeName: string;
380
+ volumePath: string;
381
+ volumeSizeGb: number;
382
+ };
383
+ }, {
384
+ enqueued: number;
385
+ failed: number;
386
+ scanned: number;
387
+ skipped: number;
388
+ }, Name>;
389
+ enqueue: FunctionReference<"mutation", "internal", {
390
+ agentKey: string;
391
+ conversationId: string;
392
+ maxAttempts?: number;
393
+ nowMs?: number;
394
+ payload: {
395
+ externalMessageId?: string;
396
+ messageText: string;
397
+ metadata?: Record<string, string>;
398
+ provider: string;
399
+ providerUserId: string;
400
+ rawUpdateJson?: string;
401
+ };
402
+ priority?: number;
403
+ providerConfig?: {
404
+ appName: string;
405
+ image: string;
406
+ kind: "fly" | "runpod" | "ecs";
407
+ organizationSlug: string;
408
+ region: string;
409
+ volumeName: string;
410
+ volumePath: string;
411
+ volumeSizeGb: number;
412
+ };
413
+ scheduledFor?: number;
414
+ }, string, Name>;
415
+ fail: FunctionReference<"mutation", "internal", {
416
+ errorMessage: string;
417
+ leaseId: string;
418
+ messageId: string;
419
+ nowMs?: number;
420
+ providerConfig?: {
421
+ appName: string;
422
+ image: string;
423
+ kind: "fly" | "runpod" | "ecs";
424
+ organizationSlug: string;
425
+ region: string;
426
+ volumeName: string;
427
+ volumePath: string;
428
+ volumeSizeGb: number;
429
+ };
430
+ workerId: string;
431
+ }, {
432
+ deadLettered: boolean;
433
+ nextScheduledFor: null | number;
434
+ requeued: boolean;
435
+ }, Name>;
436
+ generateMediaUploadUrl: FunctionReference<"mutation", "internal", {}, {
437
+ uploadUrl: string;
438
+ }, Name>;
439
+ getHydrationBundle: FunctionReference<"query", "internal", {
440
+ messageId: string;
441
+ workspaceId: string;
442
+ }, null | {
443
+ agentKey: string;
444
+ bridgeRuntimeConfig: null | {
445
+ appBaseUrlMapJson: null | string;
446
+ appKey: null | string;
447
+ baseUrl: null | string;
448
+ serviceId: null | string;
449
+ serviceKey: null | string;
450
+ serviceKeySecretRef: null | string;
451
+ };
452
+ conversationId: string;
453
+ conversationState: {
454
+ contextHistory: Array<{
455
+ at: number;
456
+ content: string;
457
+ role: "system" | "user" | "assistant" | "tool";
458
+ }>;
459
+ pendingToolCalls: Array<{
460
+ callId: string;
461
+ status: "pending" | "running" | "done" | "failed";
462
+ toolName: string;
463
+ }>;
464
+ };
465
+ messageId: string;
466
+ payload: {
467
+ externalMessageId?: string;
468
+ messageText: string;
469
+ metadata?: Record<string, string>;
470
+ provider: string;
471
+ providerUserId: string;
472
+ rawUpdateJson?: string;
473
+ };
474
+ telegramBotToken: null | string;
475
+ }, Name>;
476
+ getPairingCodeStatus: FunctionReference<"query", "internal", {
477
+ code: string;
478
+ nowMs?: number;
479
+ }, null | {
480
+ agentKey: string;
481
+ code: string;
482
+ consumerUserId: string;
483
+ createdAt: number;
484
+ expiresAt: number;
485
+ status: "pending" | "used" | "expired";
486
+ telegramChatId: null | string;
487
+ telegramUserId: null | string;
488
+ usedAt: null | number;
489
+ }, Name>;
490
+ getStorageFileUrl: FunctionReference<"query", "internal", {
491
+ storageId: string;
492
+ }, null | string, Name>;
493
+ getUserAgentBinding: FunctionReference<"query", "internal", {
494
+ consumerUserId: string;
495
+ }, null | {
496
+ agentKey: string;
497
+ boundAt: number;
498
+ consumerUserId: string;
499
+ metadata: null | Record<string, string>;
500
+ revokedAt: null | number;
501
+ source: "manual" | "telegram_pairing" | "api";
502
+ status: "active" | "revoked";
503
+ telegramChatId: null | string;
504
+ telegramUserId: null | string;
505
+ }, Name>;
506
+ heartbeat: FunctionReference<"mutation", "internal", {
507
+ leaseId: string;
508
+ messageId: string;
509
+ nowMs?: number;
510
+ workerId: string;
511
+ }, boolean, Name>;
512
+ importSecret: FunctionReference<"mutation", "internal", {
513
+ metadata?: Record<string, string>;
514
+ plaintextValue: string;
515
+ secretRef: string;
516
+ }, {
517
+ secretId: string;
518
+ secretRef: string;
519
+ version: number;
520
+ }, Name>;
521
+ listPushDispatchesByJob: FunctionReference<"query", "internal", {
522
+ jobId: string;
523
+ limit?: number;
524
+ }, Array<{
525
+ _id: string;
526
+ createdAt: number;
527
+ error: null | string;
528
+ runKey: string;
529
+ scheduledFor: number;
530
+ status: "enqueued" | "skipped" | "failed";
531
+ }>, Name>;
532
+ listPushJobsForUser: FunctionReference<"query", "internal", {
533
+ consumerUserId: string;
534
+ includeDisabled?: boolean;
535
+ }, Array<{
536
+ _id: string;
537
+ agentKey: null | string;
538
+ companyId: string;
539
+ consumerUserId: string;
540
+ createdAt: number;
541
+ enabled: boolean;
542
+ lastRunAt: null | number;
543
+ lastRunKey: null | string;
544
+ nextRunAt: null | number;
545
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
546
+ schedule: {
547
+ kind: "manual";
548
+ } | {
549
+ kind: "daily";
550
+ time: string;
551
+ } | {
552
+ kind: "weekly";
553
+ time: string;
554
+ weekday: number;
555
+ } | {
556
+ dayOfMonth: number | "last";
557
+ kind: "monthly";
558
+ time: string;
559
+ };
560
+ sourceTemplateId: null | string;
561
+ text: string;
562
+ timezone: string;
563
+ title: string;
564
+ updatedAt: number;
565
+ }>, Name>;
566
+ listPushTemplatesByCompany: FunctionReference<"query", "internal", {
567
+ companyId: string;
568
+ includeDisabled?: boolean;
569
+ }, Array<{
570
+ _id: string;
571
+ companyId: string;
572
+ createdAt: number;
573
+ createdBy: string;
574
+ enabled: boolean;
575
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
576
+ suggestedTimes: Array<{
577
+ kind: "daily";
578
+ time: string;
579
+ } | {
580
+ kind: "weekly";
581
+ time: string;
582
+ weekday: number;
583
+ } | {
584
+ dayOfMonth: number | "last";
585
+ kind: "monthly";
586
+ time: string;
587
+ }>;
588
+ templateKey: string;
589
+ text: string;
590
+ title: string;
591
+ updatedAt: number;
592
+ updatedBy: string;
593
+ }>, Name>;
594
+ providerRuntimeConfig: FunctionReference<"query", "internal", {}, null | {
595
+ appName: string;
596
+ image: string;
597
+ kind: "fly" | "runpod" | "ecs";
598
+ organizationSlug: string;
599
+ region: string;
600
+ volumeName: string;
601
+ volumePath: string;
602
+ volumeSizeGb: number;
603
+ }, Name>;
604
+ queueStats: FunctionReference<"query", "internal", {
605
+ nowMs?: number;
606
+ }, {
607
+ deadLetter: number;
608
+ processing: number;
609
+ queuedReady: number;
610
+ }, Name>;
611
+ reconcileWorkers: FunctionReference<"action", "internal", {
612
+ convexUrl?: string;
613
+ flyApiToken?: string;
614
+ nowMs?: number;
615
+ providerConfig?: {
616
+ appName: string;
617
+ image: string;
618
+ kind: "fly" | "runpod" | "ecs";
619
+ organizationSlug: string;
620
+ region: string;
621
+ volumeName: string;
622
+ volumePath: string;
623
+ volumeSizeGb: number;
624
+ };
625
+ scalingPolicy?: {
626
+ idleTimeoutMs: number;
627
+ maxWorkers: number;
628
+ queuePerWorkerTarget: number;
629
+ reconcileIntervalMs: number;
630
+ spawnStep: number;
631
+ };
632
+ workspaceId?: string;
633
+ }, {
634
+ activeWorkers: number;
635
+ spawned: number;
636
+ terminated: number;
637
+ }, Name>;
638
+ releaseStuckJobs: FunctionReference<"mutation", "internal", {
639
+ limit?: number;
640
+ nowMs?: number;
641
+ }, {
642
+ requeued: number;
643
+ unlocked: number;
644
+ }, Name>;
645
+ resolveAgentForTelegram: FunctionReference<"query", "internal", {
646
+ telegramChatId?: string;
647
+ telegramUserId?: string;
648
+ }, {
649
+ agentKey: null | string;
650
+ consumerUserId: null | string;
651
+ }, Name>;
652
+ resolveAgentForUser: FunctionReference<"query", "internal", {
653
+ consumerUserId: string;
654
+ }, {
655
+ agentKey: null | string;
656
+ consumerUserId: string;
657
+ }, Name>;
658
+ revokeUserAgentBinding: FunctionReference<"mutation", "internal", {
659
+ consumerUserId: string;
660
+ nowMs?: number;
661
+ }, {
662
+ revoked: number;
663
+ }, Name>;
664
+ secretStatus: FunctionReference<"query", "internal", {
665
+ secretRefs: Array<string>;
666
+ }, Array<{
667
+ hasActive: boolean;
668
+ secretRef: string;
669
+ version: null | number;
670
+ }>, Name>;
671
+ sendBroadcastToAllActiveAgents: FunctionReference<"mutation", "internal", {
672
+ companyId: string;
673
+ nowMs?: number;
674
+ providerConfig?: {
675
+ appName: string;
676
+ image: string;
677
+ kind: "fly" | "runpod" | "ecs";
678
+ organizationSlug: string;
679
+ region: string;
680
+ volumeName: string;
681
+ volumePath: string;
682
+ volumeSizeGb: number;
683
+ };
684
+ requestedBy: string;
685
+ text: string;
686
+ title: string;
687
+ }, {
688
+ broadcastId: string;
689
+ enqueued: number;
690
+ failed: number;
691
+ totalTargets: number;
692
+ }, Name>;
693
+ setProviderRuntimeConfig: FunctionReference<"mutation", "internal", {
694
+ nowMs?: number;
695
+ providerConfig: {
696
+ appName: string;
697
+ image: string;
698
+ kind: "fly" | "runpod" | "ecs";
699
+ organizationSlug: string;
700
+ region: string;
701
+ volumeName: string;
702
+ volumePath: string;
703
+ volumeSizeGb: number;
704
+ };
705
+ }, null, Name>;
706
+ setPushJobEnabled: FunctionReference<"mutation", "internal", {
707
+ enabled: boolean;
708
+ jobId: string;
709
+ nowMs?: number;
710
+ }, boolean, Name>;
711
+ triggerPushJobNow: FunctionReference<"mutation", "internal", {
712
+ jobId: string;
713
+ nowMs?: number;
714
+ providerConfig?: {
715
+ appName: string;
716
+ image: string;
717
+ kind: "fly" | "runpod" | "ecs";
718
+ organizationSlug: string;
719
+ region: string;
720
+ volumeName: string;
721
+ volumePath: string;
722
+ volumeSizeGb: number;
723
+ };
724
+ }, {
725
+ enqueuedMessageId: string;
726
+ runKey: string;
727
+ }, Name>;
728
+ updatePushJob: FunctionReference<"mutation", "internal", {
729
+ enabled?: boolean;
730
+ jobId: string;
731
+ nowMs?: number;
732
+ periodicity?: "manual" | "daily" | "weekly" | "monthly";
733
+ schedule?: {
734
+ kind: "manual";
735
+ } | {
736
+ kind: "daily";
737
+ time: string;
738
+ } | {
739
+ kind: "weekly";
740
+ time: string;
741
+ weekday: number;
742
+ } | {
743
+ dayOfMonth: number | "last";
744
+ kind: "monthly";
745
+ time: string;
746
+ };
747
+ text?: string;
748
+ timezone?: string;
749
+ title?: string;
750
+ }, boolean, Name>;
751
+ updatePushTemplate: FunctionReference<"mutation", "internal", {
752
+ actorUserId: string;
753
+ enabled?: boolean;
754
+ nowMs?: number;
755
+ periodicity?: "manual" | "daily" | "weekly" | "monthly";
756
+ suggestedTimes?: Array<{
757
+ kind: "daily";
758
+ time: string;
759
+ } | {
760
+ kind: "weekly";
761
+ time: string;
762
+ weekday: number;
763
+ } | {
764
+ dayOfMonth: number | "last";
765
+ kind: "monthly";
766
+ time: string;
767
+ }>;
768
+ templateId: string;
769
+ text?: string;
770
+ title?: string;
771
+ }, boolean, Name>;
772
+ workerStats: FunctionReference<"query", "internal", {}, {
773
+ activeCount: number;
774
+ idleCount: number;
775
+ workers: Array<{
776
+ appName: null | string;
777
+ heartbeatAt: number;
778
+ load: number;
779
+ machineId: null | string;
780
+ status: "active" | "stopped";
781
+ workerId: string;
782
+ }>;
783
+ }, Name>;
784
+ };
785
+ providers: {
786
+ fly: {
787
+ deleteFlyVolumeManual: FunctionReference<"action", "internal", {
788
+ appName: string;
789
+ flyApiToken?: string;
790
+ volumeId: string;
791
+ }, {
792
+ message: string;
793
+ ok: boolean;
794
+ status: number;
795
+ }, Name>;
796
+ };
797
+ };
798
+ pushing: {
799
+ createPushJobCustom: FunctionReference<"mutation", "internal", {
800
+ companyId: string;
801
+ consumerUserId: string;
802
+ enabled?: boolean;
803
+ nowMs?: number;
804
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
805
+ schedule: {
806
+ kind: "manual";
807
+ } | {
808
+ kind: "daily";
809
+ time: string;
810
+ } | {
811
+ kind: "weekly";
812
+ time: string;
813
+ weekday: number;
814
+ } | {
815
+ dayOfMonth: number | "last";
816
+ kind: "monthly";
817
+ time: string;
818
+ };
819
+ text: string;
820
+ timezone: string;
821
+ title: string;
822
+ }, string, Name>;
823
+ createPushJobFromTemplate: FunctionReference<"mutation", "internal", {
824
+ companyId: string;
825
+ consumerUserId: string;
826
+ enabled?: boolean;
827
+ nowMs?: number;
828
+ schedule?: {
829
+ kind: "manual";
830
+ } | {
831
+ kind: "daily";
832
+ time: string;
833
+ } | {
834
+ kind: "weekly";
835
+ time: string;
836
+ weekday: number;
837
+ } | {
838
+ dayOfMonth: number | "last";
839
+ kind: "monthly";
840
+ time: string;
841
+ };
842
+ templateId: string;
843
+ timezone: string;
844
+ }, string, Name>;
845
+ createPushTemplate: FunctionReference<"mutation", "internal", {
846
+ actorUserId: string;
847
+ companyId: string;
848
+ enabled?: boolean;
849
+ nowMs?: number;
850
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
851
+ suggestedTimes: Array<{
852
+ kind: "daily";
853
+ time: string;
854
+ } | {
855
+ kind: "weekly";
856
+ time: string;
857
+ weekday: number;
858
+ } | {
859
+ dayOfMonth: number | "last";
860
+ kind: "monthly";
861
+ time: string;
862
+ }>;
863
+ templateKey: string;
864
+ text: string;
865
+ title: string;
866
+ }, string, Name>;
867
+ deletePushJob: FunctionReference<"mutation", "internal", {
868
+ jobId: string;
869
+ }, boolean, Name>;
870
+ deletePushTemplate: FunctionReference<"mutation", "internal", {
871
+ templateId: string;
872
+ }, boolean, Name>;
873
+ dispatchDuePushJobs: FunctionReference<"mutation", "internal", {
874
+ limit?: number;
875
+ nowMs?: number;
876
+ providerConfig?: {
877
+ appName: string;
878
+ image: string;
879
+ kind: "fly" | "runpod" | "ecs";
880
+ organizationSlug: string;
881
+ region: string;
882
+ volumeName: string;
883
+ volumePath: string;
884
+ volumeSizeGb: number;
885
+ };
886
+ }, {
887
+ enqueued: number;
888
+ failed: number;
889
+ scanned: number;
890
+ skipped: number;
891
+ }, Name>;
892
+ listPushDispatchesByJob: FunctionReference<"query", "internal", {
893
+ jobId: string;
894
+ limit?: number;
895
+ }, Array<{
896
+ _id: string;
897
+ createdAt: number;
898
+ error: null | string;
899
+ runKey: string;
900
+ scheduledFor: number;
901
+ status: "enqueued" | "skipped" | "failed";
902
+ }>, Name>;
903
+ listPushJobsForUser: FunctionReference<"query", "internal", {
904
+ consumerUserId: string;
905
+ includeDisabled?: boolean;
906
+ }, Array<{
907
+ _id: string;
908
+ agentKey: null | string;
909
+ companyId: string;
910
+ consumerUserId: string;
911
+ createdAt: number;
912
+ enabled: boolean;
913
+ lastRunAt: null | number;
914
+ lastRunKey: null | string;
915
+ nextRunAt: null | number;
916
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
917
+ schedule: {
918
+ kind: "manual";
919
+ } | {
920
+ kind: "daily";
921
+ time: string;
922
+ } | {
923
+ kind: "weekly";
924
+ time: string;
925
+ weekday: number;
926
+ } | {
927
+ dayOfMonth: number | "last";
928
+ kind: "monthly";
929
+ time: string;
930
+ };
931
+ sourceTemplateId: null | string;
932
+ text: string;
933
+ timezone: string;
934
+ title: string;
935
+ updatedAt: number;
936
+ }>, Name>;
937
+ listPushTemplatesByCompany: FunctionReference<"query", "internal", {
938
+ companyId: string;
939
+ includeDisabled?: boolean;
940
+ }, Array<{
941
+ _id: string;
942
+ companyId: string;
943
+ createdAt: number;
944
+ createdBy: string;
945
+ enabled: boolean;
946
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
947
+ suggestedTimes: Array<{
948
+ kind: "daily";
949
+ time: string;
950
+ } | {
951
+ kind: "weekly";
952
+ time: string;
953
+ weekday: number;
954
+ } | {
955
+ dayOfMonth: number | "last";
956
+ kind: "monthly";
957
+ time: string;
958
+ }>;
959
+ templateKey: string;
960
+ text: string;
961
+ title: string;
962
+ updatedAt: number;
963
+ updatedBy: string;
964
+ }>, Name>;
965
+ sendBroadcastToAllActiveAgents: FunctionReference<"mutation", "internal", {
966
+ companyId: string;
967
+ nowMs?: number;
968
+ providerConfig?: {
969
+ appName: string;
970
+ image: string;
971
+ kind: "fly" | "runpod" | "ecs";
972
+ organizationSlug: string;
973
+ region: string;
974
+ volumeName: string;
975
+ volumePath: string;
976
+ volumeSizeGb: number;
977
+ };
978
+ requestedBy: string;
979
+ text: string;
980
+ title: string;
981
+ }, {
982
+ broadcastId: string;
983
+ enqueued: number;
984
+ failed: number;
985
+ totalTargets: number;
986
+ }, Name>;
987
+ setPushJobEnabled: FunctionReference<"mutation", "internal", {
988
+ enabled: boolean;
989
+ jobId: string;
990
+ nowMs?: number;
991
+ }, boolean, Name>;
992
+ triggerPushJobNow: FunctionReference<"mutation", "internal", {
993
+ jobId: string;
994
+ nowMs?: number;
995
+ providerConfig?: {
996
+ appName: string;
997
+ image: string;
998
+ kind: "fly" | "runpod" | "ecs";
999
+ organizationSlug: string;
1000
+ region: string;
1001
+ volumeName: string;
1002
+ volumePath: string;
1003
+ volumeSizeGb: number;
1004
+ };
1005
+ }, {
1006
+ enqueuedMessageId: string;
1007
+ runKey: string;
1008
+ }, Name>;
1009
+ updatePushJob: FunctionReference<"mutation", "internal", {
1010
+ enabled?: boolean;
1011
+ jobId: string;
1012
+ nowMs?: number;
1013
+ periodicity?: "manual" | "daily" | "weekly" | "monthly";
1014
+ schedule?: {
1015
+ kind: "manual";
1016
+ } | {
1017
+ kind: "daily";
1018
+ time: string;
1019
+ } | {
1020
+ kind: "weekly";
1021
+ time: string;
1022
+ weekday: number;
1023
+ } | {
1024
+ dayOfMonth: number | "last";
1025
+ kind: "monthly";
1026
+ time: string;
1027
+ };
1028
+ text?: string;
1029
+ timezone?: string;
1030
+ title?: string;
1031
+ }, boolean, Name>;
1032
+ updatePushTemplate: FunctionReference<"mutation", "internal", {
1033
+ actorUserId: string;
1034
+ enabled?: boolean;
1035
+ nowMs?: number;
1036
+ periodicity?: "manual" | "daily" | "weekly" | "monthly";
1037
+ suggestedTimes?: Array<{
1038
+ kind: "daily";
1039
+ time: string;
1040
+ } | {
1041
+ kind: "weekly";
1042
+ time: string;
1043
+ weekday: number;
1044
+ } | {
1045
+ dayOfMonth: number | "last";
1046
+ kind: "monthly";
1047
+ time: string;
1048
+ }>;
1049
+ templateId: string;
1050
+ text?: string;
1051
+ title?: string;
1052
+ }, boolean, Name>;
1053
+ };
1054
+ queue: {
1055
+ appendConversationMessages: FunctionReference<"mutation", "internal", {
1056
+ conversationId: string;
1057
+ messages: Array<{
1058
+ at?: number;
1059
+ content: string;
1060
+ role: "system" | "user" | "assistant" | "tool";
1061
+ }>;
1062
+ nowMs?: number;
1063
+ workspaceId?: string;
1064
+ }, {
1065
+ messageCount: number;
1066
+ updated: boolean;
1067
+ }, Name>;
1068
+ attachMessageMetadata: FunctionReference<"mutation", "internal", {
1069
+ messageId: string;
1070
+ metadata: Record<string, string>;
1071
+ }, boolean, Name>;
1072
+ claimNextJob: FunctionReference<"mutation", "internal", {
1073
+ nowMs?: number;
1074
+ workerId: string;
1075
+ }, null | {
1076
+ agentKey: string;
1077
+ conversationId: string;
1078
+ leaseExpiresAt: number;
1079
+ leaseId: string;
1080
+ messageId: string;
1081
+ payload: {
1082
+ externalMessageId?: string;
1083
+ messageText: string;
1084
+ metadata?: Record<string, string>;
1085
+ provider: string;
1086
+ providerUserId: string;
1087
+ rawUpdateJson?: string;
1088
+ };
1089
+ }, Name>;
1090
+ completeJob: FunctionReference<"mutation", "internal", {
1091
+ leaseId: string;
1092
+ messageId: string;
1093
+ nowMs?: number;
1094
+ providerConfig?: {
1095
+ appName: string;
1096
+ image: string;
1097
+ kind: "fly" | "runpod" | "ecs";
1098
+ organizationSlug: string;
1099
+ region: string;
1100
+ volumeName: string;
1101
+ volumePath: string;
1102
+ volumeSizeGb: number;
1103
+ };
1104
+ workerId: string;
1105
+ }, boolean, Name>;
1106
+ enqueueMessage: FunctionReference<"mutation", "internal", {
1107
+ agentKey: string;
1108
+ conversationId: string;
1109
+ maxAttempts?: number;
1110
+ nowMs?: number;
1111
+ payload: {
1112
+ externalMessageId?: string;
1113
+ messageText: string;
1114
+ metadata?: Record<string, string>;
1115
+ provider: string;
1116
+ providerUserId: string;
1117
+ rawUpdateJson?: string;
1118
+ };
1119
+ priority?: number;
1120
+ providerConfig?: {
1121
+ appName: string;
1122
+ image: string;
1123
+ kind: "fly" | "runpod" | "ecs";
1124
+ organizationSlug: string;
1125
+ region: string;
1126
+ volumeName: string;
1127
+ volumePath: string;
1128
+ volumeSizeGb: number;
1129
+ };
1130
+ scheduledFor?: number;
1131
+ }, string, Name>;
1132
+ failDataSnapshotUpload: FunctionReference<"mutation", "internal", {
1133
+ error: string;
1134
+ nowMs?: number;
1135
+ snapshotId: string;
1136
+ workerId: string;
1137
+ }, boolean, Name>;
1138
+ failJob: FunctionReference<"mutation", "internal", {
1139
+ errorMessage: string;
1140
+ leaseId: string;
1141
+ messageId: string;
1142
+ nowMs?: number;
1143
+ providerConfig?: {
1144
+ appName: string;
1145
+ image: string;
1146
+ kind: "fly" | "runpod" | "ecs";
1147
+ organizationSlug: string;
1148
+ region: string;
1149
+ volumeName: string;
1150
+ volumePath: string;
1151
+ volumeSizeGb: number;
1152
+ };
1153
+ workerId: string;
1154
+ }, {
1155
+ deadLettered: boolean;
1156
+ nextScheduledFor: null | number;
1157
+ requeued: boolean;
1158
+ }, Name>;
1159
+ finalizeDataSnapshotUpload: FunctionReference<"mutation", "internal", {
1160
+ nowMs?: number;
1161
+ sha256: string;
1162
+ sizeBytes: number;
1163
+ snapshotId: string;
1164
+ storageId: string;
1165
+ workerId: string;
1166
+ }, boolean, Name>;
1167
+ generateMediaUploadUrl: FunctionReference<"mutation", "internal", {}, {
1168
+ uploadUrl: string;
1169
+ }, Name>;
1170
+ getHydrationBundleForClaimedJob: FunctionReference<"query", "internal", {
1171
+ messageId: string;
1172
+ workspaceId: string;
1173
+ }, null | {
1174
+ agentKey: string;
1175
+ bridgeRuntimeConfig: null | {
1176
+ appBaseUrlMapJson: null | string;
1177
+ appKey: null | string;
1178
+ baseUrl: null | string;
1179
+ serviceId: null | string;
1180
+ serviceKey: null | string;
1181
+ serviceKeySecretRef: null | string;
1182
+ };
1183
+ conversationId: string;
1184
+ conversationState: {
1185
+ contextHistory: Array<{
1186
+ at: number;
1187
+ content: string;
1188
+ role: "system" | "user" | "assistant" | "tool";
1189
+ }>;
1190
+ pendingToolCalls: Array<{
1191
+ callId: string;
1192
+ status: "pending" | "running" | "done" | "failed";
1193
+ toolName: string;
1194
+ }>;
1195
+ };
1196
+ messageId: string;
1197
+ payload: {
1198
+ externalMessageId?: string;
1199
+ messageText: string;
1200
+ metadata?: Record<string, string>;
1201
+ provider: string;
1202
+ providerUserId: string;
1203
+ rawUpdateJson?: string;
1204
+ };
1205
+ telegramBotToken: null | string;
1206
+ }, Name>;
1207
+ getLatestDataSnapshotForRestore: FunctionReference<"query", "internal", {
1208
+ agentKey: string;
1209
+ conversationId?: string;
1210
+ nowMs?: number;
1211
+ workspaceId: string;
1212
+ }, null | {
1213
+ createdAt: number;
1214
+ downloadUrl: string;
1215
+ sha256: null | string;
1216
+ sizeBytes: null | number;
1217
+ snapshotId: string;
1218
+ }, Name>;
1219
+ getQueueStats: FunctionReference<"query", "internal", {
1220
+ nowMs?: number;
1221
+ }, {
1222
+ deadLetter: number;
1223
+ processing: number;
1224
+ queuedReady: number;
1225
+ }, Name>;
1226
+ getSecretsStatus: FunctionReference<"query", "internal", {
1227
+ secretRefs: Array<string>;
1228
+ }, Array<{
1229
+ hasActive: boolean;
1230
+ secretRef: string;
1231
+ version: null | number;
1232
+ }>, Name>;
1233
+ getStorageFileUrl: FunctionReference<"query", "internal", {
1234
+ storageId: string;
1235
+ }, null | string, Name>;
1236
+ getWorkerControlState: FunctionReference<"query", "internal", {
1237
+ workerId: string;
1238
+ }, {
1239
+ shouldStop: boolean;
1240
+ }, Name>;
1241
+ getWorkerStats: FunctionReference<"query", "internal", {}, {
1242
+ activeCount: number;
1243
+ idleCount: number;
1244
+ workers: Array<{
1245
+ appName: null | string;
1246
+ heartbeatAt: number;
1247
+ load: number;
1248
+ machineId: null | string;
1249
+ status: "active" | "stopped";
1250
+ workerId: string;
1251
+ }>;
1252
+ }, Name>;
1253
+ hasQueuedJobsForConversation: FunctionReference<"query", "internal", {
1254
+ conversationId: string;
1255
+ }, boolean, Name>;
1256
+ heartbeatJob: FunctionReference<"mutation", "internal", {
1257
+ leaseId: string;
1258
+ messageId: string;
1259
+ nowMs?: number;
1260
+ workerId: string;
1261
+ }, boolean, Name>;
1262
+ importPlaintextSecret: FunctionReference<"mutation", "internal", {
1263
+ metadata?: Record<string, string>;
1264
+ plaintextValue: string;
1265
+ secretRef: string;
1266
+ }, {
1267
+ secretId: string;
1268
+ secretRef: string;
1269
+ version: number;
1270
+ }, Name>;
1271
+ listJobsByStatus: FunctionReference<"query", "internal", {
1272
+ limit?: number;
1273
+ status: "queued" | "processing" | "done" | "failed" | "dead_letter";
1274
+ }, Array<{
1275
+ _creationTime: number;
1276
+ _id: string;
1277
+ agentKey: string;
1278
+ attempts: number;
1279
+ conversationId: string;
1280
+ lastError?: string;
1281
+ maxAttempts: number;
1282
+ priority: number;
1283
+ scheduledFor: number;
1284
+ status: "queued" | "processing" | "done" | "failed" | "dead_letter";
1285
+ }>, Name>;
1286
+ prepareDataSnapshotUpload: FunctionReference<"mutation", "internal", {
1287
+ agentKey: string;
1288
+ conversationId?: string;
1289
+ nowMs?: number;
1290
+ reason: "drain" | "signal" | "manual";
1291
+ workerId: string;
1292
+ workspaceId: string;
1293
+ }, {
1294
+ expiresAt: number;
1295
+ snapshotId: string;
1296
+ uploadUrl: string;
1297
+ }, Name>;
1298
+ providerRuntimeConfig: FunctionReference<"query", "internal", {}, null | {
1299
+ appName: string;
1300
+ image: string;
1301
+ kind: "fly" | "runpod" | "ecs";
1302
+ organizationSlug: string;
1303
+ region: string;
1304
+ volumeName: string;
1305
+ volumePath: string;
1306
+ volumeSizeGb: number;
1307
+ }, Name>;
1308
+ releaseStuckJobs: FunctionReference<"mutation", "internal", {
1309
+ limit?: number;
1310
+ nowMs?: number;
1311
+ }, {
1312
+ requeued: number;
1313
+ unlocked: number;
1314
+ }, Name>;
1315
+ setProviderRuntimeConfig: FunctionReference<"mutation", "internal", {
1316
+ nowMs?: number;
1317
+ providerConfig: {
1318
+ appName: string;
1319
+ image: string;
1320
+ kind: "fly" | "runpod" | "ecs";
1321
+ organizationSlug: string;
1322
+ region: string;
1323
+ volumeName: string;
1324
+ volumePath: string;
1325
+ volumeSizeGb: number;
1326
+ };
1327
+ }, null, Name>;
1328
+ upsertAgentProfile: FunctionReference<"mutation", "internal", {
1329
+ agentKey: string;
1330
+ bridgeConfig?: {
1331
+ appBaseUrlMapJsonSecretRef?: string;
1332
+ appKey?: string;
1333
+ baseUrl?: string;
1334
+ enabled: boolean;
1335
+ serviceId?: string;
1336
+ serviceKeySecretRef?: string;
1337
+ };
1338
+ clientMd?: string;
1339
+ enabled: boolean;
1340
+ providerUserId?: string;
1341
+ secretsRef: Array<string>;
1342
+ skills: Array<string>;
1343
+ soulMd: string;
1344
+ version: string;
1345
+ }, string, Name>;
1346
+ };
1347
+ scheduler: {
1348
+ checkIdleShutdowns: FunctionReference<"action", "internal", {
1349
+ flyApiToken?: string;
1350
+ nowMs?: number;
1351
+ providerConfig?: {
1352
+ appName: string;
1353
+ image: string;
1354
+ kind: "fly" | "runpod" | "ecs";
1355
+ organizationSlug: string;
1356
+ region: string;
1357
+ volumeName: string;
1358
+ volumePath: string;
1359
+ volumeSizeGb: number;
1360
+ };
1361
+ }, {
1362
+ checked: number;
1363
+ nextCheckScheduled: boolean;
1364
+ pending: number;
1365
+ stopped: number;
1366
+ }, Name>;
1367
+ reconcileWorkerPool: FunctionReference<"action", "internal", {
1368
+ convexUrl?: string;
1369
+ flyApiToken?: string;
1370
+ nowMs?: number;
1371
+ providerConfig?: {
1372
+ appName: string;
1373
+ image: string;
1374
+ kind: "fly" | "runpod" | "ecs";
1375
+ organizationSlug: string;
1376
+ region: string;
1377
+ volumeName: string;
1378
+ volumePath: string;
1379
+ volumeSizeGb: number;
1380
+ };
1381
+ scalingPolicy?: {
1382
+ idleTimeoutMs: number;
1383
+ maxWorkers: number;
1384
+ queuePerWorkerTarget: number;
1385
+ reconcileIntervalMs: number;
1386
+ spawnStep: number;
1387
+ };
1388
+ workspaceId?: string;
1389
+ }, {
1390
+ activeWorkers: number;
1391
+ spawned: number;
1392
+ terminated: number;
1393
+ }, Name>;
1394
+ };
1395
+ };
1396
+ //# sourceMappingURL=component.d.ts.map