ingest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ingest declares the core port used to turn a source corpus into a validated knowledge graph. Implementations live in driven adapters (for example internal/graphify); the tenant domain depends only on this contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOptions

type AddOptions struct {
	URL         string
	TargetDir   string
	Author      string
	Contributor string
	WorkingDir  string
	Timeout     time.Duration
}

AddOptions describes one public source to materialize in a corpus.

type AddResult

type AddResult struct {
	Artifact string
	Result   Result
}

AddResult identifies the artifact created by an ingest engine.

type Engine

type Engine interface {
	Preflight(context.Context) (string, error)
	Add(context.Context, AddOptions) (AddResult, error)
	Extract(context.Context, ExtractOptions) (GraphStats, Result, error)
}

Engine is the port driven by tenant bootstrap.

type ExtractOptions

type ExtractOptions struct {
	CorpusDir      string
	OutputDir      string
	WorkingDir     string
	Backend        string
	Model          string
	Mode           string
	MaxWorkers     int
	TokenBudget    int
	MaxConcurrency int
	APITimeout     time.Duration
	Timeout        time.Duration
	Force          bool
	NoCluster      bool
	// Env contains per-attempt credentials and routing overrides. Adapters must
	// pass it only to the child engine process and must not persist or log it.
	Env []string
}

ExtractOptions controls a headless semantic extraction.

type GraphStats

type GraphStats struct {
	Path  string `json:"path"`
	Nodes int    `json:"nodes"`
	Edges int    `json:"edges"`
}

GraphStats is the minimal machine-readable health view of a graph.

type Result

type Result struct {
	Stdout   string
	Stderr   string
	ExitCode int
	Duration time.Duration
	Err      error
}

Result is the implementation-neutral outcome of an engine invocation.

Jump to

Keyboard shortcuts

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