Skip to content

✨ knowledge: owner toggle for the public read-only MCP endpoint in dashboard - #10678

Merged
clubanderson merged 3 commits into
v5from
feat/public-knowledge-toggle
Oct 5, 2026
Merged

clubanderson merged 3 commits into
v5from
feat/public-knowledge-toggle

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #10676

Summary

  • Adds GET /api/knowledge/public and owner-only PUT /api/knowledge/public for the public read-only Knowledge MCP setting.
  • Persists the dashboard override in hive config, with saved settings taking precedence over HIVE_PUBLIC_KNOWLEDGE / HIVE_PUBLIC_KNOWLEDGE_TAGS and per-request instant off semantics.
  • Adds shared dashboard controls in the Knowledge section header and Settings → Knowledge → Knowledge sharing, including tags, endpoint copy, and inline enable confirmation.
  • Updates OpenAPI, docs, tests, and changelog.

UI

  • Knowledge section header: status pill and owner controls for Public read-only MCP.
  • Global Settings modal: Knowledge tab with a Knowledge sharing group using the same API-backed state.

Validation

  • Local go test, go build, and docs citation guard were not run because this repo's AGENTS.md forbids agents from running them locally; CI is the validation source.
  • Ran gofmt -l on changed Go files and git diff --check.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 5, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 5, 2026
clubanderson added a commit that referenced this pull request Oct 5, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#10683 ✨ add Spek recheck outward discovery sources same files src/docs/api-reference.md
src/pkg/dashboard/static/index.html
#10684 ✨ dashboard: link the Level 6 operating guide from the ACMM level picker same files src/pkg/dashboard/static/index.html
#10675 🐛 sync issue claim labels same files src/docs/api-reference.md
src/pkg/dashboard/static/index.html
#10679 ✨ knowledge: add owner-only public MCP sharing controls CONFLICT src/docs/env-vars.md
src/docs/public-knowledge-mcp.md
src/pkg/config/knowledge_config.go
src/pkg/dashboard/mcp_knowledge.go
src/pkg/dashboard/static/index.html
#10602 ✨ feat: label-driven repos skip un-park notice and keep needs-human same files dashboard/openapi.json
src/docs/api-reference.md

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 5, 2026
Signed-off-by: Andy Anderson <andy@clubanderson.com>
clubanderson and others added 2 commits October 5, 2026 19:17
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts with #10679 (same issue #10676), and the dashboard toggle does not survive a config reload in Kubernetes.

Duplicate/conflict. #10679 adds the same GET/PUT /api/knowledge/public routes (src/pkg/dashboard/api.go), the same knowledge.public config key (src/pkg/config/knowledge_config.go), and the same {enabled,tags,source,endpoint,url} response shape. I read both diffs in full: they differ in type (Public is a struct with Enabled *bool here vs *PublicKnowledgeConfig there) and in source value ("setting" vs "config"), so they cannot both merge. Both are "Closes #10676". Flagging for a maintainer: one should be closed. I have not closed anything.

Verified defect — toggle reverts on reload (high). handlePublicKnowledgePut (src/pkg/dashboard/mcp_knowledge.go, PUT handler) writes Knowledge.Public and calls s.saveConfig(). In a pod, Config.Save() writes /data/hive.yaml.dashboard (src/pkg/config/config.go:6981-6994). But loadWithDashboardOverlay (config.go:5427-5520 on v5) adopts only OTel/Tracing, Governor.WorkSource, cadences, RemovedAgents and Agents from that overlay — it never copies Knowledge.Public. The ~2‑min reload in src/cmd/hive/main.go:3691 then does *b.cfg = *newCfg, so an owner who enables sharing from the dashboard sees it silently fall back to the env switch within minutes (and on every pod restart). #10679 handles exactly this at config.go:5444-5447.

This PR does correctly extend isPublicPath (server.go:1853) to the setting, which #10679 misses — so the two PRs each have half the fix. Best outcome is probably one PR that combines them; a maintainer should pick which branch carries it.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@clubanderson
clubanderson merged commit ef2ad0b into v5 Oct 5, 2026
54 of 55 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/public-knowledge-toggle branch October 5, 2026 20:12
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ knowledge: dashboard toggle for the public read-only MCP endpoint (owner only)

1 participant