Documentation
¶
Overview ¶
Package profile stores a QuickAgent's MCP profile: the persistent, credentialed half of its gateway configuration, keyed by signature — ns/name@version plus the archive digest, the same identity the install cache uses. A profile holds the application keys and identities the declared contract needs so a later run of the same release "just uses the authenticated resources"; whether it survives the run is the operator's keep/remove choice.
Values live only here (dir 0700, file 0600) and in the per-run gateway secrets file the engine deletes at teardown; they never enter plans, receipts, or process listings — the v1 invariants hold unchanged.
Index ¶
Constants ¶
const Version = "1"
Version is the profile schema major.
Variables ¶
This section is empty.
Functions ¶
func RefMatches ¶
RefMatches is the release selector the runner's state commands share (`profiles remove`, `connections remove`, `uninstall`): ref is ns/name@version; sel names it exactly, or as ns/name for every version.
Types ¶
type Profile ¶
type Profile struct {
// ProfileVersion pins the schema ("1").
ProfileVersion string `json:"profileVersion"`
// Ref is ns/name@version; Digest is the verified archive digest. A
// different digest is a different trust decision and gets a fresh
// guided setup.
Ref string `json:"ref"`
Digest string `json:"digest"`
// Keep records the operator's completion choice: true → the profile
// survives the run; false → the run deletes it on completion.
Keep bool `json:"keep"`
// CreatedAt / LastUsedAt are RFC3339 audit stamps.
CreatedAt string `json:"createdAt"`
LastUsedAt string `json:"lastUsedAt,omitempty"`
// Secrets maps declared env NAMES to the values guided setup
// collected. A name absent here falls back to the policy secret
// source at run time.
Secrets map[string]string `json:"secrets,omitempty"`
}
Profile is one QuickAgent signature's stored configuration.
func Load ¶
Load reads a profile; (nil, nil) when none exists — absence is the normal first-run state, not an error.
func (*Profile) MatchesRef ¶
MatchesRef reports whether the profile belongs to ns/name or ns/name@version (the `agentry profiles remove` selector).
func (*Profile) SecretNames ¶
SecretNames lists the stored secret names, sorted — for display; values are never printed by any surface.