Documentation
¶
Index ¶
- func IsolatedGitEnv() []string
- func ResolveClonePath(projectPath, name string) (string, error)
- func SaveInventoryManifest(path string, manifest InventoryManifest) error
- func WriteStudyNote(projectPath, name, area string) (string, error)
- type AreaReport
- type CloneRequest
- type CloneResult
- type CloneRunner
- type GitCloneRunner
- type GitHubMetadataOptions
- type InventoryDriftResult
- type InventoryEntry
- type InventoryManifest
- type InventoryPolicyOptions
- type InventoryPolicyResult
- type InventoryRefreshResult
- type InventoryReport
- type InventoryReportOptions
- type InventoryRoadmapImplementationSlice
- type InventoryRoadmapReport
- type InventoryRoadmapSlice
- type InventoryValidationResult
- type LicenseDetection
- type OSSRepositoryStudy
- type RefreshMetadata
- type Registry
- type RepositoryStudyInput
- type SearchPlan
- type SearchProviderPlan
- type TopicScan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsolatedGitEnv ¶ added in v0.2.0
func IsolatedGitEnv() []string
IsolatedGitEnv returns the current environment without the variables that would make a git subprocess act on the caller's repository (for example when rforge runs inside a Git hook of a linked worktree).
func ResolveClonePath ¶
ResolveClonePath returns the safe local clone location for owner/repo.
func SaveInventoryManifest ¶
func SaveInventoryManifest(path string, manifest InventoryManifest) error
SaveInventoryManifest writes a machine-readable OSS inventory manifest.
func WriteStudyNote ¶
WriteStudyNote writes a safe study-note template for an OSS repository and area.
Types ¶
type AreaReport ¶
AreaReport is a markdown OSS study report for one research area.
func BuildAreaReport ¶
func BuildAreaReport(projectPath string, registry Registry, area string) (AreaReport, error)
BuildAreaReport summarizes registered repositories for a research area.
type CloneRequest ¶
CloneRequest describes a deterministic shallow repository clone operation.
func (CloneRequest) Args ¶
func (r CloneRequest) Args() []string
Args renders git clone arguments without invoking a shell.
type CloneResult ¶
CloneResult describes a completed local clone registration.
func CloneRepository ¶
func CloneRepository(ctx context.Context, projectPath, name, remoteURL string, runner CloneRunner) (CloneResult, error)
CloneRepository resolves a safe clone path and invokes the provided shallow clone runner.
type CloneRunner ¶
type CloneRunner interface {
Clone(context.Context, CloneRequest) error
}
CloneRunner runs a repository clone through an injectable boundary.
type GitCloneRunner ¶
type GitCloneRunner struct{}
GitCloneRunner runs git clone directly without shell interpolation.
func (GitCloneRunner) Clone ¶
func (GitCloneRunner) Clone(ctx context.Context, request CloneRequest) error
Clone executes git clone for the request.
type GitHubMetadataOptions ¶
GitHubMetadataOptions configures inventory metadata refresh from a GitHub-compatible API.
type InventoryDriftResult ¶
type InventoryDriftResult struct {
EntryCount int `json:"entryCount"`
NoteCount int `json:"noteCount"`
Issues []string `json:"issues"`
Markdown string `json:"markdown"`
}
InventoryDriftResult reports mismatches between manifest entries and inventory notes.
func CheckInventoryDrift ¶
func CheckInventoryDrift(manifestPath string) (InventoryDriftResult, error)
CheckInventoryDrift compares manifest metadata with referenced Markdown note content.
func (InventoryDriftResult) Contains ¶
func (r InventoryDriftResult) Contains(substr string) bool
Contains reports whether an issue contains the provided substring.
type InventoryEntry ¶
type InventoryEntry struct {
ID string `json:"id"`
Name string `json:"name"`
Repository string `json:"repository,omitempty"`
URL string `json:"url,omitempty"`
Area string `json:"area"`
Disposition string `json:"disposition"`
LicensePolicy string `json:"licensePolicy"`
Note string `json:"note"`
Risk string `json:"risk"`
NextSlice string `json:"nextSlice"`
Stars int `json:"stars,omitempty"`
Forks int `json:"forks,omitempty"`
LicenseSPDX string `json:"licenseSPDX,omitempty"`
Archived bool `json:"archived,omitempty"`
PushedAt string `json:"pushedAt,omitempty"`
MetadataRefreshedAt string `json:"metadataRefreshedAt,omitempty"`
}
InventoryEntry describes one studied OSS tool/source and its governance metadata.
type InventoryManifest ¶
type InventoryManifest struct {
SchemaVersion string `json:"schemaVersion"`
Entries []InventoryEntry `json:"entries"`
}
InventoryManifest is the committed machine-readable OSS inventory index.
func LoadInventoryManifest ¶
func LoadInventoryManifest(path string) (InventoryManifest, error)
LoadInventoryManifest reads a machine-readable OSS inventory manifest.
type InventoryPolicyOptions ¶
InventoryPolicyOptions configures policy checks over refreshed inventory metadata.
type InventoryPolicyResult ¶
type InventoryPolicyResult struct {
EntryCount int `json:"entryCount"`
Issues []string `json:"issues"`
Markdown string `json:"markdown"`
}
InventoryPolicyResult reports stale/license/archive policy issues.
func CheckInventoryPolicy ¶
func CheckInventoryPolicy(manifest InventoryManifest, opts InventoryPolicyOptions) InventoryPolicyResult
CheckInventoryPolicy evaluates refreshed OSS inventory metadata for governance risks.
func (InventoryPolicyResult) Contains ¶
func (r InventoryPolicyResult) Contains(substr string) bool
Contains reports whether an issue contains the provided substring.
type InventoryRefreshResult ¶
type InventoryRefreshResult struct {
Refreshed int `json:"refreshed"`
Skipped int `json:"skipped"`
Issues []string `json:"issues"`
}
InventoryRefreshResult reports an inventory metadata refresh outcome.
func RefreshInventoryGitHubMetadata ¶
func RefreshInventoryGitHubMetadata(path string, opts GitHubMetadataOptions) (InventoryRefreshResult, error)
RefreshInventoryGitHubMetadata refreshes GitHub repository metadata in-place for manifest entries with owner/repo repositories.
type InventoryReport ¶
type InventoryReport struct {
EntryCount int `json:"entryCount"`
Area string `json:"area,omitempty"`
Markdown string `json:"markdown"`
}
InventoryReport is a generated Markdown ecosystem report.
func BuildInventoryReport ¶
func BuildInventoryReport(manifest InventoryManifest, opts InventoryReportOptions) InventoryReport
BuildInventoryReport renders a deterministic Markdown report from an inventory manifest.
type InventoryReportOptions ¶
type InventoryReportOptions struct {
Area string
}
InventoryReportOptions filters an OSS inventory ecosystem report.
type InventoryRoadmapReport ¶
type InventoryRoadmapReport struct {
Areas map[string][]InventoryRoadmapSlice `json:"areas"`
CoverageGaps []string `json:"coverageGaps"`
SuggestedSlices []InventoryRoadmapImplementationSlice `json:"suggestedSlices"`
Markdown string `json:"markdown"`
}
func BuildInventoryRoadmapReport ¶
func BuildInventoryRoadmapReport(manifestPath, todoPath string) (InventoryRoadmapReport, error)
func (InventoryRoadmapReport) ContainsGap ¶
func (r InventoryRoadmapReport) ContainsGap(substr string) bool
type InventoryRoadmapSlice ¶
type InventoryValidationResult ¶
type InventoryValidationResult struct {
EntryCount int `json:"entryCount"`
Issues []string `json:"issues"`
}
InventoryValidationResult reports deterministic inventory manifest validation.
func ValidateInventoryManifest ¶
func ValidateInventoryManifest(path string) (InventoryValidationResult, error)
ValidateInventoryManifest verifies the OSS inventory manifest and referenced notes.
func (InventoryValidationResult) Contains ¶
func (r InventoryValidationResult) Contains(substr string) bool
Contains reports whether an issue contains the provided substring.
type LicenseDetection ¶
LicenseDetection describes a detected repository license file.
func DetectLicenseFile ¶
func DetectLicenseFile(repoPath string) (LicenseDetection, error)
DetectLicenseFile detects common license files and a small set of license kinds.
type OSSRepositoryStudy ¶
type OSSRepositoryStudy struct {
SchemaVersion string
Name string
Owner string
Repo string
ClonePath string
Area string
RefreshInterval string
Archived bool
Stale bool
}
OSSRepositoryStudy tracks one external open-source repository under study.
func NewRepositoryStudy ¶
func NewRepositoryStudy(input RepositoryStudyInput) (OSSRepositoryStudy, error)
NewRepositoryStudy validates owner/repo names and creates study metadata.
type RefreshMetadata ¶
RefreshMetadata stores scheduled refresh, stale, and archived metadata for a repository.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry stores OSSRepositoryStudy records in a local JSON file.
func OpenRegistry ¶
OpenRegistry opens a JSON-backed OSS registry.
func (Registry) Add ¶
func (r Registry) Add(study OSSRepositoryStudy) error
Add inserts a repository study if not already present.
func (Registry) List ¶
func (r Registry) List() ([]OSSRepositoryStudy, error)
List returns repository studies sorted by name.
func (Registry) RefreshMetadata ¶
func (r Registry) RefreshMetadata(name string, metadata RefreshMetadata) error
RefreshMetadata updates registry metadata for one repository.
type RepositoryStudyInput ¶
type RepositoryStudyInput struct {
Name string
Area string
RefreshInterval string
Archived bool
Stale bool
}
RepositoryStudyInput is caller-provided OSS repository study metadata.
type SearchPlan ¶ added in v0.1.6
type SearchPlan struct {
SchemaVersion string `json:"schemaVersion"`
Query string `json:"query"`
Ecosystem string `json:"ecosystem"`
Providers []SearchProviderPlan `json:"providers"`
}
SearchPlan is a deterministic multi-provider OSS discovery plan.
func BuildSearchPlan ¶ added in v0.1.6
func BuildSearchPlan(query, ecosystem string) (SearchPlan, error)
BuildSearchPlan builds a source-coverage-first plan across code forges, package registries, archival indexes, and dependency/security databases.
type SearchProviderPlan ¶ added in v0.1.6
type SearchProviderPlan struct {
Provider string `json:"provider"`
Kind string `json:"kind"`
Query string `json:"query"`
URL string `json:"url"`
Signals []string `json:"signals"`
HumanGate string `json:"humanGate"`
Notes string `json:"notes"`
}
SearchProviderPlan describes one provider/query an agent can use to discover open-source projects without committing to cloning or integrating them.
type TopicScan ¶
TopicScan records metadata for a topic-oriented scan of an OSS repository.
func WriteTopicScan ¶
WriteTopicScan writes deterministic scan metadata without copying external source code.