Repository navigation
✨ knowledge: owner-switched, read-only public MCP endpoint for external agents - #10621
Merged
Merged
Conversation
regexp.MustCompile at package init used (?=...), which Go's RE2 engine does not support, so pkg/dashboard panicked on load (spoke startup and every dashboard test). Express the no-double-hyphen rule without lookahead and enforce the 39-char cap explicitly; add a table test. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
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>
pkg/hub/feedback.go carried the identical (?=...) pattern, so the hub binary and every hub test panicked at init too. Same rewrite + length cap + table test. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Add POST /mcp/knowledge, a Model Context Protocol endpoint any external agent can use anonymously to read this hive's operational knowledge — but only after the owner sets HIVE_PUBLIC_KNOWLEDGE. Default off (404). Strictly read-only: the surface serves initialize/ping/tools/list and three tools (knowledge_search, knowledge_get, knowledge_export). No code path reaches CreateFact/UpdateFact/DeleteFact or vault mutation. Only operational fact types are projected; ideation/governance types, sources, usage counters and confidence reasoning never leave the hive. Optional HIVE_PUBLIC_KNOWLEDGE_TAGS narrows the projection further. isPublicPath (spoke) and publicExactPaths (hub nginx auth_request) wave the path through only so the handler can run its own fail-closed check. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
env-vars, api-reference (+citation refresh), documentation map, a new public-knowledge-mcp.md with Goose/Claude/Copilot client snippets, and the changelog fragment for #10615. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…tations verify Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…ctly Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
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>
This was referenced Oct 5, 2026
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
This was referenced Oct 5, 2026
…ing, MCP 2025-06-18 - knowledge_get/export/search re-read facts by slug so bodies are not the 200-rune store snippets - enforce the type filter after search (vault/git stores ignore it) - over-fetch 10x before the public filter so private facts cannot starve the result window - filter Related down to public slugs - advertise MCP 2025-06-18 and reject JSON-RPC batches with -32600 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
… to #10621) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
…edge-mcp-10615 Signed-off-by: Andrew Anderson <andy@clubanderson.com> # Conflicts: # src/docs/api-reference.md # src/pkg/dashboard/mcp_knowledge.go # src/pkg/dashboard/mcp_knowledge_test.go
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
clubanderson
added a commit
that referenced
this pull request
Oct 5, 2026
… regexp (#10617) * 🐛 fix: dashboard init panic from lookahead in feedback login regexp regexp.MustCompile at package init used (?=...), which Go's RE2 engine does not support, so pkg/dashboard panicked on load (spoke startup and every dashboard test). Express the no-double-hyphen rule without lookahead and enforce the 39-char cap explicitly; add a table test. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * changelog: fragment for #10617 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> * 🐛 fix: same lookahead regexp panic in pkg/hub feedback login validator pkg/hub/feedback.go carried the identical (?=...) pattern, so the hub binary and every hub test panicked at init too. Same rewrite + length cap + table test. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * changelog: drop duplicate fragment (bot added fixed-10617.md) Signed-off-by: Andrew Anderson <andy@clubanderson.com> * fix: drop public-knowledge MCP files that leaked into this PR (belong to #10621) Signed-off-by: Andrew Anderson <andy@clubanderson.com> * docs: refresh api-reference citations (drifted on v5) Signed-off-by: Andrew Anderson <andy@clubanderson.com> --------- Signed-off-by: Andrew Anderson <andy@clubanderson.com> Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…cp-10615 Signed-off-by: Andrew Anderson <andy@clubanderson.com> # Conflicts: # src/docs/api-reference.md
Contributor
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10615. cc @castrojo — this is the "public knowledge" switch for Bluefin's Troubleshooting /
mcp.projectbluefin.io.What
An owner-controlled, strictly read-only MCP endpoint that lets any external agent (Goose, Claude, Copilot CLI, curl) read a hive's operational knowledge with no credentials — but only after the hive owner opts in.
POST /mcp/knowledge— MCP Streamable HTTP, JSON-RPC 2.0, JSON responses (no SSE)HIVE_PUBLIC_KNOWLEDGE=1|true|yes|on— default off → 404, even for the owner. Read per-request; close it without a pod roll.HIVE_PUBLIC_KNOWLEDGE_TAGS=linux,troubleshooting— optional tag allow-listknowledge_search {query,type?,limit?}·knowledge_get {slug}·knowledge_export {}(Markdown + ETag)Read-only guarantees
initialize,ping,notifications/*,tools/list,tools/calland nothing else (-32601otherwise).CreateFact/UpdateFact/DeleteFact, import, promotion, or vault mutation. Tests assert no tool name contains create/update/delete/write/import/promote and that every tool is annotatedreadOnlyHint: true, destructiveHint: false.What leaves the hive
Only operational types:
pattern, gotcha, regression, test_scaffold, integration, coverage_rule, general. Ideation/governance types (idea, vision, constitution, requirement, constraint, stakeholder, decision) are filtered at a single choke point (publicKnowledgeFilter); fetching one by slug answers not found, not forbidden. Each fact is projected toslug/title/type/body/tags/related(+confidenceonly when scored) —sources,usage_count,confidence_reason,last_used,phaseare stripped.Plumbing
dashboard.isPublicPathadmits/mcp/knowledgeonly while the switch is on; the handler re-checks and 404s.hub.publicExactPathsadds the exact path so the nginxauth_requestgate doesn't bounce credential-less agents to login (same mechanism/rationale asknowledgeExportPath, 🐛 bug(contribute): on a hosted hive the contributor's knowledge download always fails, silently — agent.md is never installed #8294). Test asserts/mcp,/mcp/,/mcp/knowledge/admin,/mcp/otherstay gated.docs/public-knowledge-mcp.md(what's exposed, what's impossible, Goose/Claude/Copilot/curl config),env-vars.md,api-reference.md(+ citation refresh), documentation map, changelog fragment.Try it
Goose:
extensions: { hive: { type: streamable_http, uri: https://<hive>/mcp/knowledge } }Verification
go test -run 'PublicKnowledge|GithubLogin' ./pkg/dashboard/✅ (9 tests: default-off, off-even-when-authenticated, spellings, handshake/tools-list, private-type hiding in search/get/export, tag allow-list, write/bad-input rejection, no-KB, path constant)go test -run PublicKnowledgeMCP ./pkg/hub/✅go test -cover ./pkg/hub/✅ 89.2%;./pkg/dashboard/85.0% — two failures there (TestOpenAPISpecCoversEveryRegisteredRoute: undocumentedGET /api/feedback/status;TestAgentsCollapsedSummaryRendersPerAgentTiles) are pre-existing on v5 and unrelated.go vet,check-api-reference-citations.sh✅