Support declared graceful stop and steam.update probe

- LifecycleActionTemplate 新增 gracefulStop:stop 动作可声明插件自有的优雅关闭命令、
  参数、环境、超时与 fallback;超时且 fallback=report 时任务失败,避免默认杀进程。
- 依赖探针新增 steam.update:通过 steamcmd +app_info_print 读取公开分支 buildid,
  与本地 appmanifest_<appid>.acf 比较,输出 installed/latest/update=yes|no|unknown。
- 依赖执行输入新增 ServerRoot,供探针定位插件声明的服务器安装目录。
This commit is contained in:
npc0-hue
2026-09-15 13:31:36 +08:00
parent a695aafd0f
commit 4e88199d18
7 changed files with 464 additions and 26 deletions
+5 -1
View File
@@ -193,7 +193,11 @@ func (worker *Worker) runAutonomousDependencies(ctx context.Context, plan protoc
return nil
}
for _, probe := range plan.DependencyProbes {
state, evidence, err := worker.executor.runDependencyProbe(ctx, probe, plan.RuntimeBindings)
installRoot := ""
if plan.Deployment != nil {
installRoot = plan.Deployment.ServerRoot
}
state, evidence, err := worker.executor.runDependencyProbe(ctx, probe, plan.RuntimeBindings, installRoot)
if err != nil {
if probe.Required {
log.Printf("RUN phase=autonomous_lifecycle.dependencies status=failed probe=%s error=%s", safeOptional(probe.Key), err.Error())