Class: AgentEvalPlanner::Planner
- Inherits:
-
Object
- Object
- AgentEvalPlanner::Planner
- Defined in:
- lib/agent_eval_planner/planner.rb
Defined Under Namespace
Classes: Result
Constant Summary collapse
- DEFAULT_OPTIONS =
{ team: nil, agent_name: nil, tools: nil, declared_scope: nil, out_of_scope: nil, harness: "generic" }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(input_path: nil, raw: nil, **options) ⇒ Planner
constructor
A new instance of Planner.
Constructor Details
#initialize(input_path: nil, raw: nil, **options) ⇒ Planner
Returns a new instance of Planner.
16 17 18 19 20 |
# File 'lib/agent_eval_planner/planner.rb', line 16 def initialize(input_path: nil, raw: nil, **) @input_path = input_path @raw = raw @options = DEFAULT_OPTIONS.merge(.compact) end |
Instance Method Details
#call ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/agent_eval_planner/planner.rb', line 22 def call analyzer = ContractAnalyzer.new( source_path: input_path, raw: raw, agent_name: [:agent_name], tools: [:tools], declared_scope: [:declared_scope], out_of_scope: [:out_of_scope], harness: [:harness] ) vectors = VectorCatalog.vectors_for(analyzer) raise InputError, "Nenhum vetor aplicável encontrado." if vectors.empty? Result.new( plan: PlanRenderer.new(analyzer: analyzer, vectors: vectors, team: [:team]).render, suite: SuiteRenderer.new(analyzer: analyzer, vectors: vectors).render, remediations: RemediationRenderer.new(analyzer: analyzer, vectors: vectors, team: [:team]).render, analyzer: analyzer, vectors: vectors ) end |