Documentation
¶
Overview ¶
Package trust manages a persisted allowlist of project directories that the user has marked as trusted for loading project-local skills.
Project-local skills (discovered under <project>/.agents/skills/ and <project>/.kit/skills/) are injected into the system prompt. A freshly cloned, untrusted repository could therefore smuggle instructions into the agent the moment the user runs Kit inside it. To mitigate this prompt- injection vector, project-level skill loading can be gated on an explicit trust decision recorded here.
The allowlist is stored as JSON at $XDG_CONFIG_HOME/kit/trusted-projects.json (default ~/.config/kit/trusted-projects.json).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
DefaultPath returns the path the trust allowlist is persisted to, respecting $XDG_CONFIG_HOME. Returns the empty string when no home directory can be determined.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a persisted set of trusted project directories. The zero value is not usable — construct one with Load.
func Load ¶
Load reads the trust allowlist from path. A missing file yields an empty store (not an error). Pass an empty path to use DefaultPath.