Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
53 lines
1.3 KiB
Go
53 lines
1.3 KiB
Go
package diagnostics
|
|
|
|
import (
|
|
"context"
|
|
|
|
cliservice "github.com/tutti-os/tutti/services/tuttid/service/cli"
|
|
"github.com/tutti-os/tutti/services/tuttid/service/cli/framework"
|
|
)
|
|
|
|
const appID = "diagnostics"
|
|
|
|
type Provider struct{}
|
|
|
|
func NewProvider() Provider {
|
|
return Provider{}
|
|
}
|
|
|
|
func (Provider) AppID() string {
|
|
return appID
|
|
}
|
|
|
|
func (Provider) Commands() []cliservice.Command {
|
|
return []cliservice.Command{newPingCommand()}
|
|
}
|
|
|
|
func newPingCommand() cliservice.Command {
|
|
return framework.Register(framework.CommandSpec[struct{}]{
|
|
ID: appID + ".doctor.ping",
|
|
Path: []string{"doctor", "ping"},
|
|
Summary: "Check CLI command routing",
|
|
Description: "Return a simple diagnostic response from the daemon CLI registry.",
|
|
Kind: framework.KindGet,
|
|
Workspace: framework.WorkspaceOptional,
|
|
Inputs: framework.FromStruct[struct{}](),
|
|
Output: framework.OutputSpec{
|
|
DefaultMode: cliservice.OutputModePlain,
|
|
DefaultView: framework.ViewDetail,
|
|
JSON: true,
|
|
RawJSON: true,
|
|
RawJSONReason: "diagnostic ping has a fixed one-field JSON payload",
|
|
JSONValue: func(any) map[string]any {
|
|
return map[string]any{"status": "ok"}
|
|
},
|
|
PlainText: func(any) string {
|
|
return "ok"
|
|
},
|
|
},
|
|
Run: func(context.Context, framework.InvokeContext, struct{}) (any, error) {
|
|
return "ok", nil
|
|
},
|
|
})
|
|
}
|