feat(update): add update deployment via web UI
- Deploy exe to alternate port 5033 - Current instance keeps running - Add parallel mode and addr flag - Add update panel to web UI - Update OpenAPI spec and CLI
This commit is contained in:
@@ -230,6 +230,32 @@ func Spec() map[string]any {
|
||||
}),
|
||||
},
|
||||
},
|
||||
"/api/v1/update": map[string]any{
|
||||
"post": map[string]any{
|
||||
"summary": "Deploy uploaded agent executable on alternate port",
|
||||
"operationId": "deployUpdate",
|
||||
"description": "Upload a .exe and launch it on port 5033 when this instance uses 5032, or vice versa. The current instance is left running.",
|
||||
"requestBody": map[string]any{
|
||||
"required": true,
|
||||
"content": map[string]any{
|
||||
"multipart/form-data": map[string]any{
|
||||
"schema": map[string]any{
|
||||
"type": "object",
|
||||
"required": []string{"file"},
|
||||
"properties": map[string]any{
|
||||
"file": map[string]string{"type": "string", "format": "binary", "description": "Windows amd64 executable"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"responses": auth(map[string]any{
|
||||
"200": okJSON("Update launched", ref("UpdateResult")),
|
||||
"400": errResp("Invalid file or executable"),
|
||||
"409": errResp("Alternate port already in use"),
|
||||
}),
|
||||
},
|
||||
},
|
||||
"/api/v1/input/click": map[string]any{
|
||||
"post": map[string]any{
|
||||
"summary": "Click the desktop",
|
||||
@@ -350,6 +376,15 @@ func Spec() map[string]any {
|
||||
"name": map[string]string{"type": "string"},
|
||||
},
|
||||
},
|
||||
"UpdateResult": map[string]any{
|
||||
"type": "object",
|
||||
"properties": map[string]any{
|
||||
"ok": map[string]any{"type": "boolean"},
|
||||
"path": map[string]string{"type": "string"},
|
||||
"listen_address": map[string]string{"type": "string"},
|
||||
"previous_listen_address": map[string]string{"type": "string"},
|
||||
},
|
||||
},
|
||||
"ExecRequest": map[string]any{
|
||||
"type": "object", "required": []string{"command"},
|
||||
"properties": map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user