@okrlinkhub/agent-factory 2.0.0 → 2.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.
@@ -9,9 +9,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
9
9
  enabled: boolean;
10
10
  } | undefined;
11
11
  agentKey: string;
12
- version: string;
13
12
  enabled: boolean;
14
13
  secretsRef: string[];
14
+ version: string;
15
15
  }, {
16
16
  agentKey: import("convex/values").VString<string, "required">;
17
17
  version: import("convex/values").VString<string, "required">;
@@ -32,7 +32,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
32
32
  appBaseUrlMapJsonSecretRef: import("convex/values").VString<string | undefined, "optional">;
33
33
  }, "optional", "enabled" | "baseUrl" | "serviceId" | "appKey" | "serviceKeySecretRef" | "appBaseUrlMapJsonSecretRef">;
34
34
  enabled: import("convex/values").VBoolean<boolean, "required">;
35
- }, "required", "agentKey" | "version" | "enabled" | "secretsRef" | "bridgeConfig" | "bridgeConfig.enabled" | "bridgeConfig.baseUrl" | "bridgeConfig.serviceId" | "bridgeConfig.appKey" | "bridgeConfig.serviceKeySecretRef" | "bridgeConfig.appBaseUrlMapJsonSecretRef">, {
35
+ }, "required", "agentKey" | "bridgeConfig" | "enabled" | "secretsRef" | "version" | "bridgeConfig.enabled" | "bridgeConfig.baseUrl" | "bridgeConfig.serviceId" | "bridgeConfig.appKey" | "bridgeConfig.serviceKeySecretRef" | "bridgeConfig.appBaseUrlMapJsonSecretRef">, {
36
36
  by_agentKey: ["agentKey", "_creationTime"];
37
37
  by_enabled: ["enabled", "_creationTime"];
38
38
  }, {}, {}>;
@@ -44,15 +44,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
44
44
  heartbeatAt: number;
45
45
  claimedMessageId: import("convex/values").GenericId<"messageQueue">;
46
46
  } | undefined;
47
- conversationId: string;
48
47
  agentKey: string;
48
+ conversationId: string;
49
49
  contextHistory: {
50
- role: "system" | "user" | "assistant" | "tool";
51
50
  content: string;
51
+ role: "system" | "user" | "assistant" | "tool";
52
52
  at: number;
53
53
  }[];
54
54
  pendingToolCalls: {
55
- status: "done" | "failed" | "pending" | "running";
55
+ status: "pending" | "failed" | "running" | "done";
56
56
  toolName: string;
57
57
  callId: string;
58
58
  }[];
@@ -60,30 +60,30 @@ declare const _default: import("convex/server").SchemaDefinition<{
60
60
  conversationId: import("convex/values").VString<string, "required">;
61
61
  agentKey: import("convex/values").VString<string, "required">;
62
62
  contextHistory: import("convex/values").VArray<{
63
- role: "system" | "user" | "assistant" | "tool";
64
63
  content: string;
64
+ role: "system" | "user" | "assistant" | "tool";
65
65
  at: number;
66
66
  }[], import("convex/values").VObject<{
67
- role: "system" | "user" | "assistant" | "tool";
68
67
  content: string;
68
+ role: "system" | "user" | "assistant" | "tool";
69
69
  at: number;
70
70
  }, {
71
71
  role: import("convex/values").VUnion<"system" | "user" | "assistant" | "tool", [import("convex/values").VLiteral<"system", "required">, import("convex/values").VLiteral<"user", "required">, import("convex/values").VLiteral<"assistant", "required">, import("convex/values").VLiteral<"tool", "required">], "required", never>;
72
72
  content: import("convex/values").VString<string, "required">;
73
73
  at: import("convex/values").VFloat64<number, "required">;
74
- }, "required", "role" | "content" | "at">, "required">;
74
+ }, "required", "content" | "role" | "at">, "required">;
75
75
  pendingToolCalls: import("convex/values").VArray<{
76
- status: "done" | "failed" | "pending" | "running";
76
+ status: "pending" | "failed" | "running" | "done";
77
77
  toolName: string;
78
78
  callId: string;
79
79
  }[], import("convex/values").VObject<{
80
- status: "done" | "failed" | "pending" | "running";
80
+ status: "pending" | "failed" | "running" | "done";
81
81
  toolName: string;
82
82
  callId: string;
83
83
  }, {
84
84
  toolName: import("convex/values").VString<string, "required">;
85
85
  callId: import("convex/values").VString<string, "required">;
86
- status: import("convex/values").VUnion<"done" | "failed" | "pending" | "running", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"done", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
86
+ status: import("convex/values").VUnion<"pending" | "failed" | "running" | "done", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"done", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
87
87
  }, "required", "status" | "toolName" | "callId">, "required">;
88
88
  processingLock: import("convex/values").VObject<{
89
89
  workerId: string;
@@ -98,7 +98,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
98
98
  heartbeatAt: import("convex/values").VFloat64<number, "required">;
99
99
  claimedMessageId: import("convex/values").VId<import("convex/values").GenericId<"messageQueue">, "required">;
100
100
  }, "optional", "workerId" | "leaseId" | "leaseExpiresAt" | "heartbeatAt" | "claimedMessageId">;
101
- }, "required", "conversationId" | "agentKey" | "contextHistory" | "pendingToolCalls" | "processingLock" | "processingLock.workerId" | "processingLock.leaseId" | "processingLock.leaseExpiresAt" | "processingLock.heartbeatAt" | "processingLock.claimedMessageId">, {
101
+ }, "required", "agentKey" | "conversationId" | "contextHistory" | "pendingToolCalls" | "processingLock" | "processingLock.workerId" | "processingLock.leaseId" | "processingLock.leaseExpiresAt" | "processingLock.heartbeatAt" | "processingLock.claimedMessageId">, {
102
102
  by_conversationId: ["conversationId", "_creationTime"];
103
103
  by_agentKey: ["agentKey", "_creationTime"];
104
104
  }, {}, {}>;
@@ -109,28 +109,48 @@ declare const _default: import("convex/server").SchemaDefinition<{
109
109
  lastError?: string | undefined;
110
110
  nextRetryAt?: number | undefined;
111
111
  deadLetteredAt?: number | undefined;
112
- conversationId: string;
113
112
  agentKey: string;
114
- priority: number;
115
- status: "queued" | "processing" | "done" | "failed" | "dead_letter";
113
+ conversationId: string;
114
+ maxAttempts: number;
116
115
  payload: {
116
+ metadata?: Record<string, string> | undefined;
117
117
  externalMessageId?: string | undefined;
118
118
  rawUpdateJson?: string | undefined;
119
- metadata?: Record<string, string> | undefined;
119
+ attachments?: {
120
+ sizeBytes?: number | undefined;
121
+ fileName?: string | undefined;
122
+ mimeType?: string | undefined;
123
+ storageId: import("convex/values").GenericId<"_storage">;
124
+ status: "expired" | "ready";
125
+ kind: "photo" | "video" | "audio" | "voice" | "document";
126
+ telegramFileId: string;
127
+ expiresAt: number;
128
+ }[] | undefined;
120
129
  provider: string;
121
130
  providerUserId: string;
122
131
  messageText: string;
123
132
  };
133
+ priority: number;
124
134
  scheduledFor: number;
135
+ status: "failed" | "done" | "queued" | "processing" | "dead_letter";
125
136
  attempts: number;
126
- maxAttempts: number;
127
137
  }, {
128
138
  conversationId: import("convex/values").VString<string, "required">;
129
139
  agentKey: import("convex/values").VString<string, "required">;
130
140
  payload: import("convex/values").VObject<{
141
+ metadata?: Record<string, string> | undefined;
131
142
  externalMessageId?: string | undefined;
132
143
  rawUpdateJson?: string | undefined;
133
- metadata?: Record<string, string> | undefined;
144
+ attachments?: {
145
+ sizeBytes?: number | undefined;
146
+ fileName?: string | undefined;
147
+ mimeType?: string | undefined;
148
+ storageId: import("convex/values").GenericId<"_storage">;
149
+ status: "expired" | "ready";
150
+ kind: "photo" | "video" | "audio" | "voice" | "document";
151
+ telegramFileId: string;
152
+ expiresAt: number;
153
+ }[] | undefined;
134
154
  provider: string;
135
155
  providerUserId: string;
136
156
  messageText: string;
@@ -141,8 +161,36 @@ declare const _default: import("convex/server").SchemaDefinition<{
141
161
  externalMessageId: import("convex/values").VString<string | undefined, "optional">;
142
162
  rawUpdateJson: import("convex/values").VString<string | undefined, "optional">;
143
163
  metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
144
- }, "required", "provider" | "providerUserId" | "messageText" | "externalMessageId" | "rawUpdateJson" | "metadata" | `metadata.${string}`>;
145
- status: import("convex/values").VUnion<"queued" | "processing" | "done" | "failed" | "dead_letter", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"done", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"dead_letter", "required">], "required", never>;
164
+ attachments: import("convex/values").VArray<{
165
+ sizeBytes?: number | undefined;
166
+ fileName?: string | undefined;
167
+ mimeType?: string | undefined;
168
+ storageId: import("convex/values").GenericId<"_storage">;
169
+ status: "expired" | "ready";
170
+ kind: "photo" | "video" | "audio" | "voice" | "document";
171
+ telegramFileId: string;
172
+ expiresAt: number;
173
+ }[] | undefined, import("convex/values").VObject<{
174
+ sizeBytes?: number | undefined;
175
+ fileName?: string | undefined;
176
+ mimeType?: string | undefined;
177
+ storageId: import("convex/values").GenericId<"_storage">;
178
+ status: "expired" | "ready";
179
+ kind: "photo" | "video" | "audio" | "voice" | "document";
180
+ telegramFileId: string;
181
+ expiresAt: number;
182
+ }, {
183
+ kind: import("convex/values").VUnion<"photo" | "video" | "audio" | "voice" | "document", [import("convex/values").VLiteral<"photo", "required">, import("convex/values").VLiteral<"video", "required">, import("convex/values").VLiteral<"audio", "required">, import("convex/values").VLiteral<"voice", "required">, import("convex/values").VLiteral<"document", "required">], "required", never>;
184
+ status: import("convex/values").VUnion<"expired" | "ready", [import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
185
+ storageId: import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">;
186
+ telegramFileId: import("convex/values").VString<string, "required">;
187
+ fileName: import("convex/values").VString<string | undefined, "optional">;
188
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
189
+ sizeBytes: import("convex/values").VFloat64<number | undefined, "optional">;
190
+ expiresAt: import("convex/values").VFloat64<number, "required">;
191
+ }, "required", "storageId" | "sizeBytes" | "status" | "kind" | "telegramFileId" | "fileName" | "mimeType" | "expiresAt">, "optional">;
192
+ }, "required", "metadata" | "provider" | "providerUserId" | "messageText" | "externalMessageId" | "rawUpdateJson" | "attachments" | `metadata.${string}`>;
193
+ status: import("convex/values").VUnion<"failed" | "done" | "queued" | "processing" | "dead_letter", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"done", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"dead_letter", "required">], "required", never>;
146
194
  priority: import("convex/values").VFloat64<number, "required">;
147
195
  scheduledFor: import("convex/values").VFloat64<number, "required">;
148
196
  claimedBy: import("convex/values").VString<string | undefined, "optional">;
@@ -153,7 +201,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
153
201
  lastError: import("convex/values").VString<string | undefined, "optional">;
154
202
  nextRetryAt: import("convex/values").VFloat64<number | undefined, "optional">;
155
203
  deadLetteredAt: import("convex/values").VFloat64<number | undefined, "optional">;
156
- }, "required", "conversationId" | "agentKey" | "priority" | "leaseId" | "status" | "leaseExpiresAt" | "payload" | "scheduledFor" | "claimedBy" | "attempts" | "maxAttempts" | "lastError" | "nextRetryAt" | "deadLetteredAt" | "payload.provider" | "payload.providerUserId" | "payload.messageText" | "payload.externalMessageId" | "payload.rawUpdateJson" | "payload.metadata" | `payload.metadata.${string}`>, {
204
+ }, "required", "agentKey" | "conversationId" | "leaseId" | "maxAttempts" | "payload" | "priority" | "scheduledFor" | "status" | "leaseExpiresAt" | "claimedBy" | "attempts" | "lastError" | "nextRetryAt" | "deadLetteredAt" | "payload.metadata" | "payload.provider" | "payload.providerUserId" | "payload.messageText" | "payload.externalMessageId" | "payload.rawUpdateJson" | "payload.attachments" | `payload.metadata.${string}`>, {
157
205
  by_status_and_scheduledFor: ["status", "scheduledFor", "_creationTime"];
158
206
  by_status_and_priority_and_scheduledFor: ["status", "priority", "scheduledFor", "_creationTime"];
159
207
  by_status_and_leaseExpiresAt: ["status", "leaseExpiresAt", "_creationTime"];
@@ -173,14 +221,14 @@ declare const _default: import("convex/server").SchemaDefinition<{
173
221
  stoppedAt?: number | undefined;
174
222
  lastSnapshotId?: import("convex/values").GenericId<"dataSnapshots"> | undefined;
175
223
  assignment?: {
176
- conversationId: string;
177
224
  agentKey: string;
225
+ conversationId: string;
178
226
  leaseId: string;
179
227
  assignedAt: number;
180
228
  } | undefined;
181
- provider: string;
182
229
  workerId: string;
183
230
  status: "active" | "draining" | "stopping" | "stopped";
231
+ provider: string;
184
232
  heartbeatAt: number;
185
233
  load: number;
186
234
  capabilities: string[];
@@ -204,8 +252,8 @@ declare const _default: import("convex/server").SchemaDefinition<{
204
252
  stoppedAt: import("convex/values").VFloat64<number | undefined, "optional">;
205
253
  lastSnapshotId: import("convex/values").VId<import("convex/values").GenericId<"dataSnapshots"> | undefined, "optional">;
206
254
  assignment: import("convex/values").VObject<{
207
- conversationId: string;
208
255
  agentKey: string;
256
+ conversationId: string;
209
257
  leaseId: string;
210
258
  assignedAt: number;
211
259
  } | undefined, {
@@ -213,9 +261,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
213
261
  agentKey: import("convex/values").VString<string, "required">;
214
262
  leaseId: import("convex/values").VString<string, "required">;
215
263
  assignedAt: import("convex/values").VFloat64<number, "required">;
216
- }, "optional", "conversationId" | "agentKey" | "leaseId" | "assignedAt">;
264
+ }, "optional", "agentKey" | "conversationId" | "leaseId" | "assignedAt">;
217
265
  capabilities: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
218
- }, "required", "provider" | "workerId" | "status" | "heartbeatAt" | "machineRef" | "load" | "lastClaimAt" | "scheduledShutdownAt" | "stoppedAt" | "lastSnapshotId" | "assignment" | "capabilities" | "machineRef.appName" | "machineRef.region" | "machineRef.machineId" | "assignment.conversationId" | "assignment.agentKey" | "assignment.leaseId" | "assignment.assignedAt">, {
266
+ }, "required", "workerId" | "status" | "provider" | "heartbeatAt" | "machineRef" | "load" | "lastClaimAt" | "scheduledShutdownAt" | "stoppedAt" | "lastSnapshotId" | "assignment" | "capabilities" | "machineRef.appName" | "machineRef.region" | "machineRef.machineId" | "assignment.agentKey" | "assignment.conversationId" | "assignment.leaseId" | "assignment.assignedAt">, {
219
267
  by_workerId: ["workerId", "_creationTime"];
220
268
  by_status: ["status", "_creationTime"];
221
269
  by_heartbeatAt: ["heartbeatAt", "_creationTime"];
@@ -223,8 +271,8 @@ declare const _default: import("convex/server").SchemaDefinition<{
223
271
  }, {}, {}>;
224
272
  runtimeConfig: import("convex/server").TableDefinition<import("convex/values").VObject<{
225
273
  providerConfig?: {
226
- kind: "fly" | "runpod" | "ecs";
227
274
  appName: string;
275
+ kind: "fly" | "runpod" | "ecs";
228
276
  organizationSlug: string;
229
277
  image: string;
230
278
  region: string;
@@ -234,14 +282,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
234
282
  } | undefined;
235
283
  messageConfig?: {
236
284
  systemPrompt?: string | undefined;
285
+ telegramAttachmentRetentionMs?: number | undefined;
237
286
  } | undefined;
238
287
  key: string;
239
288
  updatedAt: number;
240
289
  }, {
241
290
  key: import("convex/values").VString<string, "required">;
242
291
  providerConfig: import("convex/values").VObject<{
243
- kind: "fly" | "runpod" | "ecs";
244
292
  appName: string;
293
+ kind: "fly" | "runpod" | "ecs";
245
294
  organizationSlug: string;
246
295
  image: string;
247
296
  region: string;
@@ -257,47 +306,82 @@ declare const _default: import("convex/server").SchemaDefinition<{
257
306
  volumeName: import("convex/values").VString<string, "required">;
258
307
  volumePath: import("convex/values").VString<string, "required">;
259
308
  volumeSizeGb: import("convex/values").VFloat64<number, "required">;
260
- }, "optional", "kind" | "appName" | "organizationSlug" | "image" | "region" | "volumeName" | "volumePath" | "volumeSizeGb">;
309
+ }, "optional", "appName" | "kind" | "organizationSlug" | "image" | "region" | "volumeName" | "volumePath" | "volumeSizeGb">;
261
310
  messageConfig: import("convex/values").VObject<{
262
311
  systemPrompt?: string | undefined;
312
+ telegramAttachmentRetentionMs?: number | undefined;
263
313
  } | undefined, {
264
314
  systemPrompt: import("convex/values").VString<string | undefined, "optional">;
265
- }, "optional", "systemPrompt">;
315
+ telegramAttachmentRetentionMs: import("convex/values").VFloat64<number | undefined, "optional">;
316
+ }, "optional", "systemPrompt" | "telegramAttachmentRetentionMs">;
266
317
  updatedAt: import("convex/values").VFloat64<number, "required">;
267
- }, "required", "key" | "providerConfig" | "messageConfig" | "updatedAt" | "providerConfig.kind" | "providerConfig.appName" | "providerConfig.organizationSlug" | "providerConfig.image" | "providerConfig.region" | "providerConfig.volumeName" | "providerConfig.volumePath" | "providerConfig.volumeSizeGb" | "messageConfig.systemPrompt">, {
318
+ }, "required", "providerConfig" | "messageConfig" | "key" | "updatedAt" | "providerConfig.appName" | "providerConfig.kind" | "providerConfig.organizationSlug" | "providerConfig.image" | "providerConfig.region" | "providerConfig.volumeName" | "providerConfig.volumePath" | "providerConfig.volumeSizeGb" | "messageConfig.systemPrompt" | "messageConfig.telegramAttachmentRetentionMs">, {
268
319
  by_key: ["key", "_creationTime"];
269
320
  }, {}, {}>;
321
+ messageAttachments: import("convex/server").TableDefinition<import("convex/values").VObject<{
322
+ sizeBytes?: number | undefined;
323
+ fileName?: string | undefined;
324
+ mimeType?: string | undefined;
325
+ agentKey: string;
326
+ conversationId: string;
327
+ messageId: import("convex/values").GenericId<"messageQueue">;
328
+ storageId: import("convex/values").GenericId<"_storage">;
329
+ status: "expired" | "ready";
330
+ kind: "photo" | "video" | "audio" | "voice" | "document";
331
+ provider: string;
332
+ telegramFileId: string;
333
+ expiresAt: number;
334
+ createdAt: number;
335
+ }, {
336
+ messageId: import("convex/values").VId<import("convex/values").GenericId<"messageQueue">, "required">;
337
+ conversationId: import("convex/values").VString<string, "required">;
338
+ agentKey: import("convex/values").VString<string, "required">;
339
+ provider: import("convex/values").VString<string, "required">;
340
+ kind: import("convex/values").VUnion<"photo" | "video" | "audio" | "voice" | "document", [import("convex/values").VLiteral<"photo", "required">, import("convex/values").VLiteral<"video", "required">, import("convex/values").VLiteral<"audio", "required">, import("convex/values").VLiteral<"voice", "required">, import("convex/values").VLiteral<"document", "required">], "required", never>;
341
+ status: import("convex/values").VUnion<"expired" | "ready", [import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
342
+ storageId: import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">;
343
+ telegramFileId: import("convex/values").VString<string, "required">;
344
+ fileName: import("convex/values").VString<string | undefined, "optional">;
345
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
346
+ sizeBytes: import("convex/values").VFloat64<number | undefined, "optional">;
347
+ createdAt: import("convex/values").VFloat64<number, "required">;
348
+ expiresAt: import("convex/values").VFloat64<number, "required">;
349
+ }, "required", "agentKey" | "conversationId" | "messageId" | "storageId" | "sizeBytes" | "status" | "kind" | "provider" | "telegramFileId" | "fileName" | "mimeType" | "expiresAt" | "createdAt">, {
350
+ by_messageId: ["messageId", "_creationTime"];
351
+ by_status_and_expiresAt: ["status", "expiresAt", "_creationTime"];
352
+ by_conversationId_and_createdAt: ["conversationId", "createdAt", "_creationTime"];
353
+ }, {}, {}>;
270
354
  dataSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
355
+ error?: string | undefined;
271
356
  sha256?: string | undefined;
272
357
  sizeBytes?: number | undefined;
273
- error?: string | undefined;
274
358
  archiveFileId?: import("convex/values").GenericId<"_storage"> | undefined;
275
359
  completedAt?: number | undefined;
276
- conversationId: string;
277
360
  agentKey: string;
278
- workerId: string;
361
+ conversationId: string;
279
362
  workspaceId: string;
280
- reason: "drain" | "signal" | "manual";
281
- status: "failed" | "expired" | "uploading" | "ready";
282
- formatVersion: number;
283
- createdAt: number;
363
+ workerId: string;
364
+ status: "expired" | "failed" | "ready" | "uploading";
365
+ reason: "manual" | "drain" | "signal";
284
366
  expiresAt: number;
367
+ createdAt: number;
368
+ formatVersion: number;
285
369
  }, {
286
370
  workspaceId: import("convex/values").VString<string, "required">;
287
371
  agentKey: import("convex/values").VString<string, "required">;
288
372
  workerId: import("convex/values").VString<string, "required">;
289
373
  conversationId: import("convex/values").VString<string, "required">;
290
- reason: import("convex/values").VUnion<"drain" | "signal" | "manual", [import("convex/values").VLiteral<"drain", "required">, import("convex/values").VLiteral<"signal", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
374
+ reason: import("convex/values").VUnion<"manual" | "drain" | "signal", [import("convex/values").VLiteral<"drain", "required">, import("convex/values").VLiteral<"signal", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
291
375
  formatVersion: import("convex/values").VFloat64<number, "required">;
292
376
  archiveFileId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
293
377
  sha256: import("convex/values").VString<string | undefined, "optional">;
294
378
  sizeBytes: import("convex/values").VFloat64<number | undefined, "optional">;
295
- status: import("convex/values").VUnion<"failed" | "expired" | "uploading" | "ready", [import("convex/values").VLiteral<"uploading", "required">, import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
379
+ status: import("convex/values").VUnion<"expired" | "failed" | "ready" | "uploading", [import("convex/values").VLiteral<"uploading", "required">, import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
296
380
  error: import("convex/values").VString<string | undefined, "optional">;
297
381
  createdAt: import("convex/values").VFloat64<number, "required">;
298
382
  completedAt: import("convex/values").VFloat64<number | undefined, "optional">;
299
383
  expiresAt: import("convex/values").VFloat64<number, "required">;
300
- }, "required", "conversationId" | "agentKey" | "workerId" | "workspaceId" | "reason" | "sha256" | "sizeBytes" | "error" | "status" | "formatVersion" | "archiveFileId" | "createdAt" | "completedAt" | "expiresAt">, {
384
+ }, "required", "agentKey" | "conversationId" | "workspaceId" | "workerId" | "error" | "sha256" | "sizeBytes" | "status" | "reason" | "expiresAt" | "createdAt" | "formatVersion" | "archiveFileId" | "completedAt">, {
301
385
  by_workerId_and_createdAt: ["workerId", "createdAt", "_creationTime"];
302
386
  by_workspaceId_and_agentKey_and_createdAt: ["workspaceId", "agentKey", "createdAt", "_creationTime"];
303
387
  by_workspaceId_and_agentKey_and_conversationId_and_createdAt: ["workspaceId", "agentKey", "conversationId", "createdAt", "_creationTime"];
@@ -308,9 +392,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
308
392
  secrets: import("convex/server").TableDefinition<import("convex/values").VObject<{
309
393
  metadata?: Record<string, string> | undefined;
310
394
  rotatedFrom?: number | undefined;
311
- version: number;
312
395
  active: boolean;
313
396
  secretRef: string;
397
+ version: number;
314
398
  encryptedValue: string;
315
399
  keyId: string;
316
400
  algorithm: string;
@@ -323,21 +407,21 @@ declare const _default: import("convex/server").SchemaDefinition<{
323
407
  active: import("convex/values").VBoolean<boolean, "required">;
324
408
  rotatedFrom: import("convex/values").VFloat64<number | undefined, "optional">;
325
409
  metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
326
- }, "required", "metadata" | "version" | "active" | "secretRef" | `metadata.${string}` | "encryptedValue" | "keyId" | "algorithm" | "rotatedFrom">, {
410
+ }, "required", "active" | "metadata" | "secretRef" | "version" | `metadata.${string}` | "encryptedValue" | "keyId" | "algorithm" | "rotatedFrom">, {
327
411
  by_secretRef: ["secretRef", "_creationTime"];
328
412
  by_secretRef_and_active: ["secretRef", "active", "_creationTime"];
329
413
  by_active: ["active", "_creationTime"];
330
414
  }, {}, {}>;
331
415
  identityBindings: import("convex/server").TableDefinition<import("convex/values").VObject<{
332
416
  metadata?: Record<string, string> | undefined;
333
- telegramUserId?: string | undefined;
334
417
  telegramChatId?: string | undefined;
418
+ telegramUserId?: string | undefined;
335
419
  revokedAt?: number | undefined;
336
- conversationId: string;
337
420
  agentKey: string;
338
- status: "active" | "revoked";
339
421
  consumerUserId: string;
340
422
  source: "manual" | "telegram_pairing" | "api";
423
+ conversationId: string;
424
+ status: "active" | "revoked";
341
425
  boundAt: number;
342
426
  }, {
343
427
  consumerUserId: import("convex/values").VString<string, "required">;
@@ -350,7 +434,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
350
434
  metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
351
435
  boundAt: import("convex/values").VFloat64<number, "required">;
352
436
  revokedAt: import("convex/values").VFloat64<number | undefined, "optional">;
353
- }, "required", "conversationId" | "agentKey" | "metadata" | "status" | "consumerUserId" | "source" | "telegramUserId" | "telegramChatId" | `metadata.${string}` | "boundAt" | "revokedAt">, {
437
+ }, "required", "agentKey" | "consumerUserId" | "metadata" | "source" | "telegramChatId" | "telegramUserId" | "conversationId" | "status" | `metadata.${string}` | "boundAt" | "revokedAt">, {
354
438
  by_consumerUserId_and_status: ["consumerUserId", "status", "_creationTime"];
355
439
  by_consumerUserId_and_agentKey_and_boundAt: ["consumerUserId", "agentKey", "boundAt", "_creationTime"];
356
440
  by_telegramUserId_and_status: ["telegramUserId", "status", "_creationTime"];
@@ -358,15 +442,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
358
442
  by_agentKey_and_status: ["agentKey", "status", "_creationTime"];
359
443
  }, {}, {}>;
360
444
  pairingCodes: import("convex/server").TableDefinition<import("convex/values").VObject<{
361
- telegramUserId?: string | undefined;
362
445
  telegramChatId?: string | undefined;
446
+ telegramUserId?: string | undefined;
363
447
  usedAt?: number | undefined;
364
448
  agentKey: string;
365
- status: "pending" | "used" | "expired";
366
449
  consumerUserId: string;
367
450
  code: string;
368
- createdAt: number;
451
+ status: "pending" | "used" | "expired";
369
452
  expiresAt: number;
453
+ createdAt: number;
370
454
  }, {
371
455
  code: import("convex/values").VString<string, "required">;
372
456
  consumerUserId: import("convex/values").VString<string, "required">;
@@ -377,7 +461,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
377
461
  usedAt: import("convex/values").VFloat64<number | undefined, "optional">;
378
462
  telegramUserId: import("convex/values").VString<string | undefined, "optional">;
379
463
  telegramChatId: import("convex/values").VString<string | undefined, "optional">;
380
- }, "required", "agentKey" | "status" | "consumerUserId" | "telegramUserId" | "telegramChatId" | "code" | "createdAt" | "expiresAt" | "usedAt">, {
464
+ }, "required", "agentKey" | "consumerUserId" | "telegramChatId" | "telegramUserId" | "code" | "status" | "expiresAt" | "createdAt" | "usedAt">, {
381
465
  by_code: ["code", "_creationTime"];
382
466
  by_consumerUserId_and_status: ["consumerUserId", "status", "_creationTime"];
383
467
  by_consumerUserId_and_agentKey_and_createdAt: ["consumerUserId", "agentKey", "createdAt", "_creationTime"];
@@ -401,16 +485,16 @@ declare const _default: import("convex/server").SchemaDefinition<{
401
485
  updatedBy: import("convex/values").VString<string, "required">;
402
486
  createdAt: import("convex/values").VFloat64<number, "required">;
403
487
  updatedAt: import("convex/values").VFloat64<number, "required">;
404
- }, "required", "slug" | "displayName" | "description" | "status" | "updatedAt" | "createdAt" | "createdBy" | "updatedBy">, {
488
+ }, "required", "slug" | "description" | "displayName" | "status" | "updatedAt" | "createdAt" | "createdBy" | "updatedBy">, {
405
489
  by_slug: ["slug", "_creationTime"];
406
490
  by_status: ["status", "_creationTime"];
407
491
  }, {}, {}>;
408
492
  globalSkillVersions: import("convex/server").TableDefinition<import("convex/values").VObject<{
409
- sha256: string;
410
493
  version: string;
411
- sourceJs: string;
412
494
  entryPoint: string;
413
495
  moduleFormat: "esm" | "cjs";
496
+ sourceJs: string;
497
+ sha256: string;
414
498
  createdAt: number;
415
499
  createdBy: string;
416
500
  skillId: import("convex/values").GenericId<"globalSkills">;
@@ -423,7 +507,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
423
507
  sha256: import("convex/values").VString<string, "required">;
424
508
  createdBy: import("convex/values").VString<string, "required">;
425
509
  createdAt: import("convex/values").VFloat64<number, "required">;
426
- }, "required", "sha256" | "version" | "sourceJs" | "entryPoint" | "moduleFormat" | "createdAt" | "createdBy" | "skillId">, {
510
+ }, "required", "version" | "entryPoint" | "moduleFormat" | "sourceJs" | "sha256" | "createdAt" | "createdBy" | "skillId">, {
427
511
  by_skillId_and_version: ["skillId", "version", "_creationTime"];
428
512
  by_skillId_and_createdAt: ["skillId", "createdAt", "_creationTime"];
429
513
  }, {}, {}>;
@@ -447,13 +531,13 @@ declare const _default: import("convex/server").SchemaDefinition<{
447
531
  }, {}, {}>;
448
532
  conversationHydrationCache: import("convex/server").TableDefinition<import("convex/values").VObject<{
449
533
  lastMessageId?: import("convex/values").GenericId<"messageQueue"> | undefined;
450
- conversationId: string;
451
534
  agentKey: string;
535
+ conversationId: string;
452
536
  snapshotKey: string;
453
537
  lastHydratedAt: number;
454
538
  deltaContext: {
455
- role: "system" | "user" | "assistant" | "tool";
456
539
  content: string;
540
+ role: "system" | "user" | "assistant" | "tool";
457
541
  at: number;
458
542
  }[];
459
543
  deltaFingerprint: string;
@@ -464,29 +548,29 @@ declare const _default: import("convex/server").SchemaDefinition<{
464
548
  lastHydratedAt: import("convex/values").VFloat64<number, "required">;
465
549
  lastMessageId: import("convex/values").VId<import("convex/values").GenericId<"messageQueue"> | undefined, "optional">;
466
550
  deltaContext: import("convex/values").VArray<{
467
- role: "system" | "user" | "assistant" | "tool";
468
551
  content: string;
552
+ role: "system" | "user" | "assistant" | "tool";
469
553
  at: number;
470
554
  }[], import("convex/values").VObject<{
471
- role: "system" | "user" | "assistant" | "tool";
472
555
  content: string;
556
+ role: "system" | "user" | "assistant" | "tool";
473
557
  at: number;
474
558
  }, {
475
559
  role: import("convex/values").VUnion<"system" | "user" | "assistant" | "tool", [import("convex/values").VLiteral<"system", "required">, import("convex/values").VLiteral<"user", "required">, import("convex/values").VLiteral<"assistant", "required">, import("convex/values").VLiteral<"tool", "required">], "required", never>;
476
560
  content: import("convex/values").VString<string, "required">;
477
561
  at: import("convex/values").VFloat64<number, "required">;
478
- }, "required", "role" | "content" | "at">, "required">;
562
+ }, "required", "content" | "role" | "at">, "required">;
479
563
  deltaFingerprint: import("convex/values").VString<string, "required">;
480
- }, "required", "conversationId" | "agentKey" | "snapshotKey" | "lastHydratedAt" | "lastMessageId" | "deltaContext" | "deltaFingerprint">, {
564
+ }, "required", "agentKey" | "conversationId" | "snapshotKey" | "lastHydratedAt" | "lastMessageId" | "deltaContext" | "deltaFingerprint">, {
481
565
  by_conversationId: ["conversationId", "_creationTime"];
482
566
  by_agentKey_and_lastHydratedAt: ["agentKey", "lastHydratedAt", "_creationTime"];
483
567
  }, {}, {}>;
484
568
  messagePushTemplates: import("convex/server").TableDefinition<import("convex/values").VObject<{
485
- periodicity: "manual" | "daily" | "weekly" | "monthly";
569
+ enabled: boolean;
486
570
  companyId: string;
487
- templateKey: string;
488
- title: string;
571
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
489
572
  text: string;
573
+ title: string;
490
574
  suggestedTimes: ({
491
575
  kind: "daily";
492
576
  time: string;
@@ -499,7 +583,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
499
583
  time: string;
500
584
  dayOfMonth: number | "last";
501
585
  })[];
502
- enabled: boolean;
586
+ templateKey: string;
503
587
  updatedAt: number;
504
588
  createdAt: number;
505
589
  createdBy: string;
@@ -560,7 +644,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
560
644
  updatedBy: import("convex/values").VString<string, "required">;
561
645
  createdAt: import("convex/values").VFloat64<number, "required">;
562
646
  updatedAt: import("convex/values").VFloat64<number, "required">;
563
- }, "required", "periodicity" | "companyId" | "templateKey" | "title" | "text" | "suggestedTimes" | "enabled" | "updatedAt" | "createdAt" | "createdBy" | "updatedBy">, {
647
+ }, "required", "enabled" | "companyId" | "periodicity" | "text" | "title" | "suggestedTimes" | "templateKey" | "updatedAt" | "createdAt" | "createdBy" | "updatedBy">, {
564
648
  by_companyId: ["companyId", "_creationTime"];
565
649
  by_companyId_and_templateKey: ["companyId", "templateKey", "_creationTime"];
566
650
  by_companyId_and_enabled: ["companyId", "enabled", "_creationTime"];
@@ -572,12 +656,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
572
656
  lastRunAt?: number | undefined;
573
657
  lastRunKey?: string | undefined;
574
658
  consumerUserId: string;
575
- periodicity: "manual" | "daily" | "weekly" | "monthly";
576
- companyId: string;
577
- title: string;
578
- text: string;
579
659
  enabled: boolean;
580
- timezone: string;
660
+ companyId: string;
661
+ periodicity: "manual" | "daily" | "weekly" | "monthly";
581
662
  schedule: {
582
663
  kind: "manual";
583
664
  } | {
@@ -592,6 +673,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
592
673
  time: string;
593
674
  dayOfMonth: number | "last";
594
675
  };
676
+ text: string;
677
+ timezone: string;
678
+ title: string;
595
679
  updatedAt: number;
596
680
  createdAt: number;
597
681
  }, {
@@ -649,7 +733,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
649
733
  lastRunKey: import("convex/values").VString<string | undefined, "optional">;
650
734
  createdAt: import("convex/values").VFloat64<number, "required">;
651
735
  updatedAt: import("convex/values").VFloat64<number, "required">;
652
- }, "required", "agentKey" | "consumerUserId" | "periodicity" | "companyId" | "title" | "text" | "enabled" | "timezone" | "schedule" | "updatedAt" | "createdAt" | "sourceTemplateId" | "nextRunAt" | "lastRunAt" | "lastRunKey" | "schedule.kind" | "schedule.time" | "schedule.weekday" | "schedule.dayOfMonth">, {
736
+ }, "required", "agentKey" | "consumerUserId" | "enabled" | "companyId" | "periodicity" | "schedule" | "text" | "timezone" | "title" | "updatedAt" | "createdAt" | "sourceTemplateId" | "nextRunAt" | "lastRunAt" | "lastRunKey" | "schedule.kind" | "schedule.time" | "schedule.weekday" | "schedule.dayOfMonth">, {
653
737
  by_enabled_and_nextRunAt: ["enabled", "nextRunAt", "_creationTime"];
654
738
  by_consumerUserId: ["consumerUserId", "_creationTime"];
655
739
  by_consumerUserId_and_enabled: ["consumerUserId", "enabled", "_creationTime"];
@@ -660,10 +744,10 @@ declare const _default: import("convex/server").SchemaDefinition<{
660
744
  messagePushDispatches: import("convex/server").TableDefinition<import("convex/values").VObject<{
661
745
  error?: string | undefined;
662
746
  enqueuedMessageId?: import("convex/values").GenericId<"messageQueue"> | undefined;
663
- status: "failed" | "enqueued" | "skipped";
664
747
  consumerUserId: string;
665
748
  jobId: import("convex/values").GenericId<"messagePushJobs">;
666
749
  scheduledFor: number;
750
+ status: "failed" | "enqueued" | "skipped";
667
751
  createdAt: number;
668
752
  runKey: string;
669
753
  }, {
@@ -675,17 +759,17 @@ declare const _default: import("convex/server").SchemaDefinition<{
675
759
  status: import("convex/values").VUnion<"failed" | "enqueued" | "skipped", [import("convex/values").VLiteral<"enqueued", "required">, import("convex/values").VLiteral<"skipped", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
676
760
  error: import("convex/values").VString<string | undefined, "optional">;
677
761
  createdAt: import("convex/values").VFloat64<number, "required">;
678
- }, "required", "error" | "status" | "consumerUserId" | "jobId" | "scheduledFor" | "createdAt" | "runKey" | "enqueuedMessageId">, {
762
+ }, "required", "consumerUserId" | "jobId" | "scheduledFor" | "error" | "status" | "createdAt" | "runKey" | "enqueuedMessageId">, {
679
763
  by_jobId_and_runKey: ["jobId", "runKey", "_creationTime"];
680
764
  by_consumerUserId_and_createdAt: ["consumerUserId", "createdAt", "_creationTime"];
681
765
  }, {}, {}>;
682
766
  messagePushBroadcasts: import("convex/server").TableDefinition<import("convex/values").VObject<{
683
767
  completedAt?: number | undefined;
684
- status: "done" | "failed" | "running";
685
768
  companyId: string;
686
- title: string;
687
769
  text: string;
770
+ title: string;
688
771
  requestedBy: string;
772
+ status: "failed" | "running" | "done";
689
773
  target: "all_active_agents";
690
774
  requestedAt: number;
691
775
  totalTargets: number;
@@ -698,12 +782,12 @@ declare const _default: import("convex/server").SchemaDefinition<{
698
782
  target: import("convex/values").VLiteral<"all_active_agents", "required">;
699
783
  requestedBy: import("convex/values").VString<string, "required">;
700
784
  requestedAt: import("convex/values").VFloat64<number, "required">;
701
- status: import("convex/values").VUnion<"done" | "failed" | "running", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"done", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
785
+ status: import("convex/values").VUnion<"failed" | "running" | "done", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"done", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
702
786
  totalTargets: import("convex/values").VFloat64<number, "required">;
703
787
  enqueuedCount: import("convex/values").VFloat64<number, "required">;
704
788
  failedCount: import("convex/values").VFloat64<number, "required">;
705
789
  completedAt: import("convex/values").VFloat64<number | undefined, "optional">;
706
- }, "required", "status" | "companyId" | "title" | "text" | "requestedBy" | "completedAt" | "target" | "requestedAt" | "totalTargets" | "enqueuedCount" | "failedCount">, {
790
+ }, "required", "companyId" | "text" | "title" | "requestedBy" | "status" | "completedAt" | "target" | "requestedAt" | "totalTargets" | "enqueuedCount" | "failedCount">, {
707
791
  by_companyId_and_requestedAt: ["companyId", "requestedAt", "_creationTime"];
708
792
  by_status: ["status", "_creationTime"];
709
793
  }, {}, {}>;
@@ -711,8 +795,8 @@ declare const _default: import("convex/server").SchemaDefinition<{
711
795
  error?: string | undefined;
712
796
  enqueuedMessageId?: import("convex/values").GenericId<"messageQueue"> | undefined;
713
797
  agentKey: string;
714
- status: "failed" | "enqueued" | "skipped";
715
798
  consumerUserId: string;
799
+ status: "failed" | "enqueued" | "skipped";
716
800
  createdAt: number;
717
801
  runKey: string;
718
802
  broadcastId: import("convex/values").GenericId<"messagePushBroadcasts">;
@@ -725,7 +809,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
725
809
  status: import("convex/values").VUnion<"failed" | "enqueued" | "skipped", [import("convex/values").VLiteral<"enqueued", "required">, import("convex/values").VLiteral<"skipped", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
726
810
  error: import("convex/values").VString<string | undefined, "optional">;
727
811
  createdAt: import("convex/values").VFloat64<number, "required">;
728
- }, "required", "agentKey" | "error" | "status" | "consumerUserId" | "createdAt" | "runKey" | "enqueuedMessageId" | "broadcastId">, {
812
+ }, "required", "agentKey" | "consumerUserId" | "error" | "status" | "createdAt" | "runKey" | "enqueuedMessageId" | "broadcastId">, {
729
813
  by_broadcastId_and_consumerUserId: ["broadcastId", "consumerUserId", "_creationTime"];
730
814
  by_broadcastId_and_createdAt: ["broadcastId", "createdAt", "_creationTime"];
731
815
  }, {}, {}>;