2026-11-26 04:21:24 +00:00
|
|
|
// Package preflight coordinates read-only checks of intended prompt requests.
|
|
|
|
|
package preflight
|
|
|
|
|
|
|
|
|
|
import "gitea.maximumdirect.net/eric/narratio/internal/adapters/scriptorium"
|
|
|
|
|
|
|
|
|
|
// Binding identifies an intended prompt input and the source that supplies it.
|
|
|
|
|
type Binding struct {
|
|
|
|
|
SourceID string
|
|
|
|
|
Required bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Target identifies a concrete prompt request and its intended inputs.
|
|
|
|
|
type Target struct {
|
|
|
|
|
Stage string
|
|
|
|
|
Artifact string
|
|
|
|
|
Context scriptorium.RequestContext
|
|
|
|
|
Inputs map[string]Binding
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Severity string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
SeverityError Severity = "error"
|
|
|
|
|
SeverityWarning Severity = "warning"
|
|
|
|
|
SeverityInfo Severity = "info"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Finding reports a contextual result of requirements inspection.
|
|
|
|
|
type Finding struct {
|
2026-11-26 04:22:45 +00:00
|
|
|
Severity Severity
|
|
|
|
|
Stage string
|
|
|
|
|
Artifact string
|
|
|
|
|
PromptID string
|
|
|
|
|
Message string
|
|
|
|
|
Kind string
|
|
|
|
|
Name string
|
|
|
|
|
SourceID string
|
|
|
|
|
IssueCode string
|
|
|
|
|
InputName string
|
|
|
|
|
VariableName string
|
2026-11-26 04:21:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Result holds findings collected across inspected targets.
|
|
|
|
|
type Result struct {
|
|
|
|
|
Findings []Finding
|
|
|
|
|
}
|