Documentation
¶
Overview ¶
Package auditshared holds analysis helpers shared by the discovery-metadata auditors (cmd/audit_1to1 R-META and cmd/audit_discovery_completeness): the projected-description probe, owner-package resolution, and the shared usage/description quality checks.
Index ¶
- func DiscoverActionSpecGroupBuilders(dir string) ([]string, error)
- func IsActionSpecGroupBuilderName(name string) bool
- func IsGenericUsage(usage string) bool
- func NewStubGitLabClient(token string) (*gitlabclient.Client, func(), error)
- func OwnerPackage(group tools.ActionSpecGroup, spec toolutil.ActionSpec) string
- func ProjectIndividualDescriptions(client *gitlabclient.Client) (map[string]string, error)
- func WeakIndividualDescription(spec toolutil.ActionSpec, projected map[string]string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverActionSpecGroupBuilders ¶
DiscoverActionSpecGroupBuilders scans the top-level non-test, non-generated .go files of dir for buildXxxActionSpecs builder functions and returns their sorted names. It fails on duplicate builder names and when no builders are found, so both the manifest generator and the catalog-first auditor agree on the same source of truth.
func IsActionSpecGroupBuilderName ¶
IsActionSpecGroupBuilderName reports whether a function name follows the buildXxxActionSpecs convention used by the per-domain catalog builders.
func IsGenericUsage ¶
IsGenericUsage reports whether the Usage string is the placeholder template or empty.
func NewStubGitLabClient ¶
func NewStubGitLabClient(token string) (*gitlabclient.Client, func(), error)
NewStubGitLabClient builds a GitLab client pointed at an in-process HTTP stub that answers every request with a fixed version payload. Generators and auditors use it to register the tool catalog offline. The returned cleanup func shuts the stub server down.
func OwnerPackage ¶
func OwnerPackage(group tools.ActionSpecGroup, spec toolutil.ActionSpec) string
OwnerPackage resolves the owning package for an action: the spec override wins, then the group owner, then the group base domain.
func ProjectIndividualDescriptions ¶
func ProjectIndividualDescriptions(client *gitlabclient.Client) (map[string]string, error)
ProjectIndividualDescriptions registers the individual-tool surface on an in-memory MCP server and returns the projected description per tool name — the exact text the model consumes.
func WeakIndividualDescription ¶
func WeakIndividualDescription(spec toolutil.ActionSpec, projected map[string]string) bool
WeakIndividualDescription reports whether the effective individual-tool description the model sees lacks the norm's "Returns: … See also: …" form. The effective description is the projected mcp.Tool.Description (which already resolves the curated-description fallback chain), so this avoids false positives from specs that omit IndividualTool.Description yet still project a good curated one.
Types ¶
This section is empty.