feat: execute durable client commands through supervisor

This commit is contained in:
2026-09-06 12:18:15 +00:00
parent 3f84d3b2f1
commit 56b15c7f4f
41 changed files with 4272 additions and 66 deletions
@@ -144,6 +144,8 @@ func BuildWrapper(spec *rvboxv1.ExecutionSpec, scriptBody []byte, maxBytes uint6
func shellTemplate(shellType rvboxv1.ShellType) (ShellPlan, error) {
switch shellType {
case rvboxv1.ShellType_SHELL_SH, rvboxv1.ShellType_SHELL_BASH:
return ShellPlan{Type: shellType, WrapperExtension: ".sh", Encoding: WrapperEncodingUTF8}, nil
case rvboxv1.ShellType_SHELL_CMD:
return ShellPlan{Type: shellType, Arguments: []string{"/D", "/S", "/C"}, WrapperExtension: ".cmd", Encoding: WrapperEncodingUTF8}, nil
case rvboxv1.ShellType_SHELL_POWERSHELL:
@@ -192,6 +194,13 @@ func ValidateWindowsExecutablePath(path string) error {
}
}
// ValidAbsoluteWindowsPath reports whether value passes the lexical absolute
// path checks. It does not touch the filesystem; native callers must still
// re-stat the object and verify its ACL immediately before use.
func ValidAbsoluteWindowsPath(value string) bool {
return validAbsoluteWindowsPath(value)
}
func validAbsoluteWindowsPath(value string) bool {
if value == "" || strings.IndexByte(value, 0) >= 0 || !utf8.ValidString(value) || strings.ContainsAny(value, "\r\n\t") {
return false