mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 15:59:25 +00:00
20 lines
548 B
TypeScript
20 lines
548 B
TypeScript
import { loadEnvConfig } from '@shumai/core/src/env-loader'
|
|||
|
|
loadEnvConfig(process.cwd(), process.env.NODE_ENV !== 'production')
|
||
|
|
|
||
|
|
import { workflowService } from '@shumai/workflow-core'
|
||
|
|
import { TaskQueueAgent } from '@shumai/workflow-core'
|
||
|
|
import { initAgentWorkflows } from '@shumai/agent'
|
||
|
|
|
||
|
|
async function run() {
|
||
|
|
// Initialize workflows and activities
|
||
|
|
initAgentWorkflows()
|
||
|
|
|
||
|
|
console.log('🚀 Starting Agent Worker...')
|
||
|
|
await workflowService.startWorkers(TaskQueueAgent)
|
||
|
|
}
|
||
|
|
|
||
|
|
run().catch((err) => {
|
||
|
|
console.error(err)
|
||
|
|
process.exit(1)
|
||
|
|
})
|