Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-18885-customers-avatars-pills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The Customers list is one line per person: a GitHub picture where the person has a confirmed GitHub login (initial otherwise; never looked up by email), identities, origin and tags as pills with a tone per default tag and a mark for tags set by hand, "+N" when there are more, and the date muted on the right. Suggested rows and the profile header use the same density. The picture is requested by the viewer's browser from github.com with no referrer; `customers.avatars.enabled` (env `HIVE_CUSTOMERS_AVATARS_ENABLED`, Settings, Features) turns it off, default on (#18885).
23 changes: 21 additions & 2 deletions src/docs/design/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,31 @@ position:
3. The owner can forget anyone; the tombstone stops a rebuild.
4. Retention follows the source: an edge cannot outlive its artefact.
5. Nothing leaves the hive. No hub sync, nothing written to GitHub, nothing in
a heartbeat.
a heartbeat. The one thing a browser fetches for this section is a public GitHub
picture, described next.

**Avatars.** The one exception to "nothing leaves the hive" is not data the hive
sends. The Customers list shows a GitHub picture next to a person who has a
confirmed GitHub login, so the viewer's browser requests
`https://github.com/<login>.png` (GitHub redirects to its own image host) for
each such person on screen, lazily, with `referrerpolicy="no-referrer"`. GitHub
sees the viewer's IP address and which logins were requested, so it can tell
that someone looking at this dashboard has those GitHub users in their customer
list. It is not sent the hive's address, the page, a token, a name, a tag or
anything else about the person. The hive's server does not fetch, proxy or
store the pictures. A person known only by
email, Slack, Discord, Teams or Meet gets an initial or a source icon, and no
service keyed by an email address or its hash (Gravatar and the like) is ever
asked, because that would hand the address to a third party. To turn pictures
off set `customers.avatars.enabled: false`, set `HIVE_CUSTOMERS_AVATARS_ENABLED=false`,
or switch **Customer avatars** off in Settings, Features; the list then shows
initials and makes no request to github.com. The default is on, because the
dashboard already loads GitHub avatars for contributors and sign-ins.

[telemetry.md](../telemetry.md) records the review of Hive's outbound paths
against the Linux Foundation telemetry policy, which says project software
should not collect telemetry by default without review and prior consent. This
feature adds no outbound path, which is what allows it to be on by default.
feature adds no outbound path from the hive, which is what allows it to be on by default. The avatar request above is made by the viewer's browser to a site they already use, and has its own switch.
Any later proposal to send customer data to a hub is its own RFC and falls
under that review.

Expand Down
1 change: 1 addition & 0 deletions src/docs/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ new value at the same time.
| `HIVE_TMUX_HISTORY_LIMIT` | No | `50000` | tmux scrollback depth applied when an agent session is created (positive integer; the authoritative knob for terminal scrollback and full-log capture). |
| `HIVE_CUSTOMERS_ENABLED` | No | config `customers.enabled` (default on) | Turns the Customers section and its people store on or off; `false` opens no store, runs no sweep and hides the section, overriding config. Nothing the store holds leaves the hive. |
| `HIVE_CUSTOMERS_INFERENCE_ENABLED` | No | config `customers.inference.enabled` (default off) | Turns goal and satisfaction suggestions on or off, overriding config. Needs Customers on. When on, a customer's own issues, pull requests and approved mail are sent to the meetings model; every suggestion waits for a person to confirm, edit or reject it. |
| `HIVE_CUSTOMERS_AVATARS_ENABLED` | No | config `customers.avatars.enabled` (default on) | Turns GitHub pictures on the Customers list on or off, overriding config. On, the viewer's browser requests `https://github.com/<login>.png` with no referrer for each person with a confirmed GitHub login; off, the list shows initials and makes no request to github.com. |
| `HIVE_SESSIONS_ENABLED` | No | config `dashboard.sessions.enabled` (default on) | Turns the dashboard Inception (spek) sessions feature (interactive CLI terminals, `/api/sessions`) on or off; `false` hides it, overriding config. Limits: `HIVE_SESSIONS_MAX`, `HIVE_SESSIONS_MAX_PER_USER`, `HIVE_SESSIONS_IDLE_TTL_HOURS`. Workspace: `HIVE_SESSIONS_WORKSPACE_REPO` (the `org/repo` sessions open in, default `project.org/primary_repo`), `HIVE_SESSIONS_WORKSPACE_DIR` (root of the one shared clone per repo, `<dir>/<org>/<repo>`, and of each session's own git worktree of it, `<dir>/.sessions/<id>/<org>/<repo>` on branch `hive-session/<id>`; sessions share commits and branches but not uncommitted edits or `.spektacular/` state; default `/data/session-sandbox/workspace`), `HIVE_SESSIONS_GID` (the sessions-only group that shares the clone, default 20000). Inbox seeds: `HIVE_SESSIONS_SEED_MAX_BYTES` (cap on one item's enveloped text in `.hive/inbox/`, default 524288); see [Sessions API](api-reference/sessions.md). |
| `HIVE_SESSIONS_AUTOSTART` | No | config `dashboard.sessions.autostart` (default on) | Turns the session startup auto-answer on or off, overriding config: when a session starts the hive answers the vendor CLI's startup screens (first-run notice, trust for the session's folder, onboarding) so its first request runs unattended. It never answers a permission prompt or a login screen. `HIVE_SESSIONS_AUTOSTART_WINDOW_SEC` (default `90`) bounds how long it answers for after a start. See [Startup auto-answer](api-reference/sessions.md#startup-auto-answer). |
| `HIVE_TTYD_HISTORY_LIMIT` | No | `50000` | Defense-in-depth history-limit raise applied at browser attach time; only affects panes created after attach. |
Expand Down
1 change: 1 addition & 0 deletions src/docs/operator-reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ Top-level YAML keys accepted by `config.Config`:
| `chat.grounded_answers` | Hive Chat grounded answers: a chat message that is not a bare command (`/agents stuck`, `/prs waiting on review`, "which agent completed last?") is answered by one read-only model turn over a capped snapshot of the hive state the dashboard already holds (agents, open PRs, actionable issues, decisions, governor, alerts, version), citing the items used or saying it does not have the data. Chat never takes actions on this path; every attempt is audited as `chat_grounded_answer`. | Default ON (`enabled: true`); `enabled: false` makes scoped questions answer with the command's usage instead. `model` overrides the governor reviewer model for the turn. See [Hive Chat](../dashboard.md#hive-chat). |
| `customers` | Customers: one profile per person built from what the hive already holds, kept in `/data/customers/people.json` (0600) with a rebuildable edge index in `/data/graph/customers.db`. Dashboard users and people added by hand are customers; anyone else is only a suggestion until accepted. Nothing it stores leaves the hive. Design: [customers](../design/customers.md). | Default ON (`enabled: true`); `enabled: false` (or `HIVE_CUSTOMERS_ENABLED=false`) opens no store, runs no sweep and hides the section. |
| `customers.inference` | Goal and satisfaction suggestions (see `customers`): the hive reads a customer's own issues, pull requests and approved mail, asks the model configured for meetings for candidate goals and a satisfaction level with the evidence behind each, and files them as suggestions for a person to confirm, edit or reject. A confirmed or manual value is never overwritten. | Default OFF (`enabled: false`) because it sends that text to the model; `enabled: true` (or `HIVE_CUSTOMERS_INFERENCE_ENABLED=true`) turns it on. Needs `customers.enabled` and a meetings model (OpenAI-compatible or Anthropic); budget about 40,000 tokens a day. |
| `customers.avatars` | GitHub pictures on the Customers list. The viewer's browser requests `https://github.com/<login>.png` (no referrer) for each person with a confirmed GitHub login on screen; nobody known only by email is looked up anywhere, and the hive neither proxies nor stores pictures. See [customers](../design/customers.md). | Default ON (`enabled: true`); `enabled: false` (or `HIVE_CUSTOMERS_AVATARS_ENABLED=false`, or Settings, Features) shows initials and makes no request to github.com. |
| `governor.first_timer_welcome` | First-time contributor welcome: when a human whose GitHub `author_association` is `FIRST_TIME_CONTRIBUTOR`/`FIRST_TIMER` opens a PR, post one comment (per author per repo, marker `<!-- hive:first-timer-welcome -->`) that thanks them and invites them to run their own hive — profile, leaderboard, trust-tier progression, offline review-fix/rebase handling. Bots, `author/clanker`/`author/hive` PRs, drafts and known relay contributors are skipped. | Default ON; `enabled: false` opts out; `template_path` overrides the text. Silent without a public dashboard URL. See [Welcoming first-time contributors](../good-first-issue.md#welcoming-first-time-contributors). |
| `sla` | Delivery SLA targets (`sla.targets.start_to_pr_h`, `pr_to_merge_h`, `open_to_merge_h`, hours; defaults 4 / 24 / 72) the dashboard's Throughput section colours its Delivery SLA spans against. | Metrics are derived from the lifecycle timeline; no extra GitHub calls. Also editable from **Settings → Thresholds**. See [Delivery SLA](sweeps-and-operations.md#delivery-sla). |
| `sentinel` | Suspicious-activity alerts: flags open PRs (any author) that touch sensitive files or look like security overrides, privilege escalation, or codebase damage. | Default ON; observe-and-alert only. See [Suspicious-activity alerts](sweeps-and-operations.md#suspicious-activity-alerts-sentinel). |
Expand Down
13 changes: 13 additions & 0 deletions src/docs/security-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,19 @@ login. The hub put that entry there after it signed the person in with GitHub,
so the hive trusts it. If your access list is edited by hand, an entry like
that gives the named person's profile the matching GitHub activity.

One part of this section is a request your browser makes, not the hive. The list
shows a GitHub picture for each person with a confirmed GitHub login. Your
browser asks `github.com/<login>.png` over https for the people on screen. It does
this late, only for rows you can see, and it sends no referrer. GitHub learns
your IP address and which logins were asked for. So it can tell you have those
GitHub users in your customer list. It learns nothing else about them. The hive
does not fetch or keep the pictures. A person known only by an email address is
never looked up, and neither is any hash of the address. The dashboard already
allows `https:` images, so no policy changes, and a test pins it. To turn the
pictures off, set `customers.avatars.enabled: false` or
`HIVE_CUSTOMERS_AVATARS_ENABLED=false`, or use the switch in Settings. The list
then shows initials and asks GitHub for nothing.

A read-only user sees only their own profile. An identity they add is shown as
unconfirmed. It links nothing until the owner or a read-write user confirms it.

Expand Down
2 changes: 2 additions & 0 deletions src/hive.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -1369,3 +1369,5 @@ data:
# enabled: true # false (or env HIVE_CUSTOMERS_ENABLED=false) opens no store and hides the section
# inference:
# enabled: false # true (or env HIVE_CUSTOMERS_INFERENCE_ENABLED=true) suggests goals and satisfaction with the meetings model; default off
# avatars:
# enabled: true # false (or env HIVE_CUSTOMERS_AVATARS_ENABLED=false) shows initials and makes no browser request to github.com for pictures; default on
37 changes: 37 additions & 0 deletions src/pkg/config/customers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ type CustomersConfig struct {
// never signed up, to the model the meetings feature is configured to
// use.
Inference CustomersInferenceConfig `yaml:"inference,omitempty" json:"inference,omitempty"`
// Avatars gates GitHub profile pictures in the Customers list. Default
// ON. It is the one part of the section that makes the viewer's browser
// contact another site: github.com, for people already on screen.
Avatars CustomersAvatarsConfig `yaml:"avatars,omitempty" json:"avatars,omitempty"`
}

// EnvCustomersAvatarsEnabled overrides customers.avatars.enabled when it
// holds a recognised boolean.
const EnvCustomersAvatarsEnabled = "HIVE_CUSTOMERS_AVATARS_ENABLED"

// CustomersAvatarsConfig (`customers.avatars:`) turns GitHub profile pictures
// on the Customers list on or off. On, the viewer's browser requests
// https://github.com/<login>.png for each customer or suggestion whose
// identity is a GitHub login, with no referrer. Off, the list shows initials
// and makes no such request.
type CustomersAvatarsConfig struct {
// Enabled turns avatars on. nil = true.
Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
}

// IsEnabled reports whether avatars are on (default on).
func (c CustomersAvatarsConfig) IsEnabled() bool {
return c.Enabled == nil || *c.Enabled
}

// EnvCustomersInferenceEnabled overrides customers.inference.enabled when it
Expand Down Expand Up @@ -72,3 +95,17 @@ func (c *Config) CustomersInferenceEnabled() bool {
}
return c.Customers.Inference.IsEnabled()
}

// CustomersAvatarsEnabled reports whether GitHub avatars show on the
// Customers list: the HIVE_CUSTOMERS_AVATARS_ENABLED env wins over
// customers.avatars.enabled when it holds a recognised boolean. A nil config
// is the default, on.
func (c *Config) CustomersAvatarsEnabled() bool {
if v, ok := parseBoolEnv(EnvCustomersAvatarsEnabled); ok {
return v
}
if c == nil {
return true
}
return c.Customers.Avatars.IsEnabled()
}
27 changes: 27 additions & 0 deletions src/pkg/config/customers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,30 @@ func TestCustomersInferenceDefaultsOffAndNeedsCustomers(t *testing.T) {
t.Fatal("a nil config has inference off")
}
}

func TestCustomersAvatarsEnabled(t *testing.T) {
t.Setenv(EnvCustomersAvatarsEnabled, "")
cfg := &Config{}
if !cfg.CustomersAvatarsEnabled() {
t.Fatal("avatars must default on")
}
off, on := false, true
cfg.Customers.Avatars.Enabled = &off
if cfg.CustomersAvatarsEnabled() {
t.Fatal("explicit false")
}
t.Setenv(EnvCustomersAvatarsEnabled, "true")
if !cfg.CustomersAvatarsEnabled() {
t.Fatal("env true must win over config false")
}
cfg.Customers.Avatars.Enabled = &on
t.Setenv(EnvCustomersAvatarsEnabled, "false")
if cfg.CustomersAvatarsEnabled() {
t.Fatal("env false must win over config true")
}
var none *Config
t.Setenv(EnvCustomersAvatarsEnabled, "")
if !none.CustomersAvatarsEnabled() {
t.Fatal("a nil config has avatars on")
}
}
3 changes: 2 additions & 1 deletion src/pkg/config/testdata/agent_runtime_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@
"grounded_answers": {}
},
"customers": {
"inference": {}
"inference": {},
"avatars": {}
},
"duplicate_sweep": {},
"good_first_issue": {},
Expand Down
23 changes: 22 additions & 1 deletion src/pkg/dashboard/api_customers.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,28 @@ func (s *Server) handleCustomersList(w http.ResponseWriter, r *http.Request) {
s.customersError(w, r, err)
return
}
jsonResponse(w, out)
jsonResponse(w, s.withCustomersAvatars(out))
}

// withCustomersAvatars adds the live avatars switch to the list answer, so
// the page knows whether it may ask github.com for profile pictures. It is
// read per request, so turning it off in Settings takes effect on the next
// refresh, and the answer is unchanged if the list cannot be re-encoded.
func (s *Server) withCustomersAvatars(out any) any {
raw, err := json.Marshal(out)
if err != nil {
return out
}
var m map[string]any
if json.Unmarshal(raw, &m) != nil || m == nil {
return out
}
on := true
if s.deps != nil && s.deps.Config != nil {
on = s.deps.Config.CustomersAvatarsEnabled()
}
m["avatars"] = on
return m
}

func (s *Server) handleCustomersGet(w http.ResponseWriter, r *http.Request) {
Expand Down
33 changes: 33 additions & 0 deletions src/pkg/dashboard/api_customers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"net/http/httptest"
"strings"
"testing"

"github.com/hivecommons/hive/pkg/config"
)

// fakeCustomersService records the viewer each call was made with, so the
Expand Down Expand Up @@ -426,3 +428,34 @@ func TestCustomersMergeSplitExportBodiesAndAudit(t *testing.T) {
t.Fatalf("a conflicting merge = %d", rec.Code)
}
}

// The list answer carries the live avatars switch, so the page asks github.com
// for pictures only while the hive allows it.
func TestCustomersListCarriesAvatarsSwitch(t *testing.T) {
t.Setenv(config.EnvCustomersAvatarsEnabled, "")
s, _ := apiServer(t)
s.SetCustomersService(&fakeCustomersService{})
if s.deps.Config == nil {
s.deps.Config = &config.Config{}
}
get := func() map[string]any {
rec := customersDo(s, custOwner, http.MethodGet, "/api/customers", "")
var m map[string]any
if rec.Code != http.StatusOK || json.Unmarshal(rec.Body.Bytes(), &m) != nil {
t.Fatalf("list = %d %s", rec.Code, rec.Body.String())
}
return m
}
if got := get(); got["avatars"] != true || got["enabled"] != true {
t.Fatalf("default list = %v, want avatars on", got)
}
off := false
s.deps.Config.Customers.Avatars.Enabled = &off
if got := get(); got["avatars"] != false {
t.Fatalf("avatars off = %v", got)
}
t.Setenv(config.EnvCustomersAvatarsEnabled, "true")
if got := get(); got["avatars"] != true {
t.Fatalf("env on must win = %v", got)
}
}
9 changes: 9 additions & 0 deletions src/pkg/dashboard/api_governor_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ func (s *Server) handleGovernorFeatures(w http.ResponseWriter, r *http.Request)
// #18742: customers.inference.enabled, goal and satisfaction
// suggestions made with a model. Default off.
CustomersInferenceEnabled *bool `json:"customersInferenceEnabled"`
// customers.avatars.enabled: GitHub profile pictures on the
// Customers list. Default on.
CustomersAvatarsEnabled *bool `json:"customersAvatarsEnabled"`

AutonomyAutoPromote *bool `json:"autonomyAutoPromote"`
AutonomyAutoDemote *bool `json:"autonomyAutoDemote"`
Expand Down Expand Up @@ -371,6 +374,10 @@ func (s *Server) handleGovernorFeatures(w http.ResponseWriter, r *http.Request)
on := *body.CustomersInferenceEnabled
cfg.Customers.Inference.Enabled = &on
}
if body.CustomersAvatarsEnabled != nil {
on := *body.CustomersAvatarsEnabled
cfg.Customers.Avatars.Enabled = &on
}
if claimsTTLsChanged {
applyClaimsTTLs(&cfg.Governor.Claims, body.ClaimsTTLS, body.ClaimsHumanTTLS, body.ClaimsAgentTTLS, body.ClaimsContributorTTLS, body.ClaimsMaxTTLS)
// Live claims keep their expiry; claims made or renewed from now on
Expand Down Expand Up @@ -577,6 +584,8 @@ func featuresSectionResponse(cfg *config.Config) map[string]interface{} {
"customersEffective": cfg.CustomersEnabled(),
"customersInference": cfg.Customers.Inference.IsEnabled(),
"customersInferenceEffective": cfg.CustomersInferenceEnabled(),
"customersAvatars": cfg.Customers.Avatars.IsEnabled(),
"customersAvatarsEffective": cfg.CustomersAvatarsEnabled(),
"publicationEnabled": cfg.Publication.Enabled,
"publicationPrivateChannel": cfg.Publication.PrivateChannel,
"publicationOwner": cfg.Publication.Owner,
Expand Down
Loading
Loading