23 lines
849 B
Go
23 lines
849 B
Go
package contracts
|
|
|
|
type CommandEnvelope struct {
|
|
CommandID string `json:"cmd_id"`
|
|
JobID string `json:"job_id"`
|
|
TenantID string `json:"tenant_id"`
|
|
ServerID string `json:"server_id"`
|
|
Type string `json:"type"`
|
|
Args map[string]any `json:"args"`
|
|
TimeoutSec int `json:"timeout_sec"`
|
|
IdempotencyKey string `json:"idempotency_key"`
|
|
RequiredCaps []string `json:"required_capabilities"`
|
|
RequestedByUserID string `json:"requested_by_user_id"`
|
|
}
|
|
|
|
type CommandResult struct {
|
|
CommandID string `json:"cmd_id"`
|
|
Status string `json:"status"`
|
|
ExitCode int `json:"exit_code"`
|
|
Output map[string]any `json:"output"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|