@okrlinkhub/agent-factory 3.0.2 → 3.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.
- package/README.md +185 -31
- package/dist/client/index.d.ts +11 -6
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +16 -0
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +2 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +60 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/flyCleanup.d.ts +32 -0
- package/dist/component/flyCleanup.d.ts.map +1 -0
- package/dist/component/flyCleanup.js +272 -0
- package/dist/component/flyCleanup.js.map +1 -0
- package/dist/component/lib.d.ts +1 -0
- package/dist/component/lib.d.ts.map +1 -1
- package/dist/component/lib.js +1 -0
- package/dist/component/lib.js.map +1 -1
- package/dist/component/providers/fly.d.ts +23 -2
- package/dist/component/providers/fly.d.ts.map +1 -1
- package/dist/component/providers/fly.js +15 -3
- package/dist/component/providers/fly.js.map +1 -1
- package/dist/component/pushing.d.ts +4 -4
- package/dist/component/queue.d.ts +19 -16
- package/dist/component/queue.d.ts.map +1 -1
- package/dist/component/queue.js +6 -0
- package/dist/component/queue.js.map +1 -1
- package/dist/component/scheduler.d.ts +8 -8
- package/dist/component/scheduler.d.ts.map +1 -1
- package/dist/component/scheduler.js +22 -2
- package/dist/component/scheduler.js.map +1 -1
- package/dist/component/schema.d.ts +30 -28
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +1 -0
- package/dist/component/schema.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +16 -0
- package/src/component/_generated/api.ts +2 -0
- package/src/component/_generated/component.ts +72 -0
- package/src/component/flyCleanup.ts +386 -0
- package/src/component/lib.test.ts +189 -3
- package/src/component/lib.ts +1 -0
- package/src/component/providers/fly.ts +39 -5
- package/src/component/queue.ts +6 -0
- package/src/component/scheduler.ts +23 -2
- package/src/component/schema.ts +1 -0
|
@@ -11,7 +11,6 @@ type PreparedTelegramAttachment = {
|
|
|
11
11
|
downloadUrl?: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const enqueueMessage: import("convex/server").RegisteredMutation<"public", {
|
|
14
|
-
nowMs?: number | undefined;
|
|
15
14
|
providerConfig?: {
|
|
16
15
|
appName: string;
|
|
17
16
|
kind: "fly" | "runpod" | "ecs";
|
|
@@ -22,6 +21,7 @@ export declare const enqueueMessage: import("convex/server").RegisteredMutation<
|
|
|
22
21
|
volumePath: string;
|
|
23
22
|
volumeSizeGb: number;
|
|
24
23
|
} | undefined;
|
|
24
|
+
nowMs?: number | undefined;
|
|
25
25
|
maxAttempts?: number | undefined;
|
|
26
26
|
priority?: number | undefined;
|
|
27
27
|
scheduledFor?: number | undefined;
|
|
@@ -34,8 +34,8 @@ export declare const enqueueMessage: import("convex/server").RegisteredMutation<
|
|
|
34
34
|
fileName?: string | undefined;
|
|
35
35
|
mimeType?: string | undefined;
|
|
36
36
|
downloadUrl?: string | undefined;
|
|
37
|
-
status: "expired" | "ready";
|
|
38
37
|
storageId: import("convex/values").GenericId<"_storage">;
|
|
38
|
+
status: "expired" | "ready";
|
|
39
39
|
kind: "photo" | "video" | "audio" | "voice" | "document";
|
|
40
40
|
telegramFileId: string;
|
|
41
41
|
expiresAt: number;
|
|
@@ -214,9 +214,9 @@ export declare const deployGlobalSkill: import("convex/server").RegisteredMutati
|
|
|
214
214
|
releaseChannel: "stable" | "canary";
|
|
215
215
|
}>>;
|
|
216
216
|
export declare const listGlobalSkills: import("convex/server").RegisteredQuery<"public", {
|
|
217
|
-
status?: "active" | "disabled" | undefined;
|
|
218
217
|
limit?: number | undefined;
|
|
219
218
|
releaseChannel?: "stable" | "canary" | undefined;
|
|
219
|
+
status?: "active" | "disabled" | undefined;
|
|
220
220
|
}, Promise<{
|
|
221
221
|
skillId: any;
|
|
222
222
|
slug: string;
|
|
@@ -262,8 +262,8 @@ export declare const getWorkerGlobalSkillsManifest: import("convex/server").Regi
|
|
|
262
262
|
export declare const setGlobalSkillStatus: import("convex/server").RegisteredMutation<"public", {
|
|
263
263
|
nowMs?: number | undefined;
|
|
264
264
|
actor?: string | undefined;
|
|
265
|
-
status: "active" | "disabled";
|
|
266
265
|
slug: string;
|
|
266
|
+
status: "active" | "disabled";
|
|
267
267
|
}, Promise<{
|
|
268
268
|
updated: boolean;
|
|
269
269
|
slug: string;
|
|
@@ -304,8 +304,8 @@ export declare const claimNextJob: import("convex/server").RegisteredMutation<"p
|
|
|
304
304
|
fileName?: string | undefined;
|
|
305
305
|
mimeType?: string | undefined;
|
|
306
306
|
downloadUrl?: string | undefined;
|
|
307
|
-
status: "expired" | "ready";
|
|
308
307
|
storageId: import("convex/values").GenericId<"_storage">;
|
|
308
|
+
status: "expired" | "ready";
|
|
309
309
|
kind: "photo" | "video" | "audio" | "voice" | "document";
|
|
310
310
|
telegramFileId: string;
|
|
311
311
|
expiresAt: number;
|
|
@@ -324,7 +324,6 @@ export declare const heartbeatJob: import("convex/server").RegisteredMutation<"p
|
|
|
324
324
|
leaseId: string;
|
|
325
325
|
}, Promise<boolean>>;
|
|
326
326
|
export declare const completeJob: import("convex/server").RegisteredMutation<"public", {
|
|
327
|
-
nowMs?: number | undefined;
|
|
328
327
|
providerConfig?: {
|
|
329
328
|
appName: string;
|
|
330
329
|
kind: "fly" | "runpod" | "ecs";
|
|
@@ -335,12 +334,12 @@ export declare const completeJob: import("convex/server").RegisteredMutation<"pu
|
|
|
335
334
|
volumePath: string;
|
|
336
335
|
volumeSizeGb: number;
|
|
337
336
|
} | undefined;
|
|
337
|
+
nowMs?: number | undefined;
|
|
338
338
|
messageId: import("convex/values").GenericId<"messageQueue">;
|
|
339
339
|
workerId: string;
|
|
340
340
|
leaseId: string;
|
|
341
341
|
}, Promise<boolean>>;
|
|
342
342
|
export declare const failJob: import("convex/server").RegisteredMutation<"public", {
|
|
343
|
-
nowMs?: number | undefined;
|
|
344
343
|
providerConfig?: {
|
|
345
344
|
appName: string;
|
|
346
345
|
kind: "fly" | "runpod" | "ecs";
|
|
@@ -351,6 +350,7 @@ export declare const failJob: import("convex/server").RegisteredMutation<"public
|
|
|
351
350
|
volumePath: string;
|
|
352
351
|
volumeSizeGb: number;
|
|
353
352
|
} | undefined;
|
|
353
|
+
nowMs?: number | undefined;
|
|
354
354
|
messageId: import("convex/values").GenericId<"messageQueue">;
|
|
355
355
|
workerId: string;
|
|
356
356
|
leaseId: string;
|
|
@@ -453,8 +453,8 @@ export declare const listQueueItemsForConversation: import("convex/server").Regi
|
|
|
453
453
|
fileName?: string | undefined;
|
|
454
454
|
mimeType?: string | undefined;
|
|
455
455
|
downloadUrl?: string | undefined;
|
|
456
|
-
status: "expired" | "ready";
|
|
457
456
|
storageId: import("convex/values").GenericId<"_storage">;
|
|
457
|
+
status: "expired" | "ready";
|
|
458
458
|
kind: "photo" | "video" | "audio" | "voice" | "document";
|
|
459
459
|
telegramFileId: string;
|
|
460
460
|
expiresAt: number;
|
|
@@ -489,8 +489,8 @@ export declare const listQueueItemsForUserAgent: import("convex/server").Registe
|
|
|
489
489
|
fileName?: string | undefined;
|
|
490
490
|
mimeType?: string | undefined;
|
|
491
491
|
downloadUrl?: string | undefined;
|
|
492
|
-
status: "expired" | "ready";
|
|
493
492
|
storageId: import("convex/values").GenericId<"_storage">;
|
|
493
|
+
status: "expired" | "ready";
|
|
494
494
|
kind: "photo" | "video" | "audio" | "voice" | "document";
|
|
495
495
|
telegramFileId: string;
|
|
496
496
|
expiresAt: number;
|
|
@@ -536,8 +536,8 @@ export declare const getConversationViewForUserAgent: import("convex/server").Re
|
|
|
536
536
|
fileName?: string | undefined;
|
|
537
537
|
mimeType?: string | undefined;
|
|
538
538
|
downloadUrl?: string | undefined;
|
|
539
|
-
status: "expired" | "ready";
|
|
540
539
|
storageId: import("convex/values").GenericId<"_storage">;
|
|
540
|
+
status: "expired" | "ready";
|
|
541
541
|
kind: "photo" | "video" | "audio" | "voice" | "document";
|
|
542
542
|
telegramFileId: string;
|
|
543
543
|
expiresAt: number;
|
|
@@ -555,8 +555,6 @@ export declare const getConversationViewForUserAgent: import("convex/server").Re
|
|
|
555
555
|
lastAssistantMessageAt: number | null;
|
|
556
556
|
}>>;
|
|
557
557
|
export declare const sendMessageToUserAgent: import("convex/server").RegisteredMutation<"public", {
|
|
558
|
-
metadata?: Record<string, string> | undefined;
|
|
559
|
-
nowMs?: number | undefined;
|
|
560
558
|
providerConfig?: {
|
|
561
559
|
appName: string;
|
|
562
560
|
kind: "fly" | "runpod" | "ecs";
|
|
@@ -567,13 +565,13 @@ export declare const sendMessageToUserAgent: import("convex/server").RegisteredM
|
|
|
567
565
|
volumePath: string;
|
|
568
566
|
volumeSizeGb: number;
|
|
569
567
|
} | undefined;
|
|
568
|
+
metadata?: Record<string, string> | undefined;
|
|
569
|
+
nowMs?: number | undefined;
|
|
570
570
|
agentKey: string;
|
|
571
571
|
consumerUserId: string;
|
|
572
572
|
content: string;
|
|
573
573
|
}, Promise<import("convex/values").GenericId<"messageQueue">>>;
|
|
574
574
|
export declare const sendMessageTemplateToUserAgent: import("convex/server").RegisteredMutation<"public", {
|
|
575
|
-
metadata?: Record<string, string> | undefined;
|
|
576
|
-
nowMs?: number | undefined;
|
|
577
575
|
providerConfig?: {
|
|
578
576
|
appName: string;
|
|
579
577
|
kind: "fly" | "runpod" | "ecs";
|
|
@@ -584,6 +582,8 @@ export declare const sendMessageTemplateToUserAgent: import("convex/server").Reg
|
|
|
584
582
|
volumePath: string;
|
|
585
583
|
volumeSizeGb: number;
|
|
586
584
|
} | undefined;
|
|
585
|
+
metadata?: Record<string, string> | undefined;
|
|
586
|
+
nowMs?: number | undefined;
|
|
587
587
|
agentKey: string;
|
|
588
588
|
consumerUserId: string;
|
|
589
589
|
templateId: import("convex/values").GenericId<"messageTemplates">;
|
|
@@ -661,6 +661,7 @@ export declare const listJobsByStatus: import("convex/server").RegisteredQuery<"
|
|
|
661
661
|
export declare const upsertWorkerState: import("convex/server").RegisteredMutation<"internal", {
|
|
662
662
|
nowMs?: number | undefined;
|
|
663
663
|
appName?: string | undefined;
|
|
664
|
+
volumeId?: string | undefined;
|
|
664
665
|
region?: string | undefined;
|
|
665
666
|
machineId?: string | undefined;
|
|
666
667
|
scheduledShutdownAt?: number | undefined;
|
|
@@ -673,8 +674,9 @@ export declare const upsertWorkerState: import("convex/server").RegisteredMutati
|
|
|
673
674
|
} | null | undefined;
|
|
674
675
|
clearLastSnapshotId?: boolean | undefined;
|
|
675
676
|
clearMachineRef?: boolean | undefined;
|
|
676
|
-
|
|
677
|
+
clearVolumeId?: boolean | undefined;
|
|
677
678
|
workerId: string;
|
|
679
|
+
status: "active" | "draining" | "stopping" | "stopped";
|
|
678
680
|
provider: string;
|
|
679
681
|
load: number;
|
|
680
682
|
}, Promise<null>>;
|
|
@@ -705,8 +707,8 @@ export declare const finalizeDataSnapshotUpload: import("convex/server").Registe
|
|
|
705
707
|
}, Promise<boolean>>;
|
|
706
708
|
export declare const failDataSnapshotUpload: import("convex/server").RegisteredMutation<"public", {
|
|
707
709
|
nowMs?: number | undefined;
|
|
708
|
-
error: string;
|
|
709
710
|
workerId: string;
|
|
711
|
+
error: string;
|
|
710
712
|
snapshotId: import("convex/values").GenericId<"dataSnapshots">;
|
|
711
713
|
}, Promise<boolean>>;
|
|
712
714
|
export declare const getLatestDataSnapshotForRestore: import("convex/server").RegisteredQuery<"public", {
|
|
@@ -739,6 +741,7 @@ export declare const listWorkersForScheduler: import("convex/server").Registered
|
|
|
739
741
|
machineId: string | null;
|
|
740
742
|
appName: string | null;
|
|
741
743
|
region: string | null;
|
|
744
|
+
volumeId: string | null;
|
|
742
745
|
}[]>>;
|
|
743
746
|
export declare const expireOldDataSnapshots: import("convex/server").RegisteredMutation<"internal", {
|
|
744
747
|
nowMs?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","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AC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;oBAmCrC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;oBAmBjC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;UA+C1C,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;KAqClC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;mBAoBjC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;mBAyCvC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;GAsCzB,CAAC"}
|
package/dist/component/queue.js
CHANGED
|
@@ -1902,9 +1902,11 @@ export const upsertWorkerState = internalMutation({
|
|
|
1902
1902
|
machineId: v.optional(v.string()),
|
|
1903
1903
|
appName: v.optional(v.string()),
|
|
1904
1904
|
region: v.optional(v.string()),
|
|
1905
|
+
volumeId: v.optional(v.string()),
|
|
1905
1906
|
assignment: v.optional(v.union(v.null(), workerAssignmentValidator)),
|
|
1906
1907
|
clearLastSnapshotId: v.optional(v.boolean()),
|
|
1907
1908
|
clearMachineRef: v.optional(v.boolean()),
|
|
1909
|
+
clearVolumeId: v.optional(v.boolean()),
|
|
1908
1910
|
},
|
|
1909
1911
|
returns: v.null(),
|
|
1910
1912
|
handler: async (ctx, args) => {
|
|
@@ -1924,6 +1926,7 @@ export const upsertWorkerState = internalMutation({
|
|
|
1924
1926
|
stoppedAt: args.status === "stopped" || args.status === "stopping"
|
|
1925
1927
|
? (args.stoppedAt ?? nowMs)
|
|
1926
1928
|
: undefined,
|
|
1929
|
+
volumeId: args.volumeId,
|
|
1927
1930
|
assignment: args.assignment ?? undefined,
|
|
1928
1931
|
machineRef: args.machineId && args.appName
|
|
1929
1932
|
? {
|
|
@@ -1948,6 +1951,7 @@ export const upsertWorkerState = internalMutation({
|
|
|
1948
1951
|
? (args.stoppedAt ?? worker.stoppedAt ?? nowMs)
|
|
1949
1952
|
: undefined,
|
|
1950
1953
|
lastSnapshotId: args.clearLastSnapshotId ? undefined : worker.lastSnapshotId,
|
|
1954
|
+
volumeId: args.clearVolumeId ? undefined : (args.volumeId ?? worker.volumeId),
|
|
1951
1955
|
assignment: args.assignment === undefined ? worker.assignment : (args.assignment ?? undefined),
|
|
1952
1956
|
machineRef: args.clearMachineRef
|
|
1953
1957
|
? undefined
|
|
@@ -2151,6 +2155,7 @@ export const listWorkersForScheduler = internalQuery({
|
|
|
2151
2155
|
machineId: v.union(v.null(), v.string()),
|
|
2152
2156
|
appName: v.union(v.null(), v.string()),
|
|
2153
2157
|
region: v.union(v.null(), v.string()),
|
|
2158
|
+
volumeId: v.union(v.null(), v.string()),
|
|
2154
2159
|
})),
|
|
2155
2160
|
handler: async (ctx) => {
|
|
2156
2161
|
const rows = await ctx.db.query("workers").collect();
|
|
@@ -2167,6 +2172,7 @@ export const listWorkersForScheduler = internalQuery({
|
|
|
2167
2172
|
machineId: worker.machineRef?.machineId ?? null,
|
|
2168
2173
|
appName: worker.machineRef?.appName ?? null,
|
|
2169
2174
|
region: worker.machineRef?.region ?? null,
|
|
2175
|
+
volumeId: worker.volumeId ?? null,
|
|
2170
2176
|
}));
|
|
2171
2177
|
},
|
|
2172
2178
|
});
|