7582a88d6b
- types.ts: START/END, RoleMeta, ThreadContext, Role, Moderator, WorkflowDefinition - engine.ts: executeThread with JSONL persistence + AbortSignal - worker.ts: per-bundle process, TCP IPC, kill individual threads - CLI: run/ps/kill/threads/thread/thread rm commands - 32 tests pass, biome clean 小橘 <xiaoju@shazhou.work>
10 lines
338 B
TypeScript
10 lines
338 B
TypeScript
import { listRunningThreads } from "./thread-scan.js";
|
|
|
|
export async function cmdPs(storageRoot: string): Promise<string[]> {
|
|
const rows = await listRunningThreads(storageRoot);
|
|
if (rows.length === 0) {
|
|
return ["(no running threads)"];
|
|
}
|
|
return rows.map((r) => `${r.threadId}\t${r.hash}\t${r.workflowName ?? "(unknown)"}`);
|
|
}
|