35 lines
759 B
TypeScript
35 lines
759 B
TypeScript
// ZCLAW 入口文件
|
|
import { ZClawApp } from './app';
|
|
|
|
// 导出所有模块
|
|
export * from './core/remote-execution';
|
|
export * from './core/task-orchestration';
|
|
export * from './core/memory';
|
|
export * from './core/proactive';
|
|
export * from './core/multi-agent';
|
|
export * from './core/ai';
|
|
export * from './im';
|
|
export * from './db';
|
|
export * from './config';
|
|
export * from './utils';
|
|
export { ZClawApp } from './app';
|
|
|
|
// 主启动流程
|
|
const app = new ZClawApp();
|
|
|
|
app.start().catch((error) => {
|
|
console.error('ZCLAW failed to start:', error);
|
|
process.exit(1);
|
|
});
|
|
|
|
// 优雅退出
|
|
process.on('SIGINT', async () => {
|
|
await app.shutdown();
|
|
process.exit(0);
|
|
});
|
|
|
|
process.on('SIGTERM', async () => {
|
|
await app.shutdown();
|
|
process.exit(0);
|
|
});
|