feat: implement runtime service with tool catalog and skill selection logic
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package executor
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
internalexecutor "cs-agent/internal/ai/runtime/internal/executor"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
inner *internalexecutor.Service
|
||||
}
|
||||
|
||||
func NewService() *Service {
|
||||
return &Service{
|
||||
inner: internalexecutor.NewService(),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Service) ExecuteRun(ctx context.Context, req RunInput) (*RunResult, error) {
|
||||
if s == nil || s.inner == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return s.inner.ExecuteRun(ctx, req)
|
||||
}
|
||||
|
||||
func (s *Service) ExecuteResume(ctx context.Context, req ResumeInput) (*RunResult, error) {
|
||||
if s == nil || s.inner == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return s.inner.ExecuteResume(ctx, req)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package executor
|
||||
|
||||
import internalexecutor "cs-agent/internal/ai/runtime/internal/executor"
|
||||
|
||||
// TODO 为什么要定义类型别名?
|
||||
type RunInput = internalexecutor.RunInput
|
||||
type ResumeInput = internalexecutor.ResumeInput
|
||||
type InterruptContextSummary = internalexecutor.InterruptContextSummary
|
||||
type RunResult = internalexecutor.RunResult
|
||||
Reference in New Issue
Block a user