feat: reveal saved server deployment inputs

This commit is contained in:
npc0-hue
2026-07-27 09:24:44 +08:00
parent e5c94be1db
commit 6c5b74b915
19 changed files with 345 additions and 31 deletions
+26
View File
@@ -865,6 +865,28 @@ type ServerDeploymentView struct {
Revision int
UpdatedAt time.Time
Projection ServerDeploymentProjection
LatestDispatch *ServerDeploymentDispatchEvidence
}
// ServerDeploymentReveal contains an explicitly requested operator view of
// persisted execution inputs. Runtime bindings are intentionally excluded.
type ServerDeploymentReveal struct {
ServerInstanceID string
ServerRoot string
WorkingDirectory string
InstallCommand string
StartCommand string
StopCommand string
StatusCommand string
}
// ServerDeploymentDispatchEvidence proves what Platform placed into the most
// recent lifecycle job without exposing its protected contents.
type ServerDeploymentDispatchEvidence struct {
JobID string
JobState JobState
DeploymentRevision int
DeploymentDefinitionIncluded bool
}
type ConfigDiffLine struct {
@@ -1790,6 +1812,10 @@ func CopyServerDeploymentUpdate(update ServerDeploymentUpdate) ServerDeploymentU
func CopyServerDeploymentView(view ServerDeploymentView) ServerDeploymentView {
view.CreateInputs = CopyStringMap(view.CreateInputs)
if view.LatestDispatch != nil {
copy := *view.LatestDispatch
view.LatestDispatch = &copy
}
return view
}