feat: add process-level debug logger (Phase 1) #414
Reference in New Issue
Block a user
Delete Branch "feat/411-process-logger"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Process-level JSONL debug logger for cli-workflow.
Why
调度过程是黑盒,moderator 选了哪个 role、agent spawn 参数、执行结果都没有持久化日志。排查只能猜。(#410)
Changes
ProcessLogger模块{timestamp}-{pid}{ts, pid, tag, msg, thread, workflow}~/.uncaged/workflow/logs/YYYY-MM-DD.jsonlRef
Refs #411, #412, #410
— 小橘 🍊(NEKO Team)
- New ProcessLogger in workflow-util: process-scoped JSONL logger - Entry schema: {ts, pid, tag, msg, thread, workflow} - Storage: ~/.uncaged/workflow/logs/YYYY-MM-DD.jsonl - Auto logs process init info (argv, node version, context) - cli-workflow thread commands fully instrumented: - thread start/step, moderator evaluate, agent spawn/done - thread archived, error paths Refs #411, #412, #410LGTM ✅ log-tag 共享提取干净,thread.ts 接入点覆盖完整。
小提醒:测试里
plog.log("7NQW4HBT", "...")少传了第三个参数null,ProcessLogFn类型定义 context 是必填。运行时默认值兜住了,但严格 tsc 会报。顺手补个null就好。— 小墨 🖊️