Documentation
¶
Overview ¶
Package skillinject is the L11 plugin wrapper around the host-filesystem skill installer in internal/skillinject. The installer itself has no daemon coupling — it scans known agent-tool directories and writes SKILL.md/heartbeat references — so the data layer lives utility-tier where both the daemon plugin and cmd/pilotctl can call it.
Package skillinject installs the Pilot Protocol skill into the well-known directories of agent tools (Claude Code, OpenClaw, PicoClaw, OpenHands, Hermes, …). The configuration — what to inject, where, and what marker content to upsert into each tool's heartbeat file — is fetched at runtime from the pilot-skills repository on GitHub. There is no embedded fallback: a tick that cannot reach the network is logged and skipped; the next tick retries.
The reconcile loop classifies each managed file as Absent / Identical / Drifted / Missing and dispatches the matching action — see state.go.
Transparency note (this is the context-injection mechanism). Writing guidance into another party's agent is a privileged operation, so the design is deliberately auditable and reversible:
- All injected bytes are fetched at runtime from the PUBLIC pilot-skills repo (DefaultManifestURL / DefaultRepoBaseURL in manifest.go). Nothing is embedded or obfuscated; anyone can read exactly what will be placed.
- Every fetched resource must carry an Ed25519 signature by the key built in as DefaultManifestPublicKeyHex (or an operator's override, Config.ManifestPublicKey). A tick that meets an unsigned or altered file writes nothing and keeps the last good state (signature.go).
- On files it shares with the operator it rewrites ONLY its own marker block (see writeMarker / classifyMarker) — operator content is never touched.
- It is opt-out at any time: GetMode (config.go) honors the `skill_inject` flag, and `pilotctl skills disable all` removes everything this package wrote — including surfaces an earlier manifest installed and the current one has retired (retired.go). Default-on so fresh installs work without a step.
The purpose is to make agents reach for Pilot before their host's default tools — the value of a third-party overlay only lands if it is the default reached for first — while leaving the human and the agent in full control.
Index ¶
- Constants
- Variables
- func GetMode(home string) string
- func IsEnabled(home string) booldeprecated
- func ParseFileMode(s string) os.FileMode
- func ParsePublicKey(s string) (ed25519.PublicKey, error)
- func Run(ctx context.Context, cfg Config)
- func SetEnabled(home string, enabled bool) errordeprecated
- func SetMode(home, mode string) error
- func SetUpdateConfig(home string, cfg UpdateConfig) error
- func SignFile(priv ed25519.PrivateKey, name string, body []byte) []byte
- func SignedFiles(raw []byte) ([]string, error)
- func VerifyFile(pub ed25519.PublicKey, name string, body, sigFile []byte) error
- type Action
- type Config
- type EnabledFlag
- type FileKind
- type Manifest
- type ManifestGatedTool
- type ManifestHelper
- type ManifestPlugin
- type ManifestPluginAllowList
- type ManifestPluginFile
- type ManifestRetired
- type ManifestTool
- type ModeFlag
- type Outcome
- type Removal
- type RemovalKind
- type RemovalReport
- type Report
- type RetiredMarker
- type Service
- type State
- type UpdateConfig
Constants ¶
const ( // ModeManual: install once + refresh on Pilot update, no 15-min ticker. ModeManual = "manual" // ModeAuto: current always-live behaviour (15-min reconcile ticker). ModeAuto = "auto" // ModeDisabled: remove skills + no ticks. ModeDisabled = "disabled" )
Mode names for the tri-state skill_inject.mode setting.
const BackupSuffix = ".pilot-bak"
BackupSuffix is appended to the original config file path before mergePluginAllowList overwrites it. Kept distinct from openclaw's own .bak / .bak.N rotation so we can identify our own snapshots and not interfere with the tool's rolling backup chain.
const DefaultInterval = 15 * time.Minute
DefaultInterval is how often the daemon re-runs the scan/reconcile pass after the initial startup tick.
const DefaultManifestPublicKeyHex = "95effdc0863c8e37d65abb292f338856ac703705041a23246c8e468d7426fb31"
DefaultManifestPublicKeyHex is the built-in verification key, hex encoded: the public half of the key that signs TeoSlayer/pilot-skills (cmd/sign-skills). It is used when Config.ManifestPublicKey, the environment and ~/.pilot/skillinject.pub supply none. A build with an empty value has no key and refuses every fetch.
const DefaultManifestURL = "https://raw.githubusercontent.com/TeoSlayer/pilot-skills/main/inject-manifest.json"
DefaultManifestURL is the canonical raw GitHub URL for the inject manifest. Overridable via Config.ManifestURL (test hook).
const DefaultRepoBaseURL = "https://raw.githubusercontent.com/TeoSlayer/pilot-skills/main/"
DefaultRepoBaseURL is the prefix used to fetch any path the manifest references (skills/<name>/SKILL.md, heartbeats/<tool>.md). Overridable via Config.RepoBaseURL.
const EnvDaemonManifestPublicKey = "PILOT_SKILLINJECT_MANIFEST_PUBKEY"
EnvDaemonManifestPublicKey is the name pilot-daemon has always read for the same override. The library honours it too, ahead of EnvManifestPublicKey, so pilotctl verifies with the key the daemon uses when both run with the same environment.
const EnvManifestPublicKey = "PILOT_SKILLINJECT_PUBKEY"
EnvManifestPublicKey names the environment variable holding an Ed25519 public key (hex or base64) that replaces the built-in one for verifying fetched resources. Use it to point a host at a fork of pilot-skills signed with its own key.
const EnvProxy = "PILOT_PROXY"
EnvProxy is pilot-daemon's proxy setting. Only its "off" words matter here: with the daemon's proxy turned off, no refresh command is run.
const EnvProxyCommand = netproxy.EnvRefreshCommand
EnvProxyCommand is the environment variable holding the refresh command (see Config.ProxyCommand). It is common/netproxy's EnvRefreshCommand, which pilot-daemon and pilotctl read too.
const EnvRequireSignedManifest = "PILOT_SKILLINJECT_REQUIRE_SIG"
EnvRequireSignedManifest named the environment variable that made a verification key mandatory.
Deprecated: signatures are always required; the variable is ignored.
const ManifestName = "inject-manifest.json"
ManifestName is the manifest's path in the pilot-skills repo, which is the name its signature covers.
const SignatureSuffix = ".sig"
SignatureSuffix is appended to a file's URL (and its repo path) to name its detached signature.
const SkillFormatMuse = "muse"
SkillFormatMuse is the ManifestGatedTool.SkillFormat value for Meta Muse. Muse is known to load a SKILL.md whose frontmatter is exactly
--- name: "<entrypoint with - replaced by _>" description: "<one line>" ---
(a quoted name that differs from the folder name, a one-line quoted description, no folded YAML). museSkillMD produces that shape.
Variables ¶
var ErrSignature = errors.New("signature check failed")
ErrSignature marks a fetch refused because the file's signature is missing, malformed, or does not verify, or because no usable verification key is configured. A tick that hits it writes nothing.
Functions ¶
func GetMode ¶ added in v0.2.3
GetMode returns the current skill_inject mode. Defaults to ModeAuto when the flag isn't present (or the config is unreadable/unparseable), so existing installs keep their current live-ticker behaviour. New installs are set to ModeManual explicitly on the first call to SetMode (configured by the daemon's startup path) — we never flip an existing install off the live ticker by silently changing the absent-config default.
func IsEnabled
deprecated
IsEnabled returns whether skill injection is on. Returns true for ModeManual and ModeAuto, false for ModeDisabled. Defaults to true (opt-out, not opt-in) when the flag isn't present, so fresh installs get the feature without any extra step.
Deprecated: use GetMode to get the full tri-state.
func ParseFileMode ¶
ParseFileMode parses an octal mode string like "0755". Empty input returns the default 0o755 (executable). Invalid input returns 0o755 with no error so a malformed manifest doesn't break the tick.
func ParsePublicKey ¶ added in v0.2.6
ParsePublicKey decodes an Ed25519 public key given as hex, standard base64, or unpadded base64 (the forms PILOT_SKILLINJECT_PUBKEY, PILOT_SKILLINJECT_MANIFEST_PUBKEY and ~/.pilot/skillinject.pub accept).
func Run ¶
Run blocks running scan/reconcile ticks until ctx is cancelled. The first tick fires immediately so injection happens shortly after daemon start; subsequent ticks fire on cfg.Interval (unless mode is manual, in which case only the initial tick runs).
func SetEnabled
deprecated
func SetMode ¶ added in v0.2.3
SetMode persists the skill_inject mode. Reads the existing config (if any), updates only the skill_inject key, writes back atomically. Accepts ModeManual, ModeAuto, or ModeDisabled. Empty string is treated as ModeAuto for backward compatibility.
func SetUpdateConfig ¶ added in v0.2.3
func SetUpdateConfig(home string, cfg UpdateConfig) error
SetUpdateConfig persists the update subkey. Reads the existing config (if any), updates only the update key, writes back atomically.
func SignFile ¶ added in v0.2.6
func SignFile(priv ed25519.PrivateKey, name string, body []byte) []byte
SignFile returns the contents of the .sig file for body published at repo path name.
func SignedFiles ¶ added in v0.2.6
SignedFiles returns the repo paths, other than the manifest itself, that the manifest in raw can make an injector fetch, sorted and without duplicates: the entrypoint SKILL.md and every "src" and "heartbeatTemplate" value anywhere in the document. Reading those keys at any depth, rather than only the rows this release decodes, also covers keys a later release reads ("plugins" next to "plugin", say), so content signed today keeps verifying there.
A path that is absolute or climbs out of the repo with ".." is an error: no file of the repo can be signed under that name.
Types ¶
type Action ¶
type Action string
Action is what the reconcile loop chose to do in response to a State.
type Config ¶
type Config struct {
// Home overrides the user home dir (test hook).
Home string
// Interval between scan ticks after the initial startup tick.
Interval time.Duration
// ManifestURL overrides the canonical raw GitHub URL for inject-manifest.json.
ManifestURL string
// RepoBaseURL overrides the prefix used to resolve relative paths in
// the manifest (skills/<name>/SKILL.md, heartbeats/<tool>.md).
RepoBaseURL string
// HTTPClient overrides the HTTP client used for fetching. When nil,
// the client follows the proxy environment and, with a ProxyCommand,
// re-reads rotating proxy credentials (see proxy.go).
HTTPClient *http.Client
// ProxyCommand is a shell command that prints the current egress
// proxy URL, for proxies that rotate the credentials in HTTPS_PROXY
// (Meta Muse): e.g. bash -c 'printf %s "$https_proxy"' (see proxy.go for the sandbox command).
// The default client runs it at the start of each tick, again once a
// minute while the tick runs, and when the proxy answers 407, and
// retries the refused request once. Empty means $PILOT_PROXY_CMD, then
// "proxy_cmd" in ~/.pilot/config.json (pilot-daemon's own settings),
// unless PILOT_PROXY or config.json "proxy" turns the proxy off.
// Ignored when HTTPClient is set.
ProxyCommand string
// ManifestPublicKey replaces the key that verifies the manifest and
// every fetched repo file. Each resource's detached signature is
// fetched from <url>.sig and checked before anything is written (see
// signature.go). When nil, the key is resolved from the environment
// (EnvDaemonManifestPublicKey, then EnvManifestPublicKey), then the
// on-disk trust file (~/.pilot/skillinject.pub), then the built-in
// DefaultManifestPublicKeyHex. Verification is never skipped.
ManifestPublicKey ed25519.PublicKey
// RequireSignedManifest made a verification key mandatory.
//
// Deprecated: signatures are always required; the field is ignored.
RequireSignedManifest bool
}
Config tunes the injector. Zero values use sensible defaults.
type EnabledFlag ¶
type EnabledFlag struct {
Enabled bool `json:"enabled"`
}
EnabledFlag describes the persisted opt-out state (legacy format). Stored at ~/.pilot/config.json under "skill_inject" → {"enabled": bool}. Deprecated: use ModeFlag with GetMode/SetMode instead.
type FileKind ¶
type FileKind string
FileKind names which of a target's managed surfaces an Outcome is about.
type Manifest ¶
type Manifest struct {
Version int `json:"version"`
Entrypoint string `json:"entrypoint"`
Description string `json:"description,omitempty"`
Tools []ManifestTool `json:"tools"`
Helpers []ManifestHelper `json:"helpers,omitempty"`
// Retired lists surfaces earlier manifests installed that this one no
// longer manages; every tick and Uninstall remove them. Merged with the
// built-in list in retired.go. Optional.
Retired *ManifestRetired `json:"retired,omitempty"`
// GatedTools are skill targets that are active only on hosts that
// opted in by creating a marker file under ~/.pilot (see gated.go).
// They have their own key, not rows in Tools, because releases that
// predate this field drop the key when they decode the manifest. A
// row in Tools would be installed by those releases on every host
// where its rootDir exists, with no marker check. Optional.
GatedTools []ManifestGatedTool `json:"gatedTools,omitempty"`
}
Manifest mirrors inject-manifest.json. Field tags match the upstream schema. Unknown fields are ignored (forward-compat with new tool fields).
type ManifestGatedTool ¶ added in v0.2.5
type ManifestGatedTool struct {
Name string `json:"name"`
// RootDir must exist, and must be inside the home directory. Every
// file operation for this tool stays inside it (see gated.go).
RootDir string `json:"rootDir"`
// SkillsDir must be RootDir or inside it.
SkillsDir string `json:"skillsDir"`
// SkillNaming is "" (directory layout, the default) or "flat", as
// for ManifestTool.
SkillNaming string `json:"skillNaming,omitempty"`
// RequireMarker is the file that turns the tool on, e.g.
// "~/.pilot/targets/muse". It must be inside ~/.pilot, and it must
// name SkillsDir and SkillFormat ("skills_dir=..." and
// "skill_format=..." lines, see gated.go). While it is absent, or
// names another directory or format, nothing under RootDir is read,
// written or removed.
RequireMarker string `json:"requireMarker"`
// SkillFormat names a rewrite applied to the entrypoint SKILL.md
// before it is written: "" copies it unchanged, SkillFormatMuse
// rewrites the frontmatter (see skillformat.go). An unknown value is
// an error row and nothing is written.
SkillFormat string `json:"skillFormat,omitempty"`
}
ManifestGatedTool is one "gatedTools" row: a skill target whose directory is too generic to detect by existence alone (Meta Muse loads skills from ~/workspace/skills). Only the entrypoint skill copy is installed; there is no heartbeat or plugin.
type ManifestHelper ¶
type ManifestHelper struct {
Name string `json:"name"`
// Src is a repo-relative path fetched via fetchRepoFile, e.g.
// "workflow-injection/pilot-ask".
Src string `json:"src"`
// Dst is the absolute install target. Supports ~/ expansion, e.g.
// "~/.pilot/bin/pilot-ask".
Dst string `json:"dst"`
// Mode is the file mode in octal string form, e.g. "0755". Empty
// defaults to 0755 (helpers are executables).
Mode string `json:"mode,omitempty"`
}
ManifestHelper is one helper script the daemon installs at a well-known path so any AI tool on the host can invoke it. Used to ship pilot-ask (the directory + specialist round-trip wrapper).
Helpers are tool-agnostic — they live under ~/.pilot/bin/ and are referenced by every tool's heartbeat directive.
type ManifestPlugin ¶
type ManifestPlugin struct {
// ID matches openclaw.plugin.json's "id" field. Used as the
// allow-list key + directory name.
ID string `json:"id"`
// InstallPath is where the plugin directory is written
// (e.g. "~/.openclaw/extensions/pilotprotocol-prompt-injector").
InstallPath string `json:"installPath"`
// Files lists the plugin source files the daemon copies in.
// Order doesn't matter — each file is reconciled independently.
Files []ManifestPluginFile `json:"files"`
// AllowList, if set, tells the daemon to ensure the plugin id
// appears in the tool's plugin allow-list + entries map. Nil
// disables the JSON-merge step (e.g. for tools without an
// explicit allow-list concept).
AllowList *ManifestPluginAllowList `json:"allowList,omitempty"`
}
ManifestPlugin describes a per-tool plugin that the daemon writes onto disk (alongside the heartbeat + skill copy) and tracks in the tool's own plugin allow-list. Today this is openclaw-only — the plugin registers a `before_prompt_build` hook that prepends the pilot directive into the system prompt on every turn. SKILL.md and the heartbeat file are loaded by their tools' own lifecycles (workspace bootstrap / periodic), neither fires per-turn, so the plugin is the only reliable per-prompt injection surface.
type ManifestPluginAllowList ¶
type ManifestPluginAllowList struct {
// ConfigPath is the JSON file the daemon merges into
// (e.g. "~/.openclaw/openclaw.json").
ConfigPath string `json:"configPath"`
// AllowListJsonPath is a dotted path to the trust array. Created
// if absent. Daemon appends the plugin id iff not already present.
AllowListJsonPath string `json:"allowListJsonPath"`
// EntriesJsonPath is a dotted path to the per-plugin entries
// object (e.g. "plugins.entries"). The daemon ensures
// `entries.<id>.enabled` is `true`.
EntriesJsonPath string `json:"entriesJsonPath"`
}
ManifestPluginAllowList describes how the daemon merges its plugin id into a tool's configuration to mark the plugin as trusted/enabled. Today targets openclaw.json with paths `plugins.allow` (string array) and `plugins.entries.<id>.enabled` (bool).
type ManifestPluginFile ¶
type ManifestPluginFile struct {
// Name is the filename relative to InstallPath (e.g.
// "openclaw.plugin.json", "index.mjs").
Name string `json:"name"`
// Src is a repo-relative path fetched via fetchRepoFile
// (e.g. "workflow-injection/openclaw-plugin/index.mjs").
Src string `json:"src"`
}
ManifestPluginFile is one file the daemon writes into the plugin install directory. Mirrors ManifestHelper but scoped to a plugin.
type ManifestRetired ¶ added in v0.2.4
type ManifestRetired struct {
// Markers are heartbeat files our marker block was written into. The
// block is stripped and the file is kept.
Markers []RetiredMarker `json:"markers,omitempty"`
// Plugins are plugin installs to remove: the id is dropped from the
// allow-list config (when AllowList is set), then each listed file
// is deleted from InstallPath and the directory is removed if empty.
// File Src fields are ignored.
Plugins []ManifestPlugin `json:"plugins,omitempty"`
// Helpers are helper scripts to delete. Src and Mode are ignored.
// Only paths under ~/.pilot are acted on.
Helpers []ManifestHelper `json:"helpers,omitempty"`
}
ManifestRetired lists surfaces an earlier manifest installed that the current one no longer manages. It is the "retired" key of inject-manifest.json.
type ManifestTool ¶
type ManifestTool struct {
Name string `json:"name"`
RootDir string `json:"rootDir"`
SkillsDir string `json:"skillsDir"`
HeartbeatPath string `json:"heartbeatPath,omitempty"`
HeartbeatTemplate string `json:"heartbeatTemplate,omitempty"`
SkillNaming string `json:"skillNaming,omitempty"` // "" = "directory" (default), "flat" = single-file
SelfHeartbeat bool `json:"selfHeartbeat,omitempty"`
Plugin *ManifestPlugin `json:"plugin,omitempty"`
}
ManifestTool is one tool target row.
type ModeFlag ¶ added in v0.2.3
type ModeFlag struct {
Mode string `json:"mode,omitempty"`
}
ModeFlag describes the persisted tri-state mode. Stored at ~/.pilot/config.json under "skill_inject" → {"mode": "manual"|"auto"|"disabled"}.
type Outcome ¶
type Outcome struct {
Tool string `json:"tool"`
Kind FileKind `json:"kind"`
Path string `json:"path"`
State State `json:"state"`
Action Action `json:"action"`
Hash string `json:"hash,omitempty"`
Err string `json:"err,omitempty"`
// Note explains a row whose State/Action alone would mislead: a
// heartbeat file shared with another tool (reconciled once, for that
// tool), or a retired plugin neutralized instead of removed.
Note string `json:"note,omitempty"`
}
Outcome records one reconcile decision.
type Removal ¶
type Removal struct {
Tool string `json:"tool"`
Kind FileKind `json:"kind"`
Path string `json:"path"`
Action RemovalKind `json:"action"`
Err string `json:"err,omitempty"`
// Note explains a RemovalNeutralized row.
Note string `json:"note,omitempty"`
}
Removal is one entry in the disable report. Path + Tool + Kind + Action mirror Outcome so callers can render them with the same code.
type RemovalKind ¶
type RemovalKind string
RemovalKind names the action Uninstall took on one path. Mirrors Action / Kind in state.go but split out so the disable path can report "stripped" vs "removed" distinctly from the install verbs.
const ( // RemovalDeleted: the file was entirely under our control (lived in // a pilot-protocol/ subdir, ~/.pilot/bin, etc.) and is now gone. RemovalDeleted RemovalKind = "deleted" // RemovalStripped: we co-inhabited the file with the user; our // marker block was removed and the rest of the file is byte-identical. RemovalStripped RemovalKind = "stripped" // RemovalMerged: we co-inhabited a JSON config; our id was removed // from the allow-list and the entries map. Other keys preserved. RemovalMerged RemovalKind = "merged" // RemovalRestored: a .pilot-bak snapshot from install time was found // and we restored from it byte-for-byte (preferred over a manual // inverse-merge when available). RemovalRestored RemovalKind = "restored" // RemovalNeutralized: a retired plugin could not be removed because the // tool's config could not be edited safely (see retired.go), so its // entry file was replaced with a no-op. The plugin stays listed but // does nothing. RemovalNeutralized RemovalKind = "neutralized" // RemovalNoop: nothing on disk to remove for this path. RemovalNoop RemovalKind = "noop" // RemovalError: a removal attempt failed; see Err. RemovalError RemovalKind = "error" )
type RemovalReport ¶
type RemovalReport struct {
At time.Time `json:"at"`
Removals []Removal `json:"removals"`
ManifestOffline bool `json:"manifest_offline,omitempty"`
}
RemovalReport is what Uninstall returns to its caller.
func Uninstall ¶
func Uninstall(ctx context.Context, cfg Config) (*RemovalReport, error)
Uninstall is the inverse of Tick: it removes every file/marker the daemon has ever written via the skillinject manifest. Safety rules:
- Files in subdirs we own (~/.<tool>/skills/pilot-protocol/, ~/.pilot/bin/, plugin install paths) are DELETED outright.
- Files we co-inhabit with the user (CLAUDE.md, AGENTS.md, AGENT.md, SOUL.md) have ONLY our marker block stripped — the file is left on disk even if it becomes empty. Never delete a user-owned file.
- Plugin allow-list JSON (openclaw.json) is restored from .pilot-bak when present, otherwise we inverse-merge: remove our id from the allow array and delete entries.<id>.
- Surfaces an earlier manifest installed and the current one has retired (retired.go) are removed with the same rules, so a path the manifest stopped writing is not left behind.
- A gated tool's skill copy is deleted only while the tool's marker exists (gated.go); without it nothing under its rootDir is touched.
Network failures are tolerated: if the manifest can't be fetched we fall back to the cached copy under ~/.pilot/skills-cache/. If that's also missing we return an error — fresh boxes that have never run a tick have nothing to remove anyway.
func (*RemovalReport) Counts ¶
func (r *RemovalReport) Counts() map[RemovalKind]int
Counts returns how many removals hit each RemovalKind.
type Report ¶
type Report struct {
At time.Time `json:"at"`
Outcomes []Outcome `json:"outcomes"`
Skipped []string `json:"skipped,omitempty"`
// Disabled is true if the tick was a no-op because the user has run
// `pilotctl skills disable all`.
Disabled bool `json:"disabled,omitempty"`
}
Report is the result of one Tick.
func ForceTick ¶ added in v0.2.3
ForceTick performs an immediate scan + reconcile pass, bypassing the periodic ticker (which does not run in manual mode). It is the entry point for `pilotctl skills check`, `pilotctl skills enable`, and the post-update reconcile in `pilotctl update`.
It does NOT override the disabled opt-out: once the user has run `pilotctl skills disable all`, ForceTick is a no-op until they re-enable. (Enable persists mode=auto before calling in, so its reconcile still runs.) Manual mode is not gated here, so a forced reconcile there behaves exactly like Tick.
func Plan ¶ added in v0.2.4
Plan is a read-only dry run: it performs the same scan + classification as ForceTick (network fetch of the manifest + entrypoint) but writes nothing to disk. The returned Report's Outcomes carry the State and the Action the next real tick WOULD take, so `pilotctl skills status` can preview changes without applying them.
func Tick ¶
Tick performs one scan + reconcile pass and returns a Report. Network failures abort the tick and return an error — there is no embedded fallback. Exposed for tests, one-shot use, and `pilotctl skills check`.
If the user has set skill injection to disabled mode via `pilotctl skills disable all` (persisted in ~/.pilot/config.json), Tick installs nothing and makes no network request. It only removes retired surfaces still on disk (see tick) and returns a report with Disabled set.
type RetiredMarker ¶ added in v0.2.4
type RetiredMarker struct {
// Tool is the tool name used in reports (e.g. "openclaw").
Tool string `json:"tool"`
// Path is the heartbeat file. Supports ~/ expansion.
Path string `json:"path"`
}
RetiredMarker is a heartbeat file that held our marker block under an earlier manifest.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the L11 plugin adapter. The daemon (L7) holds plugins only as coreapi.Service interfaces — no skillinject import in core. Concrete construction happens in cmd/daemon/main.go (L12).
func NewService ¶
NewService returns a Service ready for daemon.RegisterPlugin.
type State ¶
type State string
State is the classification of one managed file at the start of a tick.
const ( // File (or marker block) does not exist on disk. StateAbsent State = "absent" // File/marker exists and matches the canonical we want. StateIdentical State = "identical" // File/marker exists but the content/hash differs from canonical. StateDrifted State = "drifted" // File/marker/plugin was installed by an earlier manifest that the // current one no longer manages (see retired.go). Present on disk and // due for removal. StateRetired State = "retired" )
type UpdateConfig ¶ added in v0.2.3
type UpdateConfig struct {
// Auto controls whether the updater checks for and applies new
// versions. True (default) = auto-update enabled.
Auto *bool `json:"auto,omitempty"`
// Pin locks the updater to a specific release tag (e.g. "v1.10.5").
// Empty string (default) means no pin — follow latest stable.
Pin string `json:"pin,omitempty"`
// Interval is the minimum time between update checks, in Go duration
// string format ("15m", "1h"). Empty string (default) means use the
// updater's built-in default check interval.
Interval string `json:"interval,omitempty"`
}
UpdateConfig describes the runtime-tunable auto-update settings. Stored at ~/.pilot/config.json under "update" → {...}. Zero values leave the updater default in place.
func GetUpdateConfig ¶ added in v0.2.3
func GetUpdateConfig(home string) UpdateConfig
GetUpdateConfig reads the update subkey from ~/.pilot/config.json. Returns a zero-value UpdateConfig when the subkey is absent, so the caller can apply its own defaults.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
sign-skills
command
Command sign-skills signs the pilot-skills content that pilot-daemon's skill injector fetches, and checks those signatures.
|
Command sign-skills signs the pilot-skills content that pilot-daemon's skill injector fetches, and checks those signatures. |