Documentation
¶
Overview ¶
Package profiles stores local registrations of vendor-owned account roots. It never reads, copies, or refreshes credentials. Remote registrations contain public metadata.
Index ¶
- func DecodeRegistrations(b []byte) ([]agent.RuntimeProfile, error)
- func FolderName(root string, id agent.ID) string
- func ID() string
- func RootID(endpoint string, a agent.ID, root string) string
- func Tags(values []string) ([]string, error)
- type Store
- func (s Store) Edit(id, name string, tags []string, generation int) error
- func (s Store) Forget(id string, generation int) error
- func (s Store) ImportObservation(id string, remote agent.RuntimeProfile) error
- func (s Store) List() ([]agent.RuntimeProfile, error)
- func (s Store) Observe(id string, account *agent.Account, problem string) (agent.RuntimeProfile, error)
- func (s Store) ObserveFrom(id string, account *agent.Account, problem, source string) (agent.RuntimeProfile, error)
- func (s Store) Register(p agent.RuntimeProfile) (agent.RuntimeProfile, error)
- func (s Store) Relocate(id, from, to string) error
- func (s Store) SetDefault(endpoint string, id agent.ID, selected, autoName string) error
- func (s Store) Update(fn func(*[]agent.RuntimeProfile) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeRegistrations ¶
func DecodeRegistrations(b []byte) ([]agent.RuntimeProfile, error)
DecodeRegistrations reads a peer's known non-secret registry. Tags stay private; vendor-reported email and plan, and the account and person fingerprints (hashes, so the sessions there can be matched to the account that ran them), are identity metadata.
func FolderName ¶ added in v0.8.0
FolderName is a name for agent id's account folder from its path: its last element, or the one before for a folder named after its agent (…/profiles/<id>/claude).
Types ¶
type Store ¶
type Store struct{ Dir string }
func (Store) ImportObservation ¶
func (s Store) ImportObservation(id string, remote agent.RuntimeProfile) error
ImportObservation accepts newer metadata from the endpoint that owns the root. Local labels and tags stay local, and a failed or stale remote read cannot reset them.
func (Store) Observe ¶
func (s Store) Observe(id string, account *agent.Account, problem string) (agent.RuntimeProfile, error)
Observe records public login metadata and rotates the opaque binding after an observable account change. Limited metadata never upgrades to verified identity.
func (Store) ObserveFrom ¶ added in v0.4.1
func (s Store) ObserveFrom(id string, account *agent.Account, problem, source string) (agent.RuntimeProfile, error)
ObserveFrom retains the origin of public metadata; failures preserve the last known login.
func (Store) Register ¶
func (s Store) Register(p agent.RuntimeProfile) (agent.RuntimeProfile, error)
func (Store) Relocate ¶ added in v0.5.0
Relocate records that a profile's folder moved (hopsesh moved it): same profile, same sign-in, another path.
func (Store) SetDefault ¶
SetDefault tracks the vendor's currently configured root, without changing profile identity. Switching that root invalidates plans which could launch the desktop app. A folder that is no longer the default and still has the name hopsesh gave the default (autoName, "Claude Code default") is named after its folder instead.