feat(jarvis): 能动的手(写文件/执行命令,三道闸) + 定时任务调度 #15
Reference in New Issue
Block a user
Delete Branch "feat/site"
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?
此前 JARVIS 只能看不能动(本地工具纯只读)、也不会调度,补齐这两块。
【能动的手】local_write_file / local_exec,在用户自选工作目录内动手:
(防无人值守被静默批准);可选「本次会话都允许」,关开关即失效
用户点同意也不执行,连审批框都不弹。20 条危险命令 + 10 条正常命令单测
错误对模型是有用信息)
【定时任务】sundynix_schedule + leader 锁 ticker(30s 扫) + 三个平台工具:
执行,跑完经语音事件主动播报结果
【顺带修一个必崩的 bug】dispatcher 工具超时硬编码 3 秒,而审批要等人点
(60s)+执行(60s)——local_exec 100% 超时。改成工具在 list_tools 自报
timeout_sec(不在 dispatcher 硬编码工具名),超时链外松内紧:
dispatcher 160s > 网关 150s > runner 转发 140s > 桌面端 60+60s。
live 验证:①「写个 hello.sh 打印日期然后跑一下」→ 写+执行两步,文件真落磁盘
②「建个定时任务 35 秒后跑 wc -l」→ 到点自动触发 → 自主调 local_exec → 出结果
Co-Authored-By: Claude Opus 5 noreply@anthropic.com