Documentation
¶
Index ¶
- func DecodeParams(raw json.RawMessage, target interface{}) error
- func RegisterJSON[T any](r *Registry, method string, ...)
- type ArtifactContentRef
- type ArtifactDeleteResult
- type ArtifactPruneResult
- type ArtifactSummary
- type ConfigSaveRequest
- type ConfigSaveResponse
- type ConfigService
- type ConfigViewRequest
- type ConfigViewResponse
- type CronService
- type DeleteNodeArtifactRequest
- type DeleteNodeArtifactResponse
- type DeleteWorkspaceFileRequest
- type DeleteWorkspaceFileResponse
- type DispatchNodeRequest
- type DispatchNodeResponse
- type Error
- type GetCronJobRequest
- type GetCronJobResponse
- type GetNodeArtifactRequest
- type GetNodeArtifactResponse
- type HeartbeatNodeRequest
- type HeartbeatNodeResponse
- type ListCronJobsRequest
- type ListCronJobsResponse
- type ListNodeArtifactsRequest
- type ListNodeArtifactsResponse
- type ListProviderModelsRequest
- type ListProviderModelsResponse
- type ListWorkspaceFilesRequest
- type ListWorkspaceFilesResponse
- type MethodHandler
- type MutateCronJobRequest
- type MutateCronJobResponse
- type NodeService
- type ProviderChatRequest
- type ProviderChatResponse
- type ProviderCountTokensRequest
- type ProviderCountTokensResponse
- type ProviderRuntimeActionRequest
- type ProviderRuntimeActionResponse
- type ProviderRuntimeViewRequest
- type ProviderRuntimeViewResponse
- type ProviderService
- type PruneNodeArtifactsRequest
- type PruneNodeArtifactsResponse
- type ReadWorkspaceFileRequest
- type ReadWorkspaceFileResponse
- type RegisterNodeRequest
- type RegisterNodeResponse
- type Registry
- type Request
- type Response
- type SkillsMutateRequest
- type SkillsMutateResponse
- type SkillsService
- type SkillsViewItem
- type SkillsViewRequest
- type SkillsViewResponse
- type UpdateProviderModelsRequest
- type UpdateProviderModelsResponse
- type WorkspaceService
- type WriteWorkspaceFileRequest
- type WriteWorkspaceFileResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeParams ¶
func DecodeParams(raw json.RawMessage, target interface{}) error
Types ¶
type ArtifactContentRef ¶
type ArtifactContentRef struct {
Data map[string]interface{} `json:"data"`
}
type ArtifactDeleteResult ¶
type ArtifactPruneResult ¶
type ArtifactSummary ¶
type ArtifactSummary struct {
Data map[string]interface{} `json:"data"`
}
type ConfigSaveRequest ¶
type ConfigSaveResponse ¶
type ConfigService ¶
type ConfigService interface {
View(context.Context, ConfigViewRequest) (*ConfigViewResponse, *Error)
Save(context.Context, ConfigSaveRequest) (*ConfigSaveResponse, *Error)
}
type ConfigViewRequest ¶
type ConfigViewResponse ¶
type ConfigViewResponse struct {
Config interface{} `json:"config,omitempty"`
RawConfig interface{} `json:"raw_config,omitempty"`
PrettyText string `json:"pretty_text,omitempty"`
HotReloadFields []string `json:"hot_reload_fields,omitempty"`
HotReloadFieldDetails []map[string]interface{} `json:"hot_reload_field_details,omitempty"`
}
type CronService ¶
type CronService interface {
List(context.Context, ListCronJobsRequest) (*ListCronJobsResponse, *Error)
Get(context.Context, GetCronJobRequest) (*GetCronJobResponse, *Error)
Mutate(context.Context, MutateCronJobRequest) (*MutateCronJobResponse, *Error)
}
type DeleteNodeArtifactRequest ¶
type DeleteNodeArtifactRequest struct {
ID string `json:"id"`
}
type DeleteNodeArtifactResponse ¶
type DeleteNodeArtifactResponse struct {
ArtifactDeleteResult
}
type DispatchNodeRequest ¶
type DispatchNodeResponse ¶
type GetCronJobRequest ¶
type GetCronJobRequest struct {
ID string `json:"id"`
}
type GetCronJobResponse ¶
type GetCronJobResponse struct {
Job interface{} `json:"job,omitempty"`
}
type GetNodeArtifactRequest ¶
type GetNodeArtifactRequest struct {
ID string `json:"id"`
}
type GetNodeArtifactResponse ¶
type HeartbeatNodeRequest ¶
type HeartbeatNodeRequest struct {
ID string `json:"id"`
}
type HeartbeatNodeResponse ¶
type HeartbeatNodeResponse struct {
ID string `json:"id"`
}
type ListCronJobsRequest ¶
type ListCronJobsRequest struct{}
type ListCronJobsResponse ¶
type ListCronJobsResponse struct {
Jobs []interface{} `json:"jobs"`
}
type ListProviderModelsRequest ¶
type ListProviderModelsRequest struct {
Provider string `json:"provider"`
}
type ListWorkspaceFilesRequest ¶
type ListWorkspaceFilesRequest struct {
Scope string `json:"scope,omitempty"`
}
type ListWorkspaceFilesResponse ¶
type ListWorkspaceFilesResponse struct {
Files []string `json:"files"`
}
type MethodHandler ¶
type MethodHandler func(context.Context, json.RawMessage) (interface{}, *Error)
type MutateCronJobRequest ¶
type MutateCronJobResponse ¶
type MutateCronJobResponse struct {
Result interface{} `json:"result,omitempty"`
}
type NodeService ¶
type NodeService interface {
Register(context.Context, RegisterNodeRequest) (*RegisterNodeResponse, *Error)
Heartbeat(context.Context, HeartbeatNodeRequest) (*HeartbeatNodeResponse, *Error)
Dispatch(context.Context, DispatchNodeRequest) (*DispatchNodeResponse, *Error)
ListArtifacts(context.Context, ListNodeArtifactsRequest) (*ListNodeArtifactsResponse, *Error)
GetArtifact(context.Context, GetNodeArtifactRequest) (*GetNodeArtifactResponse, *Error)
DeleteArtifact(context.Context, DeleteNodeArtifactRequest) (*DeleteNodeArtifactResponse, *Error)
PruneArtifacts(context.Context, PruneNodeArtifactsRequest) (*PruneNodeArtifactsResponse, *Error)
}
type ProviderChatRequest ¶
type ProviderChatResponse ¶
type ProviderCountTokensResponse ¶
type ProviderCountTokensResponse struct {
Usage map[string]interface{} `json:"usage,omitempty"`
}
type ProviderRuntimeActionResponse ¶
type ProviderRuntimeActionResponse struct {
Result map[string]interface{} `json:"result"`
}
type ProviderRuntimeViewRequest ¶
type ProviderRuntimeViewRequest struct {
Provider string `json:"provider,omitempty"`
Kind string `json:"kind,omitempty"`
Reason string `json:"reason,omitempty"`
Target string `json:"target,omitempty"`
Sort string `json:"sort,omitempty"`
ChangesOnly bool `json:"changes_only,omitempty"`
WindowSec int `json:"window_sec,omitempty"`
Limit int `json:"limit,omitempty"`
Cursor int `json:"cursor,omitempty"`
HealthBelow int `json:"health_below,omitempty"`
CooldownUntilBeforeSec int `json:"cooldown_until_before_sec,omitempty"`
}
type ProviderRuntimeViewResponse ¶
type ProviderRuntimeViewResponse struct {
View map[string]interface{} `json:"view"`
}
type ProviderService ¶
type ProviderService interface {
ListModels(context.Context, ListProviderModelsRequest) (*ListProviderModelsResponse, *Error)
UpdateModels(context.Context, UpdateProviderModelsRequest) (*UpdateProviderModelsResponse, *Error)
Chat(context.Context, ProviderChatRequest) (*ProviderChatResponse, *Error)
CountTokens(context.Context, ProviderCountTokensRequest) (*ProviderCountTokensResponse, *Error)
RuntimeView(context.Context, ProviderRuntimeViewRequest) (*ProviderRuntimeViewResponse, *Error)
RuntimeAction(context.Context, ProviderRuntimeActionRequest) (*ProviderRuntimeActionResponse, *Error)
}
type PruneNodeArtifactsResponse ¶
type PruneNodeArtifactsResponse struct {
ArtifactPruneResult
}
type RegisterNodeRequest ¶
type RegisterNodeResponse ¶
type RegisterNodeResponse struct {
ID string `json:"id"`
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) Register ¶
func (r *Registry) Register(method string, handler MethodHandler)
type Request ¶
type Request struct {
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
RequestID string `json:"request_id,omitempty"`
}
func (Request) NormalizedMethod ¶
type SkillsMutateRequest ¶
type SkillsMutateRequest struct {
Action string `json:"action"`
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
SystemPrompt string `json:"system_prompt,omitempty"`
Tools []string `json:"tools,omitempty"`
IgnoreSuspicious bool `json:"ignore_suspicious,omitempty"`
File string `json:"file,omitempty"`
Content string `json:"content,omitempty"`
}
type SkillsMutateResponse ¶
type SkillsMutateResponse struct {
Installed string `json:"installed,omitempty"`
InstalledOK bool `json:"installed_ok,omitempty"`
Output string `json:"output,omitempty"`
ClawhubPath string `json:"clawhub_path,omitempty"`
Name string `json:"name,omitempty"`
File string `json:"file,omitempty"`
Deleted bool `json:"deleted,omitempty"`
ID string `json:"id,omitempty"`
Imported []string `json:"imported,omitempty"`
}
type SkillsService ¶
type SkillsService interface {
View(context.Context, SkillsViewRequest) (*SkillsViewResponse, *Error)
Mutate(context.Context, SkillsMutateRequest) (*SkillsMutateResponse, *Error)
}
type SkillsViewItem ¶
type SkillsViewItem struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tools []string `json:"tools"`
SystemPrompt string `json:"system_prompt,omitempty"`
Enabled bool `json:"enabled"`
UpdateChecked bool `json:"update_checked"`
RemoteFound bool `json:"remote_found,omitempty"`
RemoteVersion string `json:"remote_version,omitempty"`
CheckError string `json:"check_error,omitempty"`
Source string `json:"source,omitempty"`
}
type SkillsViewRequest ¶
type SkillsViewResponse ¶
type SkillsViewResponse struct {
ID string `json:"id,omitempty"`
File string `json:"file,omitempty"`
Content string `json:"content,omitempty"`
FilesList []string `json:"files,omitempty"`
Skills []SkillsViewItem `json:"skills,omitempty"`
Source string `json:"source,omitempty"`
ClawhubInstalled bool `json:"clawhub_installed,omitempty"`
ClawhubPath string `json:"clawhub_path,omitempty"`
}
type WorkspaceService ¶
type WorkspaceService interface {
ListFiles(context.Context, ListWorkspaceFilesRequest) (*ListWorkspaceFilesResponse, *Error)
ReadFile(context.Context, ReadWorkspaceFileRequest) (*ReadWorkspaceFileResponse, *Error)
WriteFile(context.Context, WriteWorkspaceFileRequest) (*WriteWorkspaceFileResponse, *Error)
DeleteFile(context.Context, DeleteWorkspaceFileRequest) (*DeleteWorkspaceFileResponse, *Error)
}
Click to show internal directories.
Click to hide internal directories.