Compare commits
2 Commits
v1.26.8-gitcaddy
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bd0a95e9f | ||
|
|
5818970a2a |
@@ -109,3 +109,7 @@ func UnmarshalHandleDoubleEncode(bs []byte, v any) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// RawMessage is a raw encoded JSON value.
|
||||
// It implements Marshaler and Unmarshaler and can be used to delay JSON decoding.
|
||||
type RawMessage = json.RawMessage
|
||||
|
||||
@@ -28,16 +28,27 @@ type DistroInfo struct {
|
||||
PrettyName string `json:"pretty_name,omitempty"` // e.g., "Ubuntu 24.04 LTS"
|
||||
}
|
||||
|
||||
// XcodeInfo holds Xcode-specific information for macOS runners
|
||||
type XcodeInfo struct {
|
||||
Version string `json:"version,omitempty"`
|
||||
Build string `json:"build,omitempty"`
|
||||
SDKs []string `json:"sdks,omitempty"`
|
||||
Simulators []string `json:"simulators,omitempty"`
|
||||
}
|
||||
|
||||
// RunnerCapability represents the detailed capabilities of a runner
|
||||
type RunnerCapability struct {
|
||||
OS string `json:"os"`
|
||||
Arch string `json:"arch"`
|
||||
Distro *DistroInfo `json:"distro,omitempty"`
|
||||
Xcode *XcodeInfo `json:"xcode,omitempty"`
|
||||
Docker bool `json:"docker"`
|
||||
DockerCompose bool `json:"docker_compose"`
|
||||
ContainerRuntime string `json:"container_runtime,omitempty"`
|
||||
Shell []string `json:"shell,omitempty"`
|
||||
Tools map[string][]string `json:"tools,omitempty"`
|
||||
BuildTools []string `json:"build_tools,omitempty"`
|
||||
PackageManagers []string `json:"package_managers,omitempty"`
|
||||
Features *CapabilityFeatures `json:"features,omitempty"`
|
||||
Limitations []string `json:"limitations,omitempty"`
|
||||
Disk *DiskInfo `json:"disk,omitempty"`
|
||||
|
||||
@@ -22,16 +22,13 @@ import (
|
||||
"code.gitea.io/gitea/services/context"
|
||||
)
|
||||
|
||||
// RawMessage is a raw encoded JSON value (equivalent to encoding/json.RawMessage)
|
||||
type RawMessage []byte
|
||||
|
||||
// MCP Protocol Types (JSON-RPC 2.0)
|
||||
|
||||
type MCPRequest struct {
|
||||
JSONRPC string `json:"jsonrpc"`
|
||||
ID any `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params RawMessage `json:"params,omitempty"`
|
||||
JSONRPC string `json:"jsonrpc"`
|
||||
ID any `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params json.RawMessage `json:"params,omitempty"`
|
||||
}
|
||||
|
||||
type MCPResponse struct {
|
||||
|
||||
@@ -174,6 +174,37 @@
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{if .RunnerCapabilities.Xcode}}
|
||||
<div class="field tw-mb-3">
|
||||
<label>Xcode</label>
|
||||
<div>
|
||||
{{if .RunnerCapabilities.Xcode.Version}}
|
||||
<span class="ui small blue label">{{.RunnerCapabilities.Xcode.Version}}{{if .RunnerCapabilities.Xcode.Build}} ({{.RunnerCapabilities.Xcode.Build}}){{end}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .RunnerCapabilities.Xcode.SDKs}}
|
||||
<div class="tw-mt-2">
|
||||
<label class="tw-text-xs" style="opacity: 0.7;">SDKs</label>
|
||||
<div class="tw-flex tw-flex-wrap tw-gap-1">
|
||||
{{range .RunnerCapabilities.Xcode.SDKs}}
|
||||
<span class="ui small olive label">{{.}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .RunnerCapabilities.Xcode.Simulators}}
|
||||
<div class="tw-mt-2">
|
||||
<label class="tw-text-xs" style="opacity: 0.7;">Simulators</label>
|
||||
<div class="tw-flex tw-flex-wrap tw-gap-1">
|
||||
{{range .RunnerCapabilities.Xcode.Simulators}}
|
||||
<span class="ui small violet label">{{.}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .RunnerCapabilities.Shell}}
|
||||
<div class="field tw-mb-3">
|
||||
<label>{{ctx.Locale.Tr "actions.runners.capabilities.shells"}}</label>
|
||||
@@ -196,6 +227,28 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .RunnerCapabilities.BuildTools}}
|
||||
<div class="field tw-mb-3">
|
||||
<label>Build Tools</label>
|
||||
<div class="tw-flex tw-flex-wrap tw-gap-1">
|
||||
{{range .RunnerCapabilities.BuildTools}}
|
||||
<span class="ui small brown label">{{.}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .RunnerCapabilities.PackageManagers}}
|
||||
<div class="field tw-mb-3">
|
||||
<label>Package Managers</label>
|
||||
<div class="tw-flex tw-flex-wrap tw-gap-1">
|
||||
{{range .RunnerCapabilities.PackageManagers}}
|
||||
<span class="ui small pink label">{{.}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .RunnerCapabilities.Limitations}}
|
||||
<div class="field tw-mb-3">
|
||||
<label>{{ctx.Locale.Tr "actions.runners.capabilities.limitations"}}</label>
|
||||
|
||||
Reference in New Issue
Block a user