project

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive(projectPath, archivePath string) error

func Restore

func Restore(archivePath, destination string) error

func ValidatePath

func ValidatePath(path string) error

ValidatePath rejects empty paths and parent-directory traversal segments.

Types

type Asset

type Asset struct {
	Path     string `json:"path"`
	Kind     string `json:"kind"`
	Imported bool   `json:"imported"`
}

Asset is a pre-existing local research asset discovered before import.

func DiscoverAssets

func DiscoverAssets(repoRoot, projectPath string) ([]Asset, error)

DiscoverAssets finds pre-existing local research assets and records discovery Provenance without importing them.

type CreateOptions

type CreateOptions struct {
	Title   string
	Clock   func() time.Time
	EventID func(time.Time) string
}

CreateOptions configures project creation.

type Event

type Event = provenance.Event

Event is a provenance event recorded in a ResearchForge project.

func ReadEvents

func ReadEvents(path string) ([]Event, error)

ReadEvents reads provenance events from a ResearchForge project.

type HealthCheck

type HealthCheck struct {
	Name    string `json:"name"`
	OK      bool   `json:"ok"`
	Message string `json:"message"`
	Action  string `json:"action"`
}

HealthCheck is one actionable Research project health check.

type HealthReport

type HealthReport struct {
	Checks []HealthCheck `json:"checks"`
}

HealthReport summarizes Research project health.

func CheckHealth

func CheckHealth(path string) HealthReport

CheckHealth checks Research project invariants without checking the host environment.

type Project

type Project struct {
	Path                string
	Title               string
	StorageMode         string
	SchemaVersion       string
	ManifestPath        string
	LockfilePath        string
	ProvenancePath      string
	StoragePath         string
	ArchiveMetadataPath string
}

Project is a local ResearchForge workspace.

func Create

func Create(path string, opts CreateOptions) (Project, error)

Create initializes a ResearchForge project workspace.

func Inspect

func Inspect(path string) (Project, error)

Inspect reads a ResearchForge project workspace.

func List

func List(root string) ([]Project, error)

List reads ResearchForge projects directly under root.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL