feat(workflow): migrate workflow engine from temporal to dbos

Replace Temporal and LocalExecutor with DBOS Transact (@dbos-inc/dbos-sdk) as the unified workflow engine. Background tasks, media transcoding, and AI agent workflows now execute with durable steps and task queues directly against PostgreSQL, eliminating the need for an external Temporal cluster and separate polling executors.
This commit is contained in:
yiling
2026-10-17 15:50:17 +08:00
parent f7ed3bafdf
commit 97af81d157
65 changed files with 4397 additions and 5933 deletions
+7 -7
View File
@@ -1,6 +1,10 @@
import { ApplicationFailure } from '@temporalio/workflow'
import type { WorkflowTask } from '@shumai/db'
import { executeActivity, getActivities, TaskQueueAgent } from '@shumai/workflow-core'
import {
ApplicationFailure,
executeActivity,
getActivities,
TaskQueueAgent,
} from '@shumai/workflow-core'
import type {
ShumaiMessageContext,
ShumaiAssetContext,
@@ -20,7 +24,6 @@ export async function agentChat(task: WorkflowTask): Promise<void> {
createCommentActivity,
updateCommentActivity,
updateTaskUsageActivity,
getAgentWorkerQueueActivity,
initializeAgentSessionActivity,
getAssetPathHierarchyActivity,
getAssetPathContextActivity,
@@ -29,12 +32,9 @@ export async function agentChat(task: WorkflowTask): Promise<void> {
} = getActivities()
let placeholderCommentId: string | undefined
let agentWorkerQueue = ''
const agentWorkerQueue = TaskQueueAgent
try {
// 0. Discover queue
agentWorkerQueue = await executeActivity(TaskQueueAgent, getAgentWorkerQueueActivity)
// Update status to processing
await executeActivity(agentWorkerQueue, updateTaskStatusActivity, {
taskId: task.id,