Expand description
On-demand instruction disclosure (help) — the asd half of the
cross-binary help system shared with ctx (CTXone).
Feature docs are compiled INTO the binary, so help always describes the
exact code that is running (version-pinned, immutable, cannot drift). They
are served through the MCP help tool and the asd help CLI. Lives in
core because both the -cli and -mcp crates depend on it and must
return byte-identical docs.
Cross-binary contract (must match ctx): each binary publishes a
lightweight manifest (feature -> synopsis -> owner -> version) into the
shared index at $AGENTSTATE_HELP_INDEX (default
$HOME/.config/agentstate/help-index.json), keyed by tool name so ctx
and asd own separate slices. A unified help reads the union.
Structs§
- HelpDoc
- One feature’s compiled documentation.
featurematches the tool/CLI name so lookups are stable. - Help
Param
Constants§
- OWNER
- Which binary owns these docs. Written into the manifest so a unified
helpcan routehelp <feature>to the tool that implements it. - REGISTRY
- The compiled registry. Discoverability-forward hot core; the no-arg catalog surfaces all of it so agents reach for features they’d otherwise miss.
Functions§
- catalog
- Grouped catalog for the no-arg overview — every feature.
- manifest
- The lightweight manifest this binary publishes to the shared help index.
- resolve
- Local resolve with a cross-binary proxy fallback: if
topicdoesn’t match any local feature, consult the shared index for other tools and ask the owning binary directly (e.g. asd proxies an unknown topic toctx help). - respond
- The response for the
helptool / CLI.topicNone or empty -> catalog. - version
- Version of the running binary — stamped into every response so an agent (or a stale manifest) can detect a mismatch against the code it is calling.