Add Scriptorium prompt requirements inspection
This commit is contained in:
@@ -19,6 +19,51 @@ const (
|
||||
type Runner interface {
|
||||
RunArtifact(ctx context.Context, req RunArtifactRequest) (ArtifactResult, error)
|
||||
RenderArtifact(ctx context.Context, req RenderArtifactRequest) (ArtifactResult, error)
|
||||
InspectRequirements(ctx context.Context, req RequirementsRequest) (RequirementsReport, error)
|
||||
}
|
||||
|
||||
// RequirementsRequest selects a prompt and variables for read-only discovery.
|
||||
type RequirementsRequest struct {
|
||||
Binary string
|
||||
ConfigPath string
|
||||
PromptID string
|
||||
ProfileID string
|
||||
Vars map[string]string
|
||||
Credentials []configkit.Secret
|
||||
WorkingDir string
|
||||
Timeout time.Duration
|
||||
}
|
||||
|
||||
type RequirementsReport struct {
|
||||
PromptID string `json:"prompt_id"`
|
||||
ProfileID string `json:"profile_id"`
|
||||
Complete bool `json:"complete"`
|
||||
Inputs []RequirementInput `json:"inputs"`
|
||||
Variables []RequirementVariable `json:"variables"`
|
||||
Issues []RequirementIssue `json:"issues"`
|
||||
}
|
||||
|
||||
type RequirementInput struct {
|
||||
Name string `json:"name"`
|
||||
Kind string `json:"kind"`
|
||||
Declared bool `json:"declared"`
|
||||
ContentType *string `json:"content_type"`
|
||||
Description *string `json:"description"`
|
||||
Explanation string `json:"explanation"`
|
||||
}
|
||||
|
||||
type RequirementVariable struct {
|
||||
Name string `json:"name"`
|
||||
Kind string `json:"kind"`
|
||||
Supplied bool `json:"supplied"`
|
||||
Explanation string `json:"explanation"`
|
||||
}
|
||||
|
||||
type RequirementIssue struct {
|
||||
Code string `json:"code"`
|
||||
InputName string `json:"input_name"`
|
||||
VariableName string `json:"variable_name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// RunArtifactRequest describes a production artifact-generation invocation.
|
||||
|
||||
Reference in New Issue
Block a user