Build shared prompt inspection targets
This commit is contained in:
40
internal/preflight/types.go
Normal file
40
internal/preflight/types.go
Normal file
@@ -0,0 +1,40 @@
|
||||
// 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 {
|
||||
Severity Severity
|
||||
Stage string
|
||||
Artifact string
|
||||
PromptID string
|
||||
Message string
|
||||
}
|
||||
|
||||
// Result holds findings collected across inspected targets.
|
||||
type Result struct {
|
||||
Findings []Finding
|
||||
}
|
||||
Reference in New Issue
Block a user