Implement controlled app launch (T-401)

This commit is contained in:
ila
2026-07-19 21:10:59 +08:00
parent d0cf333394
commit 87083c387f
32 changed files with 1802 additions and 31 deletions
+14
View File
@@ -1,14 +1,28 @@
package windows
import (
"errors"
"softbox.local/core/application/launch"
)
// Edition identifies the application build channel shown by the UI.
type Edition string
const EditionModern Edition = "Modern"
// ErrUnsupported reports that a Windows-only capability is unavailable on the
// current host. Callers must treat it as an unknown state, never as a stopped
// process or a compatible system.
var ErrUnsupported = errors.New("windows platform capability is unsupported on this host")
// Platform is the minimal boundary for target-specific capabilities.
type Platform interface {
OS() string
Edition() Edition
IsCompatible(minOS string) (bool, error)
IsRunning(appID, entrypoint string) (bool, error)
Start(command launch.Command) (int, error)
}
// New returns the platform implementation selected by build tags.