Documentation
¶
Index ¶
- func AutoSyncDue(skaelDir string, now time.Time) bool
- func Binary() (path string, onPath bool, err error)
- func Detach(bin string, args ...string) error
- func InstallAutoSyncForAgent(agentName, configPath, bin string) error
- func InstallForAgent(agentName, configPath, bin string) error
- func RemoveLegacyScripts(skaelDir string)
- func Repair(agentName, configPath, bin string) error
- func Send(ev Event, skaelDir string) error
- func UninstallAutoSyncForAgent(agentName, configPath string) error
- func UninstallForAgent(agentName, configPath string) error
- type Event
- type HookState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoSyncDue ¶ added in v0.22.0
AutoSyncDue reports whether the last sync recorded in state.json is older than 30 minutes, or missing.
func Binary ¶ added in v0.22.0
Binary returns the skael path that hooks name, and whether it is the skael on PATH. The PATH entry wins when it is the running file, because a brew symlink or a Scoop shim keeps its path across an upgrade.
func Detach ¶ added in v0.22.0
Detach starts bin with args in a new session, detached from the agent's process tree and console, and does not wait for it.
func InstallAutoSyncForAgent ¶ added in v0.8.0
InstallAutoSyncForAgent registers `skael hook autosync` with one agent.
func InstallForAgent ¶
InstallForAgent registers `skael hook report` with one agent.
func RemoveLegacyScripts ¶ added in v0.22.0
func RemoveLegacyScripts(skaelDir string)
RemoveLegacyScripts deletes the bash hook scripts older releases wrote.
func Repair ¶ added in v0.22.0
Repair rewrites the skael hooks an agent already has that name another binary or an old script. It adds no hook the user did not install.
func Send ¶ added in v0.22.0
Send posts ev to the server in skaelDir's config.json. It runs in the detached child, so the agent never waits on the network or on the harness's --version.
func UninstallAutoSyncForAgent ¶ added in v0.8.0
UninstallAutoSyncForAgent removes the auto-sync hook from one agent.
func UninstallForAgent ¶
UninstallForAgent removes the activation hook from one agent.
Types ¶
type Event ¶ added in v0.22.0
type Event struct {
SkillName string `json:"skill_name"`
Agent string `json:"agent"`
TriggerType string `json:"trigger_type"`
ProjectHash string `json:"project_hash"`
DeveloperHash string `json:"developer_hash"`
EventSource string `json:"event_source"`
Model string `json:"model"`
HarnessVersion string `json:"harness_version,omitempty"`
Version int `json:"version"`
}
Event is one activation as POST /api/events receives it.