Documentation
¶
Overview ¶
Package depcheck periodically checks registered anvils for outdated dependencies, starting with Go and designed to support additional ecosystems (.NET, npm) in the future. When updates are found it creates beads so a Smith agent can apply them. Patch/minor updates produce auto-dispatch beads; major version bumps produce "needs attention" beads.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeadTitle ¶
BeadTitle returns the standardized bead title for a dependency update. Format: "Deps(<ecosystem>): update <package> <old> → <new>"
func DedupCheck ¶
func DedupCheck(ctx context.Context, db *state.DB, anvilPath, anvilName, packageName, ecosystem string) bool
DedupCheck returns true if a bead for the given package already exists (open, in-progress, or recently closed within 7 days), or if an open PR references a bead that mentions the package. This prevents duplicate dependency update beads from accumulating.
For checking many packages in a single cycle, prefer building a DedupCache with BuildDedupCache and calling DedupCheckWithCache to avoid per-package external-command fanout.
func DedupCheckWithCache ¶
func DedupCheckWithCache(cache *DedupCache, packageName string) bool
DedupCheckWithCache checks whether a package already has an existing bead using pre-fetched data from BuildDedupCache.
Types ¶
type CheckResult ¶
type CheckResult struct {
Anvil string
Path string
Ecosystem string // e.g. "Go", ".NET", "npm"
Patch []ModuleUpdate // patch updates (auto-bead)
Minor []ModuleUpdate // minor updates (auto-bead)
Major []ModuleUpdate // major version bumps (needs attention)
Error error
Checked time.Time
}
CheckResult holds the depcheck results for a single anvil.
type DedupCache ¶
type DedupCache struct {
// contains filtered or unexported fields
}
DedupCache holds pre-fetched bead and PR data for a single anvil. Build once per depcheck cycle with BuildDedupCache, then query cheaply with DedupCheckWithCache instead of spawning external commands per module.
func BuildDedupCache ¶
BuildDedupCache fetches bead state once for an anvil, avoiding per-module external-command fanout in DedupCheckWithCache.
type ModuleUpdate ¶
type ModuleUpdate struct {
Path string // module/package path
Current string // current version
Latest string // latest available version
Kind string // "patch", "minor", or "major"
}
ModuleUpdate describes a single outdated dependency.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner checks anvils for outdated dependencies across all supported ecosystems.
func (*Scanner) ScanAll ¶
ScanAll runs dependency checks on all anvils across all supported ecosystems.
func (*Scanner) UpdateAnvilPaths ¶
UpdateAnvilPaths replaces the set of anvils to scan. This is safe to call while Run is active and takes effect on the next scan cycle.