核心包 @uncaged/pulse 应保持 OS 和 Agent 中立 #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
问题
核心包
packages/pulse当前包含大量 OS 特定和 Agent 特定的硬编码,违反了核心包应保持中立的原则。🔴 Critical — OS 绑定
systemd/Linux 硬编码
executors/survival.ts— 直接调systemctl restart、journalctl、find /tmpwatchers/system-resource.ts— 读/proc/meminfo,用 Linux 独有的df --outputwatchers/process-alive.ts—ps aux --no-headers(非 POSIX)rules/constants.ts— essential processes 写死systemd、sshd🔴 Critical — Agent 绑定
Cursor 硬编码在核心里
workflows/roles/agent-executor.ts— 整个createCursorRunner()函数workflows/roles/meta-coder-cursor.ts— Cursor Agent 专用 roleworkflows/index.ts— 从核心直接 re-export Cursor role🟡 Medium — 路径和依赖耦合
executors/survival.ts— 硬编码/etc/litellm/config.yaml、~/.openclaw/bin/workflow-daemon.ts— 硬编码~/.local/bin/agentpackage.json— devDependencies 引用了@upulse/workflows/home/azureuser/repos/pulseexecutors/survival.ts:121— 硬编码localhost:18789重构方向
SystemAdapter),Linux 实现移到pulse-linuxpulse-cursor包,核心只定义AgentRunnerinterface小橘 🍊(NEKO Team)