feat: evidence-anchor citations and Agent Plugins protocol alignment - #85
Merged
Conversation
added 2 commits
August 12, 2026 09:28
…col alignment - Replace the legacy [ref:tool-N] citation pipeline (orchestration/citations.py) with evidence anchors (orchestration/citation_anchor.py): tools stamp cite_id on citable items, the model writes [anchor text](cite:eN), and the allocator is bound to the agent instance so numbering stays monotonic across turns. - Render citations as ChatGPT-style capsule chips with hover source cards; drop the old footnote/link styling and dead citation utilities. - Align plugin.json with the Agent Plugins standard ($schema, author object, org.hugagent extensions namespace, external mcp.json) and move display metadata (name/category/icon) to admin-side UI configuration with a curated plugin icon library. - Update system prompt guidance, docs (chat / mcp-tools), and tests to match: add test_citation_anchor.py, remove test_citation_offset.py.
citeTag was only referenced by renderers that are not part of this build; with noUnusedLocals enabled tsc fails the frontend build (TS6133).
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.
Summary
Evidence-anchor citation system
[ref:tool-N]citation pipeline (orchestration/citations.py) with evidence anchors (orchestration/citation_anchor.py): tool results stamp acite_idon each citable item, the model writes[anchor text](cite:eN)inline, and the anchor allocator is bound to the agent instance so numbering stays monotonic across turns and subagents.Agent Plugins protocol alignment
plugin.jsonnow follows the Agent Plugins standard:$schema, structuredauthorobject,org.hugagentextensions namespace, and MCP server definitions split intomcp.json.plugin.jsoninto admin-side UI configuration, backed by a curated plugin icon library and icon picker.Supporting changes
document/{zh-CN,en}/modules/chat.mdandmcp-tools.md.test_citation_anchor.py, removestest_citation_offset.py; plugin system tests updated for the new manifest format.Testing