onboard

package
v0.1.0-dev.20260215013445 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package onboard implements the multi-phase onboarding pipeline for lore. It parses wiki pages or setup scripts and generates packages-manifest.yaml files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteManifest

func WriteManifest(result *Result, outputDir string) error

WriteManifest writes the manifest to a file.

Types

type ComplexityInfo

type ComplexityInfo struct {
	Rating   string   `json:"rating"` // simple, moderate, complex
	Concerns []string `json:"concerns"`
}

ComplexityInfo describes installation complexity.

type ExtractedSlot

type ExtractedSlot struct {
	Name        string   `json:"name"`
	Value       string   `json:"value"`
	Confidence  float64  `json:"confidence"`
	Source      string   `json:"source"`
	Platform    string   `json:"platform"`
	Annotations []string `json:"annotations,omitempty"`
}

ExtractedSlot represents a piece of extracted information.

type Options

type Options struct {
	Source     string                // URL or file path
	OutputDir  string                // Output directory (default: current)
	Format     string                // Manifest format: "plain" or "yaml"
	Verbose    bool                  // Show AI reasoning
	Explain    bool                  // Show detailed confidence decisions
	Provider   model.Provider        // AI provider
	RegClient  *lorepackage.Registry // Registry for prompts and matching
	MaxFetches int                   // Max additional URLs to fetch (default: 5)
}

Options controls onboarding behavior.

type PlatformInfo

type PlatformInfo struct {
	Darwin  *PlatformSupport `json:"darwin,omitempty"`
	Linux   *PlatformSupport `json:"linux,omitempty"`
	Windows *PlatformSupport `json:"windows,omitempty"`
}

PlatformInfo contains platform support information.

type PlatformSupport

type PlatformSupport struct {
	Supported     bool     `json:"supported"`
	Architectures []string `json:"architectures,omitempty"`
	Distributions []string `json:"distributions,omitempty"`
	MinVersion    string   `json:"min_version,omitempty"`
	Notes         string   `json:"notes,omitempty"`
}

PlatformSupport describes support for a specific platform.

type ProductInfo

type ProductInfo struct {
	Name          string `json:"name"`
	CanonicalName string `json:"canonical_name"`
	Category      string `json:"category"`
	Vendor        string `json:"vendor"`
	Version       string `json:"version,omitempty"`
	License       string `json:"license,omitempty"`
}

ProductInfo contains identified product information.

type Result

type Result struct {
	Product    *ProductInfo    `json:"product"`
	Sources    *SourceInfo     `json:"sources"`
	Platforms  *PlatformInfo   `json:"platforms"`
	Complexity *ComplexityInfo `json:"complexity"`
	Slots      []ExtractedSlot `json:"slots"`
	Manifest   string          `json:"manifest"` // Generated packages-manifest.yaml content
	Warnings   []string        `json:"warnings"`
}

Result contains the onboarding output.

func Run

func Run(ctx context.Context, opts Options) (*Result, error)

Run executes the onboarding pipeline.

type SourceInfo

type SourceInfo struct {
	Homepage        string   `json:"homepage"`
	Installation    []string `json:"installation"`
	Upgrade         []string `json:"upgrade"`
	Uninstall       []string `json:"uninstall"`
	Troubleshooting []string `json:"troubleshooting"`
	Repository      string   `json:"repository,omitempty"`
	Releases        string   `json:"releases,omitempty"`
}

SourceInfo contains discovered documentation URLs.

Jump to

Keyboard shortcuts

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