@okrlinkhub/fly-agents 0.1.0
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/LICENSE +201 -0
- package/README.md +229 -0
- package/dist/client/_generated/_ignore.d.ts +1 -0
- package/dist/client/_generated/_ignore.d.ts.map +1 -0
- package/dist/client/_generated/_ignore.js +3 -0
- package/dist/client/_generated/_ignore.js.map +1 -0
- package/dist/client/index.d.ts +164 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +188 -0
- package/dist/client/index.js.map +1 -0
- package/dist/component/_generated/api.d.ts +36 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +159 -0
- package/dist/component/_generated/component.d.ts.map +1 -0
- package/dist/component/_generated/component.js +11 -0
- package/dist/component/_generated/component.js.map +1 -0
- package/dist/component/_generated/dataModel.d.ts +46 -0
- package/dist/component/_generated/dataModel.d.ts.map +1 -0
- package/dist/component/_generated/dataModel.js +11 -0
- package/dist/component/_generated/dataModel.js.map +1 -0
- package/dist/component/_generated/server.d.ts +121 -0
- package/dist/component/_generated/server.d.ts.map +1 -0
- package/dist/component/_generated/server.js +78 -0
- package/dist/component/_generated/server.js.map +1 -0
- package/dist/component/convex.config.d.ts +3 -0
- package/dist/component/convex.config.d.ts.map +1 -0
- package/dist/component/convex.config.js +3 -0
- package/dist/component/convex.config.js.map +1 -0
- package/dist/component/lib.d.ts +136 -0
- package/dist/component/lib.d.ts.map +1 -0
- package/dist/component/lib.js +607 -0
- package/dist/component/lib.js.map +1 -0
- package/dist/component/schema.d.ts +109 -0
- package/dist/component/schema.d.ts.map +1 -0
- package/dist/component/schema.js +52 -0
- package/dist/component/schema.js.map +1 -0
- package/dist/component/storage.d.ts +161 -0
- package/dist/component/storage.d.ts.map +1 -0
- package/dist/component/storage.js +178 -0
- package/dist/component/storage.js.map +1 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +6 -0
- package/dist/react/index.js.map +1 -0
- package/package.json +105 -0
- package/src/client/_generated/_ignore.ts +1 -0
- package/src/client/index.test.ts +34 -0
- package/src/client/index.ts +214 -0
- package/src/client/setup.test.ts +26 -0
- package/src/component/_generated/api.ts +52 -0
- package/src/component/_generated/component.ts +200 -0
- package/src/component/_generated/dataModel.ts +60 -0
- package/src/component/_generated/server.ts +156 -0
- package/src/component/convex.config.ts +3 -0
- package/src/component/lib.test.ts +79 -0
- package/src/component/lib.ts +704 -0
- package/src/component/schema.ts +61 -0
- package/src/component/setup.test.ts +11 -0
- package/src/component/storage.ts +213 -0
- package/src/react/index.ts +7 -0
- package/src/test.ts +18 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
declare const _default: import("convex/server").SchemaDefinition<{
|
|
2
|
+
agentMachines: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3
|
+
machineId?: string | undefined;
|
|
4
|
+
flyVolumeId?: string | undefined;
|
|
5
|
+
lastWakeAt?: number | undefined;
|
|
6
|
+
lastActivityAt?: number | undefined;
|
|
7
|
+
lifecycleMode?: "running" | "hibernated" | undefined;
|
|
8
|
+
latestSnapshotId?: import("convex/values").GenericId<"agentSnapshots"> | undefined;
|
|
9
|
+
lastError?: string | undefined;
|
|
10
|
+
userId: string;
|
|
11
|
+
tenantId: string;
|
|
12
|
+
status: "provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted";
|
|
13
|
+
allowedSkills: string[];
|
|
14
|
+
memoryMB: number;
|
|
15
|
+
appKey: string;
|
|
16
|
+
bridgeUrl: string;
|
|
17
|
+
serviceId: string;
|
|
18
|
+
serviceKey: string;
|
|
19
|
+
region: string;
|
|
20
|
+
}, {
|
|
21
|
+
userId: import("convex/values").VString<string, "required">;
|
|
22
|
+
tenantId: import("convex/values").VString<string, "required">;
|
|
23
|
+
machineId: import("convex/values").VString<string | undefined, "optional">;
|
|
24
|
+
flyVolumeId: import("convex/values").VString<string | undefined, "optional">;
|
|
25
|
+
status: import("convex/values").VUnion<"provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted", [import("convex/values").VLiteral<"provisioning", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"stopped", "required">, import("convex/values").VLiteral<"hibernated", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"deleted", "required">], "required", never>;
|
|
26
|
+
allowedSkills: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
27
|
+
memoryMB: import("convex/values").VFloat64<number, "required">;
|
|
28
|
+
appKey: import("convex/values").VString<string, "required">;
|
|
29
|
+
bridgeUrl: import("convex/values").VString<string, "required">;
|
|
30
|
+
serviceId: import("convex/values").VString<string, "required">;
|
|
31
|
+
serviceKey: import("convex/values").VString<string, "required">;
|
|
32
|
+
region: import("convex/values").VString<string, "required">;
|
|
33
|
+
lastWakeAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
34
|
+
lastActivityAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
35
|
+
lifecycleMode: import("convex/values").VUnion<"running" | "hibernated" | undefined, [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"hibernated", "required">], "optional", never>;
|
|
36
|
+
latestSnapshotId: import("convex/values").VId<import("convex/values").GenericId<"agentSnapshots"> | undefined, "optional">;
|
|
37
|
+
lastError: import("convex/values").VString<string | undefined, "optional">;
|
|
38
|
+
}, "required", "userId" | "tenantId" | "machineId" | "flyVolumeId" | "status" | "allowedSkills" | "memoryMB" | "appKey" | "bridgeUrl" | "serviceId" | "serviceKey" | "region" | "lastWakeAt" | "lastActivityAt" | "lifecycleMode" | "latestSnapshotId" | "lastError">, {
|
|
39
|
+
by_tenantId: ["tenantId", "_creationTime"];
|
|
40
|
+
by_machineId: ["machineId", "_creationTime"];
|
|
41
|
+
by_userId_and_tenantId: ["userId", "tenantId", "_creationTime"];
|
|
42
|
+
}, {}, {}>;
|
|
43
|
+
agentSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
44
|
+
lastError?: string | undefined;
|
|
45
|
+
machineDocId?: import("convex/values").GenericId<"agentMachines"> | undefined;
|
|
46
|
+
snapshotStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
47
|
+
flyVolumeSnapshotId?: string | undefined;
|
|
48
|
+
restoreInfo?: {
|
|
49
|
+
restoredMachineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
50
|
+
restoredMachineId: string;
|
|
51
|
+
restoredAt: number;
|
|
52
|
+
} | undefined;
|
|
53
|
+
userId: string;
|
|
54
|
+
tenantId: string;
|
|
55
|
+
status: "created" | "restored" | "failed";
|
|
56
|
+
agentKey: string;
|
|
57
|
+
manifest: {
|
|
58
|
+
sourceMachineId?: string | undefined;
|
|
59
|
+
sourceFlyVolumeId?: string | undefined;
|
|
60
|
+
image?: string | undefined;
|
|
61
|
+
llmModel?: string | undefined;
|
|
62
|
+
notes?: string | undefined;
|
|
63
|
+
region: string;
|
|
64
|
+
backupScope: "openclaw-state-plus-manifest";
|
|
65
|
+
backupCreatedAt: number;
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
agentKey: import("convex/values").VString<string, "required">;
|
|
69
|
+
machineDocId: import("convex/values").VId<import("convex/values").GenericId<"agentMachines"> | undefined, "optional">;
|
|
70
|
+
tenantId: import("convex/values").VString<string, "required">;
|
|
71
|
+
userId: import("convex/values").VString<string, "required">;
|
|
72
|
+
status: import("convex/values").VUnion<"created" | "restored" | "failed", [import("convex/values").VLiteral<"created", "required">, import("convex/values").VLiteral<"restored", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
|
|
73
|
+
snapshotStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
|
|
74
|
+
flyVolumeSnapshotId: import("convex/values").VString<string | undefined, "optional">;
|
|
75
|
+
manifest: import("convex/values").VObject<{
|
|
76
|
+
sourceMachineId?: string | undefined;
|
|
77
|
+
sourceFlyVolumeId?: string | undefined;
|
|
78
|
+
image?: string | undefined;
|
|
79
|
+
llmModel?: string | undefined;
|
|
80
|
+
notes?: string | undefined;
|
|
81
|
+
region: string;
|
|
82
|
+
backupScope: "openclaw-state-plus-manifest";
|
|
83
|
+
backupCreatedAt: number;
|
|
84
|
+
}, {
|
|
85
|
+
sourceMachineId: import("convex/values").VString<string | undefined, "optional">;
|
|
86
|
+
sourceFlyVolumeId: import("convex/values").VString<string | undefined, "optional">;
|
|
87
|
+
image: import("convex/values").VString<string | undefined, "optional">;
|
|
88
|
+
region: import("convex/values").VString<string, "required">;
|
|
89
|
+
llmModel: import("convex/values").VString<string | undefined, "optional">;
|
|
90
|
+
backupScope: import("convex/values").VLiteral<"openclaw-state-plus-manifest", "required">;
|
|
91
|
+
backupCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
92
|
+
notes: import("convex/values").VString<string | undefined, "optional">;
|
|
93
|
+
}, "required", "region" | "sourceMachineId" | "sourceFlyVolumeId" | "image" | "llmModel" | "backupScope" | "backupCreatedAt" | "notes">;
|
|
94
|
+
restoreInfo: import("convex/values").VObject<{
|
|
95
|
+
restoredMachineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
96
|
+
restoredMachineId: string;
|
|
97
|
+
restoredAt: number;
|
|
98
|
+
} | undefined, {
|
|
99
|
+
restoredMachineDocId: import("convex/values").VId<import("convex/values").GenericId<"agentMachines">, "required">;
|
|
100
|
+
restoredMachineId: import("convex/values").VString<string, "required">;
|
|
101
|
+
restoredAt: import("convex/values").VFloat64<number, "required">;
|
|
102
|
+
}, "optional", "restoredMachineDocId" | "restoredMachineId" | "restoredAt">;
|
|
103
|
+
lastError: import("convex/values").VString<string | undefined, "optional">;
|
|
104
|
+
}, "required", "userId" | "tenantId" | "status" | "lastError" | "agentKey" | "machineDocId" | "snapshotStorageId" | "flyVolumeSnapshotId" | "manifest" | "restoreInfo" | "manifest.region" | "manifest.sourceMachineId" | "manifest.sourceFlyVolumeId" | "manifest.image" | "manifest.llmModel" | "manifest.backupScope" | "manifest.backupCreatedAt" | "manifest.notes" | "restoreInfo.restoredMachineDocId" | "restoreInfo.restoredMachineId" | "restoreInfo.restoredAt">, {
|
|
105
|
+
by_agentKey_createdAt: ["agentKey", "_creationTime"];
|
|
106
|
+
}, {}, {}>;
|
|
107
|
+
}, true>;
|
|
108
|
+
export default _default;
|
|
109
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAyDG"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineSchema, defineTable } from "convex/server";
|
|
2
|
+
import { v } from "convex/values";
|
|
3
|
+
export default defineSchema({
|
|
4
|
+
agentMachines: defineTable({
|
|
5
|
+
userId: v.string(),
|
|
6
|
+
tenantId: v.string(),
|
|
7
|
+
machineId: v.optional(v.string()),
|
|
8
|
+
flyVolumeId: v.optional(v.string()),
|
|
9
|
+
status: v.union(v.literal("provisioning"), v.literal("running"), v.literal("stopped"), v.literal("hibernated"), v.literal("error"), v.literal("deleted")),
|
|
10
|
+
allowedSkills: v.array(v.string()),
|
|
11
|
+
memoryMB: v.number(),
|
|
12
|
+
appKey: v.string(),
|
|
13
|
+
bridgeUrl: v.string(),
|
|
14
|
+
serviceId: v.string(),
|
|
15
|
+
serviceKey: v.string(),
|
|
16
|
+
region: v.string(),
|
|
17
|
+
lastWakeAt: v.optional(v.number()),
|
|
18
|
+
lastActivityAt: v.optional(v.number()),
|
|
19
|
+
lifecycleMode: v.optional(v.union(v.literal("running"), v.literal("hibernated"))),
|
|
20
|
+
latestSnapshotId: v.optional(v.id("agentSnapshots")),
|
|
21
|
+
lastError: v.optional(v.string()),
|
|
22
|
+
})
|
|
23
|
+
.index("by_tenantId", ["tenantId"])
|
|
24
|
+
.index("by_machineId", ["machineId"])
|
|
25
|
+
.index("by_userId_and_tenantId", ["userId", "tenantId"]),
|
|
26
|
+
agentSnapshots: defineTable({
|
|
27
|
+
agentKey: v.string(),
|
|
28
|
+
machineDocId: v.optional(v.id("agentMachines")),
|
|
29
|
+
tenantId: v.string(),
|
|
30
|
+
userId: v.string(),
|
|
31
|
+
status: v.union(v.literal("created"), v.literal("restored"), v.literal("failed")),
|
|
32
|
+
snapshotStorageId: v.optional(v.id("_storage")),
|
|
33
|
+
flyVolumeSnapshotId: v.optional(v.string()),
|
|
34
|
+
manifest: v.object({
|
|
35
|
+
sourceMachineId: v.optional(v.string()),
|
|
36
|
+
sourceFlyVolumeId: v.optional(v.string()),
|
|
37
|
+
image: v.optional(v.string()),
|
|
38
|
+
region: v.string(),
|
|
39
|
+
llmModel: v.optional(v.string()),
|
|
40
|
+
backupScope: v.literal("openclaw-state-plus-manifest"),
|
|
41
|
+
backupCreatedAt: v.number(),
|
|
42
|
+
notes: v.optional(v.string()),
|
|
43
|
+
}),
|
|
44
|
+
restoreInfo: v.optional(v.object({
|
|
45
|
+
restoredMachineDocId: v.id("agentMachines"),
|
|
46
|
+
restoredMachineId: v.string(),
|
|
47
|
+
restoredAt: v.number(),
|
|
48
|
+
})),
|
|
49
|
+
lastError: v.optional(v.string()),
|
|
50
|
+
}).index("by_agentKey_createdAt", ["agentKey"]),
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,eAA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,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAChC,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAAC;YACtD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;YAC3B,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAC9B,CAAC;QACF,WAAW,EAAE,CAAC,CAAC,QAAQ,CACrB,CAAC,CAAC,MAAM,CAAC;YACP,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC;YAC3C,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;YAC7B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;SACvB,CAAC,CACH;QACD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAClC,CAAC,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC,UAAU,CAAC,CAAC;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export declare const getMachineRecord: import("convex/server").RegisteredQuery<"internal", {
|
|
2
|
+
machineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
3
|
+
}, Promise<{
|
|
4
|
+
_id: import("convex/values").GenericId<"agentMachines">;
|
|
5
|
+
_creationTime: number;
|
|
6
|
+
machineId?: string | undefined;
|
|
7
|
+
flyVolumeId?: string | undefined;
|
|
8
|
+
lastWakeAt?: number | undefined;
|
|
9
|
+
lastActivityAt?: number | undefined;
|
|
10
|
+
lifecycleMode?: "running" | "hibernated" | undefined;
|
|
11
|
+
latestSnapshotId?: import("convex/values").GenericId<"agentSnapshots"> | undefined;
|
|
12
|
+
lastError?: string | undefined;
|
|
13
|
+
userId: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
status: "provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted";
|
|
16
|
+
allowedSkills: string[];
|
|
17
|
+
memoryMB: number;
|
|
18
|
+
appKey: string;
|
|
19
|
+
bridgeUrl: string;
|
|
20
|
+
serviceId: string;
|
|
21
|
+
serviceKey: string;
|
|
22
|
+
region: string;
|
|
23
|
+
} | null>>;
|
|
24
|
+
export declare const insertMachineRecord: import("convex/server").RegisteredMutation<"internal", {
|
|
25
|
+
lastActivityAt?: number | undefined;
|
|
26
|
+
lifecycleMode?: "running" | "hibernated" | undefined;
|
|
27
|
+
userId: string;
|
|
28
|
+
tenantId: string;
|
|
29
|
+
status: "provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted";
|
|
30
|
+
allowedSkills: string[];
|
|
31
|
+
memoryMB: number;
|
|
32
|
+
appKey: string;
|
|
33
|
+
bridgeUrl: string;
|
|
34
|
+
serviceId: string;
|
|
35
|
+
serviceKey: string;
|
|
36
|
+
region: string;
|
|
37
|
+
}, Promise<import("convex/values").GenericId<"agentMachines">>>;
|
|
38
|
+
export declare const patchMachineRecord: import("convex/server").RegisteredMutation<"internal", {
|
|
39
|
+
machineId?: string | undefined;
|
|
40
|
+
flyVolumeId?: string | undefined;
|
|
41
|
+
status?: "provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted" | undefined;
|
|
42
|
+
lastWakeAt?: number | undefined;
|
|
43
|
+
lastActivityAt?: number | undefined;
|
|
44
|
+
lifecycleMode?: "running" | "hibernated" | undefined;
|
|
45
|
+
latestSnapshotId?: import("convex/values").GenericId<"agentSnapshots"> | undefined;
|
|
46
|
+
lastError?: string | undefined;
|
|
47
|
+
machineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
48
|
+
}, Promise<null>>;
|
|
49
|
+
export declare const listStaleRunningMachines: import("convex/server").RegisteredQuery<"internal", {
|
|
50
|
+
limit?: number | undefined;
|
|
51
|
+
cutoffMs: number;
|
|
52
|
+
}, Promise<{
|
|
53
|
+
_id: import("convex/values").GenericId<"agentMachines">;
|
|
54
|
+
_creationTime: number;
|
|
55
|
+
machineId?: string | undefined;
|
|
56
|
+
flyVolumeId?: string | undefined;
|
|
57
|
+
lastWakeAt?: number | undefined;
|
|
58
|
+
lastActivityAt?: number | undefined;
|
|
59
|
+
lifecycleMode?: "running" | "hibernated" | undefined;
|
|
60
|
+
latestSnapshotId?: import("convex/values").GenericId<"agentSnapshots"> | undefined;
|
|
61
|
+
lastError?: string | undefined;
|
|
62
|
+
userId: string;
|
|
63
|
+
tenantId: string;
|
|
64
|
+
status: "provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted";
|
|
65
|
+
allowedSkills: string[];
|
|
66
|
+
memoryMB: number;
|
|
67
|
+
appKey: string;
|
|
68
|
+
bridgeUrl: string;
|
|
69
|
+
serviceId: string;
|
|
70
|
+
serviceKey: string;
|
|
71
|
+
region: string;
|
|
72
|
+
}[]>>;
|
|
73
|
+
export declare const getLatestMachineByUserTenant: import("convex/server").RegisteredQuery<"internal", {
|
|
74
|
+
userId: string;
|
|
75
|
+
tenantId: string;
|
|
76
|
+
}, Promise<{
|
|
77
|
+
_id: import("convex/values").GenericId<"agentMachines">;
|
|
78
|
+
_creationTime: number;
|
|
79
|
+
machineId?: string | undefined;
|
|
80
|
+
flyVolumeId?: string | undefined;
|
|
81
|
+
lastWakeAt?: number | undefined;
|
|
82
|
+
lastActivityAt?: number | undefined;
|
|
83
|
+
lifecycleMode?: "running" | "hibernated" | undefined;
|
|
84
|
+
latestSnapshotId?: import("convex/values").GenericId<"agentSnapshots"> | undefined;
|
|
85
|
+
lastError?: string | undefined;
|
|
86
|
+
userId: string;
|
|
87
|
+
tenantId: string;
|
|
88
|
+
status: "provisioning" | "running" | "stopped" | "hibernated" | "error" | "deleted";
|
|
89
|
+
allowedSkills: string[];
|
|
90
|
+
memoryMB: number;
|
|
91
|
+
appKey: string;
|
|
92
|
+
bridgeUrl: string;
|
|
93
|
+
serviceId: string;
|
|
94
|
+
serviceKey: string;
|
|
95
|
+
region: string;
|
|
96
|
+
}>>;
|
|
97
|
+
export declare const getLatestSnapshotByAgentKey: import("convex/server").RegisteredQuery<"internal", {
|
|
98
|
+
agentKey: string;
|
|
99
|
+
}, Promise<{
|
|
100
|
+
_id: import("convex/values").GenericId<"agentSnapshots">;
|
|
101
|
+
_creationTime: number;
|
|
102
|
+
lastError?: string | undefined;
|
|
103
|
+
machineDocId?: import("convex/values").GenericId<"agentMachines"> | undefined;
|
|
104
|
+
snapshotStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
105
|
+
flyVolumeSnapshotId?: string | undefined;
|
|
106
|
+
restoreInfo?: {
|
|
107
|
+
restoredMachineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
108
|
+
restoredMachineId: string;
|
|
109
|
+
restoredAt: number;
|
|
110
|
+
} | undefined;
|
|
111
|
+
userId: string;
|
|
112
|
+
tenantId: string;
|
|
113
|
+
status: "created" | "restored" | "failed";
|
|
114
|
+
agentKey: string;
|
|
115
|
+
manifest: {
|
|
116
|
+
sourceMachineId?: string | undefined;
|
|
117
|
+
sourceFlyVolumeId?: string | undefined;
|
|
118
|
+
image?: string | undefined;
|
|
119
|
+
llmModel?: string | undefined;
|
|
120
|
+
notes?: string | undefined;
|
|
121
|
+
region: string;
|
|
122
|
+
backupScope: "openclaw-state-plus-manifest";
|
|
123
|
+
backupCreatedAt: number;
|
|
124
|
+
};
|
|
125
|
+
}>>;
|
|
126
|
+
export declare const insertAgentSnapshot: import("convex/server").RegisteredMutation<"internal", {
|
|
127
|
+
lastError?: string | undefined;
|
|
128
|
+
machineDocId?: import("convex/values").GenericId<"agentMachines"> | undefined;
|
|
129
|
+
snapshotStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
130
|
+
flyVolumeSnapshotId?: string | undefined;
|
|
131
|
+
restoreInfo?: {
|
|
132
|
+
restoredMachineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
133
|
+
restoredMachineId: string;
|
|
134
|
+
restoredAt: number;
|
|
135
|
+
} | undefined;
|
|
136
|
+
userId: string;
|
|
137
|
+
tenantId: string;
|
|
138
|
+
status: "created" | "restored" | "failed";
|
|
139
|
+
agentKey: string;
|
|
140
|
+
manifest: {
|
|
141
|
+
sourceMachineId?: string | undefined;
|
|
142
|
+
sourceFlyVolumeId?: string | undefined;
|
|
143
|
+
image?: string | undefined;
|
|
144
|
+
llmModel?: string | undefined;
|
|
145
|
+
notes?: string | undefined;
|
|
146
|
+
region: string;
|
|
147
|
+
backupScope: "openclaw-state-plus-manifest";
|
|
148
|
+
backupCreatedAt: number;
|
|
149
|
+
};
|
|
150
|
+
}, Promise<import("convex/values").GenericId<"agentSnapshots">>>;
|
|
151
|
+
export declare const patchAgentSnapshot: import("convex/server").RegisteredMutation<"internal", {
|
|
152
|
+
status?: "created" | "restored" | "failed" | undefined;
|
|
153
|
+
lastError?: string | undefined;
|
|
154
|
+
restoreInfo?: {
|
|
155
|
+
restoredMachineDocId: import("convex/values").GenericId<"agentMachines">;
|
|
156
|
+
restoredMachineId: string;
|
|
157
|
+
restoredAt: number;
|
|
158
|
+
} | undefined;
|
|
159
|
+
snapshotId: import("convex/values").GenericId<"agentSnapshots">;
|
|
160
|
+
}, Promise<null>>;
|
|
161
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/component/storage.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;UAM3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;+DAmB9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;iBAkB7B,CAAC;AAQH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;KAsBnC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;GAgBvC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CtC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;gEAgC9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;iBAmB7B,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { internalMutation, internalQuery } from "./_generated/server.js";
|
|
3
|
+
import schema from "./schema.js";
|
|
4
|
+
const machineStatusValidator = v.union(v.literal("provisioning"), v.literal("running"), v.literal("stopped"), v.literal("hibernated"), v.literal("error"), v.literal("deleted"));
|
|
5
|
+
const machineRecordValidator = schema.tables.agentMachines.validator.extend({
|
|
6
|
+
_id: v.id("agentMachines"),
|
|
7
|
+
_creationTime: v.number(),
|
|
8
|
+
});
|
|
9
|
+
export const getMachineRecord = internalQuery({
|
|
10
|
+
args: { machineDocId: v.id("agentMachines") },
|
|
11
|
+
returns: v.union(v.null(), machineRecordValidator),
|
|
12
|
+
handler: async (ctx, args) => {
|
|
13
|
+
return await ctx.db.get(args.machineDocId);
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
export const insertMachineRecord = internalMutation({
|
|
17
|
+
args: {
|
|
18
|
+
userId: v.string(),
|
|
19
|
+
tenantId: v.string(),
|
|
20
|
+
status: machineStatusValidator,
|
|
21
|
+
allowedSkills: v.array(v.string()),
|
|
22
|
+
memoryMB: v.number(),
|
|
23
|
+
appKey: v.string(),
|
|
24
|
+
bridgeUrl: v.string(),
|
|
25
|
+
serviceId: v.string(),
|
|
26
|
+
serviceKey: v.string(),
|
|
27
|
+
region: v.string(),
|
|
28
|
+
lastActivityAt: v.optional(v.number()),
|
|
29
|
+
lifecycleMode: v.optional(v.union(v.literal("running"), v.literal("hibernated"))),
|
|
30
|
+
},
|
|
31
|
+
returns: v.id("agentMachines"),
|
|
32
|
+
handler: async (ctx, args) => {
|
|
33
|
+
return await ctx.db.insert("agentMachines", args);
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
export const patchMachineRecord = internalMutation({
|
|
37
|
+
args: {
|
|
38
|
+
machineDocId: v.id("agentMachines"),
|
|
39
|
+
status: v.optional(machineStatusValidator),
|
|
40
|
+
machineId: v.optional(v.string()),
|
|
41
|
+
flyVolumeId: v.optional(v.string()),
|
|
42
|
+
lastWakeAt: v.optional(v.number()),
|
|
43
|
+
lastActivityAt: v.optional(v.number()),
|
|
44
|
+
lifecycleMode: v.optional(v.union(v.literal("running"), v.literal("hibernated"))),
|
|
45
|
+
latestSnapshotId: v.optional(v.id("agentSnapshots")),
|
|
46
|
+
lastError: v.optional(v.string()),
|
|
47
|
+
},
|
|
48
|
+
returns: v.null(),
|
|
49
|
+
handler: async (ctx, args) => {
|
|
50
|
+
const { machineDocId, ...updates } = args;
|
|
51
|
+
await ctx.db.patch(machineDocId, updates);
|
|
52
|
+
return null;
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
const snapshotStatusValidator = v.union(v.literal("created"), v.literal("restored"), v.literal("failed"));
|
|
56
|
+
export const listStaleRunningMachines = internalQuery({
|
|
57
|
+
args: {
|
|
58
|
+
cutoffMs: v.number(),
|
|
59
|
+
limit: v.optional(v.number()),
|
|
60
|
+
},
|
|
61
|
+
returns: v.array(machineRecordValidator),
|
|
62
|
+
handler: async (ctx, args) => {
|
|
63
|
+
const all = await ctx.db.query("agentMachines").collect();
|
|
64
|
+
const stale = all
|
|
65
|
+
.filter((m) => m.status === "running" &&
|
|
66
|
+
(m.lastActivityAt ?? m.lastWakeAt ?? 0) <= args.cutoffMs &&
|
|
67
|
+
!!m.machineId &&
|
|
68
|
+
!!m.flyVolumeId)
|
|
69
|
+
.sort((a, b) => (a.lastActivityAt ?? a.lastWakeAt ?? 0) - (b.lastActivityAt ?? b.lastWakeAt ?? 0));
|
|
70
|
+
if (!args.limit || args.limit <= 0) {
|
|
71
|
+
return stale;
|
|
72
|
+
}
|
|
73
|
+
return stale.slice(0, args.limit);
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
export const getLatestMachineByUserTenant = internalQuery({
|
|
77
|
+
args: {
|
|
78
|
+
userId: v.string(),
|
|
79
|
+
tenantId: v.string(),
|
|
80
|
+
},
|
|
81
|
+
returns: v.union(v.null(), machineRecordValidator),
|
|
82
|
+
handler: async (ctx, args) => {
|
|
83
|
+
const rows = await ctx.db
|
|
84
|
+
.query("agentMachines")
|
|
85
|
+
.withIndex("by_userId_and_tenantId", (q) => q.eq("userId", args.userId).eq("tenantId", args.tenantId))
|
|
86
|
+
.order("desc")
|
|
87
|
+
.take(1);
|
|
88
|
+
return rows[0] ?? null;
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
export const getLatestSnapshotByAgentKey = internalQuery({
|
|
92
|
+
args: { agentKey: v.string() },
|
|
93
|
+
returns: v.union(v.null(), v.object({
|
|
94
|
+
_id: v.id("agentSnapshots"),
|
|
95
|
+
_creationTime: v.number(),
|
|
96
|
+
agentKey: v.string(),
|
|
97
|
+
machineDocId: v.optional(v.id("agentMachines")),
|
|
98
|
+
tenantId: v.string(),
|
|
99
|
+
userId: v.string(),
|
|
100
|
+
status: snapshotStatusValidator,
|
|
101
|
+
snapshotStorageId: v.optional(v.id("_storage")),
|
|
102
|
+
flyVolumeSnapshotId: v.optional(v.string()),
|
|
103
|
+
manifest: v.object({
|
|
104
|
+
sourceMachineId: v.optional(v.string()),
|
|
105
|
+
sourceFlyVolumeId: v.optional(v.string()),
|
|
106
|
+
image: v.optional(v.string()),
|
|
107
|
+
region: v.string(),
|
|
108
|
+
llmModel: v.optional(v.string()),
|
|
109
|
+
backupScope: v.literal("openclaw-state-plus-manifest"),
|
|
110
|
+
backupCreatedAt: v.number(),
|
|
111
|
+
notes: v.optional(v.string()),
|
|
112
|
+
}),
|
|
113
|
+
restoreInfo: v.optional(v.object({
|
|
114
|
+
restoredMachineDocId: v.id("agentMachines"),
|
|
115
|
+
restoredMachineId: v.string(),
|
|
116
|
+
restoredAt: v.number(),
|
|
117
|
+
})),
|
|
118
|
+
lastError: v.optional(v.string()),
|
|
119
|
+
})),
|
|
120
|
+
handler: async (ctx, args) => {
|
|
121
|
+
const entries = await ctx.db
|
|
122
|
+
.query("agentSnapshots")
|
|
123
|
+
.withIndex("by_agentKey_createdAt", (q) => q.eq("agentKey", args.agentKey))
|
|
124
|
+
.order("desc")
|
|
125
|
+
.take(1);
|
|
126
|
+
return entries[0] ?? null;
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
export const insertAgentSnapshot = internalMutation({
|
|
130
|
+
args: {
|
|
131
|
+
agentKey: v.string(),
|
|
132
|
+
machineDocId: v.optional(v.id("agentMachines")),
|
|
133
|
+
tenantId: v.string(),
|
|
134
|
+
userId: v.string(),
|
|
135
|
+
status: snapshotStatusValidator,
|
|
136
|
+
snapshotStorageId: v.optional(v.id("_storage")),
|
|
137
|
+
flyVolumeSnapshotId: v.optional(v.string()),
|
|
138
|
+
manifest: v.object({
|
|
139
|
+
sourceMachineId: v.optional(v.string()),
|
|
140
|
+
sourceFlyVolumeId: v.optional(v.string()),
|
|
141
|
+
image: v.optional(v.string()),
|
|
142
|
+
region: v.string(),
|
|
143
|
+
llmModel: v.optional(v.string()),
|
|
144
|
+
backupScope: v.literal("openclaw-state-plus-manifest"),
|
|
145
|
+
backupCreatedAt: v.number(),
|
|
146
|
+
notes: v.optional(v.string()),
|
|
147
|
+
}),
|
|
148
|
+
restoreInfo: v.optional(v.object({
|
|
149
|
+
restoredMachineDocId: v.id("agentMachines"),
|
|
150
|
+
restoredMachineId: v.string(),
|
|
151
|
+
restoredAt: v.number(),
|
|
152
|
+
})),
|
|
153
|
+
lastError: v.optional(v.string()),
|
|
154
|
+
},
|
|
155
|
+
returns: v.id("agentSnapshots"),
|
|
156
|
+
handler: async (ctx, args) => {
|
|
157
|
+
return await ctx.db.insert("agentSnapshots", args);
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
export const patchAgentSnapshot = internalMutation({
|
|
161
|
+
args: {
|
|
162
|
+
snapshotId: v.id("agentSnapshots"),
|
|
163
|
+
status: v.optional(snapshotStatusValidator),
|
|
164
|
+
restoreInfo: v.optional(v.object({
|
|
165
|
+
restoredMachineDocId: v.id("agentMachines"),
|
|
166
|
+
restoredMachineId: v.string(),
|
|
167
|
+
restoredAt: v.number(),
|
|
168
|
+
})),
|
|
169
|
+
lastError: v.optional(v.string()),
|
|
170
|
+
},
|
|
171
|
+
returns: v.null(),
|
|
172
|
+
handler: async (ctx, args) => {
|
|
173
|
+
const { snapshotId, ...updates } = args;
|
|
174
|
+
await ctx.db.patch(snapshotId, updates);
|
|
175
|
+
return null;
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/component/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CACpC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EACzB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EACvB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAClB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CACrB,CAAC;AAEF,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC;IAC1E,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC;IAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;IAC5C,IAAI,EAAE,EAAE,YAAY,EAAE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AE;QAC3B,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC;QACxC,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,UAE1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,6CAA6C;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC"}
|