Initial commit: QwenClaw persistent daemon for Qwen Code

This commit is contained in:
admin
2026-02-26 02:16:18 +04:00
Unverified
commit 80cdad994c
53 changed files with 7285 additions and 0 deletions

20
src/statusline.ts Normal file
View File

@@ -0,0 +1,20 @@
import { join } from "path";
const HEARTBEAT_DIR = join(process.cwd(), ".qwen", "qwenclaw");
// Write state.json so the statusline script can read fresh data
export interface StateData {
heartbeat?: { nextAt: number };
jobs: { name: string; nextAt: number }[];
security: string;
telegram: boolean;
startedAt: number;
web?: { enabled: boolean; host: string; port: number };
}
export async function writeState(state: StateData) {
await Bun.write(
join(HEARTBEAT_DIR, "state.json"),
JSON.stringify(state) + "\n"
);
}