@@ -2,6 +2,7 @@ package proposal
22
33import (
44 "context"
5+ "time"
56
67 agenticv1alpha1 "github.com/openshift/lightspeed-agentic-operator/api/v1alpha1"
78)
@@ -42,18 +43,18 @@ type EscalationOutput struct {
4243// HTTP implementations POST to /v1/agent/run — a step-agnostic
4344// endpoint where all workflow context is in the request payload.
4445type AgentCaller interface {
45- Analyze (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , requestText string , serviceAccount string ) (* AnalysisOutput , error )
46- Execute (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , option * agenticv1alpha1.RemediationOption , serviceAccount string ) (* ExecutionOutput , error )
47- Verify (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , option * agenticv1alpha1.RemediationOption , exec * ExecutionOutput , serviceAccount string ) (* VerificationOutput , error )
48- Escalate (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , requestText string , serviceAccount string ) (* EscalationOutput , error )
46+ Analyze (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , requestText string , serviceAccount string , timeout time. Duration ) (* AnalysisOutput , error )
47+ Execute (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , option * agenticv1alpha1.RemediationOption , serviceAccount string , timeout time. Duration ) (* ExecutionOutput , error )
48+ Verify (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , option * agenticv1alpha1.RemediationOption , exec * ExecutionOutput , serviceAccount string , timeout time. Duration ) (* VerificationOutput , error )
49+ Escalate (ctx context.Context , proposal * agenticv1alpha1.Proposal , step resolvedStep , requestText string , serviceAccount string , timeout time. Duration ) (* EscalationOutput , error )
4950 ReleaseSandboxes (ctx context.Context , proposal * agenticv1alpha1.Proposal ) error
5051}
5152
5253// StubAgentCaller returns canned success results. Wire in a real
5354// implementation (sandbox + HTTP) when the agent infrastructure is ready.
5455type StubAgentCaller struct {}
5556
56- func (s * StubAgentCaller ) Analyze (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ string , _ string ) (* AnalysisOutput , error ) {
57+ func (s * StubAgentCaller ) Analyze (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ string , _ string , _ time. Duration ) (* AnalysisOutput , error ) {
5758 return & AnalysisOutput {
5859 Success : true ,
5960 Options : []agenticv1alpha1.RemediationOption {{
@@ -73,7 +74,7 @@ func (s *StubAgentCaller) Analyze(_ context.Context, _ *agenticv1alpha1.Proposal
7374 }, nil
7475}
7576
76- func (s * StubAgentCaller ) Execute (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ * agenticv1alpha1.RemediationOption , _ string ) (* ExecutionOutput , error ) {
77+ func (s * StubAgentCaller ) Execute (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ * agenticv1alpha1.RemediationOption , _ string , _ time. Duration ) (* ExecutionOutput , error ) {
7778 return & ExecutionOutput {
7879 Success : true ,
7980 ActionsTaken : []agenticv1alpha1.ExecutionAction {{
@@ -88,7 +89,7 @@ func (s *StubAgentCaller) Execute(_ context.Context, _ *agenticv1alpha1.Proposal
8889 }, nil
8990}
9091
91- func (s * StubAgentCaller ) Escalate (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ string , _ string ) (* EscalationOutput , error ) {
92+ func (s * StubAgentCaller ) Escalate (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ string , _ string , _ time. Duration ) (* EscalationOutput , error ) {
9293 return & EscalationOutput {
9394 Success : true ,
9495 Summary : "Stub escalation summary" ,
@@ -100,7 +101,7 @@ func (s *StubAgentCaller) ReleaseSandboxes(_ context.Context, _ *agenticv1alpha1
100101 return nil
101102}
102103
103- func (s * StubAgentCaller ) Verify (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ * agenticv1alpha1.RemediationOption , _ * ExecutionOutput , _ string ) (* VerificationOutput , error ) {
104+ func (s * StubAgentCaller ) Verify (_ context.Context , _ * agenticv1alpha1.Proposal , _ resolvedStep , _ * agenticv1alpha1.RemediationOption , _ * ExecutionOutput , _ string , _ time. Duration ) (* VerificationOutput , error ) {
104105 return & VerificationOutput {
105106 Success : true ,
106107 Checks : []agenticv1alpha1.VerifyCheck {{
0 commit comments