feat: acp manager (#304)

* feat: acp 控制器第一版

* feat: acp-link 命令二合一
This commit is contained in:
claude-code-best
2026-04-19 21:18:18 +08:00
committed by GitHub
parent c7bc8c8636
commit 66d2671c98
11 changed files with 897 additions and 49 deletions

View File

@@ -883,20 +883,16 @@ export async function startServer(config: ServerConfig): Promise<void> {
authEnabled: !!AUTH_TOKEN,
}, "started");
// Graceful shutdown — close RCS upstream
const shutdown = async () => {
if (rcsUpstream) {
await rcsUpstream.close();
}
process.exit(0);
};
process.on("SIGINT", shutdown);
process.on("SIGTERM", shutdown);
// Keep the server running
await new Promise(() => {});
}
// Graceful shutdown — close RCS upstream on process exit
process.on("SIGINT", async () => {
if (rcsUpstream) {
await rcsUpstream.close();
}
process.exit(0);
});
process.on("SIGTERM", async () => {
if (rcsUpstream) {
await rcsUpstream.close();
}
process.exit(0);
});