Expand description
byob’s user guide for the model: the bundled help plugin’s backend, in-process. One
read-only tool, byob_help(topic?, section?, start?, query?):
- no arguments: the topics, one line each;
topic: that doc, a window ofMAX_CHARSat a time (start), or onesection;query: the best-matching sections across every doc (keyword scoring).
The docs are copies of byob’s user docs (README.md’s Install/Use parts, docs/mail.md, …)
kept in this crate’s docs/ so a published crate carries them. cargo xtask help-docs
writes them from the repo’s files (the one source of truth) and cargo xtask ci fails
when a copy is stale. They are byob’s own text, so results aren’t framed as outside data.
The plugin’s manifest (crates/bundled/plugins/help) names it with
"backend": {"native": "help"}; the app registers factory under ID.
Structs§
- Help
- The backend (stateless: the docs are compiled in).
- Section
- One
##or###section of a doc: its heading and its text (heading line included; a##section’s text runs over its###ones). - Topic
- One doc.
Constants§
- ID
- The id manifests name (
"backend": {"native": "help"}). - MAX_
CHARS - Most characters of doc text one call returns.
- MAX_
HITS - Most sections a query returns.
- TOOL
- The tool it serves.
Statics§
- TOPICS
- Every doc, in the order they’re listed.
Functions§
- factory
- help
- The tool: its text for the model, or the error sentence.
- sections
- The sections of
text, in order; the part before the first##is a level-1 section headed by the title. Headings inside code fences don’t count. - topic_
list - “Topics: …” with a line each.