mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 00:04:54 +00:00
feat(foundry): checkpoint actor and workspace refactor
This commit is contained in:
parent
32f3c6c3bc
commit
dbe57d45b9
81 changed files with 3441 additions and 2332 deletions
|
|
@ -11,8 +11,6 @@ export const task = sqliteTable(
|
|||
task: text("task").notNull(),
|
||||
sandboxProviderId: text("sandbox_provider_id").notNull(),
|
||||
status: text("status").notNull(),
|
||||
agentType: text("agent_type").default("claude"),
|
||||
prSubmitted: integer("pr_submitted").default(0),
|
||||
createdAt: integer("created_at").notNull(),
|
||||
updatedAt: integer("updated_at").notNull(),
|
||||
},
|
||||
|
|
@ -24,14 +22,10 @@ export const taskRuntime = sqliteTable(
|
|||
{
|
||||
id: integer("id").primaryKey(),
|
||||
activeSandboxId: text("active_sandbox_id"),
|
||||
activeSessionId: text("active_session_id"),
|
||||
activeSwitchTarget: text("active_switch_target"),
|
||||
activeCwd: text("active_cwd"),
|
||||
statusMessage: text("status_message"),
|
||||
gitStateJson: text("git_state_json"),
|
||||
gitStateUpdatedAt: integer("git_state_updated_at"),
|
||||
provisionStage: text("provision_stage"),
|
||||
provisionStageUpdatedAt: integer("provision_stage_updated_at"),
|
||||
updatedAt: integer("updated_at").notNull(),
|
||||
},
|
||||
(table) => [check("task_runtime_singleton_id_check", sql`${table.id} = 1`)],
|
||||
|
|
@ -54,12 +48,12 @@ export const taskSandboxes = sqliteTable("task_sandboxes", {
|
|||
});
|
||||
|
||||
/**
|
||||
* Coordinator index of workbench sessions within this task.
|
||||
* Coordinator index of workspace sessions within this task.
|
||||
* The task actor is the coordinator for sessions. Each row holds session
|
||||
* metadata, model, status, transcript, and draft state. Sessions are
|
||||
* sub-entities of the task — no separate session actor in the DB.
|
||||
*/
|
||||
export const taskWorkbenchSessions = sqliteTable("task_workbench_sessions", {
|
||||
export const taskWorkspaceSessions = sqliteTable("task_workspace_sessions", {
|
||||
sessionId: text("session_id").notNull().primaryKey(),
|
||||
sandboxSessionId: text("sandbox_session_id"),
|
||||
sessionName: text("session_name").notNull(),
|
||||
|
|
@ -68,11 +62,6 @@ export const taskWorkbenchSessions = sqliteTable("task_workbench_sessions", {
|
|||
errorMessage: text("error_message"),
|
||||
transcriptJson: text("transcript_json").notNull().default("[]"),
|
||||
transcriptUpdatedAt: integer("transcript_updated_at"),
|
||||
unread: integer("unread").notNull().default(0),
|
||||
draftText: text("draft_text").notNull().default(""),
|
||||
// Structured by the workbench composer attachment payload format.
|
||||
draftAttachmentsJson: text("draft_attachments_json").notNull().default("[]"),
|
||||
draftUpdatedAt: integer("draft_updated_at"),
|
||||
created: integer("created").notNull().default(1),
|
||||
closed: integer("closed").notNull().default(0),
|
||||
thinkingSinceMs: integer("thinking_since_ms"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue