Repository navigation
feat(hub): agents rate hub corpora (xerj_corpus_feedback, xerj hub feedback, automatic reviews) - #1886
Conversation
…eedback, automatic reviews after pull and MCP hub answers Adds the client half of hub.xerj.org's Agent score (POST https://hub.xerj.org/api/corpus-feedback, corpus-hub #1881). - xerj-common::corpus_feedback: the review payload with the server's caps; the query is reduced to its shape (placeholders + structure words, every other word <term>), never sent raw; random local install id; ISO week. - xerj hub feedback <slug> --usefulness 1-5 --found yes|partial|no [...] - xerj hub pull: one automatic pull note per corpus per week (worked? slow?, no score) and the line asking the agent to rate the corpus once used. - MCP: new tool xerj_corpus_feedback (sends by default, confirm:false previews); xerj_hub_ask / xerj_hub_def send one automatic review per corpus per week in the background (hits or not, pack age; never 5/5). The agent's own review replaces the automatic one on the server. - All of it honours --disable-feedback / XERJ_DISABLE_FEEDBACK; automatic sends skip a non-production hub key (tests) unless XERJ_CORPUS_FEEDBACK_URL is set; never block more than 4s or fail the command. - AGENTS.md and landing/llms.txt tell agents to send it; mcp-tools.json regenerated (18 tools).
…orpus-feedback path feedback.rs POSTs structured corpus reviews to hub.xerj.org/api/corpus-feedback, which tripped every_outbound_client_in_the_engine_is_on_the_published_list. Classify it as a client path (`xerj hub feedback`) and add its row to docs/RERANK.md "Every way data leaves a XERJ node" and to the air-gapped recipe, naming --disable-feedback / XERJ_DISABLE_FEEDBACK.
|
Xerj Merger made the fix: reviewed the full diff. This is the client half of the hub Agent score: |
|
Xerj Merger made the fix: the client now sends structured corpus feedback automatically after hub pull and MCP hub queries, adds the xerj_corpus_feedback MCP tool and |
This is the client half of the Agent score on hub.xerj.org: AI agents rate the hub corpora they use, kept separate from human hub ★. The endpoint lands on corpus-hub in #1881 (
POST https://hub.xerj.org/api/corpus-feedback).What sends a review
xerj hub pull <slug>xerj_hub_ask/xerj_hub_defanswerxerj_corpus_feedback(new tool)confirm:falsepreviewsxerj hub feedback <slug> --usefulness N --found yes|partial|no [...]--dry-runprints the JSON)There's no prompt, like field reports. The server keeps one review per install per corpus per week. An agent review replaces the automatic one, and an automatic review never overwrites an agent's.
Privacy
normalise_templatekeeps placeholders and a fixed list of structure words, and every other word becomes<term>,<num>,<str>or<ref>. The server repeats the same rule.<hub home>/corpus-feedback.json), and never tied to a person.clientInfo.nameor tool env markers (CLAUDECODE,CURSOR_AGENT, …), andXERJ_AGENT_FAMILYoverrides it.Opt-out and safety
--disable-feedback/XERJ_DISABLE_FEEDBACK=trueturns all of it off.XERJ_HUB_PUBKEY, which the tests set) unlessXERJ_CORPUS_FEEDBACK_URLis set. So the test suite never posts.Docs
landing/llms.txthas the same line under Field report, and the tool count goes from seventeen to eighteen.mcp-tools.jsonwas regenerated withscripts/mcp-schema-check.sh --write(18 tools).Tests (local, quick profile)
xerj-commoncorpus_feedback: 6 Rust payload tests (field names, caps, refusals, template never carries the raw query, signals → scores, family detection, ISO week).xerj-hubfeedback: state/weekly claim, CLI arg parsing, answer → auto review, auto-send gating, URL refusal. The fullxerj-hubsuite passes (275 unit + integration).xerj-mcppasses 93 unit tests (tool count 18/15), pluspublished_schema_driftandhub_tools.cargo clippy -p xerj-common -p xerj-hub -p xerj-mcp --all-targets -D warningsis clean, andscripts/seo/test_llms_field_report.pypasses.xerj_corpus_feedbackcall against a localwrangler pages devof hub: /api/corpus-feedback — structured agent reviews per corpus (Agent score backend) #1881 was stored and aggregated.