Require captured repository lookups
This commit is contained in:
@@ -18,10 +18,6 @@ type RequirementInspectionRequest struct {
|
||||
SessionID string
|
||||
}
|
||||
|
||||
type requirementSnapshotRepository interface {
|
||||
GetRequirementSnapshot(id string) (prompt.RequirementSnapshot, bool)
|
||||
}
|
||||
|
||||
// InspectRequirements discovers prompt inputs and caller variables without
|
||||
// loading artifacts or performing execution preparation.
|
||||
func (r *Runner) InspectRequirements(
|
||||
@@ -61,11 +57,7 @@ func (r *Runner) InspectRequirements(
|
||||
return nil, &OperationError{Category: ErrPromptLoad, Cause: err}
|
||||
}
|
||||
|
||||
repository, ok := r.promptDefs.(requirementSnapshotRepository)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("%w: prompt repository does not provide captured requirement snapshots", ErrPromptLoad)
|
||||
}
|
||||
snapshot, ok := repository.GetRequirementSnapshot(selection.PromptID)
|
||||
snapshot, ok := r.promptDefs.GetRequirementSnapshot(selection.PromptID)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("%w: captured requirement snapshot is unavailable", ErrPromptLoad)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user