feat: add durable AgentOS slice execution
This commit is contained in:
@@ -44,10 +44,28 @@ export default defineSchema({
|
||||
.index("by_userId", ["userId"])
|
||||
.index("by_organizationId", ["organizationId"])
|
||||
.index("by_organizationId_and_userId", ["organizationId", "userId"]),
|
||||
gitConnections: defineTable({
|
||||
connectedAt: v.number(),
|
||||
credentialCiphertext: v.string(),
|
||||
credentialIv: v.string(),
|
||||
credentialKind: v.union(v.literal("oauth"), v.literal("token")),
|
||||
organizationId: v.id("organizations"),
|
||||
provider: v.union(v.literal("github"), v.literal("gitea")),
|
||||
serverUrl: v.string(),
|
||||
updatedAt: v.number(),
|
||||
username: v.optional(v.string()),
|
||||
})
|
||||
.index("by_organizationId", ["organizationId"])
|
||||
.index("by_organizationId_and_provider_and_serverUrl", [
|
||||
"organizationId",
|
||||
"provider",
|
||||
"serverUrl",
|
||||
]),
|
||||
projects: defineTable({
|
||||
createdAt: v.number(),
|
||||
defaultBranch: v.optional(v.string()),
|
||||
description: v.optional(v.string()),
|
||||
gitConnectionId: v.optional(v.id("gitConnections")),
|
||||
name: v.string(),
|
||||
normalizedSourceUrl: v.string(),
|
||||
organizationId: v.id("organizations"),
|
||||
@@ -314,11 +332,17 @@ export default defineSchema({
|
||||
]),
|
||||
|
||||
workRuns: defineTable({
|
||||
baseRevision: v.optional(v.string()),
|
||||
candidateRevision: v.optional(v.string()),
|
||||
createdAt: v.number(),
|
||||
designVersion: v.optional(v.number()),
|
||||
endedAt: v.optional(v.number()),
|
||||
kitId: v.string(),
|
||||
kitVersion: v.string(),
|
||||
environmentId: v.optional(v.string()),
|
||||
executionKind: v.optional(
|
||||
v.union(v.literal("simulated"), v.literal("real"))
|
||||
),
|
||||
scenario: v.union(
|
||||
v.literal("success"),
|
||||
v.literal("transient-failure-then-success"),
|
||||
@@ -337,6 +361,7 @@ export default defineSchema({
|
||||
),
|
||||
terminalClassification: v.optional(attemptClassification),
|
||||
terminalSummary: v.optional(v.string()),
|
||||
workflowId: v.optional(v.string()),
|
||||
workId: v.id("works"),
|
||||
}).index("by_work_and_createdAt", ["workId", "createdAt"]),
|
||||
|
||||
@@ -356,6 +381,7 @@ export default defineSchema({
|
||||
),
|
||||
summary: v.optional(v.string()),
|
||||
workId: v.id("works"),
|
||||
workspaceKey: v.optional(v.string()),
|
||||
})
|
||||
.index("by_runId_and_number", ["runId", "number"])
|
||||
.index("by_status_and_leaseExpiresAt", ["status", "leaseExpiresAt"]),
|
||||
|
||||
Reference in New Issue
Block a user